        *, *::before, *::after { box-sizing: border-box; }
        body { font-family: 'Inter', sans-serif; background: #faf7f4; color: #252120; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }
        .tab-content { display: none; }
        .tab-content.active { display: block; }
        .day-card-body { max-height: 0; overflow: hidden; transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease; opacity: 0; }
        .day-card-body.open { max-height: 8000px; opacity: 1; }
        .chevron-icon { transition: transform 0.3s ease; }
        .chevron-icon.rotated { transform: rotate(180deg); }
        @keyframes pulse-alert { 0%, 100% { opacity: 1; } 50% { opacity: 0.85; } }
        .alert-pulse { animation: pulse-alert 2s ease-in-out infinite; }
        @keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
        .today-highlight { background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.3) 50%, rgba(255, 215, 0, 0.15) 100%); background-size: 200% 100%; animation: shimmer 3s ease-in-out infinite; border-left: 4px solid #FFD700; }
        .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; }
        /* With destinations added, the tab count is dynamic and can exceed
           what fits at flex-1 on a phone (labels overlap once ~9 tabs are
           on screen) — scroll horizontally instead of squeezing. */
        .bottom-nav-row { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
        .bottom-nav .nav-btn { flex: 0 0 auto !important; width: 66px; }
        .nav-btn.active { color: #C8102E; }
        .nav-btn.active .nav-indicator { width: 100%; }
        .nav-indicator { width: 0; height: 3px; transition: width 0.3s ease; border-radius: 2px; }
        @media (max-width: 640px) {
            .bottom-nav { padding-bottom: env(safe-area-inset-bottom, 0px); }
            .bottom-nav-row {
                display: grid !important;
                grid-template-columns: repeat(5, minmax(0, 1fr));
                overflow: visible;
                max-width: none;
            }
            .bottom-nav .nav-btn {
                width: auto;
                min-width: 0;
                min-height: 58px;
                padding: 7px 2px 6px;
            }
            .bottom-nav .nav-btn span {
                max-width: 100%;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                font-size: 9px;
            }
        }
        .pass-dot { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
        .copy-toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: #252120; color: #fefcfa; padding: 10px 20px; border-radius: 12px; font-size: 14px; z-index: 100; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
        .copy-toast.show { opacity: 1; }
        /* Real bug found via independent audit (2026-07-11): #undo-toast
           used to carry inline pointer-events:auto unconditionally (needed
           so its real Undo button is clickable while shown), which also
           left it clickable/hit-testable after fading back to opacity:0 -
           a tap in that spot could silently pop the undo stack or just eat
           a tap meant for content underneath, with zero visible feedback
           either way. Scoped to .show instead, so it's only interactive
           while actually visible - falls back to the base .copy-toast
           pointer-events:none otherwise, same as the plain copy-toast. */
        #undo-toast.show { pointer-events: auto; }
        .badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 9999px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
        .timeline-item { position: relative; padding-left: 28px; padding-bottom: 14px; }
        .timeline-item::before { content: ''; position: absolute; left: 7px; top: 22px; bottom: 0; width: 2px; background: #eae5e0; }
        .timeline-item:last-child::before { display: none; }
        .timeline-dot { position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid; background: #fefcfa; }
        .london-dot { border-color: #C8102E; }
        .paris-dot { border-color: #002395; }
        .travel-dot { border-color: #6b6460; }
        main { padding-bottom: 85px; }
        @media (max-width: 640px) {
            main { padding-bottom: calc(134px + env(safe-area-inset-bottom, 0px)); }
        }
        .sticky-header { position: sticky; top: 0; z-index: 40; }
        body::-webkit-scrollbar { width: 6px; }
        body::-webkit-scrollbar-thumb { background: #d8d2cc; border-radius: 3px; }

        .upload-zone { border: 2px dashed #d8d2cc; border-radius: 16px; background: #f4f0ec; transition: border-color 0.2s, background 0.2s; cursor: pointer; }
        .upload-zone:hover, .upload-zone.dragover { border-color: #002395; background: #e8ecf5; }
        .ticket-item { animation: fadeInItem 0.3s ease forwards; }
        @keyframes fadeInItem { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
        .cat-badge-flights { background: #fee2e2; color: #991b1b; }
        .cat-badge-hotels { background: #dbeafe; color: #1e40af; }
        .cat-badge-transport { background: #fef3c7; color: #92400e; }
        .cat-badge-activities { background: #ede9fe; color: #5b21b6; }
        .cat-badge-other { background: #f3f4f6; color: #374151; }
        .file-thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #eae5e0; }

        .note-saved { color: #16a34a; font-size: 11px; opacity: 1; transition: opacity 0.6s ease; }
        .note-saved.fade { opacity: 0; }

        .od-section { margin-top: 10px; border-top: 1px solid #eae5e0; padding-top: 10px; }
        .od-section-title { font-size: 11px; font-weight: 600; color: #8a8380; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }
        .od-note-area { width: 100%; min-height: 56px; border: 1px solid #eae5e0; border-radius: 10px; padding: 8px 12px; font-size: 12px; color: #3a3532; background: #fefcfa; resize: vertical; font-family: inherit; box-sizing: border-box; outline: none; }
        .od-note-area:focus { border-color: #002395; box-shadow: 0 0 0 2px rgba(0,35,149,0.1); }
        .od-note-area::placeholder { color: #d8d2cc; }
        .od-save-status { font-size: 10px; color: #16a34a; margin-top: 3px; min-height: 14px; transition: opacity 0.5s; }
        .od-file-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #f4f0ec; border-radius: 10px; margin-bottom: 5px; }
        .od-file-icon { font-size: 16px; flex-shrink: 0; }
        .od-file-name { font-size: 11px; font-weight: 600; color: #3a3532; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; }
        .od-file-desc { flex: 1; border: none; background: transparent; font-size: 11px; color: #6b6460; outline: none; min-width: 0; }
        .od-file-desc::placeholder { color: #d8d2cc; }
        .od-file-link { font-size: 10px; color: #002395; text-decoration: none; white-space: nowrap; }
        .od-file-del { background: none; border: none; cursor: pointer; font-size: 14px; color: #8a8380; padding: 0 2px; flex-shrink: 0; }
        .od-upload-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #002395; background: #e8ecf5; border: 1px dashed #002395; border-radius: 8px; padding: 5px 10px; cursor: pointer; margin-top: 4px; }
        .od-upload-btn:hover { background: #d0d8eb; }
        .od-link-item { display: flex; align-items: center; gap: 6px; padding: 5px 8px; background: #f4f0ec; border-radius: 8px; margin-bottom: 4px; }
        .od-link-text { flex: 1; font-size: 11px; color: #002395; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .od-link-del { background: none; border: none; cursor: pointer; font-size: 12px; color: #8a8380; padding: 0; }
        .od-add-link-row { display: flex; gap: 4px; margin-top: 4px; }
        .od-add-link-input { flex: 1; border: 1px solid #eae5e0; border-radius: 8px; padding: 5px 8px; font-size: 11px; outline: none; }
        .od-add-link-btn { background: #012169; color: white; border: none; border-radius: 8px; padding: 5px 10px; font-size: 11px; cursor: pointer; white-space: nowrap; }
        .od-uploading { font-size: 10px; color: #002395; margin-top: 3px; }

        .fp-tab { background: #f4f0ec; color: #6b6460; }
        .fp-tab.selected { background: #012169; color: white; }
        .fp-crumb { cursor: pointer; color: #002395; }
        .fp-crumb:not(:last-child)::after { content: ' / '; color: #8a8380; }
        .fp-crumb:last-child { color: #3a3532; font-weight: 600; cursor: default; }
        .fp-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: #3a3532; }
        .fp-item:hover { background: #f4f0ec; }
        .fp-item.selected { background: #e8ecf5; }
        .fp-empty { font-size: 12px; color: #8a8380; text-align: center; padding: 24px 8px; }

        .reorder-tab-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #f4f0ec; border-radius: 10px; touch-action: none; }
        .reorder-tab-row.dragging { opacity: 0.6; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
        .reorder-drag-handle { cursor: grab; color: #8a8380; font-size: 16px; touch-action: none; user-select: none; }
        .reorder-arrow-btn { background: none; border: none; cursor: pointer; padding: 4px; color: #524c48; }
        .reorder-arrow-btn:disabled { opacity: 0.3; cursor: default; }

        .tl-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f4f0ec; cursor: pointer; border-radius: 8px; transition: background 0.15s; }
        .tl-row:last-child { border-bottom: none; }
        .tl-row:hover { background: #f4f0ec; margin: 0 -6px; padding-left: 6px; padding-right: 6px; }
        .tl-time { font-size: 11px; font-weight: 700; color: #8a8380; width: 38px; flex-shrink: 0; padding-top: 2px; letter-spacing: 0.03em; }
        .tl-desc { flex: 1; font-size: 13px; color: #3a3532; line-height: 1.45; }
        .tl-desc.highlight { font-weight: 600; color: #252120; }
        .tl-icons { display: flex; gap: 3px; flex-shrink: 0; padding-top: 2px; }
        .tl-icon { font-size: 10px; opacity: 0.55; }
        .tl-icon.active { opacity: 1; }
        .tl-segment { margin: 12px 0 6px; border: 1px solid #eee7df; border-radius: 10px; overflow: hidden; background: #fff; }
        .tl-segment.flat { margin-top: 0; border: none; border-radius: 0; background: transparent; }
        .tl-segment:first-child { margin-top: 2px; }
        .tl-segment-header { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; background: #f4f0ec; border: 0; border-bottom: 1px solid #eee7df; cursor: pointer; text-align: left; }
        .tl-segment-title { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 11px; font-weight: 800; color: #252120; text-transform: uppercase; letter-spacing: 0.04em; }
        .tl-segment-title span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .tl-segment-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; color: #6b6460; }
        .tl-segment-time { flex-shrink: 0; font-size: 10px; font-weight: 800; color: #6b6460; font-family: 'Courier New', monospace; }
        .tl-segment-body { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.25s ease; }
        .tl-segment-body.open { max-height: 3000px; opacity: 1; }
        .tl-segment-items { padding: 0 10px; }
        .tl-segment-empty { padding: 9px 10px; font-size: 11px; color: #8a8380; }
        .chip-segment-jump { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; padding: 10px 12px; border: 1px solid #ded8d2; border-radius: 10px; background: #eeeae5; color: #5f5853; cursor: pointer; text-align: left; }
        .chip-segment-jump:hover { background: #e5dfd8; border-color: #cfc6bd; }
        .chip-segment-jump-main { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
        .chip-segment-jump-main span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .chip-segment-jump-time { flex-shrink: 0; font-size: 10px; font-weight: 800; font-family: 'Courier New', monospace; color: #6b6460; }
        .overview-segment-list { display: grid; gap: 2px; margin-top: 5px; }
        .overview-segment-line { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 10px; color: #6b6460; line-height: 1.25; }
        .overview-segment-dot { width: 6px; height: 6px; border-radius: 999px; flex-shrink: 0; }
        .overview-segment-time { flex-shrink: 0; font-family: 'Courier New', monospace; font-weight: 800; color: #524c48; }
        .overview-segment-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .timeline-day-card { background:#fff; border:1px solid #eae5e0; border-radius:14px; overflow:hidden; margin-bottom:12px; box-shadow:0 1px 4px rgba(0,0,0,0.06); }
        .timeline-day-toggle { width:100%; border:0; background:#f4f0ec; padding:10px 12px; display:flex; align-items:center; justify-content:space-between; gap:10px; cursor:pointer; text-align:left; color:#252120; font-size:13px; }
        .timeline-day-body { display:grid; grid-template-columns:48px minmax(0,1fr); gap:10px; padding:12px; }
        .timeline-scale { position:relative; height:640px; display:flex; flex-direction:column; justify-content:space-between; align-items:flex-end; color:#8a8380; font-size:10px; font-family:'Courier New', monospace; font-weight:800; padding:2px 0; }
        .timeline-track { position:relative; min-height:640px; border-left:1px solid #e0d8cf; background:repeating-linear-gradient(to bottom,#fff 0,#fff 78px,#faf7f4 79px,#faf7f4 80px); border-radius:10px; overflow:hidden; }
        .timeline-segment-block { position:absolute; left:8px; right:8px; border-left:5px solid #8a8380; border-radius:10px; background:rgba(244,240,236,0.92); box-shadow:0 1px 5px rgba(0,0,0,0.08); overflow:hidden; min-height:48px; }
        .timeline-segment-head { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 8px; background:rgba(255,255,255,0.72); color:#252120; font-size:10px; text-transform:uppercase; letter-spacing:0.04em; }
        .timeline-segment-head span { flex-shrink:0; font-family:'Courier New', monospace; font-weight:800; color:#6b6460; }
        .timeline-segment-head strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
        .timeline-segment-items { position:relative; height:calc(100% - 28px); min-height:24px; }
        .timeline-activity { position:absolute; left:8px; right:8px; transform:translateY(-50%); display:flex; align-items:flex-start; gap:7px; border:1px solid rgba(216,210,204,0.9); border-radius:8px; background:#fff; padding:5px 7px; color:#3a3532; text-align:left; cursor:pointer; box-shadow:0 1px 3px rgba(0,0,0,0.06); }
        .timeline-activity-time { width:38px; flex-shrink:0; font-size:10px; font-family:'Courier New', monospace; font-weight:800; color:#6b6460; }
        .timeline-activity-text { min-width:0; font-size:11px; line-height:1.25; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
        .timeline-activity-block { min-height:28px; }
        .timeline-activity-block .timeline-activity-text { -webkit-line-clamp:6; }
        /* Concurrent items sharing a segment row get squeezed columns (see
           assignTimelineColumns() in 07-main-app.js) - the fixed 38px time
           badge that reads fine full-width eats most of a ~70-100px column,
           so past 1 column this stacks time above text instead and lets the
           badge size to content, reclaiming the width for the label. */
        .timeline-activity[data-col-count]:not([data-col-count="1"]) { flex-direction:column; gap:2px; padding:4px 5px; }
        .timeline-activity[data-col-count]:not([data-col-count="1"]) .timeline-activity-time { width:auto; }
        .timeline-empty { padding:8px; font-size:10px; color:#8a8380; }

        .ap-file-row { display:flex;align-items:center;gap:8px;padding:6px 10px;background:#f4f0ec;border-radius:10px;margin-bottom:5px; }
        .ap-file-name { font-size:11px;font-weight:600;color:#3a3532;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:90px; }
        .ap-file-desc-inp { flex:1;border:none;background:transparent;font-size:11px;color:#6b6460;outline:none;min-width:0; }
        .ap-file-link { font-size:10px;color:#002395;text-decoration:none;white-space:nowrap; }
        .ap-file-del { background:none;border:none;cursor:pointer;font-size:13px;color:#8a8380;padding:0 2px; }
        .ap-link-row { display:flex;align-items:center;gap:6px;padding:5px 8px;background:#f4f0ec;border-radius:8px;margin-bottom:4px; }
        .ap-link-anchor { flex:1;font-size:12px;color:#002395;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
        .ap-link-del { background:none;border:none;cursor:pointer;font-size:12px;color:#8a8380;padding:0; }
        #activity-panel { transition: transform 0.32s cubic-bezier(0.4,0,0.2,1); }

        /* FIX 2: Clocks row at bottom of banner */
        .banner-clocks-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 8px 0 7px; }
        .clock-pill { display: flex; align-items: center; gap: 7px; background: rgba(0,0,0,0.34); border-radius: 10px; padding: 7px 12px; min-height: 32px; }
        .clock-pill .cp-city { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.82); white-space: nowrap; }
        .clock-pill .cp-time { font-size: 15px; font-weight: 800; color: #fff; font-family: 'Courier New', monospace; letter-spacing: 0.03em; line-height: 1; }
        @media (max-width: 640px) {
            .banner-clocks-row {
                display: grid;
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 6px;
                padding: 7px 0 8px;
            }
            .clock-pill {
                justify-content: center;
                gap: 4px;
                min-width: 0;
                padding: 6px 4px;
            }
            .clock-pill .cp-city { font-size: 9px; }
            .clock-pill .cp-time { font-size: 13px; letter-spacing: 0.01em; }
        }

        #ap-name-input { width: 100%; border: 1px solid transparent; background: transparent; font-size: 15px; font-weight: 600; color: #252120; line-height: 1.4; padding: 4px 8px; border-radius: 8px; font-family: inherit; outline: none; box-sizing: border-box; }
        #ap-name-input:focus { border-color: #002395; background: #faf7f4; }
        #ap-time-input { border: 1px solid transparent; background: transparent; font-size: 11px; font-weight: 700; color: #8a8380; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 6px; font-family: inherit; outline: none; width: 90px; }
        #ap-time-input:focus { border-color: #002395; background: #faf7f4; }
        #ap-end-time-input { border: 1px solid transparent; background: transparent; font-size: 11px; font-weight: 700; color: #8a8380; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 6px; font-family: inherit; outline: none; width: 90px; }
        #ap-end-time-input:focus { border-color: #002395; background: #faf7f4; }
        .military-time-input { font-family: 'Courier New', monospace !important; letter-spacing: 0.03em; }
        .military-time-input.time-invalid { border-color: #dc2626 !important; background: #fff7f7 !important; color: #991b1b !important; }
        #ap-save-btn { display: inline-flex; align-items: center; gap: 5px; background: #012169; color: white; border: none; border-radius: 10px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; margin-top: 8px; }
        #ap-save-btn:hover { opacity: 0.9; }
        #ap-save-status { font-size: 11px; color: #16a34a; margin-left: 10px; display: inline; transition: opacity 0.5s; }

        .ap-link-booking-section { margin-top: 14px; padding-top: 14px; border-top: 1px solid #eae5e0; }
        .ap-link-booking-title { font-size: 11px; font-weight: 700; color: #8a8380; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
        .ap-link-check-row:hover { background: #f4f0ec; }
        #ap-linked-badges .linked-badge-inner { display: inline-flex; align-items: center; gap: 6px; background: #e8ecf5; color: #002395; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 20px; cursor: pointer; }
        #ap-linked-badges .linked-badge-inner:hover { background: #d0d8eb; }

        .traveller-card { background: white; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.07); padding: 16px; cursor: pointer; display: flex; align-items: center; gap: 12px; transition: box-shadow 0.2s, transform 0.15s; border: 1px solid #eae5e0; }
        .traveller-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-1px); }
        .traveller-card .tc-icon { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #012169, #002395); color: white; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
        .traveller-card .tc-info { flex: 1; min-width: 0; }
        .traveller-card .tc-name { font-size: 14px; font-weight: 600; color: #252120; }
        .traveller-card .tc-age { font-size: 12px; color: #8a8380; }
        .traveller-card .tc-arrow { color: #d8d2cc; font-size: 18px; }
        #traveller-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 9001; width: min(420px, 100vw); background: #fefcfa; box-shadow: -4px 0 32px rgba(0,0,0,0.15); overflow-y: auto; transform: translateX(100%); transition: transform 0.32s cubic-bezier(0.4,0,0.2,1); display: none; }
        #traveller-panel-overlay { display: none; position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,0.25); }
        /* Booking/Ticket edit — same right-side sliding panel pattern as
           #activity-panel/#traveller-panel, replacing the old centered
           popup dialog so all three "edit" surfaces feel consistent. */
        #booking-edit-modal, #ticket-edit-modal, #add-day-modal, #day-map-modal, #destination-edit-modal, #nearby-restaurants-modal, #flight-status-modal, #ai-assistant-modal { position: fixed; top: 0; right: 0; bottom: 0; z-index: 9001; width: min(420px, 100vw); background: #fefcfa; box-shadow: -4px 0 32px rgba(0,0,0,0.15); overflow-y: auto; transform: translateX(100%); transition: transform 0.32s cubic-bezier(0.4,0,0.2,1); display: none; }
        #booking-edit-overlay, #ticket-edit-overlay, #add-day-overlay, #day-map-overlay, #destination-edit-overlay, #nearby-restaurants-overlay, #flight-status-overlay, #ai-assistant-overlay { display: none; position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,0.25); }
        .ai-chat-messages { display: flex; flex-direction: column; gap: 8px; min-height: 200px; max-height: 50vh; overflow-y: auto; padding: 4px 0; }
        .ai-chat-bubble { max-width: 85%; padding: 8px 12px; border-radius: 14px; font-size: 13px; line-height: 1.4; white-space: pre-wrap; }
        .ai-chat-bubble-user { align-self: flex-end; background: #012169; color: #fff; border-bottom-right-radius: 4px; }
        .ai-chat-bubble-assistant { align-self: flex-start; background: #f4f0ec; color: #3a3532; border-bottom-left-radius: 4px; }
        .tp-field-group { margin-bottom: 16px; }
        .tp-field-group label { display: block; font-size: 11px; font-weight: 700; color: #8a8380; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
        .tp-field-group input, .tp-field-group textarea, .tp-field-group select { width: 100%; border: 1px solid #eae5e0; border-radius: 10px; padding: 10px 14px; font-size: 13px; color: #3a3532; background: #faf7f4; font-family: inherit; outline: none; box-sizing: border-box; }
        .tp-field-group input:focus, .tp-field-group textarea:focus, .tp-field-group select:focus { border-color: #002395; box-shadow: 0 0 0 2px rgba(0,35,149,0.1); }
        .pp-status-btn { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid #eae5e0; background: #faf7f4; font-size: 13px; font-weight: 600; color: #6b6460; cursor: pointer; transition: all 0.15s; }
        .pp-status-btn.active[data-status="buy"] { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
        .pp-status-btn.active[data-status="owned"] { background: #dcfce7; border-color: #16a34a; color: #15803d; }
        .tp-field-group textarea { resize: vertical; min-height: 60px; }
        .tp-field-group .tp-inline { display: flex; align-items: center; gap: 10px; }
        .tp-field-group .tp-age-badge { font-size: 12px; font-weight: 600; color: #002395; background: #e8ecf5; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
        .tp-passport-warn { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: #dc2626; background: #fee2e2; padding: 3px 8px; border-radius: 12px; margin-top: 4px; }
        .doc-thumbnail-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
        .doc-thumb { width: 80px; height: 80px; border-radius: 10px; object-fit: cover; position: relative; overflow: hidden; background: #eae5e0; display: flex; align-items: center; justify-content: center; }
        .doc-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
        .doc-thumb .doc-pdf-icon { font-size: 28px; }
        .doc-thumb .doc-pdf-name { font-size: 8px; color: #6b6460; text-align: center; margin-top: 2px; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .doc-remove-btn { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; background: rgba(0,0,0,0.6); color: white; border: none; border-radius: 50%; font-size: 11px; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; }
        .doc-remove-btn:hover { background: #dc2626; }
        .upload-drop-zone { border: 2px dashed #d8d2cc; border-radius: 12px; padding: 24px; text-align: center; cursor: pointer; background: #f4f0ec; transition: border-color 0.2s, background 0.2s; }
        .upload-drop-zone:hover { border-color: #002395; background: #e8ecf5; }

        /* Overview traveller chips */
        .traveller-chip { display: inline-flex; align-items: center; gap: 6px; background: #e8ecf5; color: #002395; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 20px; }

    /* ── Login Gate ─────────────────────────────────── */
    #login-gate {
      position: fixed; inset: 0; z-index: 99999;
      display: flex; align-items: center; justify-content: center;
      background: radial-gradient(circle at top, #012169 0, #001233 40%, #000000 100%);
      color: #fff;
    }
    #login-gate.hidden { display: none !important; }
    #app-root.hidden   { display: none !important; }
    .lg-card {
      background: rgba(255,255,255,0.07); border-radius: 18px;
      padding: 28px 28px 22px; box-shadow: 0 18px 40px rgba(0,0,0,0.5);
      max-width: 360px; width: 90%; backdrop-filter: blur(18px); text-align: center;
    }
    .lg-icon  { font-size: 36px; margin-bottom: 10px; }
    .lg-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
    .lg-sub   { font-size: 13px; opacity: .8; margin-bottom: 20px; }
    .lg-btn {
      width: 100%; border-radius: 999px; border: none; padding: 11px 14px;
      font-size: 14px; font-weight: 600; cursor: pointer;
      background: #fff; color: #012169;
      display: flex; align-items: center; justify-content: center; gap: 8px;
    }
    .lg-btn:hover { background: #e8e8e8; }
    .lg-err  { margin-top: 10px; font-size: 12px; color: #ffb3b3; min-height: 16px; }
    .lg-signout { display: block; margin: 4px auto 0; background: none; border: none; color: #9db4e0; font-size: 12px; text-decoration: underline; cursor: pointer; padding: 4px; }
    .lg-meta { margin-top: 14px; font-size: 11px; opacity: .6; }

    /* ── Trip Picker ────────────────────────────────── */
    #trip-picker { position: fixed; inset: 0; z-index: 9500; background: #faf7f4; overflow-y: auto; }
    #trip-picker.hidden { display: none !important; }
    .trip-tile { position: relative; }
    .trip-tile-delete-btn {
      position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.9);
      border: none; border-radius: 8px; width: 26px; height: 26px; color: #dc2626;
      cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center;
    }
    .at-type-chip {
      border: 1px solid #d8d2cc; border-radius: 999px; padding: 6px 14px; font-size: 12px;
      font-weight: 600; background: #f4f0ec; color: #524c48; cursor: pointer;
    }
    .at-type-chip.selected { background: #002395; border-color: #002395; color: white; }

    .search-input-wrap { display: flex; align-items: center; gap: 8px; border: 1px solid #eae5e0; border-radius: 12px; padding: 9px 12px; background: #faf7f4; }
    .search-input-wrap:focus-within { border-color: #002395; box-shadow: 0 0 0 2px rgba(0,35,149,0.1); }
    #trip-search-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: inherit; font-size: 14px; color: #252120; }
    #trip-search-clear { display: none; align-items: center; justify-content: center; width: 28px; height: 28px; border: none; border-radius: 8px; background: #eae5e0; color: #524c48; cursor: pointer; flex-shrink: 0; }
    #trip-search-clear.visible { display: inline-flex; }
    .search-filter-row { display: flex; gap: 6px; overflow-x: auto; padding-top: 12px; -webkit-overflow-scrolling: touch; }
    .search-filter-chip { flex: 0 0 auto; border: 1px solid #d8d2cc; border-radius: 999px; background: #f4f0ec; color: #524c48; padding: 6px 11px; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
    .search-filter-chip span { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: rgba(255,255,255,0.7); color: inherit; font-size: 10px; }
    .search-filter-chip.active { background: #012169; border-color: #012169; color: white; }
    .search-recent-row { display: none; align-items: center; gap: 6px; overflow-x: auto; padding-top: 10px; -webkit-overflow-scrolling: touch; }
    .search-recent-row.visible { display: flex; }
    .search-recent-row > span { flex: 0 0 auto; font-size: 10px; font-weight: 800; text-transform: uppercase; color: #8a8380; letter-spacing: 0.05em; }
    .search-recent-chip { flex: 0 0 auto; border: 1px solid #eae5e0; border-radius: 999px; background: white; color: #524c48; padding: 5px 9px; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; }
    .search-result-card { width: 100%; text-align: left; display: flex; gap: 10px; background: white; border: 1px solid #eae5e0; border-radius: 12px; padding: 12px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
    .search-result-card:hover { border-color: #d8d2cc; box-shadow: 0 4px 14px rgba(0,0,0,0.07); transform: translateY(-1px); }
    .search-result-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #f4f0ec; flex-shrink: 0; font-size: 16px; }
    .search-result-body { min-width: 0; flex: 1; }
    .search-result-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
    .search-result-kind { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: #8a8380; }
    .search-result-location { font-size: 11px; font-weight: 600; color: #002395; }
    .search-result-title { display: block; font-size: 14px; font-weight: 700; color: #252120; line-height: 1.35; overflow-wrap: anywhere; }
    .search-result-snippet { display: block; font-size: 12px; color: #6b6460; line-height: 1.45; margin-top: 3px; overflow-wrap: anywhere; }
    .search-result-snippet mark { background: #fef3c7; color: #92400e; border-radius: 3px; padding: 0 2px; }
    .search-result-card:focus-visible, .search-filter-chip:focus-visible, .search-recent-chip:focus-visible, #trip-search-clear:focus-visible { outline: 2px solid #002395; outline-offset: 2px; }

    .overview-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
    .overview-date-pill { flex: 0 0 auto; min-width: 168px; background: #fff; border: 1px solid #eae5e0; border-radius: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); padding: 12px 14px; }
    .overview-summary-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(190px, 0.85fr); gap: 12px; align-items: stretch; }
    .overview-summary-card { min-height: 112px; }
    .overview-export-card { display: flex; flex-direction: column; justify-content: flex-start; gap: 10px; min-height: 112px; }
    .export-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-start; }
    .export-action-btn { border: none; border-radius: 10px; min-height: 34px; padding: 7px 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
    .export-print-btn { background: #252120; color: white; }
    .export-excel-btn { background: #e8f5ee; color: #166534; }
    .export-action-btn:focus-visible { outline: 2px solid #002395; outline-offset: 2px; }
    .overview-actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
    .overview-action-card { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .overview-action-card .overview-action-copy { min-width: 0; }
    .overview-action-card button { flex-shrink: 0; }
    .overview-actions-grid .trip-health-card { grid-column: 1 / -1; }
    .overview-actions-grid .trip-health-card:not(.collapsed) { align-items: flex-start; }
    .overview-stay-travel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .overview-booking-panel { border: 1px solid #eae5e0; border-radius: 12px; background: #fff; padding: 10px; min-width: 0; }
    .overview-booking-panel-title { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: #252120; font-size: 12px; font-weight: 800; }
    .overview-booking-panel-list { display: grid; gap: 8px; }
    .overview-booking-link { width: 100%; display: flex; gap: 9px; align-items: flex-start; text-align: left; border: 1px solid #eee8e2; border-radius: 10px; background: #faf7f4; padding: 9px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
    .overview-booking-link:hover { border-color: #d8d2cc; box-shadow: 0 5px 14px rgba(0,0,0,0.06); transform: translateY(-1px); }
    .overview-booking-link:focus-visible { outline: 2px solid #002395; outline-offset: 2px; }
    .overview-booking-dot { width: 8px; height: 8px; border-radius: 999px; margin-top: 5px; flex-shrink: 0; background: #012169; }
    .overview-booking-copy { min-width: 0; }
    .overview-booking-title { display: block; color: #252120; font-size: 13px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
    .overview-booking-meta { display: block; margin-top: 2px; color: #6b6460; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
    .overview-booking-empty { border: 1px dashed #e2dcd6; border-radius: 10px; padding: 10px; color: #8a8380; font-size: 12px; }
    .booking-jump-highlight { outline: 2px solid #012169; box-shadow: 0 0 0 4px rgba(1,33,105,0.12); }
    #trip-print-root { display: none; }

    @media (max-width: 640px) {
      .overview-summary-grid { grid-template-columns: 1fr; }
      .overview-header-row { flex-direction: column; gap: 10px; }
      .overview-date-pill { width: 100%; }
      .overview-export-card { min-height: 0; }
      .overview-summary-card { min-height: 0; }
      .overview-actions-grid { grid-template-columns: 1fr; }
      .overview-stay-travel-grid { grid-template-columns: 1fr; }
    }

    .overview-collapsible-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
    .overview-section-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
    .overview-collapse-toggle { border: none; border-radius: 10px; min-height: 32px; padding: 6px 9px; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; background: #f4f0ec; color: #524c48; }
    .overview-collapsible.collapsed .overview-collapsible-body { display: none; }
    .overview-collapse-toggle:focus-visible { outline: 2px solid #002395; outline-offset: 2px; }

    .quick-expense-cat-btn { border: 1px solid #eae5e0; border-radius: 10px; padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer; background: #faf7f4; color: #524c48; white-space: nowrap; }
    .quick-expense-cat-btn.active { background: #002395; border-color: #002395; color: #fff; }

    .packing-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
    .packing-stat-card { border-radius: 12px; padding: 10px; border: 1px solid #eae5e0; background: #f4f0ec; }
    .packing-stat-card span { display: block; font-size: 18px; font-weight: 800; line-height: 1; color: #252120; }
    .packing-stat-card small { display: block; margin-top: 4px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #6b6460; }
    .packing-stat-card.warn { background: #fff7ed; border-color: #fed7aa; }
    .packing-stat-card.buy { background: #fffbeb; border-color: #fde68a; }
    .packing-stat-card.ok { background: #ecfdf5; border-color: #bbf7d0; }
    .packing-filter-row, .packing-owner-row { display: flex; gap: 6px; overflow-x: auto; padding-top: 8px; -webkit-overflow-scrolling: touch; }
    .packing-filter-chip, .packing-owner-chip { flex: 0 0 auto; border: 1px solid #d8d2cc; border-radius: 999px; background: #f4f0ec; color: #524c48; padding: 6px 10px; font-size: 11px; font-weight: 800; cursor: pointer; white-space: nowrap; }
    .packing-filter-chip span { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: rgba(255,255,255,0.7); color: inherit; font-size: 10px; }
    .packing-filter-chip.active, .packing-owner-chip.active { background: #012169; border-color: #012169; color: white; }
    .packing-dashboard-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid #f1ede8; margin-top: 12px; padding-top: 12px; font-size: 11px; font-weight: 700; color: #6b6460; }
    .packing-dashboard-footer button, .packing-pack-card-btn { border: none; border-radius: 9px; min-height: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 11px; font-weight: 800; cursor: pointer; background: #e8f5ee; color: #166534; padding: 6px 9px; }
    .packing-dashboard-footer button:disabled { opacity: 0.45; cursor: default; }
    .packing-filter-chip:focus-visible, .packing-owner-chip:focus-visible, .packing-dashboard-footer button:focus-visible, .packing-pack-card-btn:focus-visible { outline: 2px solid #002395; outline-offset: 2px; }

    .trip-health-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
    .trip-health-refresh-btn { border: none; border-radius: 10px; min-height: 36px; padding: 8px 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; background: #f4f0ec; color: #524c48; }
    .trip-health-card.collapsed .trip-health-stats,
    .trip-health-card.collapsed .trip-health-results,
    .trip-health-card.collapsed #trip-health-refresh-btn { display: none; }
    .trip-health-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
    .trip-health-stat { border-radius: 12px; padding: 9px 10px; background: #f4f0ec; border: 1px solid #eae5e0; }
    .trip-health-stat span { display: block; font-size: 17px; line-height: 1; font-weight: 800; color: #252120; }
    .trip-health-stat small { display: block; margin-top: 4px; font-size: 10px; font-weight: 700; color: #6b6460; text-transform: uppercase; letter-spacing: 0.04em; }
    .trip-health-stat.warn { background: #fff7ed; border-color: #fed7aa; }
    .trip-health-stat.info { background: #eff6ff; border-color: #bfdbfe; }
    .trip-health-stat.ok { background: #ecfdf5; border-color: #bbf7d0; }
    .trip-health-results { display: grid; gap: 10px; }
    .trip-health-group { border: 1px solid #eae5e0; border-radius: 12px; overflow: hidden; background: #fff; }
    .trip-health-group-title { display: flex; align-items: center; gap: 7px; padding: 9px 11px; background: #faf7f4; color: #252120; font-size: 12px; font-weight: 800; }
    .trip-health-group-title span { flex: 1; }
    .trip-health-group-title em { font-style: normal; min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #eae5e0; color: #524c48; font-size: 11px; }
    .trip-health-issue-row { display: flex; align-items: stretch; border-top: 1px solid #f1ede8; }
    .trip-health-issue { flex: 1; min-width: 0; border: none; background: white; text-align: left; padding: 10px 11px; display: flex; gap: 9px; cursor: pointer; }
    .trip-health-issue:hover { background: #faf7f4; }
    .trip-health-dot { width: 8px; height: 8px; border-radius: 999px; background: #60a5fa; flex-shrink: 0; margin-top: 5px; }
    .trip-health-issue.warn .trip-health-dot { background: #f97316; }
    .trip-health-issue-body { min-width: 0; }
    .trip-health-issue-body strong { display: block; font-size: 12px; color: #252120; line-height: 1.35; overflow-wrap: anywhere; }
    .trip-health-issue-body small { display: block; margin-top: 2px; font-size: 11px; color: #6b6460; line-height: 1.35; overflow-wrap: anywhere; }
    /* Fix buttons (2026-07-10) - rule-based, one-click Trip Health fixes
       (see AGENTS.md's v2.5x entry) - deliberately only shown for the small
       set of issues that have a well-defined, deterministic, reversible
       mutation (add a specific packing item, delete a duplicate CUSTOM
       activity, shift an overlapping activity's start time). No fix button
       at all for issues that would need real user input (e.g. "missing
       address" - there's no one correct address to fill in). */
    .trip-health-fix-btn { flex-shrink: 0; align-self: center; margin-right: 10px; background: #012169; color: white; border: none; border-radius: 8px; padding: 6px 10px; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; }
    .trip-health-fix-btn:hover { opacity: 0.9; }
    .trip-health-more { border-top: 1px solid #f1ede8; padding: 8px 11px; font-size: 11px; font-weight: 700; color: #8a8380; }
    .trip-health-empty { display: flex; align-items: center; gap: 8px; color: #166534; background: #ecfdf5; border: 1px solid #bbf7d0; border-radius: 12px; padding: 10px 12px; font-size: 12px; font-weight: 700; }
    .trip-health-refresh-btn:focus-visible, .trip-health-issue:focus-visible { outline: 2px solid #002395; outline-offset: 2px; }
    @media (max-width: 420px) {
      .trip-health-actions { width: 100%; justify-content: flex-start; }
    }

    @media print {
      @page { margin: 0.45in; }
      body.export-printing { background: white !important; color: #111827 !important; }
      body.export-printing .sticky-header,
      body.export-printing #alerts-banner,
      body.export-printing #today-banner,
      body.export-printing main,
      body.export-printing nav { display: none !important; }
      body.export-printing #trip-print-root { display: block !important; }
      .print-packet { font-family: Inter, Arial, sans-serif; font-size: 10.5pt; line-height: 1.35; color: #111827; }
      .print-cover { border-bottom: 2px solid #111827; padding-bottom: 12px; margin-bottom: 14px; }
      .print-title { font-size: 24pt; font-weight: 800; margin: 0 0 4px; }
      .print-subtitle { margin: 0; color: #4b5563; }
      .print-section { break-inside: avoid; page-break-inside: avoid; margin: 0 0 14px; }
      .print-section h2 { font-size: 15pt; border-bottom: 1px solid #d1d5db; padding-bottom: 4px; margin: 0 0 8px; }
      .print-day { break-inside: avoid; page-break-inside: avoid; margin: 0 0 12px; }
      .print-day h3 { font-size: 12pt; margin: 0 0 3px; }
      .print-day-meta { color: #4b5563; margin: 0 0 6px; }
      .print-items { width: 100%; border-collapse: collapse; }
      .print-items td { border-top: 1px solid #e5e7eb; padding: 5px 4px; vertical-align: top; }
      .print-time { width: 54px; font-weight: 700; color: #374151; white-space: nowrap; }
      .print-address { color: #6b7280; font-size: 9pt; margin-top: 2px; }
      .print-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
      .print-card { border: 1px solid #d1d5db; border-radius: 6px; padding: 7px; break-inside: avoid; page-break-inside: avoid; }
      .print-card-title { font-weight: 800; margin-bottom: 2px; }
      .print-small { color: #4b5563; font-size: 9pt; }
    }
