        /* Self-hosted Caveat (latin subset, woff2) — vendored from Google Fonts
           to remove the third-party @import (supply-chain hardening). */
        @font-face {
            font-family: 'Caveat';
            font-style: normal;
            font-weight: 400;
            font-display: swap;
            src: url('vendor/fonts/caveat-latin-400.woff2') format('woff2');
        }
        @font-face {
            font-family: 'Caveat';
            font-style: normal;
            font-weight: 600;
            font-display: swap;
            src: url('vendor/fonts/caveat-latin-600.woff2') format('woff2');
        }
        @font-face {
            font-family: 'Caveat';
            font-style: normal;
            font-weight: 700;
            font-display: swap;
            src: url('vendor/fonts/caveat-latin-700.woff2') format('woff2');
        }
        /* ── Heartbeat palette (2026-06-04 refresh) ──────────────────────────
           Built from the REV-3 app icon. Terracotta body · cream surfaces ·
           brick (the heart) accents · cocoa text · sage success. The old
           city-photo backgrounds + Background-Photos toggle were retired here. */
        :root {
            --terracotta:#C15B47; --cream:#F4E8D2; --brick:#B84A38;
            --cocoa:#3E2C26; --sage:#5B8A72;
        }
        html { height: 100%; }
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            margin: 0; padding: 20px; min-height: 100%;
            background: var(--terracotta); text-align: center;
        }
        /* Fixed full-viewport terracotta so content scrolls over a solid brand
           background (replaces the old photo layer + dark overlay). */
        body::after {
            content: ''; position: fixed; inset: 0; z-index: -1;
            background: var(--terracotta);
        }
        .container {
            max-width: 400px; margin: 20px auto;
            background: var(--cream);
            padding: 20px; border-radius: 15px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.25);
            position: relative; z-index: 1;
        }
        h2 { color: var(--cocoa); margin-bottom: 5px; font-size: 20px; }
        .subtitle { color: #6b5a50; font-size: 14px; margin-bottom: 20px; }
        input {
            width: 100%; padding: 12px; margin: 8px 0;
            border: 2px solid #e3d6c4; border-radius: 8px; font-size: 16px;
            background: #fffdf8; color: var(--cocoa);
        }
        input:focus { outline: none; border-color: var(--brick); }
        .btn {
            background: var(--brick); color: white; border: none;
            padding: 13px 20px; font-size: 16px; border-radius: 10px;
            cursor: pointer; width: 100%; margin: 5px 0;
        }
        .btn:hover { background: #a23f2f; }
        .btn.secondary { background: rgba(62,44,38,0.10); color: var(--cocoa); }
        .btn.secondary:hover { background: rgba(62,44,38,0.18); }
        .error-msg { color: var(--brick); font-size: 13px; margin: 5px 0; min-height: 18px; }
        /* ── App card shell (replaces fixed footer + appPanels) ── */
        body.app-active { padding-bottom: 20px; }
        #appCard {
            display: none;
            max-width: 440px; margin: 20px auto 0;
            background: var(--cream);
            box-shadow: 0 8px 24px rgba(0,0,0,0.25);
            border-radius: 15px;
            flex-direction: column; overflow: hidden; z-index: 1;
            height: calc(100vh - 40px);
        }
        #appCard.active { display: flex; }
        .card-content {
            flex: 1; overflow-y: auto; overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
        }
        .card-panel { display: none; padding: 16px 20px 8px; }
        .card-panel.active {
            display: block;
            animation: panelIn 0.18s ease;
        }
        @keyframes panelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
        /* Inner containers become transparent inside the card */
        #appCard .container {
            background: none; box-shadow: none;
            backdrop-filter: none; -webkit-backdrop-filter: none;
            border-radius: 0; margin: 0; max-width: none; padding: 0;
        }
        /* ── Grocery / sub-screen panel ── */
        #panelGrocery { padding: 0; flex-direction: column; }
        #panelGrocery.active { display: flex; }

        /* Notebook paper background on the whole panel */
        #panelGrocery {
            background-color: #fef9c3;
            font-family: 'Caveat', cursive;
        }

        /* Header — top of the notepad */
        #panelGrocery .subscreen-header {
            display: flex; align-items: center; gap: 6px;
            padding: 14px 16px 12px; flex-shrink: 0;
            background: #f9e84a;
            border-bottom: 3px solid #e8c800;
            position: sticky; top: 0; z-index: 5;
        }
        .subscreen-back {
            color: #c0392b; background: none; border: none;
            font-size: 24px; font-weight: 700; cursor: pointer;
            padding: 0 6px; line-height: 1; flex-shrink: 0;
            font-family: 'Caveat', cursive;
        }
        .subscreen-title {
            flex: 1; font-size: 22px; font-weight: 700;
            color: #3a3000; text-align: center;
            font-family: 'Caveat', cursive; letter-spacing: 0.5px;
        }
        .subscreen-clear {
            color: #c0392b; background: none; border: none;
            font-size: 15px; font-weight: 700; cursor: pointer;
            flex-shrink: 0; font-family: 'Caveat', cursive;
        }

        /* Ruled paper lines in the list area */
        .grocery-list-wrap {
            padding: 0 20px 8px 56px;
            background-image:
                linear-gradient(90deg, transparent 44px, #f4a0a0 44px, #f4a0a0 46px, transparent 46px),
                repeating-linear-gradient(
                    transparent 0px, transparent 31px,
                    #a8c8e8 31px, #a8c8e8 32px
                );
            background-attachment: local;
            min-height: 160px;
        }

        /* List items sit ON the ruled lines */
        .grocery-item {
            display: flex; align-items: center; gap: 8px;
            height: 32px; padding: 0; border: none;
            cursor: pointer; user-select: none;
            font-family: 'Caveat', cursive;
        }
        .grocery-bullet {
            color: #5b8dd9; font-size: 9px; flex-shrink: 0;
        }
        .grocery-name {
            flex: 1; font-size: 19px; color: #2c2c2c;
            line-height: 32px; white-space: nowrap;
            overflow: hidden; text-overflow: ellipsis;
        }
        .grocery-amt {
            font-size: 16px; color: #888; flex-shrink: 0;
            font-family: 'Caveat', cursive;
        }

        /* Pencil strikethrough — no color change, just the line */
        .grocery-item.done .grocery-name {
            text-decoration: line-through;
            text-decoration-color: #2c2c2c;
            text-decoration-thickness: 2px;
        }
        .grocery-item.done .grocery-amt {
            text-decoration: line-through;
            text-decoration-color: #888;
            text-decoration-thickness: 2px;
        }

        .grocery-empty {
            text-align: center; color: #bbb; font-size: 18px;
            padding: 32px 0; font-family: 'Caveat', cursive;
        }

        /* Add area — bottom of notepad */
        .grocery-add-area {
            padding: 12px 20px 16px; flex-shrink: 0;
            border-top: 2px solid #e8c800;
            background: #f9f0a0;
            position: sticky; bottom: 0;
        }
        .grocery-add-btn {
            width: 44px; height: 44px; border-radius: 50%;
            background: #5b8dd9; color: white; border: none;
            font-size: 30px; line-height: 1; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            margin: 0 auto; box-shadow: 0 2px 8px rgba(91,141,217,0.5);
            transition: transform 0.12s;
        }
        .grocery-add-btn:active { transform: scale(0.91); }
        .grocery-form { display: none; flex-direction: column; gap: 8px; }
        .grocery-form.open { display: flex; }
        .grocery-form-row { display: flex; gap: 12px; align-items: flex-end; }
        .grocery-form input {
            flex: 1; padding: 4px 4px 4px 0;
            border: none; border-bottom: 2px solid #5b8dd9;
            background: transparent; font-size: 18px;
            font-family: 'Caveat', cursive; color: #2c2c2c;
            border-radius: 0;
        }
        .grocery-form input:focus { outline: none; border-bottom-color: #c0392b; }
        .grocery-form input::placeholder { color: #bba020; }
        .grocery-form .amt-input { max-width: 80px; flex: none; }
        .grocery-form-btns { display: flex; gap: 8px; margin-top: 4px; }
        .grocery-form-btns .btn { font-family: 'Caveat', cursive; font-size: 17px; }

        /* Navigation row into grocery list */
        .grocery-nav-row {
            display: flex; align-items: center; justify-content: space-between;
            padding: 11px 0; border-top: 1px solid rgba(0,0,0,0.06);
            cursor: pointer; user-select: none;
        }
        .grocery-nav-row span { font-size: 14px; color: #1a1a1a; font-weight: 600; }
        .grocery-nav-arrow { color: #007aff; font-size: 18px; font-weight: bold; }

        /* ── Generic sub-screen panel (recipes / meal plan) ── */
        .subpanel { padding: 0; flex-direction: column; background: #f7f9fc; }
        .subpanel.active { display: flex; }
        .subpanel-header {
            display: flex; align-items: center; gap: 6px;
            padding: 14px 16px 12px; flex-shrink: 0;
            background: rgba(255,255,255,0.9);
            border-bottom: 1px solid rgba(0,0,0,0.10);
            position: sticky; top: 0; z-index: 5;
        }
        .subpanel-back {
            color: #007aff; background: none; border: none;
            font-size: 22px; font-weight: 700; cursor: pointer;
            padding: 0 6px; line-height: 1; flex-shrink: 0;
        }
        .subpanel-title {
            flex: 1; font-size: 17px; font-weight: 700;
            color: #1a1a1a; text-align: center;
        }
        .subpanel-action {
            color: #007aff; background: none; border: none;
            font-size: 14px; font-weight: 600; cursor: pointer;
            flex-shrink: 0; padding: 0 4px;
        }
        .subpanel-scroll { flex: 1; overflow-y: auto; padding: 12px 16px; }

        /* Recipe list */
        .recipe-card {
            background: white; border-radius: 10px;
            padding: 12px 14px; margin-bottom: 10px;
            box-shadow: 0 1px 4px rgba(0,0,0,0.08);
            cursor: pointer; display: flex;
            align-items: center; justify-content: space-between;
        }
        .recipe-card-name { font-size: 15px; font-weight: 600; color: #1a1a1a; }
        .recipe-card-meta { font-size: 12px; color: #888; margin-top: 2px; }
        .recipe-card-arrow { color: #007aff; font-size: 18px; }
        .recipe-empty { text-align: center; color: #bbb; font-size: 14px; padding: 40px 16px; }

        /* Recipe detail */
        .recipe-field-label {
            font-size: 11px; font-weight: 700; color: #888;
            text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
        }
        .recipe-field-group { margin-bottom: 16px; }
        .recipe-name-input {
            width: 100%; padding: 8px 12px; border-radius: 8px;
            border: 1.5px solid #ddd; font-size: 16px; font-weight: 600;
            background: white; box-sizing: border-box; color: #1a1a1a;
        }
        .recipe-name-input:focus { outline: none; border-color: #007aff; }
        .ingredient-row {
            display: flex; gap: 6px; align-items: center; margin-bottom: 6px;
        }
        .ingredient-row input, .ingredient-row select {
            padding: 6px 10px; border-radius: 7px;
            border: 1.5px solid #ddd; font-size: 14px;
            background: white; color: #1a1a1a;
        }
        .ingredient-row input:focus,
        .ingredient-row select:focus { outline: none; border-color: #007aff; }
        .ingredient-name-input { flex: 1; min-width: 0; }
        .ingredient-qty-input { width: 60px; flex-shrink: 0; }
        .ingredient-unit-select {
            width: 78px; flex-shrink: 0;
            appearance: none; -webkit-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: right 8px center;
            padding-right: 24px; cursor: pointer;
        }
        .ingredient-del-btn {
            background: none; border: none; color: #e74c3c;
            font-size: 20px; cursor: pointer; padding: 0 4px;
            line-height: 1; flex-shrink: 0;
        }
        .add-ingredient-btn {
            background: none; border: 1.5px dashed #007aff;
            color: #007aff; border-radius: 7px; padding: 6px 12px;
            font-size: 13px; font-weight: 600; cursor: pointer; width: 100%;
            margin-top: 2px;
        }
        .recipe-notes-input {
            width: 100%; padding: 8px 12px; border-radius: 8px;
            border: 1.5px solid #ddd; font-size: 14px;
            background: white; box-sizing: border-box; resize: vertical;
            min-height: 72px; color: #1a1a1a;
        }
        .recipe-notes-input:focus { outline: none; border-color: #007aff; }
        .recipe-delete-btn {
            width: 100%; margin-top: 8px; padding: 11px;
            background: none; border: 1.5px solid #e74c3c;
            color: #e74c3c; border-radius: 9px; font-size: 14px;
            font-weight: 600; cursor: pointer;
        }

        /* Meal plan grid */
        .meal-add-grocery-btn {
            display: block; width: calc(100% - 0px);
            margin-bottom: 14px; padding: 11px;
            background: #007aff; color: white; border: none;
            border-radius: 10px; font-size: 14px; font-weight: 600;
            cursor: pointer; text-align: center;
        }
        .meal-day-block { margin-bottom: 14px; }
        .meal-day-label {
            font-size: 13px; font-weight: 700; color: #555;
            text-transform: uppercase; letter-spacing: 0.5px;
            margin-bottom: 6px;
        }
        .meal-slots { display: flex; flex-direction: column; gap: 5px; }
        .meal-slot {
            display: flex; align-items: center;
            background: white; border-radius: 9px;
            padding: 9px 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.07);
            cursor: pointer; gap: 10px;
        }
        .meal-slot-type {
            font-size: 11px; font-weight: 700; color: #aaa;
            text-transform: uppercase; width: 60px; flex-shrink: 0;
        }
        .meal-slot-name {
            flex: 1; font-size: 14px; color: #1a1a1a;
            font-weight: 500;
        }
        .meal-slot-name.empty { color: #bbb; font-style: italic; font-weight: 400; }
        .meal-slot-clear {
            background: none; border: none; color: #ccc;
            font-size: 18px; cursor: pointer; padding: 0;
            line-height: 1; flex-shrink: 0;
        }
        .meal-slot-clear:hover { color: #e74c3c; }

        /* Recipe picker overlay */
        #recipePickerOverlay {
            display: none; position: absolute; inset: 0;
            background: rgba(0,0,0,0.45); z-index: 200;
            align-items: flex-end; border-radius: 15px; overflow: hidden;
        }
        #recipePickerOverlay.open { display: flex; }
        .recipe-picker-sheet {
            background: white; width: 100%; max-height: 65%;
            border-radius: 16px 16px 0 0; display: flex; flex-direction: column;
            overflow: hidden;
        }
        .recipe-picker-header {
            display: flex; align-items: center; justify-content: space-between;
            padding: 14px 16px 10px;
            border-bottom: 1px solid rgba(0,0,0,0.10);
        }
        .recipe-picker-title { font-size: 16px; font-weight: 700; color: #1a1a1a; }
        .recipe-picker-close {
            background: none; border: none; color: #007aff;
            font-size: 15px; font-weight: 600; cursor: pointer;
        }
        .recipe-picker-list { overflow-y: auto; padding: 8px 0; }
        .recipe-picker-item {
            padding: 13px 16px; font-size: 15px; color: #1a1a1a;
            cursor: pointer; border-bottom: 1px solid rgba(0,0,0,0.06);
        }
        .recipe-picker-item:hover { background: #f0f6ff; }
        .recipe-picker-none { padding: 24px 16px; color: #bbb; text-align: center; font-size: 14px; }

        /* ── Card tab bar ── */
        .card-tabs {
            flex-shrink: 0; display: flex;
            border-top: 1px solid rgba(0,0,0,0.10);
            background: rgba(255,255,255,0.88);
        }
        .card-tab-btn {
            flex: 1; display: flex; flex-direction: column;
            align-items: center; justify-content: center;
            gap: 3px; padding: 9px 0 11px;
            font-size: 10px; font-weight: 600; color: #aaa;
            border: none; background: none; cursor: pointer;
            transition: color 0.15s; position: relative;
        }
        .card-tab-btn .icon { font-size: 22px; line-height: 1; }
        .card-tab-btn.active { color: #007aff; }
        .tab-unread {
            position: absolute; top: 6px; right: calc(50% - 18px);
            background: #ff3b30; color: white; border-radius: 50%;
            font-size: 9px; font-weight: 700; min-width: 16px; height: 16px;
            display: flex; align-items: center; justify-content: center; padding: 0 3px;
        }

        /* ── Conversation list ── */
        .msg-panel-header {
            display: flex; align-items: center; justify-content: space-between;
            margin-bottom: 14px;
        }
        .msg-panel-header h2 { margin: 0; }
        .new-msg-btn {
            width: 32px; height: 32px; border-radius: 50%; background: #007aff;
            color: white; border: none; font-size: 20px; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            line-height: 1;
        }
        .conv-list { list-style: none; padding: 0; margin: 0; text-align: left; }
        .conv-item {
            display: flex; align-items: center; gap: 12px;
            padding: 11px 0; border-bottom: 1px solid rgba(0,0,0,0.07);
            cursor: pointer; transition: opacity 0.1s;
        }
        .conv-item:active { opacity: 0.6; }
        .conv-item:last-child { border-bottom: none; }
        .conv-avatar {
            width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
            color: white; display: flex; align-items: center; justify-content: center;
            font-size: 19px; font-weight: 700;
        }
        .conv-info { flex: 1; min-width: 0; }
        .conv-name-row { display: flex; align-items: baseline; justify-content: space-between; }
        .conv-name { font-weight: 700; font-size: 15px; color: #1a1a1a; }
        .conv-time { font-size: 11px; color: #aaa; flex-shrink: 0; margin-left: 6px; }
        .conv-preview-row { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
        .conv-preview { font-size: 13px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
        .conv-unread-badge {
            background: #007aff; color: white; border-radius: 50%;
            font-size: 10px; font-weight: 700; min-width: 18px; height: 18px;
            display: flex; align-items: center; justify-content: center;
            padding: 0 4px; flex-shrink: 0;
        }
        .conv-item.unread .conv-name { color: #000; }
        .conv-item.unread .conv-preview { color: #333; font-weight: 500; }

        /* ── Chat screen ── */
        .chat-header {
            display: flex; align-items: center; gap: 10px;
            padding-bottom: 12px; border-bottom: 1px solid rgba(0,0,0,0.08);
            margin-bottom: 8px;
        }
        .chat-back {
            font-size: 24px; cursor: pointer; color: #007aff;
            background: none; border: none; padding: 0 4px 0 0;
        }
        .chat-avatar {
            width: 34px; height: 34px; border-radius: 50%;
            color: white; display: flex; align-items: center; justify-content: center;
            font-size: 14px; font-weight: 700; flex-shrink: 0;
        }
        .chat-title { font-size: 16px; font-weight: 700; flex: 1; color: #1a1a1a; }
        .chat-messages {
            overflow-y: auto; display: flex; flex-direction: column; gap: 2px;
            padding: 4px 0 8px; margin-bottom: 8px;
            height: calc(100vh - 270px); min-height: 200px;
        }
        .msg-group { display: flex; flex-direction: column; margin-bottom: 6px; }
        .msg-group.mine { align-items: flex-end; }
        .msg-group.theirs { align-items: flex-start; }
        .msg-bubble {
            padding: 8px 12px; border-radius: 18px;
            font-size: 15px; line-height: 1.4; word-break: break-word;
            max-width: 78%;
        }
        .msg-group.mine .msg-bubble {
            background: #007aff; color: white;
            border-bottom-right-radius: 4px;
        }
        .msg-group.theirs .msg-bubble {
            background: rgba(0,0,0,0.08); color: #1a1a1a;
            border-bottom-left-radius: 4px;
        }
        .msg-bubble + .msg-bubble { margin-top: 2px; border-radius: 18px; }
        .msg-group.mine .msg-bubble + .msg-bubble { border-bottom-right-radius: 4px; }
        .msg-group.theirs .msg-bubble + .msg-bubble { border-bottom-left-radius: 4px; }
        .msg-meta {
            display: flex; align-items: center; gap: 6px;
            font-size: 10px; color: #aaa; margin-top: 3px; padding: 0 2px;
        }
        .msg-read { color: #007aff; font-size: 10px; }
        /* Translation meta line (v1.0.9) -- shown below a translated bubble.
           Renders: "translated from Spanish · see original · flag" with the
           tag muted and the two actions in brick (the brand accent). */
        .msg-translation-meta {
            font-size: 11px; line-height: 1.3;
            margin: 2px 6px 4px;
            color: rgba(0,0,0,0.45);
        }
        .msg-translation-toggle, .msg-translation-flag {
            color: var(--brick); text-decoration: none; cursor: pointer;
        }
        .msg-translation-toggle:hover,
        .msg-translation-flag:hover { text-decoration: underline; }
        .msg-translation-flag.done {
            color: var(--sage); cursor: default;
        }
        .msg-translation-flag.done:hover { text-decoration: none; }
        /* Translation glossary (v1.0.9 Option A) -- Settings -> Translation
           section. List of household rules + an inline add form. */
        .glossary-help {
            font-size: 12px; color: rgba(0,0,0,0.55);
            margin: 4px 0 10px; line-height: 1.4;
        }
        .glossary-rules-list { margin-bottom: 10px; }
        .glossary-empty {
            font-size: 13px; color: rgba(0,0,0,0.45);
            font-style: italic; padding: 6px 2px;
        }
        .glossary-rule {
            background: rgba(0,0,0,0.04);
            border-radius: 8px;
            padding: 8px 10px; margin-bottom: 6px;
        }
        .glossary-rule-text {
            font-size: 14px; color: var(--cocoa, #3E2C26); font-weight: 600;
            word-break: break-word;
        }
        .glossary-rule-note {
            font-size: 12px; color: rgba(0,0,0,0.55);
            font-style: italic; margin-top: 2px;
        }
        .glossary-rule-meta {
            font-size: 11px; color: rgba(0,0,0,0.45); margin-top: 4px;
        }
        .glossary-rule-delete {
            color: var(--brick, #B84A38); text-decoration: none; cursor: pointer;
        }
        .glossary-rule-delete:hover { text-decoration: underline; }
        .glossary-add-form {
            display: flex; flex-direction: column; gap: 6px;
            padding: 10px; border: 1px dashed rgba(0,0,0,0.18);
            border-radius: 10px; margin-bottom: 8px;
        }
        .glossary-field {
            display: flex; flex-direction: column; gap: 2px;
            font-size: 12px; color: rgba(0,0,0,0.65);
        }
        .glossary-field input {
            padding: 8px 10px; font-size: 14px;
            border: 1px solid rgba(0,0,0,0.15); border-radius: 8px;
            background: #fff;
        }
        .glossary-add-msg {
            font-size: 12px; color: rgba(0,0,0,0.55); margin-top: 4px;
            min-height: 16px;
        }
        .glossary-add-msg.err { color: var(--brick, #B84A38); }
        .chat-input-row {
            display: flex; gap: 8px; align-items: flex-end;
            padding-top: 8px; border-top: 1px solid rgba(0,0,0,0.08);
        }
        .chat-input {
            flex: 1; padding: 10px 14px; border: 1.5px solid #e0e0e0;
            border-radius: 22px; font-size: 15px; resize: none;
            background: rgba(255,255,255,0.9); max-height: 100px; outline: none;
            font-family: inherit; line-height: 1.4;
        }
        .chat-input:focus { border-color: #007aff; }
        .chat-send-btn {
            width: 38px; height: 38px; border-radius: 50%; background: #007aff;
            color: white; border: none; font-size: 18px; cursor: pointer;
            flex-shrink: 0; display: flex; align-items: center; justify-content: center;
            transition: background 0.15s;
        }
        .chat-send-btn:disabled { background: #ccc; }

        /* ── New conversation picker ── */
        .friend-picker-item {
            display: flex; align-items: center; gap: 12px;
            padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.07);
            cursor: pointer;
        }
        .friend-picker-item:last-child { border-bottom: none; }
        .friend-picker-avatar {
            width: 40px; height: 40px; border-radius: 50%;
            color: white; display: flex; align-items: center; justify-content: center;
            font-size: 16px; font-weight: 700;
        }
        .friend-picker-name { font-size: 15px; font-weight: 600; color: #1a1a1a; }

        /* ── Placeholder panels ── */
        .placeholder-panel {
            text-align: center; padding: 60px 20px; color: #888;
        }
        .placeholder-panel .ph-icon { font-size: 48px; margin-bottom: 12px; }
        .placeholder-panel h3 { color: #555; margin-bottom: 8px; }

        /* ── Header actions: report + settings ── */
        .header-actions {
            display: flex; justify-content: flex-end; align-items: center;
            gap: 10px; margin: 0 0 14px; min-height: 36px;
        }
        .header-btn {
            background: none; border: none; font-size: 22px; color: #666;
            cursor: pointer; padding: 6px 10px; border-radius: 10px; line-height: 1;
            transition: transform 0.35s, color 0.15s, background 0.15s;
        }
        .gear-btn:hover { color: #007aff; transform: rotate(60deg); }
        .report-btn { color: #ff3b30; font-size: 20px; }
        .report-btn:hover { background: rgba(255,59,48,0.10); transform: scale(1.10); }
        /* Info button -- standard "circled lowercase i" privacy/info symbol.
           Opens a 2-step disclosure flow: what-we-collect -> permission-toggles.
           NOT extending .header-btn because we want a hard pill shape, not the
           subtle text-button look the others have. Sized to match their vertical
           footprint so the header row stays balanced. */
        .info-btn {
            background: #007aff; color: #fff; border: none; cursor: pointer;
            width: 28px; height: 28px; padding: 0;
            border-radius: 50%; line-height: 1;
            font-size: 16px; font-weight: 700; font-style: italic;
            font-family: Georgia, "Times New Roman", serif;
            display: inline-flex; align-items: center; justify-content: center;
            box-shadow: 0 1px 3px rgba(0,0,0,0.15);
            transition: background 0.15s, transform 0.15s;
        }
        .info-btn:hover { background: #0062cc; transform: scale(1.10); }

        /* ── Recipe Book ───────────────────────────────────────────────────
           Grid of recipe tiles (replaces the old flat list in panelRecipes).
           Each tile is a "thumbnail + title" mini-card -- the thumbnail is
           a placeholder gradient today, reserved for an attached photo of
           the dish in a future iteration. Tiles open the read-only view
           overlay below; the "+ New" header button opens the edit overlay. */
        .recipe-book-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
            gap: 12px;
            padding: 14px;
            overflow-y: auto;
            align-content: start;
        }
        .recipe-tile {
            background: white;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 1px 4px rgba(0,0,0,0.10);
            cursor: pointer;
            display: flex;
            flex-direction: column;
            transition: transform 0.15s, box-shadow 0.15s;
        }
        .recipe-tile:hover {
            transform: scale(1.03);
            box-shadow: 0 3px 10px rgba(0,0,0,0.18);
        }
        .recipe-tile-photo {
            aspect-ratio: 4 / 3;
            background: linear-gradient(135deg, #ffe9c2 0%, #ffcf80 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 42px;
            color: rgba(255,255,255,0.85);
            text-shadow: 0 1px 3px rgba(0,0,0,0.20);
        }
        .recipe-tile-title {
            padding: 8px 10px 10px;
            font-size: 13px;
            font-weight: 700;
            color: #1a1a1a;
            text-align: center;
            line-height: 1.3;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .recipe-empty {
            grid-column: 1 / -1;
            text-align: center;
            padding: 40px 20px;
            color: #888;
            font-size: 13px;
            line-height: 1.5;
        }

        /* Recipe view + edit overlays: floating-modal style like memories.
           Distinct from .overlay/.panel so the recipe modal sizing/
           internal layout can grow without disturbing other modals. */
        .recipe-overlay {
            position: fixed; inset: 0;
            background: rgba(0,0,0,0.55);
            z-index: 30;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 16px;
        }
        .recipe-overlay.open { display: flex; }
        .recipe-view-panel, .recipe-edit-panel {
            background: white;
            border-radius: 14px;
            width: 100%;
            max-width: 460px;
            max-height: 92vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 8px 32px rgba(0,0,0,0.30);
        }
        .recipe-view-header {
            display: flex;
            align-items: center;
            padding: 12px 14px;
            border-bottom: 1px solid #ececec;
            gap: 10px;
            flex-shrink: 0;
        }
        .recipe-view-title {
            flex: 1;
            font-size: 16px;
            font-weight: 700;
            color: #1a1a1a;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .recipe-view-close {
            background: none; border: none;
            font-size: 24px; color: #888; cursor: pointer;
            padding: 0 4px; line-height: 1;
        }
        .recipe-view-close:hover { color: #1a1a1a; }
        .recipe-view-edit {
            background: #007aff; color: white; border: none;
            padding: 6px 14px; border-radius: 7px;
            font-size: 13px; font-weight: 600; cursor: pointer;
            transition: background 0.15s;
        }
        .recipe-view-edit:hover { background: #0062cc; }
        .recipe-view-body {
            flex: 1;
            overflow-y: auto;
            padding: 14px 16px 18px;
        }
        .recipe-view-photo {
            aspect-ratio: 16 / 9;
            background: linear-gradient(135deg, #ffe9c2 0%, #ffcf80 100%);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: rgba(255,255,255,0.85);
            font-size: 50px;
            margin-bottom: 14px;
            text-shadow: 0 1px 3px rgba(0,0,0,0.20);
        }
        .recipe-view-section-label {
            font-size: 11px;
            font-weight: 700;
            color: #aaa;
            text-transform: uppercase;
            letter-spacing: 0.7px;
            margin: 12px 0 5px;
        }
        .recipe-view-text {
            font-size: 14px;
            line-height: 1.55;
            color: #2a2a2a;
            white-space: pre-wrap;
            word-wrap: break-word;
            background: #fafafa;
            border-radius: 8px;
            padding: 10px 12px;
        }
        .recipe-view-text:empty::before {
            content: "(none)";
            color: #b0b0b0;
            font-style: italic;
        }
        .recipe-view-add-grocery {
            margin-top: 22px;
            width: 100%;
            padding: 11px;
            background: #34c759;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            transition: background 0.15s;
        }
        .recipe-view-add-grocery:hover { background: #2aa84a; }
        .recipe-view-delete {
            margin-top: 10px;
            width: 100%;
            padding: 10px;
            background: #ff3b30;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            transition: background 0.15s;
        }
        .recipe-view-delete:hover { background: #cc2e26; }

        /* Edit-modal-specific bits (shares most of view's CSS) */
        .recipe-edit-label {
            display: block;
            font-size: 11px;
            font-weight: 700;
            color: #aaa;
            text-transform: uppercase;
            letter-spacing: 0.7px;
            margin: 14px 0 5px;
        }
        .recipe-edit-label:first-child { margin-top: 0; }
        /* Ingredient-name correction review (GEMMA_RECIPE_ENABLED go-live gate).
           One row per corrected name: the fixed name + the typed original + an
           Undo toggle. Warm, plain, low-drama -- this is a gentle "we changed a
           word, is that ok?" not an error. */
        .recipe-correction-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 0;
            border-bottom: 1px solid #f0f0f0;
        }
        .recipe-correction-row:last-child { border-bottom: none; }
        .recipe-correction-text {
            flex: 1;
            min-width: 0;
            font-size: 14px;
            line-height: 1.35;
        }
        .recipe-correction-name {
            font-weight: 700;
            color: #1a1a1a;
            word-break: break-word;
        }
        .recipe-correction-name.reverted { color: #6a6a6a; font-weight: 600; }
        .recipe-correction-was {
            color: #999;
            font-size: 12px;
            word-break: break-word;
        }
        .recipe-correction-undo {
            flex-shrink: 0;
            background: #f2f2f4;
            color: #444;
            border: 1px solid #e0e0e2;
            padding: 6px 12px;
            border-radius: 7px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.15s;
        }
        .recipe-correction-undo:hover { background: #e7e7ea; }
        .recipe-correction-undo.reverted {
            background: #eaf4ff;
            color: #0062cc;
            border-color: #cbe3ff;
        }
        .recipe-edit-field {
            width: 100%;
            padding: 10px 12px;
            border-radius: 8px;
            border: 1.5px solid #e0e0e0;
            font-size: 14px;
            font-family: inherit;
            line-height: 1.4;
            box-sizing: border-box;
            background: white;
        }
        textarea.recipe-edit-field {
            resize: vertical;
            min-height: 80px;
        }

        /* Info disclosure panel -- one box per feature, scannable summary of
           what data each feature uses. Sits inside .panel like report/settings. */
        .info-feature {
            border: 1px solid #ececec; border-radius: 10px;
            padding: 9px 11px; margin: 8px 0;
            background: #fafafa;
        }
        .info-feature-head {
            font-size: 13px; font-weight: 700; color: #1a1a1a; margin-bottom: 3px;
        }
        .info-feature-body {
            font-size: 12px; color: #555; line-height: 1.45;
        }
        .info-feature.info-feature-good {
            background: #f0fbf2; border-color: #cfe9d4;
        }
        .info-feature.info-feature-good .info-feature-head { color: #1b6b2f; }
        .info-feature.info-feature-warn {
            background: #fff8e6; border-color: #f0d68a;
        }
        .info-feature.info-feature-warn .info-feature-head { color: #8a5800; }

        /* ── Report panel ── */
        .report-kind-row { display: flex; gap: 8px; margin: 4px 0 2px; }
        .report-kind-btn {
            flex: 1; padding: 10px 8px; border-radius: 10px; cursor: pointer;
            border: 1.5px solid #e0e0e0; background: #fafafa; font-size: 13px;
            font-weight: 600; color: #555; transition: border-color 0.15s, background 0.15s, color 0.15s;
        }
        .report-kind-btn.selected { border-color: #ff3b30; background: #fff0ef; color: #c0392b; }
        .report-select {
            width: 100%; padding: 10px; border-radius: 10px; border: 1.5px solid #e0e0e0;
            font-size: 14px; margin: 2px 0; background: white;
        }
        .report-textarea {
            width: 100%; min-height: 88px; padding: 10px; border-radius: 10px;
            border: 1.5px solid #e0e0e0; font-size: 14px; font-family: inherit;
            resize: vertical; margin: 2px 0;
        }

        /* ── iOS-style toggle ── */
        .toggle-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
        .toggle-switch input { opacity: 0; width: 0; height: 0; }
        .toggle-track {
            position: absolute; cursor: pointer; inset: 0;
            background: #ccc; border-radius: 26px; transition: 0.22s;
        }
        .toggle-track:before {
            position: absolute; content: ""; height: 20px; width: 20px;
            left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.22s;
        }
        input:checked + .toggle-track { background: #34c759; }
        input:checked + .toggle-track:before { transform: translateX(20px); }

        /* ── Settings panel ── */
        .settings-section-title {
            font-size: 11px; font-weight: 700; color: #aaa;
            text-transform: uppercase; letter-spacing: 0.8px; margin: 14px 0 4px;
        }
        .settings-row {
            display: flex; align-items: center; justify-content: space-between;
            padding: 11px 0; border-bottom: 1px solid #f0f0f0; font-size: 15px; color: #1a1a1a;
        }
        .settings-row:last-of-type { border-bottom: none; }

        /* ── Color swatches ── */
        .color-swatches { display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 0 4px; }
        .color-swatch {
            width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
            border: 3px solid transparent; transition: transform 0.15s, border-color 0.15s;
            box-shadow: 0 1px 4px rgba(0,0,0,0.3);
        }
        .color-swatch:hover { transform: scale(1.18); }
        .color-swatch.sel  { border-color: #007aff; transform: scale(1.12); }

        /* ── Paired Phones (mobile-app pairing UI) ── */
        /* ── Profile status (geofence-derived "— (at Work)") ── */
        .profile-status {
            font-size: 13px; font-weight: 600;
            color: #34c759;
            margin-left: 4px;
        }

        /* ── Saved Places panel (geofence configuration UI) ── */
        .places-title {
            margin: 8px 0 4px; font-size: 18px; font-weight: 600;
            color: #1a1a1a;
        }
        .places-help {
            font-size: 12px; color: #666; line-height: 1.45;
            margin: 0 0 14px;
        }
        .places-list { margin: 8px 0 4px; }
        .places-empty {
            font-size: 13px; color: #888; padding: 16px 8px;
            text-align: center; font-style: italic;
            background: #f7f7f9; border-radius: 8px;
        }
        .place-row {
            display: flex; align-items: center; gap: 8px;
            padding: 10px 12px; margin-bottom: 6px;
            background: #fff;
            border: 1px solid #e3e3e6; border-radius: 8px;
        }
        .place-info { flex: 1; min-width: 0; }
        .place-name {
            font-size: 14px; font-weight: 600; color: #1a1a1a;
        }
        .place-here {
            display: inline-block;
            margin-left: 6px;
            padding: 1px 6px;
            background: #34c759; color: #fff;
            font-size: 10px; font-weight: 700; border-radius: 4px;
            letter-spacing: 0.4px;
            vertical-align: 1px;
        }
        .place-meta {
            font-size: 11px; color: #888; margin-top: 2px;
        }
        /* notify_scope chooser inside the place meta line (2026-06-16) */
        .place-notify {
            font-size: 11px; color: #ccc; background: #2a2a2a;
            border: 1px solid #444; border-radius: 4px;
            padding: 0 2px; margin-left: 1px; vertical-align: baseline;
        }
        .place-actions {
            display: flex; align-items: center; gap: 10px;
            flex-shrink: 0;
        }
        .place-delete {
            background: transparent; color: #ff3b30;
            border: 1px solid #ff3b30; border-radius: 6px;
            width: 28px; height: 28px;
            font-size: 18px; line-height: 1; cursor: pointer;
            padding: 0;
        }
        .place-delete:hover { background: #ff3b30; color: #fff; }
        /* Add-place inline form */
        .add-place-form {
            margin-top: 12px;
            padding: 14px;
            background: #f5f5f7; border-radius: 10px;
        }
        .add-place-row { margin-bottom: 12px; }
        .add-place-label {
            display: block;
            font-size: 12px; font-weight: 600;
            color: #555; margin-bottom: 4px;
            text-transform: uppercase; letter-spacing: 0.5px;
        }
        .add-place-form input[type=text] {
            width: 100%;
            padding: 9px 12px;
            font-size: 14px;
            border: 1px solid #d0d0d3; border-radius: 6px;
            background: #fff; color: #1a1a1a;
            box-sizing: border-box;
        }
        .add-place-form input[type=range] {
            width: 100%; margin: 6px 0;
        }
        .add-place-action-row {
            display: flex; gap: 8px; margin-top: 8px;
        }
        .add-place-action-row .btn-secondary {
            flex: 1; padding: 9px 12px;
            background: #e3e3e6; color: #444;
            border: none; border-radius: 6px;
            font-size: 13px; font-weight: 600; cursor: pointer;
        }
        .add-place-action-row .btn-secondary:hover { background: #cfcfd3; }
        .place-picker-map {
            height: 280px;
            margin: 10px 0 14px;
            border-radius: 8px;
            border: 1px solid #d0d0d3;
            overflow: hidden;
            cursor: crosshair;
        }
        .add-place-radius-help {
            font-size: 11px; color: #888; line-height: 1.4;
        }
        .geocode-result { margin: 6px 0 14px; min-height: 18px; }
        .geocode-pending {
            font-size: 12px; color: #888; font-style: italic;
        }
        .geocode-error {
            font-size: 12px; color: #c0392b;
            padding: 8px 10px; background: #fff5f5;
            border: 1px solid #ffcfcb; border-radius: 6px;
        }
        .geocode-ok {
            padding: 10px 12px; background: #effce8;
            border: 1px solid #b8e9a8; border-radius: 6px;
        }
        .geocode-ok-mark { font-size: 12px; font-weight: 700; color: #2d8538; }
        .geocode-ok-name { font-size: 13px; color: #1a1a1a; margin-top: 2px; }
        .geocode-ok-coords {
            font-size: 11px; color: #888; margin-top: 2px;
            font-family: "Consolas", monospace;
        }
        .geocode-ok-redo {
            margin-top: 8px; padding: 5px 12px;
            background: transparent; color: #1a7e2a;
            border: 1px solid #1a7e2a; border-radius: 4px;
            font-size: 11px; font-weight: 600; cursor: pointer;
        }
        .geocode-ok-redo:hover { background: #1a7e2a; color: #fff; }
        /* Multi-candidate picker (when Nominatim returns >1 match) */
        .geocode-multi {
            background: #fff;
            border: 1px solid #d6e4f0; border-radius: 8px;
            overflow: hidden;
        }
        .geocode-multi-header {
            padding: 9px 12px;
            background: #eef5fb;
            font-size: 12px; color: #1a4060; line-height: 1.4;
            border-bottom: 1px solid #d6e4f0;
        }
        .geocode-multi-footer {
            padding: 9px 12px;
            font-size: 11px; color: #888; font-style: italic;
            border-top: 1px solid #f0f0f0;
            background: #fafbfd;
        }
        .geocode-candidate {
            padding: 9px 12px; cursor: pointer;
            border-bottom: 1px solid #f0f0f0;
            transition: background 0.1s;
        }
        .geocode-candidate:last-of-type { border-bottom: none; }
        .geocode-candidate:hover { background: #f3f9ff; }
        .geocode-candidate:active { background: #e3f0fc; }
        .geocode-candidate-name {
            font-size: 13px; color: #1a1a1a; line-height: 1.35;
        }
        .geocode-candidate-coords {
            font-size: 10px; color: #999; margin-top: 2px;
            font-family: "Consolas", monospace;
        }
        .add-place-buttons {
            display: flex; gap: 10px; margin-top: 8px;
        }
        .add-place-buttons .btn {
            flex: 1; padding: 11px;
        }
        .add-place-buttons .btn-secondary {
            flex: 1; padding: 11px;
            background: #e3e3e6; color: #444;
            border: none; border-radius: 6px;
            font-size: 14px; font-weight: 600; cursor: pointer;
        }
        .add-place-buttons .btn-secondary:hover { background: #cfcfd3; }
        .add-place-form .btn-secondary {
            background: #e3e3e6; color: #444;
            border: none; border-radius: 6px;
            padding: 8px 14px;
            font-size: 13px; font-weight: 600; cursor: pointer;
        }
        .add-place-form .btn-secondary:hover { background: #cfcfd3; }

        .paired-devices-help {
            font-size: 12px; color: #777; line-height: 1.45; margin: 4px 0 8px;
        }
        .paired-devices-list { margin: 8px 0 4px; }
        .paired-devices-empty {
            font-size: 13px; color: #888; padding: 12px 0; text-align: center;
            font-style: italic;
        }
        .paired-device-row {
            display: flex; align-items: center; justify-content: space-between;
            padding: 10px 0; border-bottom: 1px solid #f0f0f0;
        }
        .paired-device-row:last-child { border-bottom: none; }
        .paired-device-info { flex: 1; min-width: 0; }
        .paired-device-label {
            font-size: 14px; font-weight: 600; color: #1a1a1a;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .paired-device-meta {
            font-size: 11px; color: #888; margin-top: 2px;
        }
        .paired-device-revoke {
            background: transparent; color: #ff3b30;
            border: 1px solid #ff3b30; border-radius: 6px;
            padding: 5px 12px; font-size: 12px; font-weight: 600;
            cursor: pointer; transition: background 0.15s, color 0.15s;
            flex-shrink: 0;
        }
        .paired-device-revoke:hover { background: #ff3b30; color: #fff; }

        /* ── Pair-code modal ── */
        .pair-code-help {
            font-size: 13px; color: #555; line-height: 1.5; margin: 8px 0 14px;
        }
        .pair-code-box {
            font-family: "Consolas", "Menlo", monospace;
            font-size: 36px; font-weight: 700; letter-spacing: 6px;
            text-align: center; color: #1a1a1a; background: #f5f5f7;
            border: 2px dashed #ccc; border-radius: 10px;
            padding: 18px 12px; margin: 4px 0 10px;
            user-select: all;   /* easy to copy by triple-click */
        }
        .pair-code-box.expired { color: #999; background: #f9f9f9; }
        .pair-code-status {
            font-size: 13px; color: #555; text-align: center; min-height: 18px;
            margin-bottom: 8px;
        }
        .pair-code-buttons {
            display: flex; gap: 10px; justify-content: space-between;
            margin-top: 16px;
        }
        .pair-code-buttons .btn-secondary {
            flex: 1;
            background: #f0f0f0; color: #333;
            border: none; border-radius: 6px;
            padding: 11px 14px; font-size: 14px; font-weight: 600;
            cursor: pointer; transition: background 0.15s;
        }
        .pair-code-buttons .btn-secondary:hover { background: #e3e3e3; }

        /* ── Live tracking control (mobile-app-only, in Your Journey) ── */
        .live-tracking-control {
            margin: 4px 0 14px;
            padding: 12px;
            background: #f5f5f7;
            border: 1px solid #e0e0e3;
            border-radius: 10px;
        }
        .live-tracking-btn {
            display: flex; align-items: center; gap: 10px;
            width: 100%;
            padding: 12px 16px;
            background: #ffffff;
            border: 2px solid #34c759;
            border-radius: 10px;
            color: #1a1a1a;
            font-size: 15px; font-weight: 700;
            cursor: pointer;
            transition: background 0.15s, border-color 0.15s, color 0.15s;
        }
        .live-tracking-btn:hover { background: #f0fff4; }
        .live-tracking-btn:active { transform: scale(0.98); }
        .live-tracking-btn.live-on {
            background: #ff3b30; color: #fff; border-color: #ff3b30;
            animation: pulse-live 1.4s ease-in-out infinite;
        }
        .live-tracking-btn.live-on:hover { background: #ff4f44; }
        @keyframes pulse-live {
            0%, 100% { box-shadow: 0 0 0 0 rgba(255,59,48,0.55); }
            50%      { box-shadow: 0 0 0 6px rgba(255,59,48,0); }
        }
        .live-tracking-icon {
            font-size: 14px; line-height: 1;
            display: inline-flex; align-items: center; justify-content: center;
            width: 20px; height: 20px;
        }
        .live-tracking-label { flex: 1; text-align: left; }
        .live-tracking-help {
            margin-top: 8px;
            font-size: 11px; color: #777; line-height: 1.4;
        }

        /* ── Friends inline section ── */
        .friends-add-row { display: flex; gap: 8px; margin: 8px 0 4px; }
        .friends-add-row input { margin: 0; flex: 1; font-size: 14px; padding: 10px; }

        /* ── Heartbeat button ── */
        .heartbeat-wrapper { display: flex; justify-content: center; margin: 20px 0 6px; }
        .heartbeat-btn {
            width: 80px; height: 80px; border-radius: 50%;
            border: 3px solid rgba(255,59,48,0.25);
            background: rgba(255,59,48,0.07);
            font-size: 34px; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
        }
        .heartbeat-btn:hover  { background: rgba(255,59,48,0.14); }
        .heartbeat-btn:active { transform: scale(0.92); }
        .heartbeat-btn.beating {
            animation: heartpulse 0.55s ease;
            box-shadow: 0 0 22px rgba(255,59,48,0.45);
        }
        @keyframes heartpulse {
            0%   { transform: scale(1); }
            30%  { transform: scale(1.28); }
            65%  { transform: scale(0.94); }
            100% { transform: scale(1); }
        }
        .heartbeat-label { font-size: 11px; color: #888; margin-bottom: 4px; text-align: center; }

        /* ── Check-in form extras ── */
        .checkin-row {
            display: flex; align-items: center; justify-content: space-between;
            padding: 7px 0; font-size: 13px; color: #444;
            border-top: 1px solid rgba(0,0,0,0.06);
        }
        .checkin-row-label { font-size: 13px; color: #555; }
        .toggle-switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
        .toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
        .toggle-slider {
            position: absolute; inset: 0; border-radius: 11px;
            background: #ccc; cursor: pointer; transition: background 0.2s;
        }
        .toggle-slider::before {
            content: ""; position: absolute; width: 18px; height: 18px;
            left: 2px; top: 2px; border-radius: 50%; background: white;
            transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.25);
        }
        .toggle-switch input:checked + .toggle-slider { background: #34c759; }
        .toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
        .checkin-tag-arrow { color: #007aff; font-size: 18px; font-weight: bold; }
        .friend-chip {
            padding: 4px 10px; border-radius: 14px; font-size: 12px; font-weight: 500;
            border: 1.5px solid #ddd; cursor: pointer; user-select: none;
            background: white; color: #444; transition: background 0.12s, color 0.12s, border-color 0.12s;
        }
        .friend-chip.selected { background: #007aff; border-color: #007aff; color: white; }

        /* ── Journey tag display ── */
        .journey-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
        .journey-tag {
            font-size: 11px; color: #007aff; background: rgba(0,122,255,0.08);
            border-radius: 8px; padding: 1px 7px; font-weight: 600;
        }

        /* ── Collapsible section rows (all levels share this) ── */
        .journey-header {
            display: flex; align-items: center; justify-content: space-between;
            padding: 14px 0; cursor: pointer;
            font-weight: 700; font-size: 14px; color: #1a1a1a;
            user-select: none; border-top: 1px solid rgba(0,0,0,0.09);
            margin: 0 -20px; padding-left: 20px; padding-right: 20px;
        }
        .journey-header:hover { background: rgba(0,0,0,0.03); }
        .journey-header.sub {
            font-weight: 600; font-size: 13px; color: #555;
            margin: 0; padding-left: 0; padding-right: 0;
            border-top: 1px solid rgba(0,0,0,0.06);
        }
        .journey-chevron { font-size: 12px; color: #888; transition: transform 0.22s; }
        .journey-chevron.open { transform: rotate(180deg); }
        .journey-body { padding: 0 0 8px; }
        .journey-map  { height: 220px; border-radius: 10px; margin-bottom: 12px;
                        border: 1px solid rgba(0,0,0,0.09); }
        .journey-empty { text-align: center; padding: 20px 0; color: #aaa; font-size: 13px; }
        .journey-entry {
            display: flex; align-items: flex-start; gap: 10px;
            padding: 9px 0; border-bottom: 1px solid rgba(0,0,0,0.06); font-size: 13px;
            position: relative;
        }
        .journey-entry:last-child { border-bottom: none; }
        .journey-dot { width: 10px; height: 10px; border-radius: 50%;
                       background: #ff3b30; flex-shrink: 0; margin-top: 3px; }
        .journey-info { flex: 1; min-width: 0; }
        .journey-comment { color: #1a1a1a; font-weight: 500; line-height: 1.4; }
        .journey-meta    { color: #888; font-size: 11px; margin-top: 2px; }
        .journey-menu-btn {
            flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
            background: none; border: none; cursor: pointer; color: #bbb;
            font-size: 16px; line-height: 28px; text-align: center;
            display: flex; align-items: center; justify-content: center;
            transition: background 0.15s;
        }
        .journey-menu-btn:hover { background: rgba(0,0,0,0.08); color: #555; }
        .journey-dropdown {
            position: absolute; right: 0; top: 32px; z-index: 99;
            background: #fff; border: 1px solid #ddd; border-radius: 8px;
            box-shadow: 0 4px 16px rgba(0,0,0,0.13); min-width: 130px; overflow: hidden;
        }
        .journey-dropdown button {
            display: block; width: 100%; padding: 10px 14px;
            background: none; border: none; text-align: left;
            font-size: 13px; cursor: pointer; color: #333;
        }
        .journey-dropdown button:hover { background: #f5f5f5; }
        .journey-dropdown button.del { color: #ff3b30; }
        .journey-edit-row {
            display: flex; gap: 6px; align-items: center; margin-top: 6px;
        }
        .journey-edit-row input {
            flex: 1; padding: 5px 8px; border: 1px solid #ccc; border-radius: 6px;
            font-size: 13px; outline: none;
        }
        .journey-edit-row input:focus { border-color: #ff3b30; }
        .journey-edit-row button {
            padding: 5px 10px; border: none; border-radius: 6px; cursor: pointer;
            font-size: 12px; font-weight: 600;
        }
        .journey-save-btn  { background: #ff3b30; color: #fff; }
        .journey-cancel-btn { background: #eee; color: #555; }

        /* -- Toast notifications (2026-05-27 audit) --------------------------
           Soft paper-feel notifications, bottom-right corner. Auto-dismiss
           or click-to-dismiss. Palette pulled from existing accent colors:
           #34c759 (success), #ff3b30 (error), #007aff (info), #f0c000 (warning).
           Backdrop matches the warm aesthetic: soft white + subtle blur. */
        .toast-container {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 9999;
            display: flex;
            flex-direction: column;
            gap: 8px;
            max-width: 320px;
            pointer-events: none;
        }
        .toast {
            background: rgba(255, 255, 255, 0.94);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border-radius: 10px;
            padding: 12px 14px;
            font-size: 14px;
            line-height: 1.4;
            color: #333;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
            border-left: 4px solid #007aff;
            cursor: pointer;
            pointer-events: auto;
            animation: toastSlideIn 0.25s cubic-bezier(0.2, 0.7, 0.3, 1);
            transform-origin: right center;
        }
        .toast-info    { border-left-color: #007aff; }
        .toast-success { border-left-color: #34c759; color: #1b6e2f; }
        .toast-error   { border-left-color: #ff3b30; color: #a32319; }
        .toast-warning { border-left-color: #f0c000; color: #6b5400; }
        .toast-leaving { animation: toastSlideOut 0.25s cubic-bezier(0.4, 0, 0.8, 0.6) forwards; }
        @keyframes toastSlideIn {
            from { opacity: 0; transform: translateX(380px); }
            to   { opacity: 1; transform: none; }
        }
        @keyframes toastSlideOut {
            from { opacity: 1; transform: none; }
            to   { opacity: 0; transform: translateX(380px); }
        }
        @media (max-width: 480px) {
            .toast-container { left: 12px; right: 12px; max-width: none; bottom: 12px; }
        }

        /* -- Push notifications (SSE phone-mode slice, 2026-06-02) ------------
           On-screen notification card reuses the warm toast aesthetic but is
           tappable (navigates to the conversation) and dedup-tagged so a
           read-state dismiss can pull it. Tester/superadmin debug overlay is a
           small always-visible fixed banner. Settings Notifications section
           styling (category group + quiet-hour pickers) lives here too. */
        .notif-card {
            background: rgba(255, 255, 255, 0.96);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border-radius: 10px;
            padding: 12px 14px;
            font-size: 14px;
            line-height: 1.4;
            color: #333;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14), 0 1px 3px rgba(0, 0, 0, 0.06);
            border-left: 4px solid #ff2d55;
            cursor: pointer;
            pointer-events: auto;
            display: flex;
            align-items: center;
            gap: 8px;
            animation: toastSlideIn 0.25s cubic-bezier(0.2, 0.7, 0.3, 1);
            transform-origin: right center;
        }
        .notif-card .notif-card-icon { font-size: 18px; }
        .notif-card-leaving { animation: toastSlideOut 0.25s cubic-bezier(0.4, 0, 0.8, 0.6) forwards; }

        .push-debug-overlay {
            position: fixed;
            left: 12px;
            bottom: 12px;
            z-index: 10000;
            background: rgba(20, 20, 24, 0.88);
            color: #f5f5f7;
            font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
            font-size: 11px;
            line-height: 1.35;
            padding: 6px 9px;
            border-radius: 8px;
            border: 1px solid rgba(255, 45, 85, 0.6);
            max-width: 260px;
            pointer-events: none;
            white-space: pre-wrap;
        }
        .push-debug-overlay b { color: #ff8fa8; }

        .notif-categories {
            margin: 2px 0 4px;
            transition: opacity 0.15s;
        }
        .notif-categories.notif-disabled {
            opacity: 0.45;
            pointer-events: none;
        }
        .notif-quiet { margin-top: 8px; }
        .notif-quiet-label {
            font-size: 12px;
            color: #777;
            margin-bottom: 4px;
        }
        .notif-quiet-row {
            display: flex;
            gap: 14px;
            align-items: center;
        }
        .notif-quiet-row label {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            color: #555;
        }
        .notif-quiet-row input[type="time"] {
            font-size: 13px;
            padding: 3px 6px;
            border: 1px solid #d0d0d5;
            border-radius: 6px;
        }
        .chat-mute-btn {
            margin-left: auto;
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
            padding: 4px 6px;
            line-height: 1;
            opacity: 0.85;
        }
        .chat-mute-btn:hover { opacity: 1; }

        /* -- Modal dialogs (2026-05-27 audit) --------------------------------
           Soft paper-feel centered dialog with backdrop blur. Distinct
           hb-modal-* namespace so it doesn't collide with users.html's
           bespoke .modal-bg / .modal (admin suspend modal). */
        .hb-modal-backdrop {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(20, 20, 28, 0.42);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.18s ease-out;
        }
        .hb-modal-backdrop.hb-modal-open { opacity: 1; }
        .hb-modal-dialog {
            background: rgba(255, 255, 255, 0.97);
            border-radius: 12px;
            padding: 20px 22px 16px;
            min-width: 280px;
            max-width: 360px;
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.08);
            transform: scale(0.92);
            transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.3, 1.1);
        }
        .hb-modal-backdrop.hb-modal-open .hb-modal-dialog { transform: scale(1); }
        .hb-modal-title {
            font-family: 'Caveat', cursive;
            font-size: 22px;
            font-weight: 700;
            color: #ff3b30;
            margin: 0 0 8px;
            line-height: 1.1;
        }
        .hb-modal-message {
            font-size: 15px;
            line-height: 1.5;
            color: #2a2a32;
            margin: 0 0 16px;
            white-space: pre-wrap;
            word-wrap: break-word;
        }
        .hb-modal-message a {
            color: #007aff;
            text-decoration: none;
            word-break: break-all;
        }
        .hb-modal-message a:hover { text-decoration: underline; }
        .hb-modal-buttons {
            display: flex;
            justify-content: flex-end;
            gap: 8px;
        }
        .hb-modal-btn-primary,
        .hb-modal-btn-secondary,
        .hb-modal-btn-danger {
            padding: 8px 18px;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.15s;
            font-family: inherit;
        }
        .hb-modal-btn-primary   { background: #007aff; color: #fff; }
        .hb-modal-btn-primary:hover   { background: #0066d6; }
        .hb-modal-btn-secondary { background: #eef0f3; color: #444; }
        .hb-modal-btn-secondary:hover { background: #dee0e3; }
        .hb-modal-btn-danger    { background: #ff3b30; color: #fff; }
        .hb-modal-btn-danger:hover    { background: #d72d24; }
        .hb-modal-btn-primary:focus-visible,
        .hb-modal-btn-secondary:focus-visible,
        .hb-modal-btn-danger:focus-visible {
            outline: 2px solid #007aff;
            outline-offset: 2px;
        }
        @media (max-width: 480px) {
            .hb-modal-dialog { min-width: 0; max-width: none; margin: 0 16px; width: 100%; }
        }

        /* ── Household management UI (2026-05-28) ────────────────────── */
        .hh-panel {
            padding: 12px 4px 16px;
            color: #888;             /* sets currentColor for the SVG house */
            text-align: center;
        }
        .hh-house-svg {
            width: 120px; height: auto; opacity: 0.85;
            display: block; margin: 0 auto 4px;
        }
        .hh-name {
            font-family: 'Caveat', cursive;
            font-size: 22px; color: #1a1a1a; margin: 0 0 10px;
        }
        .hh-grid {
            display: flex; flex-wrap: wrap; gap: 14px;
            justify-content: center; padding: 4px 4px 0;
        }
        .hh-member {
            display: flex; flex-direction: column; align-items: center;
            position: relative; min-width: 64px;
        }
        .hh-member-add {
            background: none; border: none; cursor: pointer;
            font-family: inherit; padding: 0;
        }
        .hh-avatar {
            width: 56px; height: 56px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            color: #fff; font-size: 22px; font-weight: 700;
            font-family: 'Caveat', cursive;
            position: relative; box-shadow: 0 2px 5px rgba(0,0,0,0.12);
        }
        .hh-avatar-sm {
            width: 40px; height: 40px; font-size: 17px;
        }
        .hh-avatar-add {
            background: none !important;
            border: 2px dashed #aaa;
            color: #888;
            font-size: 28px;
            transition: background 0.15s, color 0.15s, border 0.15s;
        }
        .hh-member-add:hover .hh-avatar-add {
            background: rgba(0, 122, 255, 0.06) !important;
            border-color: #007aff; color: #007aff;
        }
        .hh-role-badge {
            position: absolute; bottom: -2px; right: -2px;
            background: #ffd700; color: #5a4a00;
            font-size: 12px; font-weight: 700;
            min-width: 18px; height: 18px; padding: 0 2px;
            border-radius: 9px;
            display: flex; align-items: center; justify-content: center;
            box-shadow: 0 1px 3px rgba(0,0,0,0.25);
        }
        .hh-name-label {
            font-size: 12px; color: #333; margin-top: 4px;
            max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        .hh-member-gear {
            position: absolute; top: -4px; right: -8px;
            width: 22px; height: 22px; border-radius: 11px;
            background: #fff; border: 1px solid rgba(0,0,0,0.18);
            color: #555; font-size: 13px; line-height: 1;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; padding: 0;
        }
        .hh-member-gear:hover { background: #007aff; color: #fff; border-color: #007aff; }
        .hh-empty {
            color: #999; font-size: 13px; text-align: center;
            padding: 14px 12px; line-height: 1.4;
        }
        .hh-loading {
            color: #999; font-size: 13px; text-align: center;
            padding: 20px 12px;
        }
        .hh-pending-label {
            width: 100%; margin: 12px 0 4px;
            font-size: 12px; color: #888; text-transform: uppercase;
            letter-spacing: 0.5px; font-weight: 600;
        }
        .hh-pending-invite {
            background: #fffaf0; border: 1px dashed #f0c060;
            border-radius: 8px; padding: 8px 12px; font-size: 13px;
            color: #6a4a00; margin: 0 4px;
        }
        .hh-invite-in {
            background: #f0f6ff; border: 1px solid #b6d6ff;
            border-radius: 10px; padding: 10px 12px; margin: 0 0 10px;
            text-align: left;
        }
        .hh-invite-in-msg { font-size: 14px; color: #1a1a1a; margin-bottom: 8px; }
        .hh-invite-in-actions { display: flex; gap: 8px; }
        .hh-mini-btn {
            padding: 6px 12px; border: none; border-radius: 6px;
            font-size: 13px; font-weight: 600; cursor: pointer;
            font-family: inherit;
        }
        .hh-mini-btn-accept  { background: #34c759; color: #fff; }
        .hh-mini-btn-accept:hover { background: #28a745; }
        .hh-mini-btn-decline { background: #eef0f3; color: #444; }
        .hh-mini-btn-decline:hover { background: #dee0e3; }

        .hh-candidate {
            display: flex; align-items: center; gap: 10px;
            padding: 10px 4px; border-bottom: 1px solid rgba(0,0,0,0.06);
        }
        .hh-candidate-info { flex: 1; min-width: 0; }
        .hh-candidate-name { font-size: 14px; font-weight: 600; color: #1a1a1a; }
        .hh-candidate-code { font-size: 12px; color: #888; }
        .hh-candidate-already, .hh-candidate-pending {
            font-size: 12px; padding: 4px 8px; border-radius: 6px;
        }
        .hh-candidate-already { background: #eef7ee; color: #2e7d32; }
        .hh-candidate-pending { background: #fffaf0; color: #b8860b; }

        /* ── Grocery: 3-bucket UI (2026-05-28) ───────────────────────── */
        .grocery-section { margin-bottom: 16px; }
        .grocery-section-label {
            font-size: 12px; text-transform: uppercase;
            letter-spacing: 0.5px; font-weight: 700; color: #888;
            padding: 4px 8px 6px;
            border-bottom: 1px solid rgba(0,0,0,0.06);
            margin-bottom: 4px;
        }
        .grocery-section-pending .grocery-section-label { color: #b8860b; }
        .grocery-section-purchased { opacity: 0.7; }
        .grocery-section-purchased .grocery-section-label { color: #2e7d32; }
        .grocery-empty-sub {
            color: #aaa; font-size: 13px;
            text-align: center; padding: 12px 8px; font-style: italic;
        }
        .grocery-item-pending {
            background: #fffaf0;
            border: 1px dashed #f0c060;
            border-radius: 8px;
            padding: 8px 12px;
            margin-bottom: 4px;
            display: flex; align-items: center; gap: 8px;
        }
        .grocery-requester {
            font-size: 11px; color: #888; font-style: italic;
            margin-left: auto; margin-right: 4px;
        }
        .grocery-actions {
            display: flex; gap: 4px; flex-shrink: 0;
        }
        .grocery-mini-btn {
            width: 28px; height: 28px; border: none; border-radius: 14px;
            font-size: 14px; font-weight: 700; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            font-family: inherit;
        }
        .grocery-mini-btn-approve { background: #34c759; color: #fff; }
        .grocery-mini-btn-approve:hover { background: #28a745; }
        .grocery-mini-btn-reject  { background: #ff3b30; color: #fff; }
        .grocery-mini-btn-reject:hover { background: #d72d24; }

        /* Owner attribution tag on the recipe picker list */
        .recipe-picker-owner {
            color: #888; font-size: 12px; font-weight: normal;
            margin-left: 6px;
        }

        /* ── Family Calendar (2026-05-28 MVP) ────────────────────────── */
        #panelCalendar.active { display: flex; }
        .cal-month-nav {
            display: flex; align-items: center; justify-content: space-between;
            padding: 6px 16px 4px;
        }
        .cal-nav-btn {
            background: none; border: 1px solid rgba(0,0,0,0.15);
            border-radius: 6px;
            color: #007aff; font-size: 18px; font-weight: 700;
            width: 32px; height: 32px; cursor: pointer;
            font-family: inherit; padding: 0;
        }
        .cal-nav-btn:hover { background: #f0f6ff; }
        .cal-today-btn {
            background: #007aff; color: #fff; border: none;
            border-radius: 6px; padding: 6px 14px;
            font-size: 13px; font-weight: 600; cursor: pointer;
            font-family: inherit;
        }
        .cal-today-btn:hover { background: #0066d6; }
        .cal-weekday-row {
            display: grid; grid-template-columns: repeat(7, 1fr);
            font-size: 11px; font-weight: 700; color: #888;
            text-align: center; text-transform: uppercase;
            padding: 4px 8px 2px;
            background: #f7f9fc;
        }
        .cal-grid {
            display: grid; grid-template-columns: repeat(7, 1fr);
            grid-auto-rows: minmax(64px, auto);
            gap: 1px; background: rgba(0,0,0,0.08);
            padding: 1px; margin: 0 6px 12px;
            border-radius: 6px; overflow: hidden;
        }
        .cal-cell {
            background: #fff; padding: 4px 4px 2px;
            cursor: pointer; position: relative;
            display: flex; flex-direction: column;
            overflow: hidden;
            min-height: 64px;
        }
        .cal-cell:hover { background: #f0f6ff; }
        .cal-cell-other { background: #fafbfc; }
        .cal-cell-other .cal-cell-num { color: #c0c4cc; }
        .cal-cell-today {
            background: #fff5e6 !important;
            box-shadow: inset 0 0 0 2px #ff9500;
        }
        .cal-cell-num { font-size: 13px; font-weight: 700; color: #1a1a1a; }
        .cal-cell-badge {
            position: absolute; top: 4px; right: 4px;
            background: #007aff; color: #fff;
            min-width: 16px; height: 16px; padding: 0 4px;
            border-radius: 8px; font-size: 10px; font-weight: 700;
            display: flex; align-items: center; justify-content: center;
        }
        .cal-cell-evt {
            font-size: 10px; color: #fff; background: #007aff;
            padding: 2px 4px; border-radius: 3px;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
            margin-top: 2px;
        }
        .cal-cell-more {
            font-size: 10px; color: #888; margin-top: 2px; text-align: center;
        }

        #calendarDayOverlay, #calendarEditorOverlay {
            display: none; position: absolute; inset: 0;
            background: rgba(0,0,0,0.45); z-index: 200;
            align-items: flex-end; border-radius: 15px; overflow: hidden;
        }
        #calendarDayOverlay.open, #calendarEditorOverlay.open { display: flex; }
        .cal-day-sheet, .cal-editor-sheet {
            background: #fff; width: 100%; max-height: 80%;
            border-radius: 16px 16px 0 0; padding: 14px 16px 16px;
            display: flex; flex-direction: column; overflow-y: auto;
        }
        .cal-day-header {
            display: flex; align-items: center; justify-content: space-between;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(0,0,0,0.10);
            margin-bottom: 10px;
        }
        .cal-day-title { font-size: 16px; font-weight: 700; color: #1a1a1a; }
        .cal-day-close {
            background: none; border: none; color: #007aff;
            font-size: 15px; font-weight: 600; cursor: pointer;
            font-family: inherit;
        }
        .cal-day-events { display: flex; flex-direction: column; gap: 8px; }
        .cal-day-empty {
            color: #aaa; font-size: 14px; text-align: center;
            padding: 20px 12px; font-style: italic;
        }
        .cal-day-add-btn {
            margin-top: 12px; background: #007aff; color: #fff;
            border: none; border-radius: 8px; padding: 10px;
            font-size: 14px; font-weight: 600; cursor: pointer;
            font-family: inherit;
        }
        .cal-day-add-btn:hover { background: #0066d6; }
        .cal-event-card {
            background: #f7f9fc; border: 1px solid rgba(0,0,0,0.08);
            border-radius: 8px; padding: 10px 12px;
            cursor: pointer;
        }
        .cal-event-card:hover { background: #eef4fc; border-color: #007aff; }
        .cal-event-top {
            display: flex; justify-content: space-between; align-items: baseline;
            margin-bottom: 4px;
        }
        .cal-event-title { font-size: 15px; font-weight: 700; color: #1a1a1a; }
        .cal-event-time { font-size: 13px; color: #007aff; font-weight: 600; }
        .cal-event-desc { font-size: 13px; color: #555; line-height: 1.4; margin: 4px 0; }
        .cal-event-by { font-size: 11px; color: #888; font-style: italic; }
        .cal-editor-buttons {
            display: flex; gap: 8px; margin-top: 12px;
        }
        .cal-editor-buttons .btn { flex: 1; }
