    *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

    :root {
      --navy:      #1B3A5C;
      --navy-dark: #0D1F35;
      --navy-mid:  #264E73;
      --gold:      #E8A030;
      --gold-light:#F0B840;
      --light:     #E8EEF4;
      --bg:        #F5F7FA;
      --text:      #1B3A5C;
      --muted:     #6B8099;
      --bubble-ai: #ffffff;
      --bubble-user: #1B3A5C;
    }

    html, body {
      height: 100%;
      font-family: 'Inter', sans-serif;
      background: var(--navy-dark);
      color: var(--text);
    }

    /* ── LAYOUT ── */
    .app {
      display: flex;
      flex-direction: column;
      height: 100dvh;
      max-width: 780px;
      margin: 0 auto;
    }

    /* ── HEADER ── */
    header {
      background: var(--navy-dark);
      padding-top: env(safe-area-inset-top);
      padding-left: 16px;
      padding-right: 16px;
      padding-bottom: 0;
      height: calc(58px + env(safe-area-inset-top));
      display: flex;
      align-items: center;
      gap: 10px;
      border-bottom: 2px solid var(--gold);
      flex-shrink: 0;
      position: relative; z-index: 1000;
    }

    .logo-mark {
      display: flex;
      align-items: center;
      gap: 8px;
      text-decoration: none;
    }

    .logo-svg { width: 26px; height: 26px; }

    .header-title {
      font-size: 17px;
      font-weight: 700;
      color: #fff;
      letter-spacing: 0.2px;
    }

    .header-sub {
      font-size: 11px;
      color: var(--gold);
      margin-left: auto;
      font-weight: 600;
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }

    /* ── MOBILE REPORT BUTTON (header) ── */
    .header-report-btn {
      display: none; /* shown only on mobile when logged in */
      align-items: center; gap: 5px;
      background: rgba(232,160,48,0.15);
      border: 1px solid rgba(232,160,48,0.4);
      border-radius: 16px;
      padding: 5px 10px;
      color: var(--gold);
      font-size: 12px; font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .header-report-btn:active { background: rgba(232,160,48,0.28); }
    @media (max-width: 600px) {
      .header-report-btn.visible { display: flex; }
    }

    /* ── CHAT AREA ── */
    .chat-scroll {
      flex: 1;
      overflow-y: auto;
      padding: 20px 16px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    /* ── MESSAGES ── */
    .message {
      display: flex;
      gap: 10px;
      max-width: 100%;
      animation: fadeUp 0.2s ease;
    }

    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(8px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    .message.ai   { width: 100%; align-items: flex-start; }
    .message.ai .bubble { flex: 1; }
    .message.user { flex-direction: row-reverse; }

    .avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: 700;
    }

    .avatar.ai-av {
      background: var(--gold);
      color: var(--navy-dark);
    }

    .avatar.user-av {
      background: var(--navy-mid);
      color: #fff;
    }

    .bubble {
      max-width: calc(100% - 52px);
      padding: 12px 16px;
      border-radius: 16px;
      font-size: 15px;
      line-height: 1.55;
    }

    .message.ai .bubble {
      background: var(--bubble-ai);
      border-bottom-left-radius: 4px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.08);
      color: var(--text);
    }

    .message.user .bubble {
      background: var(--bubble-user);
      border-bottom-right-radius: 4px;
      color: #fff;
    }

    .bubble p { margin-bottom: 8px; }
    .bubble p:last-child { margin-bottom: 0; }
    .bubble strong { font-weight: 700; }

    .sources {
      margin-top: 10px;
      padding-top: 8px;
      border-top: 1px solid var(--light);
      font-size: 12px;
      color: var(--muted);
    }

    .sources a {
      display: inline-block;
      background: var(--light);
      border-radius: 4px;
      padding: 2px 7px;
      margin: 2px 3px 2px 0;
      font-weight: 600;
      color: var(--navy-mid);
      text-decoration: none;
      transition: background 0.15s, color 0.15s;
    }
    .sources a:hover {
      background: var(--gold);
      color: var(--navy-dark);
    }
    .cite-link {
      display: inline;
      background: rgba(197, 165, 90, 0.15);
      border-radius: 3px;
      padding: 0 4px;
      font-size: 12px;
      font-weight: 700;
      color: var(--navy-mid);
      text-decoration: none;
      border: 1px solid rgba(197, 165, 90, 0.4);
      transition: background 0.15s;
      white-space: nowrap;
    }
    .cite-link:hover {
      background: var(--gold);
      color: var(--navy-dark);
    }
    .bubble h2, .bubble h3 {
      font-size: 15px;
      font-weight: 700;
      margin: 10px 0 4px;
      color: var(--navy-dark);
    }
    .bubble ul, .bubble ol {
      padding-left: 18px;
      margin: 6px 0;
    }
    .bubble li { margin-bottom: 4px; }

    /* ── TYPING INDICATOR ── */
    .typing .bubble {
      display: flex;
      align-items: center;
      gap: 5px;
      padding: 14px 16px;
    }

    .dot {
      width: 7px; height: 7px;
      border-radius: 50%;
      background: var(--muted);
      animation: bounce 1.2s infinite;
    }
    .dot:nth-child(2) { animation-delay: 0.2s; }
    .dot:nth-child(3) { animation-delay: 0.4s; }

    @keyframes bounce {
      0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
      40% { transform: scale(1); opacity: 1; }
    }

    /* ── WELCOME ── */
    .welcome {
      text-align: center;
      padding: 32px 16px;
      color: var(--muted);
    }

    .welcome-icon {
      width: 56px; height: 56px;
      background: var(--gold);
      border-radius: 16px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 16px;
    }

    .welcome h2 {
      font-size: 20px;
      font-weight: 700;
      color: var(--navy);
      margin-bottom: 8px;
    }

    .welcome p {
      font-size: 14px;
      line-height: 1.5;
      max-width: 380px;
      margin: 0 auto 20px;
    }

    .suggestions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: center;
      max-width: 500px;
      margin: 0 auto;
    }

    .suggestion-btn {
      background: #fff;
      border: 1.5px solid var(--light);
      border-radius: 20px;
      padding: 8px 14px;
      font-size: 13px;
      color: var(--navy);
      cursor: pointer;
      transition: border-color 0.15s, background 0.15s;
      text-align: left;
      font-family: inherit;
    }

    .suggestion-btn:hover {
      border-color: var(--gold);
      background: #fffdf7;
    }

    /* Dark suggestion buttons inside contract section */
    #section-contract .suggestion-btn {
      background: #1e3a5f; color: #93c5fd;
      border-color: #2d5a8e; font-weight: 700;
    }
    #section-contract .suggestion-btn:hover {
      background: #264d7a; border-color: #4a7ab5;
    }

    /* Dark sections: contract Q&A, concierge, and trips */
    #section-contract, #section-concierge, #section-trip { background: var(--navy-dark); }

    /* ── Trips page dark-mode overrides ── */
    /* Upload zone */
    #section-trip .upload-zone h3 { color: #fff; }
    #section-trip .upload-zone p,
    #section-trip .upload-zone .upload-note { color: rgba(255,255,255,0.5); }
    #section-trip .upload-zone svg { filter: brightness(0) invert(1); opacity: 0.55; }
    /* Google Calendar UI */
    #section-trip .gcal-divider { color: rgba(255,255,255,0.4); }
    #section-trip .gcal-divider::before,
    #section-trip .gcal-divider::after { background: rgba(255,255,255,0.1); }
    #section-trip .gcal-compact-label { color: rgba(255,255,255,0.85); }
    #section-trip .gcal-last-sync { color: rgba(255,255,255,0.38); }
    #section-trip .gcal-compact-manage-btn { color: rgba(255,255,255,0.5); }
    #section-trip .gcal-status-msg { color: rgba(255,255,255,0.55); }
    #section-trip .gcal-status-msg.ok { color: #5edc8a; }
    #section-trip .gcal-manage-panel { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }
    #section-trip .gcal-cal-select { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); color: #fff; color-scheme: dark; }
    /* Calendar header */
    #section-trip .cal-month-title { color: #fff; }
    #section-trip .cal-share-btn { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.85); }
    #section-trip .cal-share-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }
    /* Calendar grid */
    #section-trip .cal-dow { color: rgba(255,255,255,0.38); }
    #section-trip .cal-cell { background: rgba(255,255,255,0.08); border-color: transparent; }
    #section-trip .cal-cell.cal-today { background: rgba(232,160,48,0.12); border-color: var(--gold); }
    #section-trip .cal-cell.cal-empty { background: transparent; border-color: transparent; }
    #section-trip .cal-day-num { color: rgba(255,255,255,0.75); }
    #section-trip .cal-cell.cal-today .cal-day-num { color: var(--gold); }
    /* Action buttons */
    #section-trip .cal-action-btn-add { background: var(--gold); color: var(--navy-dark); border-color: var(--gold); }
    #section-trip .cal-action-btn-add:hover { background: var(--gold-light); border-color: var(--gold-light); }
    #section-trip .cal-action-btn-test { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.22); }
    #section-trip .cal-action-btn-test:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.45); color: #fff; }
    #section-trip .cal-action-btn-gcal { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.22); }
    #section-trip .cal-action-btn-gcal:hover { background: rgba(66,133,244,0.18); border-color: #4285F4; color: #fff; }
    /* Gold-family trip palette — muted/softened for dark background */
    #section-trip .trip-c0 { background: #C4903A; }
    #section-trip .trip-c1 { background: #B07828; }
    #section-trip .trip-c2 { background: #CFA448; }
    #section-trip .trip-c3 { background: #A46C20; }
    #section-trip .trip-c4 { background: #D8B258; }
    #section-trip .trip-c5 { background: #9C6018; }
    #section-trip .trip-c6 { background: #C08C32; }
    #section-trip .trip-c7 { background: #BA9A48; }
    /* Help icon */
    #section-trip .btn-help-icon { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.65); }
    #section-trip .btn-help-icon:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
    /* "Upload another pairing" button */
    #section-trip .trip-new-btn { color: rgba(255,255,255,0.55); border-color: rgba(255,255,255,0.15); }
    #section-trip .trip-new-btn:hover { border-color: rgba(255,255,255,0.45); color: #fff; }
    /* Loading state */
    #section-trip .trip-loading-box p { color: rgba(255,255,255,0.55); }
    #section-trip .trip-spinner { border-color: rgba(255,255,255,0.15); border-top-color: var(--gold); }
    /* Conflict resolution */
    #section-trip .tcb-title { color: #fff; }
    #section-trip .tcb-desc { color: rgba(255,255,255,0.6); }
    #section-trip .tcb-trip-card { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.1); }
    #section-trip .tcb-trip-id { color: #fff; }
    #section-trip .tcb-trip-dates,
    #section-trip .tcb-trip-route,
    #section-trip .tcb-vs { color: rgba(255,255,255,0.5); }
    #section-trip .tcb-btn-cancel { border-color: rgba(255,255,255,0.18); color: rgba(255,255,255,0.65); }
    #section-trip .tcb-btn-cancel:hover { border-color: rgba(255,255,255,0.5); color: #fff; background: rgba(255,255,255,0.05); }

    /* ── INPUT AREA ── */
    .input-area {
      background: #fff;
      border-top: 1px solid var(--light);
      padding: 12px 16px;
      flex-shrink: 0;
    }
    /* Dark input area for contract section */
    #section-contract .input-area {
      background: var(--navy-dark);
      border-top-color: rgba(255,255,255,0.1);
    }

    .input-row {
      display: flex;
      gap: 10px;
      align-items: flex-end;
      max-width: 100%;
    }

    textarea {
      flex: 1;
      border: 1.5px solid var(--light);
      border-radius: 24px;
      padding: 11px 18px;
      font-size: 15px;
      font-family: inherit;
      resize: none;
      outline: none;
      max-height: 120px;
      min-height: 46px;
      line-height: 1.4;
      color: var(--text);
      background: var(--bg);
      transition: border-color 0.15s;
      overflow-y: auto;
    }

    textarea:focus { border-color: var(--gold); }
    textarea::placeholder { color: var(--muted); }
    textarea:disabled {
      background: var(--light); color: var(--muted);
      cursor: not-allowed; border-color: var(--light);
    }

    /* Dark textarea inside contract section */
    #section-contract textarea {
      background: rgba(255,255,255,0.07); color: #fff;
      border-color: rgba(255,255,255,0.12);
    }
    #section-contract textarea:focus { border-color: var(--gold); }
    #section-contract textarea::placeholder { color: rgba(255,255,255,0.35); }

    .contract-lock-bar {
      background: #FFF8E7; border-top: 1px solid #F0DFA0;
      padding: 9px 16px; font-size: 12px; color: #8B6914;
      text-align: center; flex-shrink: 0; line-height: 1.5;
    }

    .send-btn {
      width: 46px;
      height: 46px;
      border-radius: 50%;
      background: var(--navy);
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      transition: background 0.15s;
    }

    .send-btn:hover { background: var(--navy-mid); }
    .send-btn:disabled { background: var(--light); cursor: not-allowed; }
    .send-btn svg { width: 20px; height: 20px; fill: #fff; }
    .send-btn:disabled svg { fill: var(--muted); }

    .input-note {
      font-size: 11px;
      color: var(--muted);
      text-align: center;
      margin-top: 6px;
    }

    /* ── LOGIN OVERLAY ── */
    .login-overlay {
      position: fixed; inset: 0; z-index: 1010;
      background: linear-gradient(160deg, #0D1F35 0%, #1B3A5C 60%, #264E73 100%);
      display: flex; align-items: center; justify-content: center;
      padding: 24px;
      transition: opacity 0.4s ease;
    }
    .login-overlay.hidden { opacity: 0; pointer-events: none; }
    .login-card {
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(232,160,48,0.3);
      border-radius: 24px;
      padding: 40px 36px 36px;
      width: 100%; max-width: 420px;
      box-shadow: 0 24px 80px rgba(0,0,0,0.5);
      text-align: center;
    }
    .login-logo {
      display: flex; align-items: center; justify-content: center; gap: 10px;
      margin-bottom: 28px;
    }
    .login-logo span {
      font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.3px;
    }
    .login-card h2 {
      font-size: 20px; font-weight: 700; color: #fff;
      margin-bottom: 8px; letter-spacing: -0.2px;
    }
    .login-card p {
      font-size: 14px; color: rgba(255,255,255,0.5);
      margin-bottom: 28px; line-height: 1.5;
    }
    .login-input {
      width: 100%; padding: 14px 16px;
      background: rgba(255,255,255,0.08);
      border: 1.5px solid rgba(255,255,255,0.15);
      border-radius: 12px; color: #fff; font-size: 15px;
      outline: none; margin-bottom: 12px;
      transition: border-color 0.2s;
    }
    .login-input::placeholder { color: rgba(255,255,255,0.35); }
    .login-input:focus { border-color: #E8A030; }
    .login-input.input-error { border-color: #f87171 !important; background: rgba(248,113,113,0.08); }
    .login-input.input-error:focus { border-color: #f87171 !important; }
    .login-btn {
      width: 100%; padding: 14px;
      background: #E8A030; color: #0D1F35;
      font-size: 15px; font-weight: 700;
      border: none; border-radius: 12px; cursor: pointer;
      transition: background 0.2s, transform 0.1s;
    }
    .login-btn:hover { background: #F0B840; transform: translateY(-1px); }
    .login-btn:active { transform: translateY(0); }
    .login-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
    .login-error {
      margin-top: 14px; padding: 12px 16px;
      background: rgba(224,92,92,0.15);
      border: 1px solid rgba(224,92,92,0.4);
      border-radius: 10px;
      font-size: 13px; color: #ff9999;
      display: none;
    }
    .login-note {
      margin-top: 20px; font-size: 12px;
      color: rgba(255,255,255,0.25);
    }
    /* ── Profile card account sections ── */
    .ps-email-row {
      display: flex; align-items: center; gap: 8px;
      background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
      border-radius: 10px; padding: 11px 14px; margin-bottom: 20px;
    }
    .ps-email-label { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0; }
    .ps-email-value { font-size: 13px; color: rgba(255,255,255,0.85); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ps-section-divider {
      border: none; border-top: 1px solid rgba(255,255,255,0.1);
      margin: 24px 0 20px;
    }
    .ps-section-title {
      font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.5);
      text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 14px;
      text-align: left;
    }
    .login-btn.secondary {
      background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.8);
      border: 1px solid rgba(255,255,255,0.18);
    }
    .login-btn.secondary:hover { background: rgba(255,255,255,0.14); }
    .login-btn.danger-btn {
      background: rgba(224,92,92,0.12); color: #ff9999;
      border: 1px solid rgba(224,92,92,0.35);
    }
    .login-btn.danger-btn:hover { background: rgba(224,92,92,0.22); }
    .ps-success {
      margin-top: 12px; padding: 10px 14px; border-radius: 8px;
      background: rgba(26,107,90,0.2); border: 1px solid rgba(26,107,90,0.4);
      font-size: 13px; color: #7fdbc9; display: none; text-align: left;
    }
    .login-contact-link {
      background: none; border: none; cursor: pointer;
      color: var(--gold); font-size: 12px; font-weight: 600;
      text-decoration: underline; padding: 0;
      transition: color 0.2s;
    }
    .login-contact-link:hover { color: var(--gold-light); }
    /* ── Friends & Family account gating ──────────────────────────────── */
    /* Hide crew-only UI elements when account_type === 'family' */
    body.acct-family #trip-upload-state          { display: none !important; }
    body.acct-family .cal-action-btn-add         { display: none !important; }
    body.acct-family .cal-action-btn-test        { display: none !important; }
    body.acct-family .cal-action-btn-gcal        { display: none !important; }
    body.acct-family .cal-action-btn-sync        { display: none !important; }
    body.acct-family .cal-share-btn              { display: none !important; }
    body.acct-family #cvt-trips                  { display: none !important; }
    body.acct-family #cvt-map                    { display: none !important; }
    body.acct-family #flight-search-card         { display: none !important; }
    /* Friendships capped at 5 for F&F — "Add Friend" stays, limit enforced in JS */

    /* ── Account type selection card ── */
    .acct-type-choices { display: flex; flex-direction: column; gap: 12px; margin: 18px 0 20px; }
    .acct-type-btn {
      display: flex; align-items: center; gap: 14px;
      background: rgba(255,255,255,0.06); border: 1.5px solid rgba(255,255,255,0.12);
      border-radius: 14px; padding: 16px 18px; cursor: pointer;
      text-align: left; transition: border-color 0.2s, background 0.2s;
      font-family: inherit;
    }
    .acct-type-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); }
    .acct-type-btn.crew:hover  { border-color: var(--gold); }
    .acct-type-btn.family:hover { border-color: #60A5FA; }
    .acct-type-icon { font-size: 28px; flex-shrink: 0; line-height: 1; }
    .acct-type-label { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 2px; }
    .acct-type-desc  { font-size: 12px; color: rgba(255,255,255,0.45); line-height: 1.4; }

    /* ── DISCLAIMER ── */
    .disclaimer-bar {
      background: #FFF8E7;
      border-top: 1px solid #F0DFA0;
      padding: 7px 16px;
      font-size: 11px;
      color: #8B6914;
      text-align: center;
      flex-shrink: 0;
    }

    /* ── TAB BAR ── */
    /* Legacy .tab-bar — hidden, replaced by .bottom-tab-bar */
    .tab-bar { display: none; }

    /* ── Bottom Tab Bar ── */
    .bottom-tab-bar {
      display: flex;
      background: #f5f5f5;
      border-top: 1px solid rgba(0,0,0,0.08);
      flex-shrink: 0;
      padding-bottom: env(safe-area-inset-bottom, 0px);
      order: 99;
    }
    .btab {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      padding: 8px 4px 6px;
      background: none;
      border: none;
      color: #999;
      font-size: 10px;
      font-weight: 600;
      cursor: pointer;
      letter-spacing: 0.2px;
      transition: color 0.15s;
      white-space: nowrap;
      position: relative;
      -webkit-tap-highlight-color: transparent;
    }
    .btab-icon {
      width: 24px;
      height: 24px;
    }
    .btab-label {
      line-height: 1;
    }
    .btab.active {
      color: #1a5276;
    }
    .btab.active .btab-icon {
      stroke: #1a5276;
    }
    .btab:hover:not(.active) { color: #666; }
    .crew-badge {
      display: inline-flex; align-items: center; justify-content: center;
      background: #e74c3c; color: #fff; font-size: 8px; font-weight: 800;
      border-radius: 99px; min-width: 14px; height: 14px; padding: 0 3px;
      position: absolute; top: 4px; right: 50%; transform: translateX(14px);
      line-height: 1;
    }

    /* ── Pull-to-refresh indicator ── */
    #ptr-indicator {
      position: fixed; top: 0; left: 50%;
      transform: translateX(-50%) translateY(-56px);
      width: 40px; height: 40px;
      background: var(--gold); border-radius: 50%;
      display: none; align-items: center; justify-content: center;
      z-index: 9999;
      transition: transform 0.22s ease;
      box-shadow: 0 2px 10px rgba(0,0,0,0.35);
    }
    #ptr-indicator.visible { transform: translateX(-50%) translateY(10px); }
    #ptr-indicator svg { animation: ptr-spin 0.75s linear infinite; }
    @keyframes ptr-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

    /* ── Layover match toast notification ── */
    .match-toast {
      position: fixed; top: 0; left: 50%;
      transform: translateX(-50%) translateY(-110%);
      z-index: 9000; max-width: 480px; width: calc(100% - 32px);
      background: #0D1F35; color: #fff;
      border-radius: 0 0 14px 14px;
      padding: 12px 16px;
      display: flex; align-items: center; gap: 10px;
      box-shadow: 0 6px 20px rgba(0,0,0,0.28);
      cursor: pointer;
      transition: transform 0.38s cubic-bezier(0.34, 1.4, 0.64, 1);
    }
    .match-toast.visible { transform: translateX(-50%) translateY(0); }
    .match-toast-icon { font-size: 20px; flex-shrink: 0; }
    .match-toast-text { flex: 1; font-size: 13px; line-height: 1.4; }
    .match-toast-text strong { display: block; font-size: 14px; margin-bottom: 1px; }
    .match-toast-cta {
      background: #E8A030; color: #0D1F35; font-weight: 800;
      font-size: 12px; border-radius: 20px; padding: 5px 13px;
      white-space: nowrap; flex-shrink: 0;
    }

    /* ── Reminder button on match cards ── */
    .match-remind-btn {
      background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
      border-radius: 6px; color: rgba(255,255,255,0.75); font-size: 11px;
      padding: 6px 10px; cursor: pointer; margin-top: 10px; width: 100%;
      text-align: center; font-family: inherit; transition: background 0.15s;
    }
    .match-remind-btn:hover  { background: rgba(255,255,255,0.2); }
    .match-remind-btn.is-set { color: #E8A030; border-color: #E8A030; }

    /* ── Inline meetup status pill on match cards ── */
    .meetup-status-pill {
      margin-top: 8px; padding: 5px 10px; border-radius: 6px;
      font-size: 11px; font-weight: 600; line-height: 1.4;
    }
    .meetup-status-pill.agreed {
      background: rgba(52,168,83,0.15); color: #34a853;
      border: 1px solid rgba(52,168,83,0.35);
      cursor: pointer;
    }
    .meetup-status-pill.agreed:hover { background: rgba(52,168,83,0.25); }
    .meetup-status-pill.incoming {
      background: rgba(232,160,48,0.12); color: #E8A030;
      border: 1px solid rgba(232,160,48,0.35);
    }
    /* Trip detail sheet (dark background) overrides */
    .trip-match-row .meetup-status-pill.agreed { color: #5edc8a; background: rgba(52,168,83,0.15); }
    .trip-match-row .meetup-status-pill.incoming { color: var(--gold); background: rgba(232,160,48,0.15); }

    /* ── Reminder picker modal ── */
    .reminder-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.55);
      z-index: 8000; display: none; align-items: center; justify-content: center;
    }
    .reminder-overlay.open { display: flex; }
    .reminder-modal {
      background: #fff; border-radius: 16px; padding: 24px 20px;
      max-width: 340px; width: calc(100% - 32px);
      box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    }
    .reminder-modal h3 { font-size: 17px; color: var(--navy-dark); margin: 0 0 6px; }
    .reminder-modal-desc { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
    .reminder-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
    .reminder-option {
      display: flex; align-items: center; gap: 10px; cursor: pointer;
      padding: 10px 12px; border-radius: 9px; border: 1.5px solid var(--light);
      transition: border-color 0.15s;
    }
    .reminder-option input[type="radio"] { accent-color: var(--navy-dark); width: 16px; height: 16px; }
    .reminder-option:has(input:checked) { border-color: var(--navy-dark); background: #f0f4f8; }
    .reminder-option-label { font-size: 13px; font-weight: 600; color: var(--navy-dark); }
    .reminder-option-desc  { font-size: 11px; color: var(--muted); }
    .reminder-modal-btns { display: flex; gap: 10px; }
    .reminder-set-btn {
      flex: 1; background: var(--navy-dark); color: #fff; border: none;
      border-radius: 9px; padding: 11px; font-size: 14px; font-weight: 700;
      cursor: pointer; font-family: inherit;
    }
    .reminder-cancel-btn {
      background: var(--light); color: var(--navy-dark); border: none;
      border-radius: 9px; padding: 11px 16px; font-size: 14px; cursor: pointer;
      font-family: inherit;
    }

    /* ── Fired reminder notification banner ── */
    .reminder-notif {
      position: fixed; top: 0; left: 50%;
      transform: translateX(-50%) translateY(-110%);
      z-index: 8500; max-width: 480px; width: calc(100% - 32px);
      background: #1A5276; color: #fff;
      border-radius: 0 0 14px 14px; padding: 12px 14px;
      display: flex; align-items: flex-start; gap: 10px;
      box-shadow: 0 6px 20px rgba(0,0,0,0.3); cursor: pointer;
      transition: transform 0.38s cubic-bezier(0.34, 1.4, 0.64, 1);
    }
    .reminder-notif.visible { transform: translateX(-50%) translateY(0); }
    .reminder-notif-icon { font-size: 20px; flex-shrink: 0; }
    .reminder-notif-text { flex: 1; font-size: 12px; line-height: 1.4; }
    .reminder-notif-text strong { display: block; font-size: 13px; margin-bottom: 2px; }
    .reminder-notif-dismiss {
      background: none; border: none; color: rgba(255,255,255,0.6);
      font-size: 16px; cursor: pointer; padding: 0 0 0 6px; flex-shrink: 0;
    }

    /* ── CREW NETWORK ── */
    .crew-block {
      background: #fff; border-radius: 12px; padding: 16px;
      margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    }
    .crew-block-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
    .crew-block-title  { font-size: 14px; font-weight: 700; color: var(--navy-dark); margin-bottom: 12px; }
    .crew-block-header .crew-block-title { margin-bottom: 0; }
    .crew-empty        { font-size: 13px; color: var(--muted); text-align: center; padding: 12px 0; }
    .crew-list-section-label {
      font-size: 11px; font-weight: 700; color: var(--muted);
      text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px;
    }
    .crew-add-btn {
      background: var(--navy-dark); color: #fff; border: none; border-radius: 8px;
      padding: 6px 14px; font-size: 13px; font-weight: 700; cursor: pointer;
    }
    .crew-add-btn:hover { background: var(--navy); }

    /* Friend row */
    .crew-friend-row {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .crew-friend-row:last-child { border-bottom: none; padding-bottom: 0; }
    .crew-friend-avatar {
      width: 36px; height: 36px; border-radius: 50%; background: var(--navy-dark);
      color: #fff; font-size: 14px; font-weight: 700; display: flex;
      align-items: center; justify-content: center; flex-shrink: 0;
    }
    .crew-friend-info   { flex: 1; min-width: 0; }
    .crew-friend-name   { font-size: 14px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .crew-friend-email  { font-size: 11px; color: rgba(255,255,255,0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .crew-friend-actions { display: flex; gap: 6px; flex-shrink: 0; }
    .crew-action-btn {
      background: none; border: 1px solid rgba(255,255,255,0.18); border-radius: 6px;
      padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; color: rgba(255,255,255,0.7);
    }
    .crew-action-btn:hover  { background: rgba(255,255,255,0.08); color: #fff; }
    .crew-action-btn.danger { color: #f87171; border-color: rgba(248,113,113,0.4); }
    .crew-action-btn.danger:hover { background: rgba(248,113,113,0.1); }
    .crew-action-btn.accept { background: var(--navy-dark); color: #fff; border-color: var(--navy-dark); }
    .crew-action-btn.accept:hover { background: var(--navy); }


    /* Match view toggle */
    .match-view-toggle {
      display: flex; border: 1.5px solid #DCE4EC; border-radius: 8px; overflow: hidden;
    }
    .match-view-btn {
      flex: 1; padding: 5px 10px; font-size: 12px; font-weight: 700;
      background: none; border: none; cursor: pointer; color: var(--muted);
      letter-spacing: 0.2px; transition: background 0.15s, color 0.15s;
    }
    .match-view-btn.active { background: var(--navy-dark); color: #fff; }

    /* ── Map view ── */
    .crew-map-mode-toggle {
      display: flex; gap: 8px; margin: 4px 0 12px;
    }
    .crew-map-mode-btn {
      flex: 1; padding: 9px 10px; border-radius: 9px;
      border: 1.5px solid var(--navy-dark); background: none;
      font-size: 13px; font-weight: 700; color: var(--navy-dark);
      cursor: pointer; transition: all 0.15s;
    }
    .crew-map-mode-btn.active { background: var(--navy-dark); color: #fff; }
    #crew-map-container {
      height: 340px; border-radius: 12px; overflow: hidden;
      border: 1.5px solid var(--light); background: #e5e3df;
      position: relative;
    }
    .crew-map-empty {
      text-align: center; padding: 24px 16px;
      font-size: 14px; color: var(--muted);
    }
    .crew-map-pins-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
    .crew-map-pin-card {
      background: var(--light); border-radius: 10px; padding: 11px 14px;
    }
    .crew-map-pin-airport {
      font-size: 17px; font-weight: 900; color: var(--navy-dark);
      letter-spacing: 0.5px; margin-bottom: 2px;
    }
    .crew-map-pin-city { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
    .crew-map-pin-friend {
      font-size: 13px; color: var(--navy-dark); padding: 4px 0;
      border-top: 1px solid rgba(0,0,0,0.07);
    }
    .crew-map-pin-friend:first-of-type { border-top: none; padding-top: 0; }

    /* Match card — layover (dark navy) */
    .crew-match-card {
      background: linear-gradient(135deg, #0D1F35 0%, #1B3A5C 100%);
      border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; color: #fff;
      cursor: pointer;
    }
    /* Match card — sit (steel blue, lighter) */
    .crew-match-card.sit {
      background: linear-gradient(135deg, #1B4A7A 0%, #2E6DA4 100%);
    }
    .crew-match-card:last-child { margin-bottom: 0; }
    .crew-match-top     { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1px; }
    .crew-match-airport { font-size: 22px; font-weight: 900; letter-spacing: 1px; }
    .crew-match-city    { font-size: 12px; color: rgba(255,255,255,0.65); margin-bottom: 8px; }
    .crew-match-overlap { font-size: 12px; font-weight: 700; color: var(--gold); margin-bottom: 10px; }
    .crew-match-legs    { display: flex; flex-direction: column; gap: 4px; }
    .crew-match-leg     { font-size: 12px; color: rgba(255,255,255,0.85); }
    .crew-match-leg strong { color: #fff; }
    /* Type badge on match card */
    /* "New" pill on match cards */
    .crew-match-new-badge {
      display: inline-block; background: var(--gold); color: var(--navy-dark);
      font-size: 9px; font-weight: 900; padding: 2px 7px; border-radius: 6px;
      letter-spacing: 0.6px; text-transform: uppercase; vertical-align: middle;
      margin-left: 6px; flex-shrink: 0;
    }
    .crew-match-type-badge {
      font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
      white-space: nowrap; flex-shrink: 0; margin-top: 4px;
    }
    .crew-match-type-badge.layover { background: rgba(255,255,255,0.18); color: rgba(255,255,255,0.95); }
    .crew-match-type-badge.sit     { background: var(--gold); color: var(--navy-dark); }
    .crew-match-type-badge.flight  { background: #2563EB; color: #fff; }
    .crew-match-card.flight        { background: linear-gradient(135deg, #1E3A5F 0%, #2563EB 100%); }

    /* ── Match calendar view ── */
    .match-cal-month { margin-bottom: 20px; }
    .match-cal-month-header {
      font-size: 13px; font-weight: 800; color: var(--navy-dark);
      text-align: center; margin-bottom: 8px;
    }
    .match-cal-dow-row {
      display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 3px;
    }
    .match-cal-dow-row span {
      text-align: center; font-size: 10px; font-weight: 700; color: var(--muted);
    }
    .match-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
    .match-cal-cell {
      aspect-ratio: 1; display: flex; flex-direction: column; align-items: center;
      justify-content: center; border-radius: 6px; font-size: 12px; color: #aab8c5;
    }
    .match-cal-cell.has-match {
      cursor: pointer; font-weight: 700; color: var(--navy-dark);
      background: rgba(13,31,53,0.06);
    }
    .match-cal-cell.has-match:hover { background: rgba(13,31,53,0.12); }
    .match-cal-cell.selected  {
      background: var(--navy-dark) !important; color: #fff !important;
    }
    .match-cal-cell.selected .match-dot.layover { background: #fff; }
    .match-cal-cell.selected .match-dot.sit      { background: var(--gold-light); }
    .match-cal-day-num { font-size: 12px; line-height: 1; }
    .match-cal-dots    { display: flex; gap: 2px; margin-top: 2px; }
    .match-dot { width: 5px; height: 5px; border-radius: 50%; }
    .match-dot.layover { background: var(--navy-dark); }
    .match-dot.sit     { background: var(--gold); }
    .match-dot.intro   { background: #22c55e; }
    .match-day-detail { margin-top: 10px; }
    .match-day-detail-header {
      font-size: 13px; font-weight: 700; color: var(--navy-dark);
      padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid #DCE4EC;
    }

    /* Invite card */
    .crew-invite-card { background: var(--light); }
    .crew-invite-desc { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
    .crew-invite-row  { display: flex; align-items: center; gap: 8px; }
    .crew-invite-url  {
      flex: 1; font-size: 12px; color: var(--navy-dark); background: #fff;
      border: 1px solid var(--border); border-radius: 7px; padding: 8px 10px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .crew-copy-btn {
      background: var(--navy-dark); color: #fff; border: none; border-radius: 7px;
      padding: 8px 14px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
    }
    .crew-copy-btn:hover { background: var(--navy); }
    .crew-copy-btn.check { background: #2D7D46; }

    /* Add friend modal */
    .crew-modal-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.55);
      display: flex; align-items: flex-end; justify-content: center;
      z-index: 1200; padding: 0;
    }
    .crew-modal {
      background: var(--navy-dark); border-radius: 20px 20px 0 0;
      padding: 24px 20px 36px; width: 100%; max-width: 480px;
    }
    .crew-modal-title { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 14px; }
    .crew-method-tabs {
      display: flex; gap: 0; border: 1.5px solid rgba(255,255,255,0.15); border-radius: 9px;
      overflow: hidden; margin-bottom: 16px;
    }
    .crew-method-tab {
      flex: 1; background: none; border: none; padding: 10px 0;
      font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.4); cursor: pointer; background: rgba(255,255,255,0.05);
    }
    .crew-method-tab.active { background: var(--gold); color: #fff; }
    .crew-method-desc { font-size: 13px; color: rgba(255,255,255,0.5); margin: 0 0 12px; line-height: 1.5; }
    .crew-label  { display: block; font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.4); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.4px; }
    .crew-input  {
      width: 100%; box-sizing: border-box; border: 1.5px solid rgba(255,255,255,0.15);
      border-radius: 9px; padding: 11px 13px; font-size: 15px; margin-bottom: 14px;
      outline: none; background: rgba(255,255,255,0.08); color: #fff;
    }
    .crew-input::placeholder { color: rgba(255,255,255,0.3); }
    .crew-input:focus { border-color: var(--gold); }
    .crew-divider {
      display: flex; align-items: center; gap: 10px; margin: 4px 0 14px;
      color: rgba(255,255,255,0.3); font-size: 12px;
    }
    .crew-divider::before, .crew-divider::after {
      content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.1);
    }
    .crew-form-error { font-size: 13px; color: #fca5a5; margin-bottom: 10px; padding: 8px 12px; background: rgba(220,38,38,0.18); border-radius: 7px; }
    .crew-modal-submit {
      width: 100%; background: var(--navy-dark); color: #fff; border: none;
      border-radius: 10px; padding: 14px; font-size: 15px; font-weight: 700;
      cursor: pointer; margin-bottom: 10px;
    }
    .crew-modal-submit:hover { background: var(--navy); }
    .crew-modal-submit:disabled { opacity: 0.6; cursor: default; }
    .crew-modal-cancel {
      width: 100%; background: none; border: none; color: rgba(255,255,255,0.4);
      font-size: 14px; padding: 8px; cursor: pointer;
    }

    /* ── FRIEND NAME LINK ── */
    .crew-friend-name-btn {
      background: none; border: none; padding: 0; margin: 0;
      font-size: 14px; font-weight: 700; color: #fff;
      cursor: pointer; text-align: left; text-decoration: none;
      font-family: inherit;
    }
    .crew-friend-name-btn:hover { color: var(--gold); }

    /* ── SETTINGS GEAR BUTTON ── */
    .settings-gear-btn {
      background: none; border: none; cursor: pointer;
      width: 36px; height: 36px; border-radius: 50%;
      display: none; align-items: center; justify-content: center;
      color: rgba(255,255,255,0.65); transition: color 0.2s, background 0.2s;
      flex-shrink: 0;
    }
    .settings-gear-btn:hover { color: var(--gold); background: rgba(232,160,48,0.12); }
    .settings-gear-btn svg { width: 20px; height: 20px; }

    /* ── SETTINGS PAGE ── */
    .settings-page {
      position: fixed; top: 0; bottom: 0; right: 0; z-index: 1001;
      left: 100%; width: 100%;
      background: var(--navy-dark);
      display: flex; flex-direction: column;
      transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
      overflow: hidden;
    }
    .settings-page.open { left: 0; }
    .settings-page-header {
      background: var(--navy-dark);
      display: flex; align-items: center; gap: 12px;
      padding-top: env(safe-area-inset-top);
      padding-left: 16px; padding-right: 16px; padding-bottom: 0;
      height: calc(58px + env(safe-area-inset-top)); flex-shrink: 0;
      border-bottom: 2px solid var(--gold);
    }
    .settings-back-btn {
      background: none; border: none; color: rgba(255,255,255,0.8);
      font-size: 24px; cursor: pointer; padding: 0 4px; line-height: 1;
      display: flex; align-items: center;
    }
    .settings-back-btn:hover { color: #fff; }
    .settings-page-title { font-size: 17px; font-weight: 700; color: #fff; }
    .settings-scroll { flex: 1; overflow-y: auto; padding: 20px 16px 32px; }
    .settings-card {
      background: rgba(255,255,255,0.07); border-radius: 14px;
      box-shadow: 0 1px 6px rgba(0,0,0,0.3);
      margin-bottom: 20px; overflow: hidden;
    }
    .settings-card-title {
      font-size: 11px; font-weight: 800; color: rgba(255,255,255,0.38);
      text-transform: uppercase; letter-spacing: 0.6px;
      padding: 14px 16px 8px;
    }
    .settings-radio-row {
      display: flex; align-items: flex-start; gap: 14px;
      padding: 14px 16px; border-top: 1px solid var(--border);
      cursor: pointer; transition: background 0.15s;
    }
    .settings-radio-row:first-of-type { border-top: none; }
    .settings-radio-row:hover { background: rgba(255,255,255,0.06); }
    .settings-radio-row.selected { background: rgba(255,255,255,0.1); }
    .settings-radio-row input[type="radio"] {
      margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0;
      accent-color: var(--navy-dark); cursor: pointer;
    }
    .settings-opt-title { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 3px; }
    .settings-opt-desc  { font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.45; }
    .settings-save-bar {
      padding: 14px 16px; background: var(--navy-dark);
      border-top: 1px solid rgba(255,255,255,0.1); flex-shrink: 0;
      display: none;
    }
    .settings-page.open .settings-save-bar {
      display: block;
    }
    .settings-save-btn {
      width: 100%; background: var(--navy-dark); color: #fff;
      border: none; border-radius: 12px; padding: 15px;
      font-size: 16px; font-weight: 700; cursor: pointer;
      font-family: inherit; transition: background 0.2s;
    }
    .settings-save-btn:hover  { background: var(--navy); }
    .settings-save-btn:active { background: #061526; }
    .settings-save-btn.saved  {
      background: #2D7D46;
      pointer-events: none;
    }

    /* ── Settings toggle rows (checkboxes) ── */
    .settings-toggle-row {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.08); cursor: pointer;
    }
    .settings-toggle-row:first-of-type { border-top: none; }
    .settings-toggle-info { flex: 1; }
    .settings-toggle-row input[type="checkbox"] {
      width: 40px; height: 22px; appearance: none; -webkit-appearance: none;
      background: #ddd; border-radius: 11px; position: relative;
      cursor: pointer; transition: background 0.2s; flex-shrink: 0; margin-left: 14px;
    }
    .settings-toggle-row input[type="checkbox"]:checked { background: var(--navy-dark); }
    .settings-toggle-row input[type="checkbox"]::after {
      content: ''; position: absolute; top: 2px; left: 2px;
      width: 18px; height: 18px; background: #fff; border-radius: 50%;
      transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }
    .settings-toggle-row input[type="checkbox"]:checked::after { transform: translateX(18px); }

    /* ── Add to Home Screen install banner ── */
    #a2hs-banner {
      position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
      background: #0D1F35; color: #fff;
      padding: 16px 20px 28px;
      border-radius: 20px 20px 0 0;
      box-shadow: 0 -4px 24px rgba(0,0,0,0.35);
      transform: translateY(100%);
      transition: transform 0.35s cubic-bezier(0.34,1.1,0.64,1);
      font-family: inherit;
    }
    #a2hs-banner.a2hs-visible { transform: translateY(0); }
    .a2hs-header {
      display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
    }
    .a2hs-icon {
      width: 52px; height: 52px; border-radius: 12px;
      background: #1e3a5f; display: flex; align-items: center;
      justify-content: center; font-size: 26px; flex-shrink: 0;
    }
    .a2hs-title { font-size: 16px; font-weight: 800; }
    .a2hs-subtitle { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 2px; }
    .a2hs-dismiss {
      position: absolute; top: 14px; right: 16px;
      background: none; border: none; color: rgba(255,255,255,0.45);
      font-size: 18px; cursor: pointer; padding: 4px 8px; line-height: 1;
    }
    /* Android: single install button */
    #a2hs-android-btn {
      width: 100%; padding: 14px; border-radius: 12px;
      background: #2563eb; border: none; color: #fff;
      font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
    }
    /* iOS: step-by-step guide */
    .a2hs-ios-steps {
      display: flex; flex-direction: column; gap: 10px;
    }
    .a2hs-ios-step {
      display: flex; align-items: center; gap: 12px;
      background: rgba(255,255,255,0.07); border-radius: 10px;
      padding: 10px 14px;
    }
    .a2hs-ios-step-num {
      width: 24px; height: 24px; border-radius: 50%;
      background: #2563eb; color: #fff;
      font-size: 12px; font-weight: 800;
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .a2hs-ios-step-text { font-size: 13px; font-weight: 500; line-height: 1.4; }
    .a2hs-ios-step-text strong { color: #93c5fd; }

    /* ── Friend Profile modal ── */
    .fprofile-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.6);
      z-index: 1100; display: flex; align-items: flex-end; justify-content: center;
    }
    .fprofile-sheet {
      background: var(--navy-dark); border-radius: 20px 20px 0 0;
      padding: 24px 20px 40px; width: 100%; max-width: 480px;
      position: relative; text-align: center;
      animation: slideUp 0.22s ease;
      border-top: 1px solid rgba(255,255,255,0.08);
    }
    .fprofile-close {
      position: absolute; top: 14px; right: 14px;
      background: rgba(255,255,255,0.1); border: none; border-radius: 50%;
      width: 30px; height: 30px; cursor: pointer; font-size: 14px;
      color: rgba(255,255,255,0.6); display: flex; align-items: center; justify-content: center;
    }
    .fprofile-close:hover { background: rgba(255,255,255,0.18); }
    .fprofile-avatar {
      width: 68px; height: 68px; border-radius: 50%;
      background: rgba(255,255,255,0.12); color: #fff;
      font-size: 26px; font-weight: 800;
      display: flex; align-items: center; justify-content: center;
      margin: 8px auto 14px;
      border: 2px solid rgba(255,255,255,0.15);
    }
    .fprofile-name { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 4px; }
    .fprofile-meta { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 20px; min-height: 18px; }
    .fprofile-contacts { text-align: left; margin-bottom: 14px; }
    .fprofile-contact-row {
      display: flex; align-items: center; gap: 10px;
      padding: 11px 14px; background: rgba(0,0,0,0.28); border-radius: 12px;
      margin-bottom: 8px; text-decoration: none;
      color: #fff; font-size: 14px; font-weight: 600;
      border: 1px solid rgba(255,255,255,0.1);
      box-shadow: 0 4px 14px rgba(0,0,0,0.4);
    }
    .fprofile-contact-row:hover { background: rgba(0,0,0,0.38); }
    .fprofile-no-contact { font-size: 13px; color: rgba(255,255,255,0.4); text-align: center; padding: 8px 0 16px; }
    .fprofile-actions { display: flex; flex-direction: column; gap: 8px; }
    .fprofile-action-btn {
      width: 100%; padding: 13px; background: rgba(255,255,255,0.1); color: #fff;
      border: 1px solid rgba(255,255,255,0.15); border-radius: 12px; font-size: 14px; font-weight: 700;
      cursor: pointer; transition: background 0.15s;
    }
    .fprofile-action-btn:hover { background: rgba(255,255,255,0.18); }
    .fprofile-action-btn:first-child { background: var(--gold); color: var(--navy-dark); border-color: var(--gold); }
    .fprofile-action-btn:first-child:hover { opacity: 0.9; }

    /* ── FRIENDS PAGE ── */
    .friends-page {
      position: fixed; inset: 0; z-index: 1001;
      background: var(--navy-dark);
      display: flex; flex-direction: column;
      transform: translateX(100%);
      transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .friends-page.open { transform: translateX(0); }
    .friends-page-header {
      background: var(--navy-dark);
      display: flex; align-items: center; gap: 12px;
      padding-top: env(safe-area-inset-top);
      padding-left: 16px; padding-right: 16px; padding-bottom: 0;
      height: calc(58px + env(safe-area-inset-top)); flex-shrink: 0;
      border-bottom: 2px solid var(--gold);
    }
    .friends-page-back-btn {
      background: none; border: none; color: rgba(255,255,255,0.8);
      font-size: 24px; cursor: pointer; padding: 0 4px; line-height: 1;
      display: flex; align-items: center;
    }
    .friends-page-back-btn:hover { color: #fff; }
    .friends-page-title { font-size: 17px; font-weight: 700; color: #fff; flex: 1; }
    .friends-page-scroll { flex: 1; overflow-y: auto; padding: 16px 16px 32px; }
    .fp-add-btn {
      width: 100%; background: var(--gold); color: #fff;
      border: none; border-radius: 12px; padding: 14px;
      font-size: 15px; font-weight: 700; cursor: pointer;
      font-family: inherit; margin-bottom: 16px;
      transition: background 0.2s;
    }
    .fp-add-btn:hover { background: #a96a18; }
    .fp-invite-card {
      background: rgba(255,255,255,0.07); border-radius: 14px;
      box-shadow: 0 1px 6px rgba(0,0,0,0.3);
      padding: 14px 16px; margin-bottom: 16px;
    }
    .fp-invite-label {
      font-size: 11px; font-weight: 800; color: rgba(255,255,255,0.38);
      text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 8px;
    }
    .fp-invite-row { display: flex; align-items: center; gap: 8px; }
    .fp-invite-url {
      flex: 1; font-size: 12px; color: rgba(255,255,255,0.8); word-break: break-all;
      background: rgba(255,255,255,0.08); border-radius: 8px; padding: 8px 10px;
    }
    .fp-copy-btn {
      background: var(--navy-dark); color: #fff; border: none;
      border-radius: 8px; padding: 8px 14px; font-size: 13px;
      font-weight: 700; cursor: pointer; white-space: nowrap;
      font-family: inherit; flex-shrink: 0;
    }
    .fp-copy-btn.check { background: #2D7D46; }
    /* ── Shared Schedule Links section ──────────────────────────────── */
    .fp-shares-header {
      display: flex; align-items: center; padding: 12px 16px 8px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .fp-share-row {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .fp-share-row:last-child { border-bottom: none; }
    .fp-share-info { flex: 1; min-width: 0; }
    .fp-share-title {
      font-size: 13px; font-weight: 700; color: #fff;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .fp-share-meta {
      font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 2px;
    }
    .fp-share-copy-btn {
      background: var(--navy-dark); color: #fff; border: none;
      border-radius: 8px; padding: 6px 12px; font-size: 12px;
      font-weight: 700; cursor: pointer; white-space: nowrap;
      font-family: inherit; flex-shrink: 0;
    }
    .fp-share-copy-btn.check { background: #2D7D46; }
    .fp-share-del-btn {
      background: none; color: #dc2626; border: 1.5px solid #dc2626;
      border-radius: 8px; padding: 5px 11px; font-size: 12px;
      font-weight: 700; cursor: pointer; white-space: nowrap;
      font-family: inherit; flex-shrink: 0;
    }
    .fp-share-del-btn:hover { background: rgba(220,38,38,0.15); }
    .fp-section-title {
      font-size: 11px; font-weight: 800; color: rgba(255,255,255,0.38);
      text-transform: uppercase; letter-spacing: 0.6px;
      padding: 0 0 8px;
    }
    .fp-search-row { display: flex; gap: 8px; margin-bottom: 14px; align-items: center; }
    .fp-search-input {
      flex: 1; padding: 10px 12px; border: 1.5px solid rgba(255,255,255,0.15);
      border-radius: 10px; font-size: 14px; font-family: inherit;
      background: rgba(255,255,255,0.08); outline: none; color: #fff;
    }
    .fp-search-input::placeholder { color: rgba(255,255,255,0.35); }
    .fp-search-input:focus { border-color: var(--gold); }
    .fp-sort-select {
      padding: 10px 8px; border: 1.5px solid rgba(255,255,255,0.15);
      border-radius: 10px; font-size: 13px; font-family: inherit;
      background: rgba(255,255,255,0.08); color: #fff; cursor: pointer; outline: none;
      color-scheme: dark; flex-shrink: 0;
    }
    .fp-section-card {
      background: var(--navy-dark); border-radius: 14px;
      box-shadow: 0 1px 6px rgba(0,0,0,0.3);
      margin-bottom: 16px; overflow: hidden;
    }
    .fp-pending-header {
      display: flex; align-items: center; padding: 12px 16px 8px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .fp-pending-badge {
      display: inline-flex; align-items: center; justify-content: center;
      background: var(--gold); color: #fff; border-radius: 50%;
      width: 18px; height: 18px; font-size: 11px; font-weight: 700;
      margin-left: 6px;
    }
    /* ── Groups section ─────────────────────────────────────────────── */
    .fp-groups-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 16px 10px; border-bottom: 1px solid var(--border);
    }
    .fp-groups-create-btn {
      background: var(--gold); color: var(--navy-dark); border: none;
      border-radius: 20px; padding: 5px 13px; font-size: 12px;
      font-weight: 700; cursor: pointer; font-family: inherit;
    }
    .fp-group-card {
      padding: 12px 16px; border-bottom: 1px solid var(--border);
      cursor: pointer; transition: background 0.15s;
    }
    .fp-group-card:last-child { border-bottom: none; }
    .fp-group-card:hover { background: #f9fafb; }
    .fp-group-name {
      font-size: 14px; font-weight: 700; color: var(--navy-dark); margin-bottom: 4px;
    }
    .fp-group-meta {
      font-size: 12px; color: var(--muted);
    }
    .fp-group-code-badge {
      display: inline-block; background: #f0f4f8; color: var(--navy-dark);
      border-radius: 6px; padding: 2px 7px; font-size: 12px;
      font-weight: 700; letter-spacing: 1px; margin-right: 6px;
    }
    .fp-groups-join-row {
      display: flex; gap: 8px; padding: 12px 16px;
      border-top: 1px solid var(--border);
    }
    .fp-groups-join-input {
      flex: 1; padding: 9px 12px; border: 1.5px solid var(--border);
      border-radius: 10px; font-size: 14px; font-family: inherit;
      background: #f8f9fa; outline: none; color: var(--navy-dark);
      text-transform: uppercase; letter-spacing: 1px;
    }
    .fp-groups-join-input:focus { border-color: var(--navy-dark); background: #fff; }
    .fp-groups-join-btn {
      background: var(--navy-dark); color: #fff; border: none;
      border-radius: 10px; padding: 9px 16px; font-size: 13px;
      font-weight: 700; cursor: pointer; font-family: inherit; white-space: nowrap;
    }
    /* Group modal */
    .fp-group-modal-code {
      text-align: center; background: #f0f4f8; border-radius: 12px;
      padding: 16px; margin: 16px 0 8px;
    }
    .fp-group-modal-code-label {
      font-size: 11px; font-weight: 800; color: var(--muted);
      text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 8px;
    }
    .fp-group-modal-code-value {
      font-size: 28px; font-weight: 800; color: var(--navy-dark);
      letter-spacing: 4px;
    }
    .fp-group-modal-link {
      font-size: 12px; color: var(--muted); margin-top: 6px;
      word-break: break-all;
    }
    .fp-group-member-chip {
      display: inline-flex; align-items: center; gap: 5px;
      background: #f0f4f8; border-radius: 20px; padding: 4px 10px;
      font-size: 12px; font-weight: 600; color: var(--navy-dark);
      margin: 3px;
    }
    .fp-group-member-chip.is-admin {
      background: #fef3e2; color: #92520e;
    }
    .fp-group-admin-badge {
      font-size: 10px; font-weight: 800; background: var(--gold);
      color: #fff; border-radius: 4px; padding: 1px 5px;
      letter-spacing: 0.3px; margin-left: 2px;
    }
    .fp-group-detail-meta {
      display: flex; align-items: center; gap: 12px;
      font-size: 12px; color: var(--muted); margin: 6px 0 2px;
      flex-wrap: wrap;
    }
    .fp-group-detail-meta-item { display: flex; align-items: center; gap: 4px; }
    /* Pending requests section in group detail modal */
    .fp-pending-req-section {
      margin: 14px 0 6px; border-top: 1px solid #f0f0f0; padding-top: 12px;
    }
    .fp-pending-req-title {
      font-size: 12px; font-weight: 800; color: var(--navy-dark);
      text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
      display: flex; align-items: center; gap: 6px;
    }
    .fp-pending-count-badge {
      background: #C47D1E; color: #fff; border-radius: 10px;
      padding: 1px 7px; font-size: 11px; font-weight: 700;
    }
    .fp-pending-req-item {
      display: flex; align-items: center; justify-content: space-between;
      padding: 8px 10px; background: #fef9f0; border-radius: 10px;
      margin-bottom: 6px; gap: 10px;
    }
    .fp-pending-req-name {
      font-size: 13px; font-weight: 600; color: var(--navy-dark); flex: 1;
    }
    .fp-pending-req-email {
      font-size: 11px; color: var(--muted);
    }
    .fp-approve-btn {
      background: #2D7D46; color: #fff; border: none; border-radius: 8px;
      padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
      font-family: inherit; flex-shrink: 0;
    }
    .fp-deny-btn {
      background: #f0f4f8; color: #dc2626; border: none; border-radius: 8px;
      padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
      font-family: inherit; flex-shrink: 0;
    }
    /* Pending badge on group card */
    .fp-group-pending-badge {
      background: #C47D1E; color: #fff; border-radius: 10px;
      padding: 1px 7px; font-size: 11px; font-weight: 700; margin-left: 6px;
    }
    .match-filter-row {
      display: flex; align-items: center; gap: 8px;
      padding: 10px 16px 8px;
    }
    .match-filter-input {
      flex: 1; padding: 9px 12px; border: 1.5px solid var(--border);
      border-radius: 10px; font-size: 13px; font-family: inherit;
      background: #fff; outline: none; color: var(--navy-dark);
    }
    .match-filter-input:focus { border-color: var(--navy-dark); }
    .match-type-pills { display: flex; gap: 6px; padding: 0 16px 10px; flex-wrap: wrap; }
    .match-type-pill {
      padding: 5px 13px; border-radius: 20px; font-size: 12px; font-weight: 700;
      border: 1.5px solid var(--border); background: #fff; color: var(--muted);
      cursor: pointer; font-family: inherit; transition: background 0.15s, color 0.15s, border-color 0.15s;
      white-space: nowrap;
    }
    .match-type-pill:hover { border-color: var(--navy-dark); color: var(--navy-dark); }
    .match-type-pill.active { background: var(--navy-dark); color: #fff; border-color: var(--navy-dark); }
    .match-type-pill.active.pill-layover { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }
    .match-type-pill.active.pill-sit     { background: var(--navy-mid);  border-color: var(--navy-mid);  color: #fff; }
    .match-type-pill.active.pill-flight  { background: #2563EB; border-color: #2563EB; color: #fff; }
    .match-type-pill.active.pill-intro   { background: #16a34a; border-color: #16a34a; color: #fff; }
    #section-crew .match-type-pill.active.pill-intro { background: #22c55e; border-color: #22c55e; color: var(--navy-dark); }
    /* Dark background for crew section */
    #section-crew { background: var(--navy-dark); }
    #section-crew .match-filter-input { background:rgba(255,255,255,0.07); border-color:rgba(255,255,255,0.12); color:#fff; }
    #section-crew .match-filter-input::placeholder { color:rgba(255,255,255,0.35); }
    #section-crew .match-filter-input:focus { border-color:rgba(255,255,255,0.4); }
    .filter-active-tag { display:inline-flex; align-items:center; gap:5px; background:rgba(196,125,30,0.18); border:1.5px solid var(--gold); color:var(--gold); border-radius:20px; padding:3px 10px 3px 12px; font-size:12px; font-weight:700; }
    .filter-active-tag button { background:none; border:none; color:var(--gold); font-size:14px; line-height:1; cursor:pointer; padding:0; margin:0; opacity:0.8; }
    .filter-active-tag button:hover { opacity:1; }
    #section-crew .crew-list-section-label { color:rgba(255,255,255,0.35); }
    #section-crew .crew-empty { color:rgba(255,255,255,0.35); }
    /* List / Calendar / Map view toggle — dark theme */
    #section-crew .match-view-toggle { border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); }
    #section-crew .match-view-btn { color: rgba(255,255,255,0.4); }
    #section-crew .match-view-btn.active { background: rgba(255,255,255,0.12); color: #fff; }
    /* Match calendar view — dark theme (mirrors Trips Calendar) */
    #section-crew .match-cal-month-header { color: #fff; }
    #section-crew .match-cal-dow-row span { color: rgba(255,255,255,0.38); }
    #section-crew .match-cal-cell { color: rgba(255,255,255,0.25); }
    #section-crew .match-cal-cell.has-match { color: #fff; background: rgba(255,255,255,0.08); }
    #section-crew .match-cal-cell.has-match:hover { background: rgba(255,255,255,0.14); }
    #section-crew .match-cal-cell.selected { background: var(--gold) !important; color: var(--navy-dark) !important; }
    #section-crew .match-cal-cell.selected .match-dot.layover { background: var(--navy-dark); }
    #section-crew .match-cal-cell.selected .match-dot.sit { background: var(--navy-dark); }
    #section-crew .match-dot.layover { background: rgba(255,255,255,0.65); }
    #section-crew .match-dot.sit { background: var(--gold); }
    #section-crew .match-day-detail-header { color: #fff; border-color: rgba(255,255,255,0.12); }
    /* Friend status dot colors */
    .friend-status-dot.layover { background:#F59E0B; }
    .friend-status-dot.sit     { background:#60A5FA; }
    .friend-status-dot.flight  { background:#34D399; }
    .friend-status-dot.off     { background:#6B7280; }
    /* Pill overrides for dark crew section */
    #section-crew .match-type-pill { background:rgba(255,255,255,0.07); border-color:rgba(255,255,255,0.12); color:rgba(255,255,255,0.5); }
    #section-crew .match-type-pill:hover { background:rgba(255,255,255,0.13); border-color:rgba(255,255,255,0.2); color:#fff; }
    #section-crew .match-type-pill.active { background:var(--gold); border-color:var(--gold); color:var(--navy-dark); }
    /* ── Notification section divider ─────────────────────────────── */
    .notif-section-divider {
      display: flex; align-items: center; gap: 10px;
      padding: 14px 16px 6px; margin-top: 4px;
    }
    .notif-section-divider-line {
      flex: 1; height: 1px; background: rgba(255,255,255,0.1);
    }
    .notif-section-label {
      font-size: 10px; font-weight: 800; color: var(--gold);
      text-transform: uppercase; letter-spacing: 0.7px; white-space: nowrap;
    }
    /* ── Mute list ─────────────────────────────────────────────────── */
    .notif-mute-row {
      padding: 12px 16px 14px;
    }
    .notif-mute-title {
      font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 8px;
    }
    .notif-mute-desc {
      font-size: 12px; color: rgba(255,255,255,0.45); margin-bottom: 10px; line-height: 1.4;
    }
    .notif-mute-chips {
      display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; min-height: 0;
    }
    .notif-mute-chip {
      display: inline-flex; align-items: center; gap: 5px;
      background: rgba(232,160,48,0.12); border: 1px solid rgba(232,160,48,0.3);
      border-radius: 20px; padding: 3px 10px 3px 12px;
      font-size: 12px; font-weight: 600; color: var(--gold);
    }
    .notif-mute-chip-x {
      background: none; border: none; color: var(--gold); font-size: 14px;
      line-height: 1; cursor: pointer; padding: 0; opacity: 0.7;
    }
    .notif-mute-chip-x:hover { opacity: 1; }
    .notif-mute-add-row {
      display: flex; gap: 8px; align-items: center;
    }
    .notif-mute-input {
      flex: 1; padding: 7px 11px; border-radius: 8px;
      border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.07);
      color: #fff; font-size: 13px; font-family: inherit; outline: none;
    }
    .notif-mute-input::placeholder { color: rgba(255,255,255,0.3); }
    .notif-mute-input:focus { border-color: var(--gold); }
    .notif-mute-add-btn {
      padding: 7px 14px; border-radius: 8px; border: 1px solid var(--gold);
      background: rgba(232,160,48,0.12); color: var(--gold);
      font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
      white-space: nowrap; flex-shrink: 0;
    }
    .notif-mute-add-btn:hover { background: rgba(232,160,48,0.22); }
    .notif-mute-suggest {
      position: fixed;
      background: #0f2540; border: 1px solid rgba(232,160,48,0.3);
      border-radius: 10px; overflow: hidden; z-index: 9999;
      box-shadow: 0 6px 20px rgba(0,0,0,0.45);
    }
    .notif-mute-suggest-item {
      display: flex; align-items: center; gap: 10px;
      padding: 9px 13px; cursor: pointer; transition: background 0.12s;
    }
    .notif-mute-suggest-item:hover { background: rgba(232,160,48,0.1); }
    .notif-mute-suggest-avatar {
      width: 28px; height: 28px; border-radius: 50%;
      background: rgba(255,255,255,0.12); color: #fff;
      font-size: 11px; font-weight: 800;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .notif-mute-suggest-name { font-size: 13px; font-weight: 600; color: #fff; }
    .notif-mute-suggest-email { font-size: 11px; color: rgba(255,255,255,0.4); }
    /* ── Notification app-required callout ────────────────────────── */
    .notif-app-callout {
      display: flex; align-items: flex-start; gap: 10px;
      margin: 0 16px 14px; padding: 10px 13px;
      background: rgba(232,160,48,0.08); border: 1px solid rgba(232,160,48,0.28);
      border-radius: 10px;
    }
    .notif-app-callout-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
    .notif-app-callout-text { font-size: 12px; color: rgba(255,255,255,0.6); line-height: 1.5; }
    .notif-app-callout-text strong { color: var(--gold); font-weight: 700; }
    /* ── Notification reminder bottom sheet ───────────────────────── */
    .notif-reminder-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.6);
      z-index: 1300; display: flex; align-items: flex-end; justify-content: center;
    }
    .notif-reminder-sheet {
      background: var(--navy-dark); border-radius: 20px 20px 0 0;
      padding: 28px 22px 44px; width: 100%; max-width: 480px;
      border-top: 1px solid rgba(255,255,255,0.08);
      animation: slideUp 0.24s ease;
    }
    .notif-reminder-icon { font-size: 36px; text-align: center; margin-bottom: 12px; }
    .notif-reminder-title { font-size: 18px; font-weight: 800; color: #fff; text-align: center; margin-bottom: 8px; }
    .notif-reminder-body { font-size: 13px; color: rgba(255,255,255,0.55); text-align: center; line-height: 1.6; margin-bottom: 22px; }
    .notif-reminder-body strong { color: #fff; font-weight: 700; }
    .notif-reminder-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
    .notif-reminder-step {
      display: flex; align-items: center; gap: 12px;
      padding: 11px 14px; background: rgba(0,0,0,0.28);
      border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
      box-shadow: 0 4px 14px rgba(0,0,0,0.4);
    }
    .notif-reminder-step-num {
      width: 24px; height: 24px; border-radius: 50%;
      background: var(--gold); color: var(--navy-dark);
      font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .notif-reminder-step-text { font-size: 13px; color: #fff; font-weight: 600; line-height: 1.4; }
    .notif-reminder-step-text span { display: block; font-size: 11px; color: rgba(255,255,255,0.45); font-weight: 400; margin-top: 1px; }
    .notif-reminder-got-it {
      width: 100%; padding: 14px; background: var(--gold); color: var(--navy-dark);
      border: none; border-radius: 12px; font-size: 15px; font-weight: 800;
      cursor: pointer; font-family: inherit;
    }
    .notif-reminder-got-it:hover { opacity: 0.9; }
    /* ── Filter dropdown pill selects ─────────────────────────────── */
    .match-filter-dropdowns {
      display: flex; gap: 8px; padding: 8px 16px 4px; align-items: center;
    }
    .match-filter-dd {
      appearance: none; -webkit-appearance: none;
      padding: 5px 28px 5px 13px; border-radius: 20px; font-size: 12px; font-weight: 700;
      border: 1.5px solid var(--gold); background: rgba(232,160,48,0.13); color: var(--gold);
      cursor: pointer; font-family: inherit;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23E8A030' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 10px center;
      transition: background 0.15s, border-color 0.15s;
    }
    .match-filter-dd:focus { outline: none; border-color: var(--gold); }
    .match-filter-dd option { background: #0f2540; color: #fff; font-weight: 600; }

    /* Friend sort dropdown options */
    .fsort-opt {
      padding:8px 14px; border-radius:8px; font-size:13px; font-weight:500;
      color:rgba(255,255,255,0.6); cursor:pointer; transition:background 0.12s;
    }
    .fsort-opt:hover { background:rgba(255,255,255,0.08); color:#fff; }
    .fsort-opt.active { color:var(--gold); font-weight:700; }

    /* Friend card subtitle */
    .tc-friend-subtitle { font-size:11px; color:rgba(255,255,255,0.4); margin-top:2px; line-height:1.3; }
    .tc-friend-group-tag { display:inline-block; font-size:10px; font-weight:700; background:rgba(96,165,250,0.15); color:#93c5fd; border-radius:5px; padding:1px 6px; margin-top:3px; margin-right:3px; letter-spacing:0.2px; }
    /* View toggle */
    .crew-view-toggle { display:flex; gap:8px; padding:4px 16px 12px; }
    .cvt-btn { flex:1; padding:5px 0; border-radius:10px; border:1.5px solid var(--gold); background:rgba(232,160,48,0.08); color:var(--gold); font-size:13px; font-weight:600; cursor:pointer; font-family:inherit; transition:all 0.2s; }
    .cvt-btn:hover { background:rgba(232,160,48,0.15); }
    .cvt-btn.active { background:var(--gold); color:var(--navy-dark); border-color:var(--gold); }
    /* Friend status cards */
    .friend-status-card { display:flex; align-items:center; gap:12px; padding:14px 0; border-bottom:1px solid rgba(255,255,255,0.06); cursor:pointer; transition:opacity 0.15s; }
    .friend-status-card:last-child { border-bottom:none; }
    .friend-status-card:active { opacity:0.7; }
    .friend-status-avatar-wrap { position:relative; flex-shrink:0; }
    .friend-status-avatar { width:44px; height:44px; border-radius:50%; background:var(--navy-mid); display:flex; align-items:center; justify-content:center; font-size:15px; font-weight:700; color:#fff; }
    .friend-status-dot { position:absolute; bottom:1px; right:1px; width:11px; height:11px; border-radius:50%; border:2px solid var(--navy-dark); }
    .friend-status-info { flex:1; min-width:0; }
    .friend-status-name-row { display:flex; align-items:center; gap:8px; margin-bottom:3px; flex-wrap:wrap; }
    .friend-status-name { font-size:15px; font-weight:700; color:#fff; }
    .friend-status-badge { font-size:11px; font-weight:700; padding:2px 9px; border-radius:20px; flex-shrink:0; }
    .friend-status-badge.layover { background:rgba(245,158,11,0.2); color:#F59E0B; }
    .friend-status-badge.sit     { background:rgba(96,165,250,0.2); color:#60A5FA; }
    .friend-status-badge.flight  { background:rgba(52,211,153,0.2); color:#34D399; }
    .friend-status-badge.off     { background:rgba(107,114,128,0.15); color:#9CA3AF; }
    .friend-status-location { font-size:13px; color:rgba(255,255,255,0.6); margin-bottom:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .friend-status-meta { font-size:12px; color:rgba(255,255,255,0.35); display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
    /* Friends Map view */
    .friends-map-toggle { display:flex; gap:8px; padding:10px 16px 8px; }
    .fmt-btn { flex:1; padding:9px 0; border-radius:10px; border:1.5px solid var(--gold); background:rgba(255,255,255,0.06); color:rgba(255,255,255,0.5); font-size:13px; font-weight:600; cursor:pointer; font-family:inherit; transition:all 0.2s; }
    .fmt-btn:hover { background:rgba(232,160,48,0.12); color:var(--gold); }
    .fmt-btn.active { background:var(--gold); color:var(--navy-dark); border-color:var(--gold); }
    #crew-friends-map-container { height:380px; width:100%; background:#0d1f35; position:relative; overflow:hidden; }
    /* Protect Leaflet tiles from global CSS resets */
    .leaflet-container { overflow:hidden; position:relative; }
    .leaflet-container img { max-width:none !important; max-height:none !important; }
    .leaflet-pane { position:absolute !important; left:0; top:0; }
    .leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow,
    .leaflet-tile-container, .leaflet-map-pane { position:absolute !important; }
    .leaflet-overlay-pane { z-index:400; }
    .leaflet-overlay-pane svg { position:absolute; left:0; top:0; overflow:visible; }
    .friends-map-legend { display:flex; gap:14px; padding:10px 16px 8px; flex-wrap:wrap; }
    .fml-item { display:flex; align-items:center; gap:5px; font-size:11px; color:rgba(255,255,255,0.45); font-weight:600; }
    .fml-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; border:1.5px solid rgba(255,255,255,0.3); }
    .friend-tc-badge { background:rgba(245,158,11,0.15); color:#F59E0B; padding:1px 7px; border-radius:12px; font-size:11px; font-weight:600; }
    .friend-status-arrow { color:rgba(255,255,255,0.2); font-size:20px; flex-shrink:0; }
    /* Redesigned trip connection cards */
    .tc-card { display:flex; align-items:center; gap:12px; padding:14px 0; border-bottom:1px solid rgba(255,255,255,0.06); cursor:pointer; transition:opacity 0.15s; }
    .tc-card:last-child { border-bottom:none; }
    .tc-card:active { opacity:0.7; }
    .friend-fav-btn { background:none; border:none; cursor:pointer; font-size:19px; color:rgba(255,255,255,0.18); padding:4px 2px; flex-shrink:0; line-height:1; transition:color 0.15s; -webkit-tap-highlight-color:transparent; }
    .friend-fav-btn:hover { color:var(--gold); }
    .friend-fav-btn.active { color:var(--gold); }
    .friends-section-label { font-size:11px; font-weight:700; color:rgba(255,255,255,0.35); text-transform:uppercase; letter-spacing:0.1em; padding:12px 0 4px; }
    .friend-status-chip { display:inline-block; font-size:11px; font-weight:600; border:1px solid; border-radius:20px; padding:1px 7px; margin-left:6px; line-height:1.6; vertical-align:middle; }
    .friend-status-chip.clickable { cursor:pointer; -webkit-tap-highlight-color:transparent; }
    .friend-status-chip.clickable:active { opacity:0.7; }
    .friend-connections-badge { display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:600; background:rgba(74,222,128,0.15); border:1px solid rgba(74,222,128,0.4); color:rgb(74,222,128); border-radius:20px; padding:2px 9px; margin-top:4px; cursor:pointer; -webkit-tap-highlight-color:transparent; transition:background 0.15s; }
    .friend-connections-badge:active { background:rgba(74,222,128,0.28); }
    /* Mutual friends badge */
    .mutual-friends-badge { display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:600; color:rgba(96,165,250,0.9); border:1px solid rgba(96,165,250,0.4); border-radius:20px; padding:2px 9px; margin-top:4px; cursor:pointer; -webkit-tap-highlight-color:transparent; transition:color 0.15s, border-color 0.15s, background 0.15s; }
    .mutual-friends-badge:active { opacity:0.7; }
    .mutual-friends-badge:hover { color:rgba(96,165,250,1); border-color:rgba(96,165,250,0.7); background:rgba(96,165,250,0.08); }
    /* Mutual friends modal */
    #mutual-friends-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.55); z-index:2100; display:none; align-items:flex-end; justify-content:center; }
    #mutual-friends-sheet { background:var(--navy-mid,#162032); border-radius:18px 18px 0 0; padding:24px 20px 36px; width:100%; max-width:480px; }
    .mutual-friends-sheet-handle { width:36px; height:4px; border-radius:2px; background:rgba(255,255,255,0.15); margin:0 auto 20px; }
    .mutual-friends-sheet-title { font-size:15px; font-weight:700; color:#fff; margin-bottom:4px; }
    .mutual-friends-sheet-sub { font-size:13px; color:rgba(255,255,255,0.45); margin-bottom:18px; }
    .mutual-friends-sheet-list { display:flex; flex-direction:column; gap:10px; }
    .mutual-friends-sheet-row { display:flex; align-items:center; gap:12px; }
    .mutual-friends-sheet-avatar { width:36px; height:36px; border-radius:50%; background:var(--navy-dark,#0D1F35); display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; color:#fff; flex-shrink:0; }
    .mutual-friends-sheet-name { font-size:14px; font-weight:600; color:#fff; }
    /* Can Introduce You cards */
    .ciy-section { margin-bottom:16px; }
    .ciy-section-label { font-size:11px; font-weight:700; color:rgba(255,255,255,0.35); text-transform:uppercase; letter-spacing:0.1em; padding:4px 0 8px; }
    .ciy-card { background:rgba(100,200,120,0.08); border:1px solid rgba(100,200,120,0.2); border-radius:12px; padding:12px 14px; margin-bottom:8px; display:flex; align-items:center; gap:12px; cursor:pointer; -webkit-tap-highlight-color:transparent; transition:background 0.15s; }
    .ciy-card:active { background:rgba(100,200,120,0.16); }
    .ciy-icon { font-size:22px; flex-shrink:0; }
    .ciy-body { flex:1; min-width:0; }
    .ciy-headline { font-size:13px; font-weight:600; color:#fff; line-height:1.4; }
    .ciy-meta { font-size:12px; color:rgba(255,255,255,0.45); margin-top:2px; }
    /* Inline CIY badge on crew-tab friend cards */
    .ciy-badge { display:inline-flex; align-items:center; gap:5px; background:rgba(96,165,250,0.15); border:1px solid rgba(96,165,250,0.4); color:rgb(96,165,250); border-radius:20px; padding:3px 10px; font-size:11px; font-weight:700; margin-top:4px; cursor:pointer; -webkit-tap-highlight-color:transparent; transition:background 0.15s; }
    .ciy-badge:active { background:rgba(96,165,250,0.28); }
    /* CIY detail bottom sheet */
    #ciy-detail-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.55); z-index:2200; display:none; align-items:flex-end; justify-content:center; }
    #ciy-detail-sheet { background:var(--navy-mid,#162032); border-radius:18px 18px 0 0; padding:24px 20px 36px; width:100%; max-width:480px; }
    .ciy-detail-handle { width:36px; height:4px; border-radius:2px; background:rgba(255,255,255,0.15); margin:0 auto 20px; }
    .ciy-detail-title { font-size:15px; font-weight:700; color:#fff; margin-bottom:4px; }
    .ciy-detail-sub { font-size:13px; color:rgba(255,255,255,0.45); margin-bottom:18px; }
    .ciy-detail-row { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid rgba(255,255,255,0.07); }
    .ciy-detail-row:last-child { border-bottom:none; }
    .ciy-detail-dot { width:36px; height:36px; border-radius:50%; background:rgba(74,222,128,0.15); border:1px solid rgba(74,222,128,0.35); display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
    .ciy-detail-info { flex:1; }
    .ciy-detail-airport { font-size:14px; font-weight:700; color:#fff; }
    .ciy-detail-date { font-size:12px; color:rgba(255,255,255,0.45); margin-top:2px; }
    .tc-date-block { display:flex; flex-direction:column; align-items:center; min-width:36px; }
    .tc-date-month { font-size:10px; font-weight:700; color:var(--gold); text-transform:uppercase; letter-spacing:0.08em; line-height:1.2; }
    .tc-date-day { font-size:24px; font-weight:700; color:#fff; line-height:1; }
    .tc-friend-avatar { width:36px; height:36px; border-radius:50%; background:var(--navy-mid); display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; color:#fff; flex-shrink:0; position:relative; }
    .tc-info { flex:1; min-width:0; }
    .tc-friend-name { font-size:14px; font-weight:700; color:#fff; margin-bottom:2px; display:flex; align-items:center; flex-wrap:wrap; }
    .tc-location { font-size:13px; color:rgba(255,255,255,0.5); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .tc-badges { display:flex; align-items:center; gap:4px; color:rgba(255,255,255,0.35); font-size:15px; flex-shrink:0; }
    .tc-arrow { color:rgba(255,255,255,0.2); font-size:16px; }
    .fp-filter-row { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
    .fp-filter-select {
      flex: 1; min-width: 90px; padding: 8px 6px; border: 1.5px solid rgba(255,255,255,0.15);
      border-radius: 10px; font-size: 12px; font-family: inherit;
      background: rgba(255,255,255,0.08); color: #fff; cursor: pointer; outline: none;
      color-scheme: dark;
    }
    .fp-filter-select:focus { border-color: var(--gold); }

    /* ── FRIEND CALENDAR OVERLAY ── */
    .fcal-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.6);
      display: flex; align-items: stretch; justify-content: center;
      z-index: 9500;
    }
    .fcal-panel {
      background: var(--navy-dark); width: 100%; max-width: 520px;
      display: flex; flex-direction: column; overflow: hidden;
    }
    .fcal-header {
      background: var(--navy-dark); color: #fff;
      padding: 14px 16px; display: flex; align-items: center; gap: 12px;
      flex-shrink: 0; border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .fcal-back-btn {
      background: none; border: none; color: rgba(255,255,255,0.75);
      font-size: 22px; cursor: pointer; padding: 0 4px; line-height: 1;
    }
    .fcal-back-btn:hover { color: #fff; }
    .fcal-title { font-size: 15px; font-weight: 700; flex: 1; color: #fff; }
    .fcal-subtitle { font-size: 11px; color: var(--gold); margin-top: 1px; }
    .fcal-body { flex: 1; overflow-y: auto; padding: 16px; }
    .fcal-legend {
      display: flex; gap: 16px; margin-bottom: 14px; flex-wrap: wrap;
    }
    .fcal-legend-item {
      display: flex; align-items: center; gap: 6px;
      font-size: 12px; color: rgba(255,255,255,0.5); font-weight: 600;
    }
    .fcal-legend-dot {
      width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0;
    }
    .fcal-legend-dot.my          { background: var(--gold); }
    .fcal-legend-dot.friend      { background: #BDC5D0; }
    /* Friend calendar — MY trips: gold. FRIEND trips: soft off-white */
    .fcal-panel .cal-badge:not(.fcal-friend-badge) {
      background: var(--gold) !important; color: var(--navy-dark) !important;
    }
    .cal-badge.fcal-friend-badge {
      background: #BDC5D0; color: #1a2a3a; font-size: 9px; font-weight: 700;
    }
    .fcal-panel .cal-month-title { color: #fff; }
    .fcal-panel .cal-dow { color: rgba(255,255,255,0.38); }
    .fcal-panel .cal-cell { background: rgba(255,255,255,0.06); border-color: transparent; }
    .fcal-panel .cal-cell.cal-today { background: rgba(232,160,48,0.12); border-color: var(--gold); }
    .fcal-panel .cal-cell.cal-empty { background: transparent; border-color: transparent; }
    .fcal-panel .cal-day-num { color: rgba(255,255,255,0.75); }
    .fcal-panel .cal-cell.cal-today .cal-day-num { color: var(--gold); }
    .fcal-panel .cal-nav-btn { color: rgba(255,255,255,0.7); }
    .fcal-panel .cal-nav-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
    .cal-cell.fcal-overlap { background: rgba(255,255,255,0.06); } /* same as normal cell — no tint */

    /* ── Overlap bar chart ───────────────────────────── */
    .overlap-chart { margin: 14px 0 6px; }
    .overlap-chart-row { display: flex; align-items: center; margin-bottom: 8px; }
    .overlap-chart-label {
      width: 44px; font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.6);
      text-align: right; padding-right: 8px; flex-shrink: 0;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .overlap-chart-track {
      flex: 1; position: relative; height: 26px;
      background: rgba(255,255,255,0.07); border-radius: 6px; overflow: hidden;
    }
    .overlap-chart-bar {
      position: absolute; top: 0; height: 100%; border-radius: 6px;
      display: flex; align-items: center; justify-content: space-between;
      padding: 0 5px; box-sizing: border-box; overflow: hidden; min-width: 2px;
    }
    .oc-mine, .oc-friend-lay, .oc-friend-sit { background: rgba(255,255,255,0.2); }
    .oc-time-l, .oc-time-r {
      font-size: 8px; color: #fff; font-weight: 700;
      text-shadow: 0 0 4px rgba(0,0,0,0.45);
      white-space: nowrap; flex-shrink: 0; line-height: 1;
    }
    .overlap-chart-highlight { display: none; }
    .overlap-chart-footer {
      text-align: center; font-size: 12px; color: var(--gold);
      font-weight: 600; margin-top: 4px;
    }

    .fcal-no-schedule {
      font-size: 12px; color: rgba(255,255,255,0.35); text-align: center;
      padding: 10px 0 4px; font-style: italic;
    }
    .fcal-hidden-msg {
      text-align: center; padding: 32px 20px; color: rgba(255,255,255,0.4); font-size: 14px;
    }

    /* ── APP SECTIONS ── */
    .app-section {
      display: flex;
      flex-direction: column;
      flex: 1;
      overflow: hidden;
      min-height: 0;
    }

    /* ── FRIENDS & FAMILY TRIP VIEW ──────────────────────────────── */
    #ff-view { display:none; flex-direction:column; height:100%; overflow:hidden; }
    body.acct-family .trip-scroll    { display:none !important; }
    body.acct-family .tab-bar        { display:none !important; }
    body.acct-family .bottom-tab-bar { display:none !important; }
    /* Hide crew-only settings / friends-page sections for F&F users */
    body.acct-family #sett-card-schedule-sharing,
    body.acct-family #sett-card-maps,
    body.acct-family #fp-invite-card,
    body.acct-family #fp-groups-block,
    body.acct-family #fp-shares-block,
    body.acct-family #fp-intros-block,
    body.acct-family .mutual-friends-badge,
    body.acct-family .ciy-badge,
    body.acct-family .fp-filter-row { display: none !important; }
    .ff-tab-bar {
      display:flex; flex-shrink:0;
      background:rgba(255,255,255,0.03);
      border-bottom:1px solid rgba(255,255,255,0.08);
    }
    .ff-tab-btn {
      flex:1; padding:13px 8px; background:none; border:none; border-bottom:2px solid transparent;
      color:rgba(255,255,255,0.42); font-size:13px; font-weight:600; cursor:pointer;
      transition:color 0.15s, border-color 0.15s; margin-bottom:-1px;
    }
    .ff-tab-btn.active  { color:var(--gold); border-bottom-color:var(--gold); }
    .ff-tab-btn:hover:not(.active) { color:rgba(255,255,255,0.75); }
    .ff-sub-view { flex:1; overflow-y:auto; display:none; flex-direction:column; }
    .ff-sub-view.ff-active { display:flex; }
    /* Calendar */
    .ff-cal-wrap { flex:0 0 auto; padding:0 4px 8px; }
    .ff-cal-header { display:flex; align-items:center; justify-content:space-between; padding:12px 16px 8px; }
    .ff-cal-nav { background:none; border:none; color:rgba(255,255,255,0.5); font-size:22px; cursor:pointer; padding:2px 8px; border-radius:6px; line-height:1; }
    .ff-cal-nav:hover { color:#fff; background:rgba(255,255,255,0.08); }
    .ff-cal-month { font-size:15px; font-weight:700; color:#fff; }
    .ff-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:0; padding:0 6px 8px; }
    .ff-cal-dow { text-align:center; font-size:10px; font-weight:700; color:rgba(255,255,255,0.28); letter-spacing:0.05em; padding:4px 0; text-transform:uppercase; }
    .ff-cal-cell { min-height:52px; border-radius:8px; margin:2px; background:rgba(255,255,255,0.04); border:1px solid transparent; display:flex; flex-direction:column; align-items:center; padding:4px 2px; overflow:hidden; }
    .ff-cal-cell.ff-today { border-color:var(--gold); background:rgba(232,160,48,0.1); }
    .ff-cal-cell.ff-empty { background:transparent; border-color:transparent; }
    .ff-cal-daynum { font-size:12px; color:rgba(255,255,255,0.55); line-height:1; margin-bottom:3px; }
    .ff-cal-cell.ff-today .ff-cal-daynum { color:var(--gold); font-weight:700; }
    .ff-cal-dots { display:flex; flex-wrap:wrap; gap:2px; justify-content:center; }
    .ff-cal-dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; }
    .ff-cal-legend { display:flex; flex-wrap:wrap; gap:8px; padding:4px 14px 12px; }
    .ff-cal-legend-item { display:flex; align-items:center; gap:5px; font-size:12px; color:rgba(255,255,255,0.55); }
    /* List */
    .ff-list-wrap { flex:1; overflow-y:auto; padding:14px 14px 24px; }
    .ff-list-dh { font-size:11px; font-weight:700; color:var(--gold); letter-spacing:0.06em; text-transform:uppercase; padding:12px 0 6px; margin-top:4px; }
    .ff-list-dh:first-child { padding-top:2px; margin-top:0; }
    .ff-list-item { display:flex; align-items:stretch; gap:0; background:rgba(255,255,255,0.05); border-radius:10px; margin-bottom:6px; overflow:hidden; }
    .ff-list-bar { width:4px; flex-shrink:0; }
    .ff-list-body { flex:1; padding:10px 12px; min-width:0; }
    .ff-list-who { font-size:11px; font-weight:700; letter-spacing:0.03em; margin-bottom:2px; }
    .ff-list-route { font-size:14px; font-weight:700; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .ff-list-detail { font-size:12px; color:rgba(255,255,255,0.42); margin-top:2px; }
    /* Map */
    .ff-map-filter-bar { display:flex; flex-direction:column; gap:6px; padding:8px 12px; flex-shrink:0; border-bottom:1px solid rgba(255,255,255,0.07); }
    .ff-filter-grp { display:flex; gap:6px; }
    .ff-pill { padding:4px 11px; border-radius:12px; border:1px solid rgba(255,255,255,0.18); background:none; color:rgba(255,255,255,0.5); font-size:12px; font-weight:600; cursor:pointer; transition:all 0.15s; }
    .ff-pill.active { background:var(--gold); border-color:var(--gold); color:var(--navy-dark); }
    .ff-pill:not(.active):hover { color:#fff; border-color:rgba(255,255,255,0.38); }
    #ff-map-container { flex:1; }
    /* GCal sync bar (F&F calendar view) — always visible, JS toggles inner connected/disconnected state */
    #ff-gcal-sync-bar {
      display: flex; align-items: center; gap: 8px; flex-shrink: 0;
      padding: 7px 14px; background: rgba(255,255,255,0.05);
      border-bottom: 1px solid rgba(255,255,255,0.07);
    }
    #ff-gcal-name-lbl {
      font-size: 13px; font-weight: 700; color: #fff; flex: 1;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .ff-gcal-last-sync { font-size: 11px; color: rgba(255,255,255,0.4); white-space: nowrap; }
    #ff-gcal-sync-btn {
      background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18);
      border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 600;
      color: #fff; cursor: pointer; white-space: nowrap; font-family: inherit;
      transition: background 0.15s;
    }
    #ff-gcal-sync-btn:hover { background: rgba(255,255,255,0.18); }
    #ff-gcal-sync-btn:disabled { opacity: 0.5; cursor: default; }
    .ff-gcal-edit-btn {
      background: none; border: none; color: rgba(255,255,255,0.35);
      font-size: 14px; cursor: pointer; padding: 2px 4px; line-height: 1;
      transition: color 0.15s;
    }
    .ff-gcal-edit-btn:hover { color: var(--gold); }
    /* Empty state */
    .ff-empty { text-align:center; padding:40px 20px; color:rgba(255,255,255,0.32); font-size:14px; line-height:1.6; }
    /* Crew panel (below calendar) */
    .ff-crew-panel { border-top:1px solid rgba(255,255,255,0.08); padding:12px 14px 16px; }
    .ff-crew-panel-title { font-size:11px; font-weight:700; color:var(--gold); letter-spacing:0.06em; text-transform:uppercase; margin-bottom:10px; }
    .ff-crew-row { display:flex; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.05); }
    .ff-crew-row:last-of-type { border-bottom:none; }
    .ff-crew-swatch { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
    .ff-crew-name { flex:1; font-size:14px; color:#fff; font-weight:500; }
    .ff-crew-toggle { position:relative; width:36px; height:20px; flex-shrink:0; }
    .ff-crew-toggle input { opacity:0; width:0; height:0; position:absolute; }
    .ff-crew-toggle-track { position:absolute; inset:0; border-radius:10px; background:rgba(255,255,255,0.15); cursor:pointer; transition:background 0.2s; }
    .ff-crew-toggle input:checked ~ .ff-crew-toggle-track { background:rgba(255,255,255,0.45); }
    .ff-crew-toggle-thumb { position:absolute; top:3px; left:3px; width:14px; height:14px; border-radius:50%; background:#fff; transition:transform 0.2s; pointer-events:none; }
    .ff-crew-toggle input:checked ~ .ff-crew-toggle-track .ff-crew-toggle-thumb { transform:translateX(16px); }
    .ff-add-crew-btn { display:flex; align-items:center; gap:6px; width:100%; margin-top:12px; padding:9px 14px; background:rgba(232,160,48,0.1); border:1px solid rgba(232,160,48,0.3); border-radius:10px; color:var(--gold); font-size:14px; font-weight:700; cursor:pointer; transition:all 0.15s; }
    .ff-add-crew-btn:hover { background:rgba(232,160,48,0.18); border-color:var(--gold); }

    /* ── TRIP PLANNER ── */
    .trip-scroll {
      flex: 1;
      overflow-y: auto;
      padding: 20px 16px 32px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }
    .upload-zone {
      border: 2px dashed rgba(232,160,48,0.35);
      border-radius: 16px;
      padding: 44px 24px;
      text-align: center;
      cursor: pointer;
      transition: all 0.2s;
      background: rgba(232,160,48,0.04);
      margin-top: 8px;
    }
    .upload-zone:hover, .upload-zone.drag-over {
      border-color: var(--gold);
      background: rgba(232,160,48,0.09);
    }
    .upload-zone svg { opacity: 0.45; margin-bottom: 14px; }
    .upload-zone h3 { font-size: 16px; font-weight: 700; color: var(--navy-dark); margin-bottom: 8px; }
    .upload-zone p  { font-size: 13px; color: var(--muted); }
    .upload-zone .upload-note { margin-top: 14px; font-size: 12px; color: var(--muted); opacity: 0.7; }

    /* ── Google Calendar Connect ─────────────────────────────────── */
    .gcal-divider {
      display: flex; align-items: center; gap: 10px;
      margin: 18px 0 14px; color: var(--muted); font-size: 12px;
    }
    .gcal-divider::before, .gcal-divider::after {
      content: ''; flex: 1; height: 1px; background: rgba(27,58,92,0.12);
    }
    .gcal-connect-btn {
      display: flex; align-items: center; justify-content: center; gap: 10px;
      width: 100%; padding: 13px 16px; border-radius: 12px;
      border: 1.5px solid rgba(27,58,92,0.18);
      background: #fff; cursor: pointer;
      font-size: 14px; font-weight: 600; color: var(--navy-dark);
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .gcal-connect-btn:hover { border-color: #4285F4; box-shadow: 0 2px 8px rgba(66,133,244,0.18); }
    .gcal-connect-btn img { width: 20px; height: 20px; }

    .gcal-connected-box {
      background: linear-gradient(135deg, #f0f7ff 0%, #e8f3ff 100%);
      border: 1.5px solid rgba(66,133,244,0.25);
      border-radius: 14px; padding: 16px 18px; margin-top: 8px;
    }
    .gcal-connected-header {
      display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
    }
    .gcal-connected-dot {
      width: 8px; height: 8px; border-radius: 50%; background: #34A853; flex-shrink: 0;
    }
    .gcal-connected-label {
      font-size: 13px; font-weight: 700; color: var(--navy-dark); flex: 1;
    }
    .gcal-disconnect-btn {
      font-size: 11px; color: var(--muted); background: none; border: none;
      cursor: pointer; text-decoration: underline; padding: 0;
    }
    .gcal-picker-row {
      display: flex; gap: 8px; align-items: center; margin-bottom: 10px;
    }
    .gcal-cal-select {
      flex: 1; padding: 9px 12px; border-radius: 8px;
      border: 1.5px solid rgba(27,58,92,0.15); font-size: 13px;
      color: var(--navy-dark); background: #fff; outline: none;
    }
    .gcal-cal-select:focus { border-color: #4285F4; }
    .gcal-sync-btn {
      padding: 9px 16px; border-radius: 8px; border: none;
      background: #4285F4; color: #fff; font-size: 13px; font-weight: 700;
      cursor: pointer; white-space: nowrap; transition: background 0.2s;
    }
    .gcal-sync-btn:hover { background: #3367d6; }
    .gcal-sync-btn:disabled { background: #9ec1fb; cursor: default; }
    .gcal-status-msg {
      font-size: 12px; color: var(--muted); min-height: 16px; margin-top: 4px;
    }
    .gcal-status-msg.ok  { color: #34A853; font-weight: 600; }
    .gcal-status-msg.err { color: #c0392b; }
    .gcal-last-sync {
      font-size: 11px; color: var(--muted); font-weight: 400;
    }

    /* Compact connected bar (replaces the big blue box once connected) */
    .gcal-compact-bar {
      display: flex; align-items: center; gap: 8px;
      padding: 8px 12px; border-radius: 10px; margin-top: 8px;
      background: rgba(52,168,83,0.08); border: 1px solid rgba(52,168,83,0.2);
    }
    .gcal-compact-dot { width: 7px; height: 7px; border-radius: 50%; background: #34A853; flex-shrink: 0; }
    .gcal-compact-label { font-size: 12px; font-weight: 600; color: var(--navy-dark); flex: 1; }
    .gcal-compact-sync-btn {
      font-size: 12px; font-weight: 700; padding: 5px 12px;
      border-radius: 7px; border: none; background: #4285F4; color: #fff;
      cursor: pointer; white-space: nowrap; transition: background 0.2s;
    }
    .gcal-compact-sync-btn:hover { background: #3367d6; }
    .gcal-compact-sync-btn:disabled { background: #9ec1fb; cursor: default; }
    .gcal-compact-manage-btn {
      font-size: 11px; color: var(--muted); background: none; border: none;
      cursor: pointer; white-space: nowrap; padding: 0 2px; text-decoration: underline;
    }
    .gcal-manage-panel {
      margin-top: 10px; background: #f5f9ff; border-radius: 10px;
      border: 1px solid rgba(66,133,244,0.18); padding: 12px 14px;
    }

    .trip-loading-box {
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      padding: 60px 20px; gap: 16px; text-align: center;
    }
    .trip-spinner {
      width: 36px; height: 36px;
      border: 3px solid var(--light);
      border-top-color: var(--gold);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .trip-loading-box p { font-size: 14px; color: var(--muted); }

    .trip-header-card {
      background: var(--navy-dark);
      border-radius: 14px;
      padding: 18px 20px;
      color: #fff;
    }
    .trip-pairing-id { font-size: 11px; font-weight: 700; color: var(--gold); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
    .trip-route { font-size: 22px; font-weight: 800; letter-spacing: 0.5px; margin-bottom: 4px; }
    .trip-dates { font-size: 13px; color: rgba(255,255,255,0.55); }

    .weather-card {
      background: #fff;
      border-radius: 12px;
      padding: 11px 14px;
      margin-bottom: 8px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.07);
      border-left: 4px solid var(--light);
    }
    .weather-card.weather-card-alert { border-left-color: #E05C5C; }
    .weather-card.weather-card-severe { border-left-color: #F5A623; }
    .weather-card-header {
      display: flex; justify-content: space-between; align-items: flex-start;
      margin-bottom: 6px;
    }
    .weather-label {
      display: inline-block;
      font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
      padding: 2px 8px; border-radius: 100px; margin-bottom: 4px; margin-right: 6px;
    }
    .label-overnight { background: #EEF2FF; color: #4F5BD5; }
    .label-departure { background: #E6F7EE; color: #1A7A3F; }
    .label-return    { background: #FFF3E0; color: #C07A00; }
    .weather-city { font-size: 15px; font-weight: 700; color: var(--navy-dark); }
    .weather-iata { font-size: 12px; color: var(--muted); margin-left: 5px; }
    .weather-date { font-size: 12px; color: var(--muted); white-space: nowrap; padding-top: 2px; }
    .weather-main {
      display: flex; align-items: center; gap: 8px;
      margin-bottom: 3px;
    }
    .weather-emoji { font-size: 20px; }
    .weather-temp { font-size: 15px; font-weight: 700; color: var(--navy-dark); }
    .weather-desc { font-size: 12px; color: var(--muted); }
    .weather-details { font-size: 12px; color: var(--muted); }
    .weather-sun { font-size: 12px; color: var(--muted); }
    .weather-alert {
      margin-top: 10px; padding: 8px 12px;
      background: #FFF0F0; border-radius: 8px;
      font-size: 12px; font-weight: 600; color: #C0392B;
    }
    .weather-unavail { font-size: 13px; color: var(--muted); font-style: italic; }

    /* ── NEXT TRIP CARD ── */
    .next-trip-card {
      margin: 16px 0 8px;
      background: #fff;
      border-radius: 14px;
      border: 1.5px solid var(--border);
      overflow: hidden;
    }
    .next-trip-header {
      display: flex; flex-direction: column; gap: 3px;
      padding: 14px 16px 12px;
      border-bottom: 1px solid var(--border);
    }
    .next-trip-label {
      font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
      text-transform: uppercase; color: var(--gold);
    }
    .next-trip-id {
      font-size: 17px; font-weight: 800; color: var(--navy-dark);
    }
    .next-trip-dates { font-size: 13px; color: var(--muted); }
    .next-trip-weather { padding: 4px 0 4px; }
    .next-trip-no-weather {
      padding: 14px 16px; font-size: 13px; color: var(--muted); font-style: italic;
    }

    /* ── Trip Panel (persistent below calendar) ────────────────────── */
    .trip-panel {
      margin: 16px 0 8px;
      background: var(--navy-dark);
      border-radius: 14px;
      border: 1.5px solid rgba(255,255,255,0.08);
      overflow: hidden;
    }
    /* Trip selector — horizontal scroll pills */
    .trip-selector-row {
      display: flex; gap: 8px; overflow-x: auto;
      padding: 12px 14px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }
    .trip-selector-row::-webkit-scrollbar { display: none; }
    .trip-selector-pill {
      position: relative;
      display: flex; flex-direction: column; align-items: flex-start; flex-shrink: 0;
      padding: 8px 13px; background: rgba(255,255,255,0.07);
      border: 1.5px solid transparent; border-radius: 10px;
      cursor: pointer; transition: all 0.15s; text-align: left;
    }
    .trip-selector-pill.active {
      background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.28);
    }
    .tsp-date {
      font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.55); white-space: nowrap;
    }
    .trip-selector-pill.active .tsp-date { color: rgba(255,255,255,0.72); }
    .tsp-id {
      font-size: 13px; font-weight: 800; color: rgba(255,255,255,0.85); white-space: nowrap;
    }
    .trip-selector-pill.active .tsp-id { color: #fff; }
    .tsp-conn-badges {
      position: absolute; top: -7px; right: -7px;
      display: flex; flex-direction: row-reverse; gap: 3px; align-items: center;
      z-index: 2;
    }
    .tsp-conn-badge {
      min-width: 18px; height: 18px; padding: 0 5px;
      border-radius: 9px; border: 2px solid #fff;
      font-size: 10px; font-weight: 900; line-height: 14px;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; transition: transform 0.12s;
    }
    .tsp-conn-badge:hover { transform: scale(1.15); }
    .tsp-conn-badge.direct { background: #22C55E; color: #fff; }
    .tsp-conn-badge.mutual { background: #60a5fa; color: #fff; }
    /* Trip panel header */
    .trip-panel-header {
      padding: 12px 16px 10px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .tp-header-pairing { font-size: 16px; font-weight: 800; color: #fff; }
    .tp-header-route   { font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 2px; }
    /* Tab bar */
    .trip-panel-tabs {
      display: flex; border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .trip-panel-tab {
      flex: 1; padding: 10px 6px;
      background: none; border: none; border-bottom: 2.5px solid transparent;
      font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.4);
      cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px;
      transition: color 0.15s, border-bottom-color 0.15s;
      margin-bottom: -1px;
    }
    .trip-panel-tab.active { color: #fff; border-bottom-color: var(--gold); }
    /* Tab content */
    .trip-panel-content { padding: 4px 12px 16px; min-height: 80px; }
    .tpanel-no-content {
      text-align: center; padding: 28px 16px;
      font-size: 14px; color: rgba(255,255,255,0.45); line-height: 1.6;
    }
    .tpanel-no-content strong { color: rgba(255,255,255,0.8); }
    .tpanel-no-content .tpanel-icon { font-size: 30px; display: block; margin-bottom: 6px; }
    /* Weather cards on dark trip panel */
    .trip-panel .weather-card {
      background: rgba(255,255,255,0.07); border-left-color: rgba(255,255,255,0.15);
      box-shadow: none;
    }
    .trip-panel .weather-card.weather-card-alert  { border-left-color: #E05C5C; }
    .trip-panel .weather-card.weather-card-severe { border-left-color: #F5A623; }
    .trip-panel .weather-city  { color: #fff; }
    .trip-panel .weather-iata, .trip-panel .weather-date,
    .trip-panel .weather-desc, .trip-panel .weather-details,
    .trip-panel .weather-sun,  .trip-panel .weather-unavail { color: rgba(255,255,255,0.55); }
    .trip-panel .weather-temp  { color: #fff; }
    .trip-panel .weather-alert { background: rgba(192,57,43,0.25); color: #ffa0a0; }
    .trip-panel .label-overnight { background: rgba(79,91,213,0.25); color: #a0a8ff; }
    .trip-panel .label-departure { background: rgba(26,122,63,0.25);  color: #7dde9d; }
    .trip-panel .label-return    { background: rgba(192,122,0,0.25);  color: #ffd580; }
    .trip-panel .next-trip-no-weather { color: rgba(255,255,255,0.45); }
    .trip-panel .trip-spinner { border-color: rgba(255,255,255,0.15); border-top-color: var(--gold); }

    /* Layover time bar */
    .layover-times {
      display: flex; align-items: center; gap: 6px;
      margin: 3px 0 6px;
      font-size: 12px; font-weight: 600; color: var(--navy-dark);
    }
    .layover-times .time-chip {
      background: var(--light); border-radius: 5px;
      padding: 2px 7px; font-size: 11px; font-weight: 700; color: var(--navy);
    }
    .layover-times .arrow { color: var(--muted); font-size: 11px; }
    .layover-duration { font-size: 11px; color: var(--muted); margin-left: auto; }

    /* Tap hint */
    .hourly-tap-hint {
      margin-top: 10px; padding-top: 8px;
      border-top: 1px solid var(--light);
      font-size: 11px; color: var(--muted);
      text-align: center; cursor: pointer;
      user-select: none;
    }
    .hourly-tap-hint:hover { color: var(--navy); }

    /* Hourly strip */
    .hourly-strip {
      display: none;
      overflow-x: auto;
      gap: 6px;
      padding: 12px 0 4px;
      margin-top: 8px;
      border-top: 1px solid var(--light);
      scrollbar-width: none;
    }
    .hourly-strip::-webkit-scrollbar { display: none; }
    .hourly-strip.open { display: flex; }
    .hour-block {
      flex-shrink: 0;
      display: flex; flex-direction: column; align-items: center;
      gap: 3px; min-width: 52px;
      padding: 6px 4px;
      border-radius: 10px;
      background: var(--bg);
    }
    .hour-block.highlight {
      background: #EEF2FF;
      outline: 1.5px solid #C5CAFF;
    }
    .hour-block .hb-time  { font-size: 10px; font-weight: 700; color: var(--muted); }
    .hour-block .hb-emoji { font-size: 18px; line-height: 1.2; }
    .hour-block .hb-temp  { font-size: 12px; font-weight: 700; color: var(--navy-dark); }
    .hour-block .hb-rain  { font-size: 10px; color: #4A90D9; }

    .trip-error-box {
      text-align: center; padding: 40px 20px;
    }
    .trip-error-box p { color: #C0392B; font-size: 14px; margin-bottom: 16px; }
    .trip-reset-btn {
      background: var(--navy-dark); color: #fff;
      border: none; border-radius: 10px;
      padding: 12px 28px; font-size: 14px; font-weight: 700;
      cursor: pointer;
    }
    .trip-reset-btn:hover { background: var(--navy); }

    /* ── Pairing conflict resolution state ── */
    .trip-conflict-box { padding: 20px 16px 28px; }
    .tcb-icon { font-size: 30px; text-align: center; margin-bottom: 8px; }
    .tcb-title {
      font-size: 17px; font-weight: 800; color: var(--navy-dark);
      text-align: center; margin-bottom: 6px;
    }
    .tcb-desc {
      font-size: 13px; color: var(--muted); text-align: center;
      margin-bottom: 18px; line-height: 1.5;
    }
    .tcb-trips { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
    .tcb-trip-card {
      background: var(--light); border-radius: 10px; padding: 12px 14px;
      border: 1px solid var(--border);
    }
    .tcb-trip-label {
      font-size: 10px; font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.8px; margin-bottom: 4px;
    }
    .tcb-trip-id { font-size: 14px; font-weight: 800; color: var(--navy-dark); margin-bottom: 2px; }
    .tcb-trip-dates { font-size: 12px; color: var(--muted); }
    .tcb-trip-route { font-size: 12px; color: var(--muted); margin-top: 2px; }
    .tcb-vs {
      font-size: 11px; font-weight: 700; color: var(--muted);
      text-align: center; letter-spacing: 0.5px; padding: 2px 0;
    }
    .tcb-actions { display: flex; flex-direction: column; gap: 8px; }
    .tcb-btn-new {
      width: 100%; padding: 13px; border-radius: 10px;
      background: var(--navy-dark); color: #fff;
      border: none; font-size: 14px; font-weight: 700; cursor: pointer;
    }
    .tcb-btn-new:hover { background: var(--navy); }
    .tcb-btn-cancel {
      width: 100%; padding: 12px; border-radius: 10px;
      background: transparent; color: var(--muted);
      border: 1.5px solid var(--border); font-size: 14px; font-weight: 600; cursor: pointer;
    }
    .tcb-btn-cancel:hover { border-color: #aaa; color: var(--navy-dark); }

    .trip-new-btn {
      background: none; border: 2px solid var(--light);
      border-radius: 10px; padding: 12px 24px;
      font-size: 14px; font-weight: 600; color: var(--muted);
      cursor: pointer; width: 100%; margin-top: 4px;
    }
    .trip-new-btn:hover { border-color: var(--navy); color: var(--navy); }

    /* ── Button + ? help icon row ── */
    .btn-help-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
    .btn-help-row .trip-new-btn { flex: 1; width: auto; margin-top: 0; }
    .btn-help-row .test-pairing-btn { flex: 1; width: auto; margin-top: 0; }
    /* ── Compact Add / Test / Sync action row ── */
    .cal-action-row { display: flex; gap: 7px; margin-top: 10px; }
    .cal-action-btn {
      flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
      padding: 9px 8px; border-radius: 10px;
      font-size: 12px; font-weight: 700;
      cursor: pointer; white-space: nowrap; transition: background 0.15s, color 0.15s, border-color 0.15s;
    }
    .cal-action-btn-add {
      background: var(--navy-dark); color: #fff; border: 2px solid var(--navy-dark);
    }
    .cal-action-btn-add:hover { background: var(--navy); border-color: var(--navy); }
    .cal-action-btn-test {
      background: none; color: var(--navy-mid);
      border: 1.5px dashed var(--navy-mid);
    }
    .cal-action-btn-test:hover { background: rgba(27,58,92,0.06); border-color: var(--navy-dark); color: var(--navy-dark); }
    .cal-action-btn-sync {
      background: #4285F4; color: #fff; border: 2px solid #4285F4;
    }
    .cal-action-btn-sync:hover { background: #3367d6; border-color: #3367d6; }
    .cal-action-btn-sync:disabled { background: #9ec1fb; border-color: #9ec1fb; cursor: default; }
    .cal-action-btn-gcal {
      background: none; color: var(--navy-mid); border: 1.5px solid rgba(27,58,92,0.3);
    }
    .cal-action-btn-gcal:hover { background: rgba(66,133,244,0.08); border-color: #4285F4; color: var(--navy-dark); }
    .btn-help-icon {
      flex-shrink: 0; width: 32px; height: 32px;
      background: var(--light); border: 1.5px solid var(--border);
      border-radius: 50%; font-size: 13px; font-weight: 800;
      color: var(--muted); cursor: pointer; line-height: 1;
      display: flex; align-items: center; justify-content: center;
      transition: background 0.15s, color 0.15s, border-color 0.15s;
    }
    .btn-help-icon:hover { background: var(--gold); color: #fff; border-color: var(--gold); }

    /* ── Info popup (bottom sheet) ── */
    .info-popup-overlay {
      display: none; position: fixed; inset: 0; z-index: 820;
      background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
    }
    .info-popup-overlay.open { display: block; }
    .info-popup-sheet {
      display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 830;
      background: #fff; border-radius: 20px 20px 0 0;
      max-height: 80vh; overflow-y: auto;
      box-shadow: 0 -4px 32px rgba(0,0,0,0.18);
      animation: slideUp 0.25s ease-out;
    }
    .info-popup-sheet.open { display: block; }
    .info-popup-handle {
      width: 36px; height: 4px; background: #d0d5dd;
      border-radius: 2px; margin: 12px auto 0; display: block;
    }
    .info-popup-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 20px 10px;
      border-bottom: 1px solid var(--light);
    }
    .info-popup-header h3 {
      font-size: 15px; font-weight: 800; color: var(--navy-dark);
    }
    .info-popup-close {
      background: var(--light); border: none; border-radius: 50%;
      width: 30px; height: 30px; font-size: 16px; color: var(--muted);
      cursor: pointer; display: flex; align-items: center; justify-content: center;
    }
    .info-popup-body { padding: 16px 20px 36px; }
    .ipu-section { margin-bottom: 18px; }
    .ipu-section:last-child { margin-bottom: 0; }
    .ipu-label {
      font-size: 10px; font-weight: 700; color: var(--muted);
      text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px;
    }
    .ipu-app-row {
      display: flex; align-items: flex-start; gap: 12px;
      padding: 10px 12px; background: var(--light);
      border-radius: 10px; margin-bottom: 6px;
    }
    .ipu-app-row:last-child { margin-bottom: 0; }
    .ipu-app-icon {
      width: 34px; height: 34px; border-radius: 8px;
      background: var(--navy-dark); color: #fff;
      font-size: 11px; font-weight: 800; letter-spacing: 0.3px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .ipu-app-info { flex: 1; min-width: 0; }
    .ipu-app-name { font-size: 13px; font-weight: 700; color: var(--navy-dark); margin-bottom: 2px; }
    .ipu-app-desc { font-size: 12px; color: var(--muted); line-height: 1.45; }
    .ipu-tip {
      font-size: 12px; color: var(--muted); line-height: 1.5;
      padding: 10px 12px; background: rgba(232,160,48,0.08);
      border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0;
      margin-top: 12px;
    }

    /* ── CONCIERGE ──────────────────────────────────────────────── */
    .concierge-wrap {
      display: flex; flex-direction: column;
      height: 100%; overflow: hidden;
    }
    .concierge-context-bar {
      background: var(--navy-dark); color: #fff;
      padding: 8px 16px; font-size: 12px; font-weight: 600;
      display: flex; align-items: center; gap: 8px;
      flex-shrink: 0;
    }
    .concierge-context-bar span { opacity: 0.75; font-weight: 400; }
    .concierge-chips-row {
      padding: 10px 12px 6px;
      display: flex; gap: 7px; overflow-x: auto; flex-shrink: 0;
      scrollbar-width: none;
    }
    .concierge-chips-row::-webkit-scrollbar { display: none; }
    .concierge-chip {
      flex-shrink: 0;
      background: #1e3a5f; border: 1.5px solid #2d5a8e;
      border-radius: 20px; padding: 6px 13px;
      font-size: 12px; font-weight: 700; color: #93c5fd;
      cursor: pointer; white-space: nowrap;
      transition: background 0.15s, border-color 0.15s;
    }
    .concierge-chip:hover { background: #264d7a; border-color: #4a7ab5; }
    .concierge-messages {
      flex: 1; overflow-y: auto;
      padding: 12px 14px;
      display: flex; flex-direction: column; gap: 12px;
    }
    .cmsg {
      display: flex; flex-direction: column;
      max-width: 88%;
    }
    .cmsg.user { align-self: flex-end; align-items: flex-end; }
    .cmsg.assistant { align-self: stretch; align-items: flex-start;
      flex-direction: column; width: 100%; }
    .cmsg-bubble {
      padding: 10px 14px;
      border-radius: 18px;
      font-size: 14px; line-height: 1.55;
    }
    .cmsg.user .cmsg-bubble {
      background: var(--navy-dark); color: #fff;
      border-bottom-right-radius: 4px;
    }
    .cmsg.assistant .cmsg-bubble {
      background: #fff;
      border: 1.5px solid var(--light);
      color: var(--navy-dark);
      border-bottom-left-radius: 4px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.06);
      width: 100%;
      box-sizing: border-box;
    }
    .cmsg-bubble ul, .cmsg-bubble ol {
      margin: 6px 0 0 18px; padding: 0;
    }
    .cmsg-bubble li { margin-bottom: 4px; }
    .cmsg-bubble strong { font-weight: 700; }
    .cmsg-bubble a { color: var(--gold); }

    /* ── PLACE CHIPS (concierge recommendations) ── */
    .place-chip {
      display: inline-flex; align-items: center; gap: 4px;
      background: rgba(232,160,48,0.12);
      border: 1px solid rgba(232,160,48,0.4);
      border-radius: 12px;
      padding: 2px 9px 2px 6px;
      color: var(--navy-dark);
      font-size: 0.9em; font-weight: 600;
      cursor: pointer; white-space: nowrap;
      position: relative; vertical-align: middle;
      transition: background 0.15s;
    }
    .place-chip:hover { background: rgba(232,160,48,0.24); }
    .place-popover {
      display: none; position: absolute;
      top: calc(100% + 6px); left: 0;
      background: #fff;
      border: 1px solid var(--light);
      border-radius: 12px;
      box-shadow: 0 4px 24px rgba(0,0,0,0.13);
      padding: 5px; z-index: 620;
      min-width: 190px;
    }
    .place-popover.open { display: block; }
    .place-popover-link {
      display: flex; align-items: center; gap: 9px;
      padding: 9px 11px; border-radius: 8px;
      text-decoration: none; color: var(--navy-dark);
      font-size: 13px; font-weight: 500; white-space: nowrap;
    }
    .place-popover-link:hover { background: var(--bg); }
    .place-popover-link span { font-size: 16px; }
    .cmsg-typing .cmsg-bubble {
      color: var(--muted); font-style: italic;
    }
    .cmsg-typing-dots::after {
      content: '●●●';
      animation: typing-pulse 1.2s infinite;
      letter-spacing: 2px;
    }
    @keyframes typing-pulse {
      0%,100% { opacity: 0.3; } 50% { opacity: 1; }
    }
    .concierge-input-row {
      padding: 10px 12px 12px;
      display: flex; gap: 8px; align-items: flex-end;
      border-top: 1px solid rgba(255,255,255,0.1);
      background: var(--navy-dark); flex-shrink: 0;
    }
    .concierge-input {
      flex: 1; resize: none; overflow: hidden;
      border: 1.5px solid rgba(255,255,255,0.12); border-radius: 20px;
      padding: 10px 14px; font-size: 14px; font-family: inherit;
      color: #fff; background: rgba(255,255,255,0.07);
      outline: none; max-height: 100px; line-height: 1.4;
      transition: border-color 0.15s;
    }
    .concierge-input:focus { border-color: var(--gold); background: rgba(255,255,255,0.1); }
    .concierge-send-btn {
      width: 40px; height: 40px; flex-shrink: 0;
      background: var(--navy-dark); color: #fff;
      border: none; border-radius: 50%; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      font-size: 18px; transition: background 0.15s;
    }
    .concierge-send-btn:hover { background: var(--navy-mid); }
    .concierge-send-btn:disabled { background: #ccc; cursor: default; }
    .concierge-empty {
      flex: 1; display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      gap: 8px; padding: 20px; text-align: center;
    }
    .concierge-empty-icon { font-size: 40px; }
    .concierge-empty-title { font-size: 18px; font-weight: 800; color: var(--navy-dark); }
    .concierge-empty-sub { font-size: 13px; color: var(--muted); max-width: 260px; line-height: 1.5; }

    /* ── SCHEDULE CALENDAR ───────────────────────────────────────── */
    .cal-header {
      display: flex; justify-content: space-between; align-items: center;
      position: relative; margin-bottom: 14px;
    }
    .cal-month-title {
      font-size: 18px; font-weight: 800; color: var(--navy-dark);
      position: absolute; left: 50%; transform: translateX(-50%);
      white-space: nowrap; pointer-events: none;
    }
    .cal-share-row { display: flex; gap: 8px; }
    .cal-share-btn {
      display: flex; align-items: center; gap: 4px;
      background: var(--navy-dark); color: #fff;
      border: none; border-radius: 7px;
      padding: 5px 10px; font-size: 11px; font-weight: 600;
      cursor: pointer; transition: background 0.15s;
    }
    .cal-share-btn:hover { background: var(--navy); }
    .cal-share-btn.check { background: #2D7D46; }
    .cal-share-btn:disabled { opacity: 0.6; cursor: default; }
    .cal-dow-row {
      display: grid; grid-template-columns: repeat(7, 1fr);
      gap: 2px; margin-bottom: 3px;
    }
    .cal-dow {
      text-align: center; font-size: 10px; font-weight: 700;
      color: var(--muted); letter-spacing: 0.5px; text-transform: uppercase;
      padding: 2px 0;
    }
    .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
    .cal-cell {
      min-height: 52px; background: #fff;
      border-radius: 7px; padding: 4px 3px;
      border: 1px solid var(--light);
      display: flex; flex-direction: column; overflow: visible;
      position: relative;
    }
    .cal-cell.cal-today { border-color: var(--gold); background: rgba(232,160,48,0.05); }
    .cal-cell.cal-empty { background: transparent; border-color: transparent; }
    .cal-day-num {
      font-size: 11px; font-weight: 700; color: var(--navy-dark);
      text-align: center; line-height: 1.4; flex-shrink: 0;
    }
    .cal-cell.cal-today .cal-day-num { color: var(--gold); }
    .cal-badges { display: flex; flex-direction: column; gap: 1.5px; flex: 1; margin-top: 2px; }
    .cal-badge {
      font-size: 9px; font-weight: 700; border-radius: 3px; padding: 2px 3px;
      cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
      color: #fff; text-align: center; letter-spacing: 0.3px;
      transition: opacity 0.15s; line-height: 1.3;
    }
    .cal-badge:hover { opacity: 0.82; }
    /* Invisible slot-holder — same height as .cal-badge so fixed tracks stay aligned */
    .cal-badge-spacer { font-size: 9px; padding: 2px 3px; line-height: 1.3; visibility: hidden; }
    /* Trip color palette */
    .trip-c0 { background: #0D1F35; }
    .trip-c1 { background: #B7411E; }
    .trip-c2 { background: #2D7D46; }
    .trip-c3 { background: #1A5276; }
    .trip-c4 { background: #6C3483; }
    .trip-c5 { background: #A04000; }
    .trip-c6 { background: #0E6655; }
    .trip-c7 { background: #7B3F00; }
    /* Special day types */
    .type-reserve  { background: #4F5BD5; }
    .type-gdo      { background: #1A7A3F; }
    .type-vacation,.type-pto { background: #B7860B; }
    .type-sick     { background: #C0392B; }
    .type-training { background: #5D4E6D; }
    .type-deadhead { background: #5D6D7E; }
    .cal-badge.cal-cont { font-size: 7px; padding: 2px 2px; letter-spacing: 0; }
    /* Spanning trip bars — seamless color across day cells, all same size.
       Negative margins are -7px to create 2px of real overlap across the 2px grid gap,
       preventing the hairline white gap that -5px (just barely touching) produced. */
    .cal-badge.span-start,
    .cal-badge.span-mid,
    .cal-badge.span-end   { font-size: 9px; padding: 2px 3px; position: relative; z-index: 2; }
    .cal-badge.span-start { border-radius: 3px 0 0 3px; margin-right: -7px; }
    .cal-badge.span-mid   { border-radius: 0; margin-left: -7px; margin-right: -7px; }
    .cal-badge.span-end   { border-radius: 0 3px 3px 0; margin-left: -7px; }
    /* Last day of a multi-day trip when it falls on the first column of a new calendar row.
       No negative margins (nothing to bleed into from the left), but same visual weight as
       the spanning badges by filling to the cell edges. */
    .cal-badge.span-row-cap { border-radius: 3px; margin-right: -7px; position: relative; z-index: 2; }
    /* Crew-match indicator — removed; connections shown via badge row below the card */
    .cal-badge.has-match-dot { }
    .cal-overflow { font-size: 8px; background: rgba(0,0,0,0.15); color: #fff; }
    .cal-legend {
      display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px;
    }
    .cal-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
    .cal-legend-dot { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }

    /* ── TRIP DETAIL MODAL ───────────────────────────────────────── */
    .trip-detail-overlay {
      display: none; position: fixed; inset: 0; z-index: 900;
      background: rgba(0,0,0,0.45); backdrop-filter: blur(2px);
    }
    .trip-detail-overlay.open { display: flex; align-items: flex-end; }
    .trip-detail-sheet {
      background: var(--navy-dark); border-radius: 20px 20px 0 0;
      width: 100%; max-height: 85vh; overflow-y: auto;
      box-shadow: 0 -4px 32px rgba(0,0,0,0.4);
      animation: slideUp 0.25s ease-out;
    }
    @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
    .trip-detail-handle {
      width: 36px; height: 4px; background: rgba(255,255,255,0.2);
      border-radius: 2px; margin: 12px auto 0; display: block;
    }
    .trip-detail-header {
      padding: 14px 20px 14px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
      display: flex; justify-content: space-between; align-items: flex-start;
    }
    .trip-detail-id {
      font-size: 10px; font-weight: 700; color: var(--gold);
      letter-spacing: 1px; text-transform: uppercase; margin-bottom: 3px;
    }
    .trip-detail-route { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 2px; }
    .trip-detail-dates { font-size: 12px; color: rgba(255,255,255,0.5); }
    .trip-detail-close {
      background: rgba(255,255,255,0.1); border: none; border-radius: 50%;
      width: 30px; height: 30px; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; font-size: 14px; color: rgba(255,255,255,0.6); margin-left: 12px;
    }
    .trip-detail-close:hover { background: rgba(255,255,255,0.18); color: #fff; }
    .trip-detail-body { padding: 16px 20px 32px; }
    .trip-detail-share-row { display: flex; gap: 8px; margin-bottom: 16px; }
    .trip-detail-share-btn {
      flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
      background: var(--gold); color: var(--navy-dark);
      border: none; border-radius: 10px; padding: 11px 14px;
      font-size: 13px; font-weight: 700; cursor: pointer;
    }
    .trip-detail-share-btn:hover { background: var(--gold-light); }
    .trip-detail-share-btn.check { background: #3BB070; color: #fff; }
    .trip-detail-share-btn:disabled { opacity: 0.6; cursor: default; }
    .trip-detail-delete-btn {
      padding: 8px 14px; border-radius: 8px; border: 1.5px solid rgba(255,255,255,0.18);
      background: transparent; color: rgba(255,255,255,0.5); font-size: 13px; font-weight: 500;
      cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
    }
    .trip-detail-delete-btn:hover { border-color: #E05C5C; color: #E05C5C; }
    .trip-detail-delete-btn.armed { background: #dc3545; color: #fff; border-color: #dc3545; }
    .trip-legs-title {
      font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.4);
      letter-spacing: 0.8px; text-transform: uppercase;
      margin-bottom: 10px;
    }
    .trip-leg-row {
      display: flex; gap: 12px; align-items: center;
      padding: 8px 0 6px; border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .trip-leg-row:last-child { border-bottom: none; }
    /* FF flight alert bell button */
    .ff-alert-bell-btn {
      background: none; border: 1px solid rgba(255,255,255,0.15);
      border-radius: 8px; padding: 3px 7px; font-size: 11px;
      cursor: pointer; flex-shrink: 0; color: rgba(255,255,255,0.55);
      transition: background 0.15s, color 0.15s, border-color 0.15s; line-height: 1;
    }
    .ff-alert-bell-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
    .ff-alert-bell-btn.subscribed {
      border-color: var(--gold); color: var(--gold); background: rgba(232,160,48,0.12);
    }
    .ff-alert-bell-btn.subscribed:hover { background: rgba(232,160,48,0.22); }
    /* FF flight alert modal */
    #ff-alert-overlay {
      position: fixed; inset: 0; z-index: 1200;
      background: rgba(0,0,0,0.6);
      display: flex; align-items: flex-end; justify-content: center;
      opacity: 0; pointer-events: none;
      transition: opacity 0.2s;
    }
    #ff-alert-overlay.open { opacity: 1; pointer-events: auto; }
    #ff-alert-sheet {
      width: 100%; max-width: 480px;
      background: var(--navy-mid);
      border-radius: 20px 20px 0 0;
      padding-bottom: env(safe-area-inset-bottom, 20px);
      transform: translateY(100%);
      transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    }
    #ff-alert-overlay.open #ff-alert-sheet { transform: translateY(0); }
    .ff-alert-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 8px; }
    .ff-alert-title { font-size: 17px; font-weight: 700; color: #fff; }
    .ff-alert-close-btn { background: none; border: none; color: rgba(255,255,255,0.45); font-size: 22px; cursor: pointer; padding: 4px; line-height: 1; }
    .ff-alert-close-btn:hover { color: #fff; }
    .ff-alert-flight-lbl { padding: 0 20px 4px; font-size: 24px; font-weight: 800; color: var(--gold); }
    .ff-alert-desc { font-size: 13px; color: rgba(255,255,255,0.45); padding: 0 20px 10px; line-height: 1.5; }
    .ff-alert-check-row {
      display: flex; align-items: flex-start; gap: 14px;
      padding: 14px 16px; margin: 6px 20px 0;
      background: var(--navy-dark);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px;
      cursor: pointer; transition: background 0.15s;
    }
    .ff-alert-check-row:hover { background: rgba(255,255,255,0.06); }
    .ff-alert-check-row input[type="checkbox"] {
      margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0;
      accent-color: var(--gold); cursor: pointer;
    }
    .ff-alert-opt-title { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 3px; }
    .ff-alert-opt-desc  { font-size: 12px; color: rgba(255,255,255,0.45); line-height: 1.4; }
    .ff-alert-sub-btn {
      display: block; width: calc(100% - 40px); margin: 14px 20px 0;
      background: var(--gold); color: #fff; border: none;
      border-radius: 12px; padding: 15px; font-size: 15px; font-weight: 700;
      cursor: pointer; font-family: inherit; text-align: center;
    }
    .ff-alert-sub-btn:disabled { opacity: 0.6; cursor: not-allowed; }
    .ff-alert-subbed-msg { text-align: center; padding: 16px 20px 0; color: #4ade80; font-size: 15px; font-weight: 600; }
    a.flight-link, button.flight-link {
      color: inherit; text-decoration: underline dotted; cursor: pointer;
      background: none; border: none; padding: 0; font: inherit;
    }
    a.flight-link:hover, button.flight-link:hover { opacity: 0.75; }
    .trip-leg-flight {
      font-size: 11px; font-weight: 700; color: var(--gold);
      white-space: nowrap; min-width: 54px;
    }
    .trip-leg-route { flex: 1; min-width: 0; }
    .trip-leg-airports { font-size: 15px; font-weight: 800; color: #fff; }
    .trip-leg-times { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 1px; }
    .trip-leg-overnight {
      font-size: 10px; font-weight: 700;
      background: rgba(79,91,213,0.25); color: #a0a8ff;
      border-radius: 4px; padding: 2px 6px; white-space: nowrap;
    }
    /* ── Per-leg notification indicator badges ── */
    .trip-notif-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
    .trip-notif-badge {
      font-size: 10px; font-weight: 700; border-radius: 4px;
      padding: 2px 6px; white-space: nowrap;
    }
    .trip-notif-badge.delay   { background: rgba(232,160,48,0.18); color: var(--gold); }
    .trip-notif-badge.arrival { background: rgba(74,222,128,0.15); color: #4ade80; }
    /* ── Flight status badge ── */
    .flt-status-badge {
      display: inline-flex; align-items: center; gap: 4px;
      font-size: 10px; font-weight: 700; border-radius: 5px;
      padding: 2px 7px; white-space: nowrap; letter-spacing: 0.01em;
      margin-top: 4px;
    }
    .flt-status-badge.on-time   { background: rgba(52,199,89,0.18);  color: #4ade80; }
    .flt-status-badge.delayed   { background: rgba(251,146,60,0.18); color: #fb923c; }
    .flt-status-badge.cancelled { background: rgba(239,68,68,0.18);  color: #f87171; }
    .flt-status-badge.departed  { background: rgba(96,165,250,0.18); color: #60a5fa; }
    .flt-status-badge.arrived   { background: rgba(96,165,250,0.18); color: #60a5fa; }
    /* ── Dedicated layover row ── */
    .trip-layover-row {
      display: flex; align-items: center; gap: 10px;
      padding: 8px 12px; margin: 2px 0 8px;
      background: rgba(255,255,255,0.06); border-radius: 8px;
      border-left: 3px solid rgba(79,91,213,0.6);
    }
    .trip-layover-icon { font-size: 15px; flex-shrink: 0; }
    .trip-layover-info { flex: 1; min-width: 0; }
    .trip-layover-apt  { font-size: 13px; font-weight: 800; color: #fff; }
    .trip-layover-dur  { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 1px; }
    .trip-layover-crew {
      font-size: 11px; font-weight: 700;
      color: var(--gold); background: rgba(196,125,30,0.15);
      border: 1px solid rgba(196,125,30,0.35);
      border-radius: 10px; padding: 2px 8px; white-space: nowrap;
    }
    .trip-layover-row.clickable { cursor: pointer; }
    .trip-layover-row.clickable:active { opacity: 0.75; }
    .trip-no-legs {
      text-align: center; padding: 24px 0;
      color: rgba(255,255,255,0.4); font-size: 13px; line-height: 1.6;
    }
    /* ── Trip-detail crew match toggle pill ── */
    .trip-match-pill {
      display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
      background: rgba(196,125,30,0.12); border: 1px solid rgba(196,125,30,0.35);
      color: var(--gold); font-size: 12px; font-weight: 600; border-radius: 20px;
      padding: 7px 14px; cursor: pointer; margin-bottom: 14px; box-sizing: border-box;
      transition: background 0.15s, color 0.15s, border-color 0.15s;
    }
    .trip-match-pill.off {
      background: rgba(52,199,89,0.12); border-color: rgba(52,199,89,0.32); color: #4ade80;
    }
    .tmp-label { flex: 1; text-align: center; }
    .tmp-arrow { font-size: 11px; flex-shrink: 0; }
    /* Hide inline match rows when pill is toggled off */
    #trip-detail-legs.matches-hidden .trip-match-row { display: none; }

    /* ── Day group headers (collapse past days) ── */
    .trip-day-header {
      display: flex; align-items: center; gap: 7px;
      padding: 7px 0 5px; margin-top: 6px;
      cursor: pointer; user-select: none;
      border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .trip-day-header:first-child { margin-top: 0; }
    .trip-day-arrow { font-size: 10px; color: rgba(255,255,255,0.4); flex-shrink: 0; }
    .trip-day-date  { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.65);
                      text-transform: uppercase; letter-spacing: 0.05em; flex: 1; }
    .trip-day-header.past .trip-day-date { color: rgba(255,255,255,0.35); }
    .trip-day-past-tag {
      font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.35);
      background: rgba(255,255,255,0.07); border-radius: 8px; padding: 1px 7px;
    }
    .trip-day-group { overflow: hidden; }
    .trip-day-group.collapsed { display: none; }

    /* ── Trip-detail match rows ── */
    .trip-match-row {
      display: flex; align-items: center; gap: 10px;
      padding: 9px 12px; border-radius: 8px; margin: 5px 0 8px;
      border-left: 3px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.06);
      cursor: pointer; transition: opacity 0.15s;
    }
    .trip-match-row.sit    { border-left-color: #93c5fd; background: rgba(100,148,230,0.1); }
    .trip-match-row.flight { border-left-color: #60a5fa; background: rgba(37,99,235,0.15); }
    .trip-match-row:hover { opacity: 0.82; }
    .trip-match-icon { font-size: 15px; flex-shrink: 0; }
    /* ── Inline crew pills (on leg/layover rows) ── */
    .trip-leg-row { flex-wrap: wrap; }
    .trip-leg-crew-pills { display: flex; flex-wrap: wrap; gap: 5px; width: 100%; padding: 0; margin: 4px 0 2px; border-left: none; background: none; }
    .trip-crew-pill { display: inline-flex; align-items: center; gap: 4px; background: rgba(52,199,89,0.16); color: #4ade80; border: 1px solid rgba(52,199,89,0.28); border-radius: 20px; padding: 3px 10px; font-size: 12px; font-weight: 500; cursor: pointer; }
    .trip-crew-pill.sit { background: rgba(52,199,89,0.16); color: #4ade80; border-color: rgba(52,199,89,0.28); }
    .trip-crew-pill:hover { opacity: 0.8; }
    .trip-match-body { flex: 1; min-width: 0; }
    .trip-match-who  { font-size: 13px; font-weight: 700; color: #fff; }
    .trip-match-meta { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 1px; }
    .trip-match-arrow { font-size: 12px; color: rgba(255,255,255,0.35); flex-shrink: 0; }
    /* ── Match detail mini-popup (slides up above trip sheet) ── */
    .match-detail-overlay {
      display: none; position: fixed; inset: 0; z-index: 950;
      background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
      align-items: flex-end;
    }
    .match-detail-overlay.open { display: flex; }
    .match-detail-sheet {
      background: var(--navy-dark); border-radius: 20px 20px 0 0;
      width: 100%; padding: 20px 20px 36px;
      box-shadow: 0 -4px 32px rgba(0,0,0,0.4);
      animation: slideUp 0.22s ease-out;
      position: relative;
    }
    .match-detail-handle { width: 36px; height: 4px; background: rgba(255,255,255,0.2); border-radius: 2px; margin: 0 auto 18px; }
    .match-detail-type {
      display: inline-flex; align-items: center; gap: 5px;
      font-size: 11px; font-weight: 800; letter-spacing: 0.7px;
      text-transform: uppercase; border-radius: 20px;
      padding: 3px 10px; margin-bottom: 10px; color: #fff;
    }
    .match-detail-type.layover { background: rgba(255,255,255,0.14); }
    .match-detail-type.sit     { background: rgba(100,148,230,0.35); }
    .match-detail-type.flight  { background: rgba(255,255,255,0.14); }
    .match-detail-airport { font-size: 30px; font-weight: 900; color: #fff; line-height: 1; }
    .match-detail-city    { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 4px; }
    .match-detail-rows    { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
    .match-detail-row     { background: rgba(255,255,255,0.07); border-radius: 10px; padding: 11px 14px; }
    .match-detail-label   { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.38); letter-spacing: 0.6px; text-transform: uppercase; margin-bottom: 3px; }
    .match-detail-times   { font-size: 14px; font-weight: 700; color: #fff; }
    .match-detail-overlap { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 2px; }

    /* ── MATCH DETAIL BAR CHART ── */
    .mdchart { margin: 4px 0 16px; }
    .mdchart-title {
      font-size: 10px; font-weight: 800; text-transform: uppercase;
      letter-spacing: 0.6px; color: rgba(255,255,255,0.38); margin-bottom: 14px;
    }
    .mdchart-person { margin-bottom: 18px; }
    .mdchart-person:last-of-type { margin-bottom: 8px; }
    .mdchart-header {
      display: flex; justify-content: space-between; align-items: baseline;
      margin-bottom: 6px;
    }
    .mdchart-name {
      font-size: 13px; font-weight: 800; color: #fff;
    }
    .mdchart-times-text {
      font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.5);
      letter-spacing: 0.01em;
    }
    .mdchart-track-wrap { position: relative; overflow: visible; }
    .mdchart-track {
      height: 34px; background: transparent;
      border-radius: 10px; position: relative; overflow: visible;
    }
    .mdchart-bar {
      position: absolute; top: 0; height: 100%; border-radius: 10px;
      display: flex; align-items: center;
      padding: 0 8px; box-sizing: border-box;
      transition: opacity 0.2s;
    }
    .mdchart-bar-mine, .mdchart-bar-layover, .mdchart-bar-sit { background: rgba(255,255,255,0.22); } /* fallback; overridden by inline gradient */
    .mdchart-overlap-highlight { display: none; } /* replaced by per-bar gradient */
    .mdchart-tick-row {
      position: relative; height: 18px; margin-top: 4px;
    }
    .mdchart-tick {
      position: absolute; font-size: 10px; font-weight: 700;
      color: rgba(255,255,255,0.55); white-space: nowrap;
      transform: translateX(-50%);
    }
    .mdchart-divider {
      border: none; border-top: 1px dashed rgba(255,255,255,0.1);
      margin: 4px 0 18px;
    }
    .mdchart-footer {
      text-align: center; font-size: 13px; font-weight: 700;
      color: var(--gold); padding: 6px 0 2px;
    }
    .mdchart-no-data {
      font-size: 13px; color: rgba(255,255,255,0.4); text-align: center;
      padding: 8px 0;
    }
    /* Anchor ruler — shows real-time markers (6AM, 9AM, 12PM…) between the bars */
    .mdchart-anchor-row {
      position: relative; height: 26px; margin: 2px 0 10px;
      border-top: 1px solid rgba(255,255,255,0.08);
    }
    .mdchart-anchor-tick {
      position: absolute; display: flex; flex-direction: column; align-items: center;
      transform: translateX(-50%); top: 0;
    }
    .mdchart-anchor-tick::before {
      content: ''; display: block; width: 1px; height: 5px;
      background: rgba(255,255,255,0.2);
    }
    .mdchart-anchor-tick span {
      font-size: 9px; font-weight: 700; color: rgba(255,255,255,0.4);
      white-space: nowrap; margin-top: 1px; letter-spacing: 0.01em;
    }
    /* Inbound / outbound flight number row below each person header */
    .mdchart-flights {
      display: flex; justify-content: space-between; align-items: center;
      font-size: 11px; color: rgba(255,255,255,0.45); margin: 2px 0 7px; padding: 0 2px;
    }
    .mdchart-flights a.flight-link {
      color: var(--gold); font-weight: 700; font-size: 11px;
    }
    .mdchart-flights .flt-none { color: transparent; }
    .match-detail-remind  {
      width: 100%; padding: 13px; border-radius: 12px; border: none;
      background: var(--gold); color: var(--navy-dark); font-size: 14px; font-weight: 700;
      cursor: pointer;
    }
    .match-detail-remind.is-set { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }
    .match-detail-close {
      position: absolute; top: 14px; right: 16px;
      background: var(--light); border: none; border-radius: 50%;
      width: 30px; height: 30px; display: flex; align-items: center;
      justify-content: center; cursor: pointer; font-size: 14px; color: var(--muted);
    }
    /* ── EVENTS SECTION ── */
    .events-section {
      margin-top: 14px; padding-top: 12px;
      border-top: 1px solid var(--light);
    }
    .events-header {
      font-size: 12px; font-weight: 700; color: var(--navy);
      letter-spacing: 0.4px; text-transform: uppercase;
      margin-bottom: 10px;
    }
    .event-row {
      display: flex; align-items: flex-start; gap: 10px;
      padding: 8px 0;
      border-bottom: 1px solid var(--bg);
    }
    .event-row:last-child { border-bottom: none; }
    .event-time {
      font-size: 11px; font-weight: 700; color: var(--navy);
      min-width: 54px; padding-top: 2px;
    }
    .event-info { flex: 1; min-width: 0; }
    .event-name {
      font-size: 13px; font-weight: 600; color: var(--navy-dark);
      margin-bottom: 2px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .event-venue { font-size: 11px; color: var(--muted); }
    .event-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
    .event-badge {
      font-size: 10px; font-weight: 600; padding: 1px 7px;
      border-radius: 100px; background: var(--light); color: var(--muted);
    }
    .event-badge.music   { background: #FFF0F8; color: #C0397B; }
    .event-badge.sports  { background: #F0FFF4; color: #1A7A3F; }
    .event-badge.arts    { background: #FFF8E7; color: #8B6914; }
    .event-link {
      font-size: 11px; font-weight: 700; color: var(--gold);
      text-decoration: none; white-space: nowrap;
    }
    .event-link:hover { text-decoration: underline; }
    .events-loading { font-size: 12px; color: var(--muted); padding: 6px 0; font-style: italic; }
    .events-empty   { font-size: 12px; color: var(--muted); padding: 4px 0; font-style: italic; }

    @media (max-width: 480px) {
      .header-sub { display: none; }
      .bubble { font-size: 14px; }
    }

    /* ── REPORT BUTTON (inside bubble, bottom-right) ── */
    .report-btn {
      display: flex; align-items: center; justify-content: flex-end; gap: 5px;
      width: 100%; margin-top: 10px;
      padding-top: 8px;
      border-top: 1px solid rgba(0,0,0,0.07);
      background: none; border-left: none; border-right: none; border-bottom: none;
      font-size: 11px; color: var(--muted);
      cursor: pointer; padding-left: 0; padding-right: 0; padding-bottom: 0;
      border-radius: 0;
      transition: color 0.2s;
      opacity: 0.55;
    }
    .report-btn:hover { color: #c0392b; opacity: 1; }
    .report-btn svg { width: 11px; height: 11px; flex-shrink: 0; }

    /* ── ERROR REPORT BUTTON ── */
    .error-report-btn {
      display: inline-block; margin-top: 10px;
      padding: 7px 14px; border-radius: 8px;
      background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.25);
      color: #dc2626; font-size: 13px; font-weight: 600; cursor: pointer;
      transition: background 0.2s;
    }
    .error-report-btn:hover { background: rgba(220,38,38,0.15); }

    /* ── REPORT PANEL ── */
    .report-panel {
      position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
      width: 100%; max-width: 780px;
      background: #fff;
      border-top: 2px solid var(--gold);
      border-radius: 20px 20px 0 0;
      box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
      padding: 24px 24px 32px;
      z-index: 512;
      transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
    }
    .report-panel.open { transform: translateX(-50%) translateY(0); }
    .report-panel-header {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 16px;
    }
    .report-panel-header h3 {
      font-size: 15px; font-weight: 700; color: var(--navy-dark);
      display: flex; align-items: center; gap: 6px;
    }
    .report-close {
      background: var(--light); border: none; border-radius: 50%;
      width: 30px; height: 30px; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      font-size: 16px; color: var(--muted);
      transition: background 0.2s;
    }
    .report-close:hover { background: #dde3eb; }
    .report-context {
      background: var(--bg); border: 1px solid var(--light);
      border-radius: 10px; padding: 12px 14px; margin-bottom: 14px;
      font-size: 12px; color: var(--muted); line-height: 1.5;
    }
    .report-context strong { color: var(--navy); display: block; margin-bottom: 3px; }
    .report-textarea {
      width: 100%; padding: 12px 14px;
      border: 1.5px solid var(--light); border-radius: 10px;
      font-size: 14px; color: var(--text); font-family: inherit;
      resize: vertical; min-height: 80px; max-height: 160px;
      outline: none; transition: border-color 0.2s;
      margin-bottom: 12px;
    }
    .report-textarea:focus { border-color: var(--gold); }
    .report-textarea::placeholder { color: var(--muted); }
    .report-submit {
      width: 100%; padding: 12px;
      background: var(--navy-dark); color: #fff;
      font-size: 14px; font-weight: 700;
      border: none; border-radius: 10px; cursor: pointer;
      transition: background 0.2s;
    }
    .report-submit:hover { background: var(--navy); }
    .report-submit:disabled { opacity: 0.5; cursor: not-allowed; }
    .report-success {
      text-align: center; padding: 12px;
      font-size: 14px; color: #2e7d32; font-weight: 600;
      display: none;
    }
    .report-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.3); z-index: 511;
    }
    .report-overlay.open { display: block; }

    /* ── TEST PAIRING FEATURE ── */
    .test-pairing-btn {
      display: flex; align-items: center; justify-content: center; gap: 7px;
      width: 100%; margin-top: 8px; padding: 11px 16px;
      background: none; border: 1.5px dashed var(--navy-mid);
      border-radius: 12px; cursor: pointer;
      font-size: 13px; font-weight: 600; color: var(--navy-mid);
      transition: background 0.18s, border-color 0.18s, color 0.18s;
    }
    .test-pairing-btn:hover { background: rgba(27,58,92,0.06); border-color: var(--navy-dark); color: var(--navy-dark); }
    .test-pairing-btn svg { flex-shrink: 0; }
    /* Full-screen overlay */
    .tp-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.35); z-index: 511;
    }
    .tp-overlay.open { display: block; }
    /* Slide-up panel */
    .tp-panel {
      position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
      width: 100%; max-width: 780px;
      background: #fff; border-top: 2px solid var(--navy-mid);
      border-radius: 20px 20px 0 0;
      box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
      z-index: 512;
      transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
      display: flex; flex-direction: column;
      max-height: 88vh;
    }
    .tp-panel.open { transform: translateX(-50%) translateY(0); }
    .tp-panel-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 20px 22px 14px; flex-shrink: 0;
      border-bottom: 1px solid var(--light);
    }
    .tp-panel-header h3 {
      font-size: 15px; font-weight: 700; color: var(--navy-dark);
      display: flex; align-items: center; gap: 7px;
    }
    .tp-close {
      background: var(--light); border: none; border-radius: 50%;
      width: 30px; height: 30px; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      font-size: 16px; color: var(--muted); transition: background 0.2s;
    }
    .tp-close:hover { background: #dde3eb; }
    .tp-body { flex: 1; overflow-y: auto; padding: 18px 22px 28px; }
    /* Drop zone — inherit .upload-zone class for identical styling */
    .tp-file-input { display: none; }
    /* Weather inside candidate cards */
    .tp-weather-btn {
      display: inline-flex; align-items: center; gap: 5px;
      margin: 8px 14px 4px;
      padding: 5px 12px; border-radius: 20px;
      background: rgba(232,160,48,0.10); border: 1px solid rgba(232,160,48,0.35);
      font-size: 12px; font-weight: 600; color: var(--navy-mid);
      cursor: pointer; transition: background 0.18s, border-color 0.18s;
    }
    .tp-weather-btn:hover { background: rgba(232,160,48,0.2); border-color: var(--gold); color: var(--navy-dark); }
    .tp-weather-section {
      display: none; padding: 0 10px 12px;
      border-top: 1px solid var(--bg);
    }
    .tp-weather-section .weather-card {
      margin-bottom: 6px; font-size: 13px;
    }
    /* ── Unified info section (Weather + TAF merged) ── */
    .tp-info-btns {
      display: flex; gap: 6px;
      padding: 8px 14px 6px;
    }
    .tp-info-btn {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 5px 12px; border-radius: 20px;
      font-size: 12px; font-weight: 600;
      cursor: pointer; transition: all 0.15s;
      border: 1.5px solid var(--border); background: none; color: var(--muted);
    }
    .tp-info-btn.active {
      background: var(--navy-dark); border-color: var(--navy-dark); color: #fff;
    }
    .tp-info-section {
      display: none; padding: 0 10px 12px;
      border-top: 1px solid var(--bg);
    }
    .tp-info-section.open { display: block; }
    /* ── TAF card ── */
    .tp-taf-card {
      background: #f4f7fc; border: 1px solid #dce4f0;
      border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
    }
    .tp-taf-card-header {
      font-size: 11px; font-weight: 700; color: var(--navy-dark);
      text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 3px;
    }
    .tp-taf-card-valid { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
    /* Raw/Decoded toggle */
    .tp-taf-toggle-bar { display: flex; gap: 5px; margin-bottom: 8px; }
    .tp-taf-view-btn {
      padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700;
      cursor: pointer; transition: all 0.15s; border: 1.5px solid;
    }
    .tp-taf-view-btn.active  { background: var(--navy-dark); color: #fff; border-color: var(--navy-dark); }
    .tp-taf-view-btn:not(.active) { background: none; color: var(--navy-mid); border-color: var(--border); }
    .tp-taf-note {
      font-size: 10px; color: var(--muted);
      background: rgba(232,160,48,0.12); border-radius: 5px;
      padding: 3px 8px; margin-bottom: 7px; display: inline-block;
    }
    /* Decoded groups */
    .tp-taf-group { padding: 7px 9px; border-radius: 7px; margin-bottom: 5px; }
    .tp-taf-group-hdr {
      display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
      margin-bottom: 4px;
    }
    .tp-taf-group-type {
      font-size: 10px; font-weight: 800; letter-spacing: 0.05em;
      padding: 1px 6px; border-radius: 8px;
    }
    .tp-taf-group-type.fm    { background: #dbeafe; color: #1d4ed8; }
    .tp-taf-group-type.base  { background: #e0e7ff; color: #4338ca; }
    .tp-taf-group-type.tempo { background: #fef3c7; color: #b45309; }
    .tp-taf-group-type.becmg { background: #dcfce7; color: #15803d; }
    .tp-taf-group-type.prob  { background: #f3e8ff; color: #7e22ce; }
    .tp-taf-group-time { font-size: 11px; color: var(--muted); font-weight: 600; }
    .tp-taf-relevant-badge {
      font-size: 10px; background: var(--gold); color: var(--navy-dark);
      padding: 1px 6px; border-radius: 8px; font-weight: 700;
    }
    .tp-taf-cond-line { font-size: 12px; color: var(--navy-dark); line-height: 1.65; }
    /* Raw TAF */
    .tp-taf-raw {
      font-family: 'Courier New', Courier, monospace;
      font-size: 11px; line-height: 1.55; color: #1a2d45;
      white-space: pre-wrap; word-break: break-all; margin: 0;
    }
    .tp-taf-unavail { font-size: 12px; color: var(--muted); font-style: italic; }
    /* Loading state */
    .tp-loading {
      display: none; text-align: center; padding: 30px 20px;
    }
    .tp-spinner {
      width: 36px; height: 36px; border-radius: 50%;
      border: 3px solid var(--light); border-top-color: var(--navy-mid);
      animation: spin 0.8s linear infinite; margin: 0 auto 12px;
    }
    .tp-loading p { font-size: 13px; color: var(--muted); }
    /* Candidate queue (thumbnails added before analysis) */
    .tp-queue { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
    .tp-thumb {
      position: relative; width: 70px; height: 70px; border-radius: 8px;
      overflow: hidden; border: 1.5px solid var(--light);
      background: #f5f7fa; flex-shrink: 0;
    }
    .tp-thumb img { width: 100%; height: 100%; object-fit: cover; }
    .tp-thumb-label {
      position: absolute; bottom: 0; left: 0; right: 0;
      background: rgba(0,0,0,0.55); color: #fff;
      font-size: 9px; font-weight: 700; text-align: center; padding: 2px 3px;
      text-transform: uppercase; letter-spacing: 0.3px;
    }
    .tp-thumb-remove {
      position: absolute; top: 3px; right: 3px;
      background: rgba(0,0,0,0.55); color: #fff; border: none;
      border-radius: 50%; width: 18px; height: 18px; font-size: 11px;
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      line-height: 1;
    }
    .tp-add-more {
      width: 70px; height: 70px; border-radius: 8px; border: 1.5px dashed var(--light);
      background: none; cursor: pointer; display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      font-size: 20px; color: var(--muted); transition: border-color 0.2s, color 0.2s;
    }
    .tp-add-more:hover { border-color: var(--navy-mid); color: var(--navy-mid); }
    .tp-analyze-btn {
      width: 100%; margin-top: 16px; padding: 13px;
      background: var(--navy-dark); color: #fff; border: none;
      border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer;
      transition: background 0.2s;
    }
    .tp-analyze-btn:hover  { background: var(--navy); }
    .tp-analyze-btn:disabled { opacity: 0.45; cursor: not-allowed; }
    /* Results */
    .tp-results { display: none; }
    .tp-results-header {
      font-size: 12px; color: var(--muted); margin-bottom: 12px; font-weight: 600;
      text-transform: uppercase; letter-spacing: 0.5px;
    }
    .tp-candidate {
      border: 1.5px solid var(--light); border-radius: 14px;
      overflow: hidden; margin-bottom: 10px;
      transition: border-color 0.2s;
    }
    .tp-candidate.winner { border-color: var(--gold); }
    .tp-candidate-header {
      display: flex; align-items: center; gap: 10px;
      padding: 12px 14px; background: var(--bg); cursor: pointer;
      user-select: none;
    }
    .tp-candidate.winner .tp-candidate-header { background: rgba(245,158,11,0.07); }
    .tp-rank-badge {
      width: 30px; height: 30px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 13px; font-weight: 800; flex-shrink: 0;
      background: var(--light); color: var(--muted);
    }
    .tp-candidate.winner .tp-rank-badge { background: var(--gold); color: #fff; }
    .tp-candidate-info { flex: 1; min-width: 0; }
    .tp-candidate-label { font-size: 13px; font-weight: 700; color: var(--navy-dark); }
    .tp-candidate-route { font-size: 11px; color: var(--muted); margin-top: 1px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .tp-candidate-score {
      display: flex; gap: 6px; flex-shrink: 0;
    }
    .tp-score-pill {
      font-size: 11px; font-weight: 700; padding: 3px 8px;
      border-radius: 20px; background: var(--light); color: var(--navy-mid);
    }
    .tp-score-pill.highlight { background: var(--gold); color: #fff; }
    .tp-candidate-matches { padding: 0 14px 4px; display: none; }
    .tp-candidate-matches.open { display: block; }
    .tp-match-item {
      display: flex; align-items: flex-start; gap: 8px; padding: 8px 0;
      border-bottom: 1px solid var(--bg); font-size: 12px; line-height: 1.4;
    }
    .tp-match-item:last-child { border-bottom: none; }
    .tp-match-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
    .tp-match-name { font-weight: 700; color: var(--navy-dark); }
    .tp-match-detail { color: var(--muted); }
    .tp-no-matches { font-size: 13px; color: var(--muted); font-style: italic; padding: 8px 0; }
    .tp-reset-btn {
      width: 100%; margin-top: 14px; padding: 11px;
      background: none; border: 1.5px solid var(--light);
      border-radius: 12px; font-size: 13px; font-weight: 600; color: var(--muted);
      cursor: pointer; transition: border-color 0.2s, color 0.2s;
    }
    .tp-reset-btn:hover { border-color: var(--navy-mid); color: var(--navy-dark); }

    /* ── BETA DISCLAIMER MODAL ── */
    .beta-overlay {
      display: none; position: fixed; inset: 0; z-index: 700;
      background: rgba(0,0,0,0.55); align-items: center; justify-content: center; padding: 24px;
    }
    .beta-overlay.open { display: flex; }
    .beta-modal {
      background: #fff; border-radius: 20px; width: 100%; max-width: 420px;
      box-shadow: 0 24px 80px rgba(0,0,0,0.3);
      overflow: hidden;
    }
    .beta-modal-header {
      background: linear-gradient(135deg, #0D1F35 0%, #1B3A5C 100%);
      padding: 20px 24px 16px;
      display: flex; align-items: center; gap: 12px;
    }
    .beta-modal-header .beta-badge {
      background: #F59E0B; color: #fff; font-size: 11px; font-weight: 700;
      padding: 3px 8px; border-radius: 20px; letter-spacing: 0.5px; text-transform: uppercase;
    }
    .beta-modal-header h2 { color: #fff; font-size: 18px; font-weight: 700; }
    .beta-modal-body { padding: 20px 24px 24px; }
    .beta-modal-body p { color: #374151; font-size: 15px; line-height: 1.6; margin-bottom: 16px; }
    .beta-modal-body p:last-of-type { margin-bottom: 0; }
    .beta-modal-footer { padding: 0 24px 24px; }
    .beta-modal-footer button {
      width: 100%; padding: 14px; border: none; border-radius: 12px;
      background: #0D1F35; color: #fff; font-size: 16px; font-weight: 700;
      cursor: pointer; transition: background 0.2s;
    }
    .beta-modal-footer button:hover { background: #1B3A5C; }

    /* ── SUBSCRIPTION MODAL ── */
    .sub-overlay {
      display: none; position: fixed; inset: 0; z-index: 600;
      background: rgba(0,0,0,0.55); align-items: center; justify-content: center; padding: 24px;
    }
    .sub-overlay.open { display: flex; }
    .sub-modal {
      background: #fff; border-radius: 20px; width: 100%; max-width: 480px;
      max-height: 90vh; overflow-y: auto;
      box-shadow: 0 24px 80px rgba(0,0,0,0.3);
    }
    .sub-modal-header {
      background: linear-gradient(135deg, #0D1F35 0%, #1B3A5C 100%);
      border-radius: 20px 20px 0 0; padding: 28px 28px 24px;
      display: flex; align-items: flex-start; justify-content: space-between;
    }
    .sub-modal-header h2 { color: #fff; font-size: 20px; font-weight: 700; margin-bottom: 4px; }
    .sub-modal-header p  { color: rgba(255,255,255,0.55); font-size: 13px; }
    .sub-modal-close {
      background: rgba(255,255,255,0.1); border: none; color: #fff;
      width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
      font-size: 16px; display: flex; align-items: center; justify-content: center;
      flex-shrink: 0; transition: background 0.2s;
    }
    .sub-modal-close:hover { background: rgba(255,255,255,0.2); }
    .sub-modal-body { padding: 24px 28px 28px; }
    .sub-current-badge {
      display: inline-flex; align-items: center; gap: 6px;
      background: rgba(232,160,48,0.12); border: 1px solid rgba(232,160,48,0.35);
      color: #9A7A2E; font-size: 12px; font-weight: 700;
      padding: 4px 12px; border-radius: 20px; margin-bottom: 20px;
      text-transform: uppercase; letter-spacing: 0.5px;
    }
    .sub-plan {
      border: 1.5px solid var(--light); border-radius: 14px;
      padding: 18px 20px; margin-bottom: 12px; position: relative;
    }
    .sub-plan.active { border-color: var(--gold); background: #FDFAF4; }
    .sub-plan.coming-soon { opacity: 0.55; }
    .sub-plan-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
    .sub-plan-name { font-size: 15px; font-weight: 700; color: var(--navy-dark); }
    .sub-plan-price { font-size: 20px; font-weight: 800; color: var(--navy-dark); }
    .sub-plan-price span { font-size: 12px; font-weight: 500; color: var(--muted); }
    .sub-plan-tag {
      font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
      padding: 3px 8px; border-radius: 10px; background: var(--gold); color: #0D1F35;
    }
    .sub-plan-tag.soon { background: var(--light); color: var(--muted); }
    .sub-feature-list { list-style: none; margin-top: 10px; }
    .sub-feature-list li { font-size: 13px; color: var(--muted); padding: 3px 0; }
    .sub-feature-list li::before { content: "✓  "; color: var(--gold); font-weight: 700; }
    .sub-action-btn {
      width: 100%; padding: 13px; margin-top: 16px;
      background: var(--navy-dark); color: #fff; font-size: 14px; font-weight: 700;
      border: none; border-radius: 12px; cursor: pointer; transition: background 0.2s;
    }
    .sub-action-btn:hover { background: var(--navy); }
    .sub-action-btn:disabled { opacity: 0.45; cursor: not-allowed; }

    /* ── SELECT & DATE INPUTS ── */
    select.login-input { appearance: none; cursor: pointer; }
    /* ── Phone-number row: country-code select + number input ── */
    .phone-row { display: flex; gap: 8px; margin-bottom: 12px; }
    .phone-row .phone-cc  { flex: 0 0 90px; margin-bottom: 0; }
    .phone-row .phone-num { flex: 1; margin-bottom: 0; }
    /* crew-input variant (used in add-friend modal) */
    .phone-row .crew-input { margin-bottom: 0; }
    select.login-input option { color: #1B3A5C; background: #fff; }
    input[type="date"].login-input { color-scheme: dark; }

    /* ── USER MENU ── */
    .user-menu { position: relative; margin-left: auto; flex-shrink: 0; }
    .user-menu-btn {
      display: flex; align-items: center; gap: 6px;
      background: none; border: 1px solid rgba(232,160,48,0.35);
      color: var(--gold); font-size: 12px; font-weight: 600;
      padding: 5px 12px; border-radius: 8px; cursor: pointer;
      letter-spacing: 0.3px; transition: background 0.2s; white-space: nowrap;
    }
    .user-menu-btn:hover { background: rgba(232,160,48,0.12); }
    .user-menu-btn svg { flex-shrink: 0; transition: transform 0.2s; }
    .user-menu-btn.open svg { transform: rotate(180deg); }
    .user-menu-dropdown {
      display: none; position: absolute; top: calc(100% + 8px); right: 0;
      background: #0D1F35; border: 1px solid rgba(232,160,48,0.25);
      border-radius: 10px; min-width: 210px; z-index: 1100;
      box-shadow: 0 8px 32px rgba(0,0,0,0.4); overflow: hidden;
    }
    .user-menu-dropdown.open { display: block; }
    /* (inline dropdown settings removed — settings now a full page) */
    /* Friend trip detail bottom sheet */
    .ftrip-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.55);
      display: flex; align-items: flex-end; justify-content: center;
      z-index: 900;
    }
    .ftrip-sheet {
      background: var(--navy-dark); border-radius: 20px 20px 0 0;
      padding: 24px 20px 40px; width: 100%; max-width: 480px;
      max-height: 80vh; overflow-y: auto;
      box-shadow: 0 -4px 32px rgba(0,0,0,0.4);
    }
    /* Full-trip leg rows (shown when friend shares whole schedule) */
    .ftrip-leg-row {
      display: flex; gap: 10px; align-items: flex-start;
      padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .ftrip-leg-row:last-child { border-bottom: none; }
    .ftrip-leg-flight {
      font-size: 11px; font-weight: 800; color: var(--gold);
      white-space: nowrap; min-width: 58px; padding-top: 2px;
    }
    .ftrip-leg-route  { font-size: 15px; font-weight: 800; color: #fff; }
    .ftrip-leg-time   { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }
    .ftrip-lay-row {
      display: flex; gap: 10px; align-items: center;
      background: rgba(255,255,255,0.06); border-radius: 8px; border-left: 3px solid rgba(79,91,213,0.6);
      padding: 8px 12px; margin: 3px 0;
    }
    .ftrip-lay-icon { font-size: 15px; flex-shrink: 0; }
    .ftrip-lay-apt  { font-size: 13px; font-weight: 800; color: #fff; }
    .ftrip-lay-dur  { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 1px; }
    .ftrip-header {
      display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
    }
    .ftrip-title { font-size: 17px; font-weight: 800; color: #fff; }
    .ftrip-close {
      background: rgba(255,255,255,0.1); border: none; font-size: 18px; color: rgba(255,255,255,0.7);
      cursor: pointer; padding: 2px 8px; border-radius: 6px;
    }
    .ftrip-close:hover { background: rgba(255,255,255,0.18); color: #fff; }
    .ftrip-row {
      display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
      align-items: flex-start;
    }
    .ftrip-row:last-child { border-bottom: none; }
    .ftrip-label {
      font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.45);
      text-transform: uppercase; letter-spacing: 0.4px; min-width: 80px; padding-top: 2px;
    }
    .ftrip-value { font-size: 14px; color: #fff; font-weight: 600; line-height: 1.4; }
    .ftrip-pairing-badge {
      display: inline-block; background: var(--gold); color: var(--navy-dark);
      font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 20px;
      letter-spacing: 0.3px;
    }
    .ftrip-locked {
      display: flex; align-items: center; gap: 8px;
      font-size: 13px; color: rgba(255,255,255,0.45); padding: 8px 0;
      font-style: italic;
    }
    /* Inline shared-time indicator (tappable) */
    .ftrip-shared-row {
      display: flex; align-items: center; gap: 8px;
      background: linear-gradient(90deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05));
      border-left: 3px solid var(--gold); border-radius: 6px;
      padding: 7px 12px; margin: 2px 0 6px;
      font-size: 12px; font-weight: 700; color: var(--gold);
      cursor: pointer; user-select: none;
    }
    .ftrip-shared-row:active { opacity: 0.7; }
    .ftrip-shared-row .ftrip-shared-chevron { margin-left: auto; font-size: 11px; color: rgba(255,255,255,0.4); }
    /* Back button inside sheet when showing overlap chart */
    .ftrip-back-btn {
      display: flex; align-items: center; gap: 6px;
      background: none; border: none; font-size: 13px; font-weight: 700;
      color: rgba(255,255,255,0.6); cursor: pointer; padding: 4px 0 14px; font-family: inherit;
    }
    .ftrip-back-btn:active { opacity: 0.6; }
    .user-menu-item {
      display: block; width: 100%; text-align: left;
      padding: 12px 16px; font-size: 13px; color: rgba(255,255,255,0.8);
      background: none; border: none; border-bottom: 1px solid rgba(255,255,255,0.06);
      cursor: pointer; transition: background 0.15s; font-family: inherit;
    }
    .user-menu-item:last-child { border-bottom: none; }
    .user-menu-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
    .user-menu-item.danger { color: #ff9999; }
    .user-menu-item.danger:hover { background: rgba(255,80,80,0.1); }

    /* ── MESSAGES BADGE ── */
    .msg-badge {
      position: absolute; top: -5px; right: -5px;
      background: #e05252; color: #fff;
      font-size: 10px; font-weight: 800;
      min-width: 17px; height: 17px; border-radius: 9px;
      display: none; align-items: center; justify-content: center;
      padding: 0 4px; line-height: 1; pointer-events: none;
      border: 2px solid #061525;
    }
    .msg-badge.visible { display: flex; }
    .user-menu-dropdown .msg-inline-badge {
      margin-left: auto; background: #e05252; color: #fff;
      font-size: 10px; font-weight: 800;
      min-width: 17px; height: 17px; border-radius: 9px;
      display: none; align-items: center; justify-content: center;
      padding: 0 4px; line-height: 1;
    }
    .user-menu-dropdown .msg-inline-badge.visible { display: flex; }
    .user-menu-item { display: flex; align-items: center; }

    /* ── MESSAGES PANEL ── */
    .msg-panel-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.45); z-index: 9100;
    }
    .msg-panel-overlay.open { display: block; }
    .msg-panel {
      position: fixed; top: 0; right: -380px;
      width: 340px; max-width: 94vw; height: 100%;
      background: #0D1F38; border-left: 1px solid rgba(232,160,48,0.2);
      z-index: 9101; display: flex; flex-direction: column;
      transition: right 0.3s cubic-bezier(.4,0,.2,1);
      box-shadow: -8px 0 40px rgba(0,0,0,0.5);
    }
    .msg-panel.open { right: 0; }
    .msg-panel-header {
      padding: max(22px, env(safe-area-inset-top)) 18px 16px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
      display: flex; align-items: center; justify-content: space-between;
    }
    .msg-panel-header h3 { color: #fff; font-size: 16px; font-weight: 700; margin: 0; }
    .msg-panel-close {
      background: none; border: none; color: rgba(255,255,255,0.45);
      cursor: pointer; font-size: 22px; padding: 0; line-height: 1;
      transition: color 0.15s;
    }
    /* ── Crew meetup notification banners (Trip Connections + Trip Detail) ── */
    .meetup-notify-wrap { margin-bottom: 10px; }
    .meetup-notify-item {
      display: flex; align-items: flex-start; gap: 10px;
      background: rgba(232,160,48,0.1); border: 1px solid rgba(232,160,48,0.38);
      border-radius: 10px; padding: 11px 13px; margin-bottom: 8px;
    }
    .meetup-notify-item:last-child { margin-bottom: 0; }
    .meetup-notify-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
    .meetup-notify-name { font-size: 13px; font-weight: 700; color: #E8A030; margin: 0 0 2px; }
    .meetup-notify-msg  { font-size: 12px; color: rgba(255,255,255,0.72); margin: 0 0 8px; line-height: 1.4; }
    .meetup-notify-btn  {
      background: rgba(232,160,48,0.18); color: #E8A030;
      border: 1px solid rgba(232,160,48,0.45); border-radius: 6px;
      font-size: 12px; font-weight: 600; padding: 4px 10px;
      cursor: pointer; transition: background 0.15s;
    }
    .meetup-notify-btn:hover { background: rgba(232,160,48,0.32); }
    /* Override for white trip-detail sheet */
    .trip-detail-body .meetup-notify-msg { color: rgba(27,58,92,0.65); }
    .trip-detail-body .meetup-notify-btn {
      background: #1B3A5C; color: #fff; border-color: #1B3A5C;
    }
    .trip-detail-body .meetup-notify-btn:hover { background: #264873; }
    .msg-panel-close:hover { color: #fff; }
    .msg-mark-all {
      background: none; border: none; cursor: pointer;
      color: rgba(232,160,48,0.7); font-size: 11px; padding: 0;
      white-space: nowrap; transition: color 0.15s;
    }
    .msg-mark-all:hover { color: #E8A030; text-decoration: underline; }
    /* ── Messages filter bar ── */
    .msg-filter-bar {
      display: flex; gap: 6px; padding: 10px 14px 8px;
      border-bottom: 1px solid rgba(255,255,255,0.07);
      overflow-x: auto; scrollbar-width: none;
    }
    .msg-filter-bar::-webkit-scrollbar { display: none; }
    .msg-filter-btn {
      flex-shrink: 0; padding: 4px 10px; border-radius: 20px;
      font-size: 11px; font-weight: 600; cursor: pointer;
      border: 1px solid rgba(255,255,255,0.18);
      background: transparent; color: rgba(255,255,255,0.55);
      transition: all 0.15s; white-space: nowrap;
    }
    .msg-filter-btn:hover { border-color: rgba(232,160,48,0.5); color: rgba(232,160,48,0.8); }
    .msg-filter-btn.active {
      background: rgba(232,160,48,0.18); border-color: rgba(232,160,48,0.6);
      color: #E8A030;
    }
    .msg-list { flex: 1; overflow-y: auto; padding: 6px 0; }
    .msg-item {
      padding: 16px 18px 14px 26px; cursor: pointer;
      border-bottom: 1px solid rgba(255,255,255,0.06);
      transition: background 0.15s; position: relative;
    }
    .msg-item:hover { background: rgba(255,255,255,0.05); }
    .msg-item:last-child { border-bottom: none; }
    .msg-item.unread { background: rgba(232,160,48,0.05); }
    .msg-item.unread::before {
      content: ''; position: absolute; left: 10px; top: 20px;
      width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
    }
    .msg-item-icon { font-size: 18px; margin-bottom: 5px; }
    .msg-item-title { font-size: 13px; font-weight: 700; color: #fff; margin: 0 0 3px; }
    .msg-item-preview { font-size: 12px; color: rgba(255,255,255,0.52); margin: 0; line-height: 1.4; }
    .msg-item-date { font-size: 11px; color: rgba(255,255,255,0.3); margin: 5px 0 0; }
    .msg-empty { padding: 40px 18px; text-align: center; color: rgba(255,255,255,0.35); font-size: 13px; }

    /* ── APP TOUR ── */
    .tour-overlay { display: none; position: fixed; inset: 0; z-index: 1100; }
    .tour-overlay.active { display: block; }
    .tour-bg {
      position: absolute; inset: 0; background: rgba(0,0,0,0.0);
      pointer-events: all;
    }
    .tour-spotlight {
      position: absolute; border-radius: 10px; pointer-events: none;
      box-shadow: 0 0 0 9999px rgba(0,0,0,0.75);
      transition: top 0.35s ease, left 0.35s ease, width 0.35s ease, height 0.35s ease;
      z-index: 1101;
    }
    .tour-card {
      position: absolute; background: #0D1F35;
      border: 1px solid rgba(232,160,48,0.45); border-radius: 14px;
      padding: 20px 22px 18px; width: 290px; max-width: 88vw;
      box-shadow: 0 12px 40px rgba(0,0,0,0.7);
      z-index: 1102; pointer-events: all;
      transition: top 0.35s ease, left 0.35s ease;
    }
    .tour-step-label {
      font-size: 10px; color: var(--gold); font-weight: 700;
      letter-spacing: 0.8px; text-transform: uppercase; margin: 0 0 7px;
    }
    .tour-card-title { font-size: 15px; font-weight: 700; color: #fff; margin: 0 0 9px; }
    .tour-card-body {
      font-size: 13px; color: rgba(255,255,255,0.78);
      line-height: 1.55; margin: 0 0 16px;
    }
    .tour-card-body .cite-link { font-size: 12px; padding: 1px 5px; }
    .tour-actions { display: flex; align-items: center; justify-content: space-between; }
    .tour-dots { display: flex; gap: 5px; align-items: center; }
    .tour-dot {
      width: 6px; height: 6px; border-radius: 50%;
      background: rgba(255,255,255,0.2); transition: background 0.2s;
    }
    .tour-dot.active { background: var(--gold); }
    .tour-btn-skip {
      background: none; border: none; color: rgba(255,255,255,0.38);
      font-size: 12px; cursor: pointer; padding: 0; transition: color 0.15s;
    }
    .tour-btn-skip:hover { color: rgba(255,255,255,0.7); }
    .tour-btn-next {
      background: var(--gold); color: #0D1F38; border: none;
      font-weight: 700; font-size: 13px; padding: 8px 16px;
      border-radius: 8px; cursor: pointer; transition: opacity 0.2s;
    }
    .tour-btn-next:hover { opacity: 0.85; }

    /* ── SIDEBAR ─────────────────────────────────────────────────── */
    .sidebar-overlay {
      position: fixed; inset: 0; z-index: 200;
      background: rgba(0,0,0,0.4);
      opacity: 0; pointer-events: none;
      transition: opacity 0.25s;
    }
    .sidebar-overlay.open { opacity: 1; pointer-events: all; }

    .sidebar {
      position: fixed; top: 0; left: 0; bottom: 0; z-index: 201;
      width: 280px;
      background: var(--navy-dark);
      display: flex; flex-direction: column;
      transform: translateX(-100%);
      transition: transform 0.25s cubic-bezier(.4,0,.2,1);
      box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }
    .sidebar.open { transform: translateX(0); }

    .sidebar-header {
      padding: max(16px, env(safe-area-inset-top)) 16px 16px;
      border-bottom: 1px solid rgba(255,255,255,0.1);
      display: flex; align-items: center; justify-content: space-between;
    }
    .sidebar-header h2 { color: white; font-size: 14px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
    .sidebar-close-btn {
      background: none; border: none; cursor: pointer;
      color: rgba(255,255,255,0.5); padding: 4px; border-radius: 6px;
      transition: color 0.15s;
    }
    .sidebar-close-btn:hover { color: white; }

    .sidebar-new-btn {
      margin: 12px; border-radius: 10px;
      background: rgba(232,160,48,0.15);
      border: 1px solid rgba(232,160,48,0.35);
      color: var(--gold); font-size: 13px; font-weight: 700;
      padding: 10px 14px; cursor: pointer;
      display: flex; align-items: center; gap: 8px;
      transition: background 0.15s;
    }
    .sidebar-new-btn:hover { background: rgba(232,160,48,0.25); }

    .sidebar-chat-list {
      flex: 1; overflow-y: auto;
      padding: 4px 8px 16px;
    }
    .sidebar-chat-list::-webkit-scrollbar { width: 4px; }
    .sidebar-chat-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

    .sidebar-chat-item {
      display: flex; align-items: center; gap: 8px;
      padding: 10px 10px; border-radius: 8px; cursor: pointer;
      transition: background 0.15s;
      user-select: none;
    }
    .sidebar-chat-item:hover { background: rgba(255,255,255,0.07); }
    .sidebar-chat-item.active { background: rgba(232,160,48,0.18); }

    .sidebar-chat-info { flex: 1; min-width: 0; }
    .sidebar-chat-title {
      color: rgba(255,255,255,0.88); font-size: 13px; font-weight: 600;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .sidebar-chat-item.active .sidebar-chat-title { color: var(--gold); }
    .sidebar-chat-meta {
      color: rgba(255,255,255,0.35); font-size: 11px; margin-top: 2px;
    }

    .sidebar-delete-btn, .sidebar-share-btn {
      background: none; border: none; cursor: pointer;
      color: rgba(255,255,255,0.25); padding: 4px; border-radius: 4px;
      opacity: 0; transition: opacity 0.15s, color 0.15s;
      flex-shrink: 0;
    }
    .sidebar-chat-item:hover .sidebar-delete-btn,
    .sidebar-chat-item:hover .sidebar-share-btn { opacity: 1; }
    .sidebar-delete-btn:hover { color: #e74c3c !important; }
    .sidebar-share-btn:hover { color: var(--gold) !important; }
    .sidebar-share-btn.sharing { opacity: 1; color: var(--gold); animation: spin 1s linear infinite; }
    @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

    /* hamburger button in header */
    .hamburger-btn {
      background: none; border: none; cursor: pointer;
      color: rgba(255,255,255,0.75); padding: 6px; border-radius: 6px;
      display: flex; align-items: center;
      transition: color 0.15s;
      flex-shrink: 0;
    }
    .hamburger-btn:hover { color: white; }

    /* share button in chat area */
    .chat-share-btn {
      background: none; border: none; cursor: pointer;
      color: var(--muted); font-size: 12px; font-weight: 600;
      padding: 4px 8px; border-radius: 6px;
      display: flex; align-items: center; gap: 5px;
      transition: color 0.15s, background 0.15s;
    }
    .chat-share-btn:hover { color: var(--navy); background: var(--light); }
    .chat-tools-bar {
      display: flex; align-items: center; justify-content: flex-end;
      padding: 0 16px 6px;
      flex-shrink: 0;
    }

    /* ── SHARE MODAL ─────────────────────────────────────────────── */
    .share-overlay {
      position: fixed; inset: 0; z-index: 300;
      background: rgba(0,0,0,0.5);
      display: flex; align-items: flex-end;
      opacity: 0; pointer-events: none;
      transition: opacity 0.2s;
    }
    .share-overlay.open { opacity: 1; pointer-events: all; }

    .share-modal {
      background: var(--navy-dark); width: 100%; border-radius: 20px 20px 0 0;
      padding: 20px 16px 32px;
      max-height: 80vh; display: flex; flex-direction: column;
      transform: translateY(40px);
      transition: transform 0.25s cubic-bezier(.4,0,.2,1);
      border-top: 1px solid rgba(255,255,255,0.08);
    }
    .share-overlay.open .share-modal { transform: translateY(0); }

    .share-modal-header {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 6px;
    }
    .share-modal-header h3 { font-size: 17px; font-weight: 800; color: #fff; }
    .share-modal-close {
      background: none; border: none; cursor: pointer;
      color: rgba(255,255,255,0.5); font-size: 20px; padding: 4px;
    }
    .share-modal-hint {
      font-size: 12px; color: rgba(255,255,255,0.45);
      margin-bottom: 14px; line-height: 1.4;
    }

    .share-msg-list { overflow-y: auto; flex: 1; margin-bottom: 14px; }
    .share-msg-row {
      display: flex; align-items: flex-start; gap: 10px;
      padding: 10px 8px; border-radius: 10px; cursor: pointer;
      transition: background 0.12s;
      border: 2px solid transparent;
    }
    .share-msg-row:hover { background: rgba(255,255,255,0.05); }
    .share-msg-row.selected { background: rgba(232,160,48,0.1); border-color: rgba(232,160,48,0.4); }
    .share-msg-checkbox {
      width: 20px; height: 20px; border-radius: 6px;
      border: 2px solid rgba(255,255,255,0.2);
      background: rgba(255,255,255,0.06); flex-shrink: 0; margin-top: 2px;
      display: flex; align-items: center; justify-content: center;
      transition: border-color 0.12s, background 0.12s;
    }
    .share-msg-row.selected .share-msg-checkbox {
      background: var(--gold); border-color: var(--gold);
    }
    .share-msg-checkbox svg { display: none; }
    .share-msg-row.selected .share-msg-checkbox svg { display: block; }
    .share-msg-preview { flex: 1; min-width: 0; }
    .share-msg-q {
      font-size: 13px; font-weight: 600; color: #fff;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .share-msg-a {
      font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 2px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .share-msg-num {
      font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.4);
      flex-shrink: 0; padding-top: 4px;
    }

    .share-modal-actions { display: flex; gap: 10px; }
    .share-link-btn {
      flex: 1; background: var(--gold); color: var(--navy-dark);
      border: none; border-radius: 12px;
      font-size: 14px; font-weight: 700; padding: 13px;
      cursor: pointer; transition: opacity 0.15s;
    }
    .share-link-btn:hover { opacity: 0.85; }
    .share-link-btn:disabled { opacity: 0.4; cursor: not-allowed; }

    .share-copy-btn {
      background: rgba(255,255,255,0.1); color: #fff;
      border: 1px solid rgba(255,255,255,0.15); border-radius: 12px;
      font-size: 14px; font-weight: 700; padding: 13px 18px;
      cursor: pointer; transition: background 0.15s;
    }
    .share-copy-btn:hover { background: rgba(255,255,255,0.18); }

    .share-result-box {
      background: rgba(255,255,255,0.06); border-radius: 10px; padding: 12px;
      margin-top: 10px; display: none;
    }
    .share-result-box.show { display: block; }
    .share-result-box p { font-size: 12px; color: rgba(255,255,255,0.45); margin-bottom: 6px; }
    .share-result-link {
      display: flex; align-items: center; gap: 8px;
      background: rgba(255,255,255,0.08); border-radius: 8px; padding: 8px 10px;
      border: 1px solid rgba(255,255,255,0.1);
    }
    .share-result-link span {
      font-size: 12px; color: #fff; flex: 1;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .share-result-copy {
      background: var(--gold); color: var(--navy-dark); border: none;
      border-radius: 6px; font-size: 11px; font-weight: 700;
      padding: 5px 10px; cursor: pointer; flex-shrink: 0;
    }

    /* auto-save indicator */
    .save-indicator {
      font-size: 11px; color: var(--muted); padding: 2px 8px;
      opacity: 0; transition: opacity 0.4s;
    }
    .save-indicator.show { opacity: 1; }

    /* ── REPORT A PROBLEM ── */
    .report-problem-btn {
      position: fixed; bottom: 14px; right: 14px; z-index: 510;
      background: rgba(255,255,255,0.88); backdrop-filter: blur(6px);
      border: 1px solid rgba(0,0,0,0.12); border-radius: 20px;
      padding: 6px 12px; font-size: 11px; font-weight: 600;
      color: var(--muted); cursor: pointer; font-family: inherit;
      box-shadow: 0 1px 4px rgba(0,0,0,0.10);
      transition: background 0.15s, color 0.15s, box-shadow 0.15s;
      display: none; /* shown only when logged in */
    }
    .report-problem-btn:hover {
      background: #fff; color: var(--navy-dark);
      box-shadow: 0 2px 8px rgba(0,0,0,0.14);
    }
    /* On mobile, hide the floating button — it's accessible via the Ryan ▾ menu instead */
    @media (max-width: 600px) {
      .report-problem-btn {
        display: none !important;
      }
    }
    .report-problem-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.50);
      display: flex; align-items: flex-end; justify-content: center;
      z-index: 700;
    }
    .report-problem-modal {
      background: #fff; border-radius: 20px 20px 0 0;
      padding: 24px 20px 36px; width: 100%; max-width: 480px;
    }
    .report-problem-title {
      font-size: 17px; font-weight: 800; color: var(--navy-dark);
      margin-bottom: 4px;
    }
    .report-problem-subtitle {
      font-size: 13px; color: var(--muted); margin-bottom: 18px; line-height: 1.45;
    }
    .report-problem-label {
      font-size: 11px; font-weight: 800; color: var(--muted);
      text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
    }
    .report-problem-field {
      width: 100%; padding: 11px 13px; border: 1.5px solid var(--border);
      border-radius: 10px; font-size: 14px; font-family: inherit;
      color: var(--navy-dark); background: #fff; outline: none;
      box-sizing: border-box; margin-bottom: 14px;
    }
    .report-problem-field:focus { border-color: var(--navy-dark); }
    textarea.report-problem-field { resize: vertical; min-height: 90px; }
    .report-problem-submit {
      width: 100%; background: var(--navy-dark); color: #fff;
      border: none; border-radius: 12px; padding: 15px;
      font-size: 16px; font-weight: 700; cursor: pointer;
      font-family: inherit; transition: background 0.2s; margin-bottom: 10px;
    }
    .report-problem-submit:hover  { background: var(--navy); }
    .report-problem-submit:active { background: #061526; }
    .report-problem-submit:disabled { opacity: 0.6; pointer-events: none; }
    .report-problem-cancel {
      width: 100%; background: none; border: none;
      color: var(--muted); font-size: 14px; cursor: pointer;
      font-family: inherit; padding: 8px;
    }
    .report-problem-cancel:hover { color: var(--navy-dark); }
    .report-problem-success {
      text-align: center; padding: 12px 0 4px;
    }
    .report-problem-success-icon { font-size: 36px; margin-bottom: 10px; }
    .report-problem-success h3 { font-size: 17px; font-weight: 800; color: var(--navy-dark); margin-bottom: 6px; }
    .report-problem-success p  { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
    /* Utility classes replacing inline styles */
    .mt-6  { margin-top: 6px; }
    .mt-8  { margin-top: 8px; }
    .mt-10 { margin-top: 10px; }
    .mt-12 { margin-top: 12px; }
    .mt-14 { margin-top: 14px; }
    .mt-16 { margin-top: 16px; }
    .mt-20 { margin-top: 20px; }
    .mb-4  { margin-bottom: 4px; }
    .mb-6  { margin-bottom: 6px; }
    .mb-8  { margin-bottom: 8px; }
    .mb-10 { margin-bottom: 10px; }
    .mb-12 { margin-bottom: 12px; }
    .mb-14 { margin-bottom: 14px; }
    .mb-16 { margin-bottom: 16px; }
    .mb-20 { margin-bottom: 20px; }
    .mb-24 { margin-bottom: 24px; }
    .flex-1 { flex: 1; }
    .flex-1-mb12 { flex: 1; margin-bottom: 12px; }
    .flex-shrink-0 { flex-shrink: 0; }
    .text-gold { color: #E8A030; }
    .text-upper { text-transform: uppercase; }
    .text-upper-spaced { text-transform: uppercase; letter-spacing: 2px; }
    .font-bold { font-weight: 700; }
    .font-normal { font-weight: 400; }
    .lh-17 { line-height: 1.7; }
    .lh17-mb24 { line-height: 1.7; margin-bottom: 24px; }
    .d-flex-gap10 { display: flex; gap: 10px; }
    .pos-relative { position: relative; }
    .flex-1-relative { position: relative; flex: 1; }
    .emoji-icon-lg { font-size: 52px; margin-bottom: 12px; }
    .emoji-icon-md { font-size: 48px; margin-bottom: 16px; }
    .text-gold-strong { font-weight: 700; text-decoration: underline; color: var(--gold); }
    .textarea-resizable { resize: vertical; min-height: 70px; font-family: inherit; }
    .textarea-resizable-sm { resize: vertical; font-family: inherit; font-size: 14px; }
    .form-label-sm { display: block; text-align: left; color: rgba(255,255,255,0.45); font-size: 12px; margin-bottom: 4px; margin-left: 2px; }
    .form-label-hint { font-weight: 400; color: rgba(255,255,255,0.3); }
    .icon-sm-danger { width: 15px; height: 15px; color: #c0392b; }
    .icon-sm { font-size: 13px; }
    .icon-google { width: 12px; height: 12px; flex-shrink: 0; }
    .report-label { font-size: 11px; font-weight: 600; color: var(--muted); margin: 4px 0 3px; display: block; }
    .report-label-gap { font-size: 11px; font-weight: 600; color: var(--muted); margin: 6px 0 3px; display: block; }
    .btn-danger-red { background: #dc2626; }
    .btn-purple { background: #7c3aed; }
    .btn-purple-mt { background: #7c3aed; margin-top: 10px; }
    .fml-dot--amber { background: #F59E0B; }
    .fml-dot--blue  { background: #60A5FA; }
    .fml-dot--gray  { background: #6B7280; }
    .notif-divider { flex: 1; height: 1px; background: rgba(255,255,255,0.1); }
    .notif-allow-btn { flex-shrink: 0; padding: 4px 13px; border-radius: 20px; border: 1.5px solid var(--gold); background: rgba(232,160,48,0.13); color: var(--gold); font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background 0.15s; white-space: nowrap; margin-left: 10px; }
    .settings-p { font-size: 13px; color: var(--muted); padding: 0 16px 12px; margin: 0; line-height: 1.5; }
    .settings-p-sm { font-size: 13px; color: var(--muted); padding: 0 16px 10px; margin: 0; line-height: 1.5; }
    .settings-card-mt { margin-top: 16px; }
    .gcal-status-mt { margin-top: 6px; }
    .gcal-manage-mt { margin-top: 10px; }
    .gcal-btn-sm { font-size: 12px; }
    .gcal-btn-sm-p { font-size: 12px; padding: 7px 14px; }
    .gcal-disconnect-mt { margin-top: 10px; display: block; }
    .crew-empty-p { padding: 14px 16px; font-size: 13px; }
    .crew-empty-p16 { padding: 16px; }
    .crew-method-mb20 { margin-bottom: 20px; }
    .crew-method-mb16 { margin-bottom: 16px; }
    .section-title-plain { padding: 0; margin: 0; }
    .section-title-pb8 { padding: 0 0 8px; }
    .group-code-mt { margin-top: 10px; }
    .group-members-lbl { margin: 14px 0 6px; }
    .group-leave-mt { background: #dc2626; margin-top: 8px; }
    .notif-p { font-size: 13px; color: rgba(255,255,255,0.45); margin: 0; line-height: 1.5; }
    .notif-hd { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 10px; }
    .gcal-bar-mt0 { margin-top: 0; }
    .gcal-help-ml2 { margin-left: 2px; }
    .gcal-flex { display: flex; align-items: center; gap: 8px; }
    .gcal-flex-gap12-mt6 { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
    .gcal-help-mt0 { margin: 0; }
    .tour-actions-row { display: flex; align-items: center; gap: 12px; }
    .friend-sort-wrap { position: relative; }
    .friends-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; position: relative; }
    .friend-sort-btn-s { padding: 6px 14px; border-radius: 20px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; }
    .friend-sort-caret { font-size: 10px; }
    .add-friend-btn-s { flex-shrink: 0; padding: 6px 14px; border-radius: 20px; background: var(--gold); color: var(--navy-dark); border: none; font-size: 12px; font-weight: 700; cursor: pointer; }
    .trip-share-row { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); }
    .share-url-lbl { font-size: 11px; color: var(--gold,#c9a84c); font-weight: 600; margin-bottom: 6px; letter-spacing: 0.03em; }
    .share-url-row { display: flex; gap: 8px; align-items: center; }
    .share-url-input { flex: 1; background: transparent; border: none; color: #fff; font-size: 13px; outline: none; min-width: 0; cursor: text; }
    .share-copy-btn { flex-shrink: 0; background: var(--gold,#c9a84c); color: #1a1a2e; border: none; border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
    .fcal-back-btn-s { font-size: 18px; opacity: 0.7; }
    .fcal-loading { padding:40px; text-align:center; color:rgba(255,255,255,0.4); }
    .crew-match-meta { margin: 0; border-radius: 0; border-left: none; border-right: none; background: transparent; }
    .crew-match-hd-p { padding: 4px 16px 8px; }
    .match-filter-col { padding: 12px 16px 0; flex-direction: column; align-items: stretch; gap: 6px; }

    /* ToS card styles */
    .tos-scroll { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 16px 18px; max-height: 300px; overflow-y: auto; text-align: left; font-size: 12px; line-height: 1.7; color: rgba(255,255,255,0.75); margin-bottom: 20px; }
    .tos-title { font-weight: 700; color: #fff; font-size: 13px; margin-bottom: 12px; }
    .tos-date { font-weight: 400; font-size: 11px; color: rgba(255,255,255,0.45); }
    .tos-section { font-weight: 600; color: rgba(255,255,255,0.9); margin: 10px 0 4px; }
    .tos-contact-link { color: #E8A030; }

    /* Flight search card styles */
    .flight-search-card { background: var(--navy-dark); border-radius: 14px; padding: 12px 14px; margin: 12px 12px 4px; border: 1px solid rgba(255,255,255,0.08); }
    .flight-search-hd { font-size: 11px; font-weight: 700; color: var(--gold); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; }
    .flight-search-hd-badge { color: #64748b; font-weight: 500; font-size: 10px; }
    .flight-search-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
    .flight-search-input-fn { flex: 1; min-width: 80px; max-width: 110px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; padding: 7px 10px; color: #fff; font-size: 14px; font-weight: 600; outline: none; text-transform: uppercase; }
    .flight-search-input-dt { flex: 1; min-width: 120px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; padding: 7px 10px; color: #fff; font-size: 13px; outline: none; color-scheme: dark; }
    .flight-search-btn { background: var(--gold); color: var(--navy-dark); border: none; border-radius: 8px; padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }

    /* Report / feedback */
    .report-reason-lbl { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
    .notif-push-link { color: var(--gold); font-weight: 700; text-decoration: underline; }

    /* Settings */
    .sett-card-pad { padding: 0 16px 16px; }
    .sett-notif-opts { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
    .sett-input-sm { width: 48px; padding: 2px 5px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #fff; font-size: 12px; font-weight: 600; text-align: center; }
    .sett-contract-select { background: var(--navy-dark); color: #fff; border: 1.5px solid rgba(228,160,48,0.4); border-radius: 10px; padding: 10px 18px; font-size: 13px; cursor: pointer; width: 100%; }

    /* ID-based display:none rules (replaces) */
    #account-type-card,
    #signup-card,
    #forgot-card,
    #reset-card,
    #tos-card,
    #contact-card,
    #contact-success,
    #profile-setup-card,
    #ps-base-wrapper,
    #ps-pilot-fields,
    #ps-email-row,
    #ps-pw-divider,
    #ps-pw-section,
    #ps-del-divider,
    #ps-del-section,
    #unsupported-card,
    #deleted-card,
    #hamburger-btn,
    #user-menu,
    #crew-badge,
    #section-contract,
    #chat-tools-bar,
    #ff-gcal-sync-bar,
    #ff-gcal-bar-disconnected,
    #ff-gcal-bar-connected,
    #trip-upload-state,
    #pairing-file,
    #gcal-connected,
    #gcal-manage-panel,
    #trip-loading-state,
    #trip-calendar-state,
    #cal-action-sync-btn,
    #gcal-cal-connected,
    #gcal-manage-panel2,
    #trip-results-state,
    #trip-error-state,
    #trip-conflict-state,
    #section-crew,
    #filter-active-pill,
    #crew-matches-cal-wrap,
    #crew-matches-map-wrap,
    #crew-friends-view,
    #friend-sort-menu,
    #crew-friends-map-view,
    #crew-friends-map-empty,
    #section-concierge,
    #concierge-context-bar,
    #concierge-tools-bar,
    #add-friend-overlay,
    #add-method-email,
    #add-method-code,
    #add-friend-error,
    #fp-pending-block,
    #fp-intros-block,
    #friend-action-overlay,
    #report-block-overlay,
    #report-other-wrap,
    #report-block-error,
    #create-group-overlay,
    #create-group-error,
    #create-group-step2,
    #group-detail-overlay,
    #group-detail-pending,
    #sett-card-ff-notif,
    #sett-gcal-connected,
    #ftrip-overlay,
    #a2hs-android-btn,
    #a2hs-ios-steps,
    #fprofile-overlay,
    #fcal-overlay,
    #trip-share-url-box,
    #ff-gcal-name-overlay,
    #ff-alert-subscribed,
    #notif-reminder-overlay,
    #tour-spotlight,
    #report-problem-overlay,
    #rp-error,
    #report-problem-success-view { display: none; }

    #group-detail-delete-btn { display: none; }
    #ff-crew-filter-row { flex-wrap: wrap; display: none; }

    /* Extra styles for IDs that had display:none + additional inline styles */
    #tos-card { max-height: 90vh; overflow-y: auto; }
    #contact-success { margin-top: 14px; padding: 12px 16px; background: rgba(232,160,48,0.15); border: 1px solid rgba(232,160,48,0.4); border-radius: 10px; font-size: 13px; color: #E8A030; text-align: center; }
    #profile-setup-card { max-height: 90vh; overflow-y: auto; }
    #unsupported-card { text-align: center; }
    #deleted-card { text-align: center; }
    #section-crew { flex-direction: column; overflow-y: auto; padding: 0; }
    #filter-active-pill { flex-wrap: wrap; gap: 6px; padding: 2px 0; }
    #crew-matches-cal-wrap { padding: 0 16px; }
    #crew-friends-view { padding: 8px 16px 16px; }
    #friend-sort-menu { position: absolute; top: calc(100% + 6px); left: 0; background: #1a2e4a; border: 1px solid rgba(255,255,255,0.15); border-radius: 12px; padding: 4px; z-index: 200; min-width: 110px; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
    #crew-friends-map-empty { padding: 24px 16px; text-align: center; color: rgba(255,255,255,0.35); font-size: 14px; }
    #section-concierge { flex-direction: column; overflow: hidden; padding: 0; }
    #report-other-wrap { margin-bottom: 14px; }
    #sett-gcal-connected { padding: 0 16px 16px; }
    #trip-share-url-box { margin: 8px 0 4px; padding: 10px 12px; background: var(--navy-light,#1a2640); border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); }

    /* ID rules moved from inline (Step 3) */
    #gcal-cal-state-area { margin-top: 10px; }
    #crew-meetup-banner { padding: 0 16px; }
    #crew-matches-list-wrap { padding: 0 16px; }
    #group-detail-members { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 4px; }
    #sett-gcal-not-connected { padding: 0 16px 16px; }
    #rp-page-display { font-size: 11px; color: var(--muted); margin-bottom: 14px; }
    /* FSS modal classes */
    .fss-modal-card { background:var(--navy-dark,#0d1f35); border-radius:16px; padding:24px; max-width:400px; width:100%; color:#fff; position:relative; box-shadow:0 8px 32px rgba(0,0,0,0.5); }
    .fss-close-btn { position:absolute; top:12px; right:14px; background:none; border:none; color:#aaa; font-size:22px; cursor:pointer; line-height:1; }
    .fss-content-box { min-height:80px; display:flex; align-items:center; justify-content:center; }
    .fss-body { width:100%; }
    .fss-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:16px; }
    .fss-flight-num { font-size:22px; font-weight:700; letter-spacing:0.03em; }
    .fss-date-lbl { font-size:13px; color:#94a3b8; margin-top:2px; }
    .fss-status-badge { border-radius:20px; padding:4px 12px; font-size:13px; font-weight:600; }
    .fss-leg-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; font-size:14px; }
    .fss-leg-box { background:rgba(255,255,255,0.05); border-radius:10px; padding:12px; }
    .fss-leg-hdr { color:#94a3b8; font-size:11px; text-transform:uppercase; letter-spacing:0.05em; margin-bottom:6px; }
    .fss-iata { font-weight:700; font-size:16px; }
    .fss-apt-name { color:#94a3b8; font-size:12px; }
    .fss-mt2 { margin-top:2px; }
    .fss-mt4 { margin-top:4px; }
    .fss-mt8 { margin-top:8px; }
    .fss-awaiting { color:#64748b; font-size:12px; }
    .fss-sm { font-size:12px; }
    .fss-lbl-muted { color:#94a3b8; }
    .fss-lbl-green { color:#22c55e; }
    .fss-lbl-amber { color:#f59e0b; }
    .fss-lbl-slate { color:#64748b; }
    .fss-aircraft-lbl { margin-top:12px; font-size:12px; color:#64748b; text-align:right; }
    .fss-footer-row { margin-top:12px; display:flex; justify-content:space-between; align-items:center; }
    .fss-source-lbl { font-size:11px; color:#475569; }
    .fss-fa-link { font-size:12px; color:#EF9F27; text-decoration:none; }
    .fss-btn-row { display:flex; gap:8px; margin-top:10px; }
    .fss-alert-btn { flex:1; background:rgba(239,159,39,0.12); border:1px solid rgba(239,159,39,0.35); color:#EF9F27; border-radius:10px; padding:11px; font-size:14px; font-weight:600; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:7px; }
    .fss-share-btn { flex:1; background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.12); color:white; border-radius:10px; padding:11px; font-size:14px; font-weight:600; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:7px; }
    .fss-debug { margin-top:10px; }
    .fss-debug-summary { font-size:11px; color:#475569; cursor:pointer; }
    .fss-debug-pre { font-size:10px; color:#94a3b8; white-space:pre-wrap; word-break:break-all; max-height:200px; overflow-y:auto; background:rgba(0,0,0,0.3); padding:8px; border-radius:6px; margin-top:4px; }
    .fss-err { text-align:center; color:#94a3b8; font-size:14px; }
    .fss-err-flight { font-size:12px; color:#475569; }
    .fss-err-msg { font-size:11px; color:#64748b; word-break:break-word; }
    .fss-loading-text { color:#aaa; font-size:14px; }
    .fss-delay-str { color:#f59e0b; font-size:12px; }
    /* gcal-help panel classes */
    .gcal-p { margin:0 0 12px; }
    .gcal-ol { margin:0; padding-left:20px; line-height:1.9; font-size:14px; }
    .gcal-google-blue { color:#4285F4; }
    .gcal-tip { margin:12px 0 0; font-size:13px; color:var(--muted); }
    .gcal-sheet { background:#fff; border-radius:20px 20px 0 0; padding:28px 24px 36px; max-width:520px; width:100%; max-height:85vh; overflow-y:auto; margin:auto; margin-top:auto; }
    .gcal-sheet-hdr { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
    .gcal-sheet-title-row { display:flex; align-items:center; gap:10px; }
    .gcal-google-icon { width:22px; height:22px; }
    .gcal-title { font-size:16px; color:var(--navy-dark); }
    .gcal-close-btn { background:none; border:none; font-size:22px; color:var(--muted); cursor:pointer; }
    .gcal-steps { color:var(--navy-dark); }
    .gcal-done-btn { margin-top:22px; width:100%; padding:13px; background:var(--navy-dark); color:#fff; border:none; border-radius:14px; font-size:16px; font-weight:700; cursor:pointer; }
    /* CSP: extracted inline styles */
    .sidebar-no-chats { color:rgba(255,255,255,0.3); font-size:12px; padding:12px 10px; }
    .report-ans-strong { margin-top:8px; display:inline-block; }
    .try-again-btn { font-size:13px; }
    .map-pin-label { font-size:11px; font-weight:900; color:#fff; }
    .new-dot { display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--gold); margin-left:5px; vertical-align:middle; flex-shrink:0; }
    .meetup-pill-mt { margin-top:4px; }
    .tc-intro-preview { font-size:11px; color:#93c5fd; margin-top:1px; }
    .tc-intro-confirmed { font-size:11px; color:#4ade80; font-weight:700; margin-top:2px; }
    .tc-time-label { font-size:12px; color:rgba(255,255,255,0.35); }
    .cm-my { margin-top:6px; margin-bottom:14px; }
    .crew-section-mt { margin-top:18px; }
    .crew-empty-padded { padding:12px 16px; }
    .crew-empty-padded-lg { padding:16px; }
    .list-empty-msg { padding:12px 16px; font-size:13px; color:var(--muted); }
    .group-admin-name { color:var(--navy-dark); margin-left:3px; }
    .ciy-chevron { color:rgba(74,222,128,0.7); font-size:16px; margin-left:auto; }
    .ciy-row-pointer { cursor:pointer; }
    .mf-flex1 { flex:1; }
    .mf-loc-label { font-size:11px; color:rgba(255,255,255,0.5); margin-top:2px; }
    .mf-chevron { color:rgba(74,222,128,0.7); font-size:16px; }
    .mf-row-pointer { cursor:pointer; }
    .tc-badge-row { display:flex; flex-wrap:wrap; gap:5px; margin-top:4px; }
    .friends-section-mt { padding-top:18px; }
    .ff-status-pill { padding:2px 8px; border-radius:10px; font-size:11px; font-weight:700; }
    .ff-status-pill-link { text-decoration:underline dotted; cursor:pointer; }
    .ff-status-pill-wrap { display:inline-flex; align-items:center; gap:5px; font-size:12px; white-space:nowrap; }
    .ff-status-name { color:rgba(255,255,255,0.7); font-weight:600; }
    .ff-status-sep { color:rgba(255,255,255,0.15); margin:0 4px; }
    .ff-status-pills-row { display:flex; flex-wrap:wrap; gap:6px 8px; align-items:center; padding:6px 14px 10px; border-bottom:1px solid rgba(255,255,255,0.07); }
    .ff-cal-nav-row { display:flex; align-items:center; justify-content:space-between; padding:12px 16px 8px; }
    .ff-crew-no-crew { font-size:13px; color:rgba(255,255,255,0.35); padding:4px 0 8px; }
    .ff-add-crew-icon { font-size:16px; line-height:1; }
    .trip-leg-overnight-sit { background:rgba(100,148,230,0.18); color:#93c5fd; }
    .sms-link { color:#60A5FA; text-decoration:underline; }
    .err-color { color:#C0392B; }
    .err-hint { color:var(--muted); }
    .mdchart-approx-text { color:var(--muted); font-style:italic; }
    .mdchart-approx-note { font-size:11px; color:#888; margin-top:4px; text-align:center; }
    .mdchart-flights-indent { margin-left:52px; }
    .mdchart-overlap-label { font-size:11px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; margin-bottom:10px; }
    .mdchart-overlap-track-transp { background:transparent; }
    .mdchart-footer-row { margin-top:4px; font-size:11px; }
    .leg-row { display:flex; align-items:center; gap:10px; margin-bottom:14px; flex-wrap:wrap; }
    .leg-date-label { font-size:12px; color:var(--muted); font-weight:600; }
    .tpanel-loading { display:flex; justify-content:center; padding:24px 0; }
    .tpanel-no-content-gap { gap:8px; }
    .tpanel-icon-lg { font-size:20px; }
    .cal-share-box { display:none; margin:8px 0 4px; padding:10px 12px; background:var(--navy-light,#1a2640); border-radius:10px; border:1px solid rgba(255,255,255,0.12); }
    .cal-share-label { font-size:11px; color:var(--gold,#c9a84c); font-weight:600; margin-bottom:6px; letter-spacing:0.03em; }
    .cal-share-row { display:flex; gap:8px; align-items:center; }
    .cal-share-input { flex:1; background:transparent; border:none; color:#fff; font-size:13px; outline:none; min-width:0; cursor:text; }
    .cal-share-copy-btn { flex-shrink:0; background:var(--gold,#c9a84c); color:#1a1a2e; border:none; border-radius:6px; padding:5px 10px; font-size:12px; font-weight:700; cursor:pointer; }
    .fcal-nav-btn { background:none; border:none; font-size:20px; cursor:pointer; color:var(--gold); padding:0 8px; line-height:1; }
    .fcal-nav-btn-disabled { background:none; border:none; font-size:20px; color:rgba(0,0,0,0.15); padding:0 8px; line-height:1; }
    .cal-month-flex1 { flex:1; text-align:center; }
    .fcal-tap-hint { font-size:11px; color:rgba(255,255,255,0.4); margin-bottom:12px; }
    .cal-header-mb { margin-bottom:10px; }
    .tp-msg-sm { font-size:12px; color:var(--muted); padding:8px 4px; }
    .tp-spinner-center { text-align:center; padding:16px 0; }
    .sharing-spin { display:inline-block; animation:spin 0.8s linear infinite; }
    .weather-no-stops { text-align:center; color:var(--muted); font-size:14px; margin-top:20px; }
    .ipu-new-badge { background:var(--gold); color:#000; font-size:10px; font-weight:700; padding:1px 6px; border-radius:4px; margin-left:4px; }
    .tp-taf-group-relevant { background:rgba(232,160,48,0.14); border:1.5px solid rgba(232,160,48,0.5); }
    .tp-taf-group-normal   { background:rgba(0,0,0,0.03); border:1px solid rgba(0,0,0,0.05); }
    .tp-taf-hl-line { display:inline-block; width:100%; background:rgba(232,160,48,0.22); border-radius:3px; }
    .d-none { display:none; }
    .contact-underline-link { cursor:pointer; text-decoration:underline; text-underline-offset:2px; }
    .ipu-section-p { font-size:13px; color:var(--text); line-height:1.6; margin-bottom:12px; }
    .ipu-section-p-last { font-size:13px; color:var(--text); line-height:1.6; }
    .aths-gold { color:var(--gold); }
    .aths-white { color:#fff; }
    .md-p { margin:0 0 4px; }
    .green-text { color:#4ade80; font-weight:700; }
    .chevron-green { color:rgba(74,222,128,0.7); font-size:16px; }
    .muted-xs { font-size:11px; color:rgba(255,255,255,0.5); margin-top:2px; }
    .cursor-default { cursor:default; }
    .fprofile-icon-cell { color:var(--muted); font-size:14px; min-width:28px; text-align:center; }
    .fprofile-val { font-weight:600; font-size:12px; }
    .fprofile-shared-groups { margin-top:10px; padding:8px 12px; background:rgba(147,197,253,0.08); border-radius:10px; border:1px solid rgba(147,197,253,0.18); }
    .fprofile-shared-groups-hdr { font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; margin-bottom:6px; }
    .fprofile-group-item { font-size:12px; font-weight:600; padding:3px 0; color:var(--navy-dark); cursor:pointer; }
    .fprofile-contact-flex { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
    .fprofile-phone-num { font-weight:600; }
    .fprofile-link { color:inherit; }
    .fprofile-call-btn { display:inline-flex; align-items:center; gap:4px; padding:2px 9px; border-radius:20px; background:rgba(14,165,233,0.12); border:1px solid rgba(14,165,233,0.35); color:rgb(14,165,233); font-size:10px; font-weight:700; text-decoration:none; }
    .fprofile-sms-btn  { display:inline-flex; align-items:center; gap:4px; padding:2px 9px; border-radius:20px; background:rgba(74,222,128,0.12); border:1px solid rgba(74,222,128,0.35); color:rgb(74,222,128); font-size:10px; font-weight:700; text-decoration:none; }
    .contact-link-btn { background:none; border:none; color:#60A5FA; text-decoration:underline; font-size:14px; cursor:pointer; padding:0; }
    .ff-req-modal-icon { font-size:22px; margin-bottom:12px; }
    .ff-req-modal-title { font-size:16px; font-weight:700; color:#fff; margin-bottom:10px; }
    .ff-req-modal-sub { font-size:14px; color:rgba(255,255,255,0.72); line-height:1.6; margin-bottom:20px; }
    .ff-req-modal-actions { display:flex; gap:10px; }
    .ff-req-modal-btn { flex:1; padding:11px; border-radius:10px; }
    .ff-req-modal-btn-cancel { border:1px solid rgba(255,255,255,0.2); background:none; color:rgba(255,255,255,0.7); font-size:14px; font-weight:600; cursor:pointer; }
    .ff-req-modal-btn-accept { border:none; background:#E8A030; color:#0D1F35; font-size:14px; font-weight:700; cursor:pointer; }
    .ff-req-modal-inner { background:#0D1F35; border:1px solid rgba(255,255,255,0.12); border-radius:16px; padding:24px 22px; max-width:360px; width:100%; box-shadow:0 8px 40px rgba(0,0,0,0.5); }
    .ff-req-strong-white { color:#fff; }
    .ff-req-strong-gold  { color:#E8A030; }
    .tc-friend-group-tag-pointer { cursor:pointer; }
    .cal-legend-dot-reserve  { background:#4F5BD5; }
    .cal-legend-dot-gdo      { background:#1A7A3F; }
    .cal-legend-dot-vacation { background:#B7860B; }
    .cal-legend-dot-pto      { background:#B7860B; }
    .cal-legend-dot-sick     { background:#C0392B; }
    .cal-legend-dot-training { background:#5D4E6D; }
    .cal-legend-dot-deadhead { background:#5D6D7E; }
    /* Leaflet dynamic marker classes */
    .leaflet-direction-arrow { font-size:12px; line-height:1; opacity:0.9; text-shadow:0 0 3px rgba(0,0,0,0.6); }
    .leaflet-plane-big-icon  { font-size:20px; line-height:1; filter:drop-shadow(0 1px 3px rgba(0,0,0,0.9)); }
    .leaflet-plane-icon      { line-height:1; filter:drop-shadow(0 1px 4px rgba(0,0,0,0.8)); transform:rotate(-45deg); }
    .leaflet-cluster-count   { background:#fff; color:#0D1F35; font-size:10px; font-weight:700; width:15px; height:15px; border-radius:50%; display:flex; align-items:center; justify-content:center; }
    .leaflet-leg-badge       { color:#fff; font-size:10px; font-weight:700; line-height:16px; width:16px; height:16px; border-radius:50%; text-align:center; box-shadow:0 1px 3px rgba(0,0,0,0.7); opacity:0.92; }
    .leaflet-current-pos-dot { width:14px; height:14px; border-radius:50%; background:#3B82F6; border:3px solid #fff; box-shadow:0 0 0 3px rgba(59,130,246,0.4); }
    .leaflet-popup-tip-b     { color:#0D1F35; }
    .leaflet-popup-tip-span  { color:#555; }
    .leaflet-popup-timeline  { color:#999; }
