@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/Inter-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

        :root {
            --nav-height: 60px;
            --toast-gap: 12px;
            --mobile-bottom-safe-area: calc(var(--nav-height) + 20px);
        }
        /* ── Dark mode tokens ──────────────────────── */
        /* ── Light mode tokens (defaults) ─────────── */
        :root, [data-theme="light"] {
            --bg-page:          #f7f4f1;
            --bg-surface:       #f9f7f6;
            --bg-card:          #ffffff;
            --border-subtle:    #efd5c7;
            --border-card:      #efd5c7;
            --text-primary:     #232526;
            --text-secondary:   #5c4a42;
            --text-muted:       #a08a7e;
            --accent:           #e09a7e;
            --nav-bg:           #f7f4f1;
            --nav-shadow:       rgba(231,189,187,0.8);
        }
        /* ── Dark mode tokens (overrides — must follow :root) ── */
        [data-theme="dark"] {
            --bg-page:          #1a1614;
            --bg-surface:       #24201e;
            --bg-card:          #2c2724;
            --border-subtle:    #3d3330;
            --border-card:      #4a3f3c;
            --text-primary:     #f0e8e4;
            --text-secondary:   #c4b0a8;
            --text-muted:       #8a7872;
            --accent:           #e09a7e;
            --nav-bg:           #1e1b19;
            --nav-shadow:       rgba(0,0,0,0.4);
        }
        body {
            font-family: 'Inter', Arial, sans-serif;
            margin: 0;
            min-height: 100vh;
            min-width: 100vw;
            width: 100vw;
            height: 100vh;
            box-sizing: border-box;
            background: var(--bg-page);
            color: var(--text-primary);
            overflow-x: hidden;
            -webkit-tap-highlight-color: transparent;
            transition: background 0.25s ease, color 0.25s ease;
        }
        .container {
            min-height: 100vh;
            min-width: 100vw;
            width: 100vw;
            height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: flex-start;
            padding-top: var(--nav-height);
            z-index: 1;
        }
        .glass {
            background: var(--bg-surface);
            border-radius: 0;
            box-shadow: none;
            border: none;
            padding: 32px 0 0 0;
            margin: 0;
            width: 100vw;
            height: calc(100vh - var(--nav-height));
            max-width: 100vw;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
        }
        h1 {
            font-family: 'Inter', Arial, sans-serif;
            text-align: center;
            font-weight: 700;
            letter-spacing: 1px;
            color: #e09a7e;
            margin-bottom: 10px;
            font-size: 2rem;
        }
        nav {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            background: var(--nav-bg);
            box-shadow: 0 2px 12px 0 var(--nav-shadow);
            padding: 0.5rem 0;
            z-index: 10;
            transition: background 0.25s ease;
        }
        .nav-mobile-wrapper {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            position: relative;
            width: 100vw;
        }
        .nav-spacer {
            flex: 1;
        }
        .nav-logo {
            height: 32px;
            width: 32px;
            object-fit: contain;
            vertical-align: middle;
        }
        .nav-ask {
            color: #ff7e5f;
            text-decoration: none;
            font-weight: 700;
            font-family: 'Inter', Arial, sans-serif;
            font-size: 1.08rem;
            letter-spacing: 1px;
            transition: color 0.2s;
            display: flex;
            align-items: center;
            gap: 6px;
            touch-action: manipulation;
        }
        .nav-right {
            list-style: none;
            display: flex;
            align-items: center;
            margin: 0 18px 0 0;
            padding: 0;
            gap: 10px;
        }
        .nav-right > li {
            display: flex;
            align-items: center;
        }
        .nav-btn {
            --btn-bg: #fff8f3;
            --btn-border: #f0cdbf;
            --btn-text: #8a5a49;
            color: var(--btn-text);
            text-decoration: none;
            font-weight: 600;
            font-size: 0.92rem;
            letter-spacing: 0.2px;
            border: 1px solid var(--btn-border);
            border-radius: 8px;
            padding: 7px 12px;
            transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
            display: inline-flex;
            align-items: center;
            background: var(--btn-bg);
            box-shadow: 0 2px 8px #e7bdbb55;
            white-space: nowrap;
            justify-content: center;
            margin: 0;
            line-height: 1;
        }
        .nav-btn-icon {
            width: 24px;
            height: 24px;
            stroke: currentColor;
            fill: none;
            flex-shrink: 0;
        }
        .nav-item-label {
            display: none;
            font-size: 0.7rem;
            font-weight: 700;
            letter-spacing: 0.2px;
            line-height: 1;
            color: currentColor;
        }
        .nav-btn:hover {
            color: #7a4f40;
            border-color: #e8b9a5;
            background: #fff2ea;
        }
        .nav-btn:focus-visible {
            outline: 2px solid #ebb9a6;
            outline-offset: 2px;
        }
        .nav-btn--login {
            --btn-bg: #fffdfa;
            --btn-text: #7f594b;
            --btn-border: #efd5ca;
        }
        .nav-btn--chat {
            --btn-text: #7f594b;
            --btn-border: #efd5ca;
        }
        .nav-theme-item {
            display: flex;
            align-items: center;
        }
        .nav-theme-toggle {
            width: 42px;
            height: 38px;
            min-width: 42px;
            gap: 0;
            padding: 0;
        }
        .nav-theme-icon {
            width: 18px;
            height: 18px;
            stroke: currentColor;
            fill: none;
        }
        .mobile-theme-toggle {
            position: fixed;
            top: calc(12px + env(safe-area-inset-top, 0px));
            right: 12px;
            z-index: 55;
            display: none;
            align-items: center;
            justify-content: center;
            gap: 0;
            border: 1px solid #efd5ca;
            background: rgba(255, 248, 243, 0.92);
            color: #7f594b;
            border-radius: 999px;
            width: 42px;
            height: 42px;
            padding: 0;
            box-shadow: 0 8px 22px rgba(90, 59, 45, 0.2);
            -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
            font: inherit;
            cursor: pointer;
            transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
        }
        .mobile-theme-toggle:hover {
            border-color: #e8b9a5;
            background: rgba(255, 242, 234, 0.96);
            color: #7a4f40;
            transform: translateY(-1px);
        }
        .mobile-theme-toggle:focus-visible {
            outline: 2px solid #ebb9a6;
            outline-offset: 2px;
        }
        .mobile-theme-toggle-icon {
            width: 17px;
            height: 17px;
            stroke: currentColor;
            fill: none;
            flex-shrink: 0;
        }
        [data-theme-toggle] [data-theme-icon] {
            display: none;
        }
        [data-theme="light"] [data-theme-toggle] [data-theme-icon="moon"],
        [data-theme="dark"] [data-theme-toggle] [data-theme-icon="sun"] {
            display: block;
        }
        .nav-mobile-chat-item {
            display: flex;
        }
        .profile-top-inline {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
        }
        .profile-chip-avatar {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: #ff9f82;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 0.9rem;
        }
        .profile-chip-meta {
            display: flex;
            flex-direction: column;
            line-height: 1.1;
        }
        .profile-chip-name {
            font-size: 0.82rem;
            font-weight: 700;
            color: #5e5046;
            max-width: 160px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .profile-chip-email {
            font-size: 0.74rem;
            color: #8f7f73;
            max-width: 160px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .nav-user-menu {
            position: relative;
            display: flex;
            align-items: center;
        }
        .nav-user-trigger {
            display: inline-flex;
            align-items: center;
            border: 1px solid #efd5ca;
            background: #fff8f3;
            color: #7f594b;
            border-radius: 8px;
            padding: 7px 12px;
            margin: 0;
            cursor: pointer;
            box-shadow: 0 2px 8px #e7bdbb55;
            transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
        }
        .nav-user-trigger:hover,
        .nav-user-trigger:active {
            color: #7a4f40;
            border-color: #e8b9a5;
            background: #fff2ea;
        }
        .nav-user-dropdown {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            min-width: 180px;
            background: #fff8f4;
            border: 1px solid #f3d8cb;
            border-radius: 12px;
            box-shadow: 0 10px 26px rgba(90, 59, 45, 0.16);
            padding: 8px;
            opacity: 0;
            transform: translateY(-6px);
            pointer-events: none;
            transition: opacity 0.2s ease, transform 0.2s ease;
            z-index: 30;
        }
        .nav-user-menu.is-open .nav-user-dropdown {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }
        .nav-user-trigger:focus-visible {
            box-shadow: 0 0 0 2px #ebb9a6;
            border-radius: 8px;
            outline: none;
        }
        .logout-form {
            margin: 0;
            padding: 0;
        }
        .nav-user-link {
            width: 100%;
            box-sizing: border-box;
            border-radius: 10px;
            border: 1px solid #ffd6c6;
            background: #fff3ec;
            color: #7a4f40;
            font-size: 0.9rem;
            font-weight: 700;
            padding: 9px 12px;
            margin: 0 0 8px 0;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        .nav-user-link:hover {
            background: #ffe8dc;
            border-color: #f0bea9;
            color: #6e4335;
        }
        .nav-user-link .nav-btn-spinner {
            width: 15px;
            height: 15px;
            border-radius: 50%;
            border: 2px solid rgba(122, 79, 64, 0.28);
            border-top-color: #7a4f40;
            display: none;
            flex-shrink: 0;
            animation: auth-btn-spin 0.8s linear infinite;
        }
        .nav-user-link .nav-user-link-loading-text {
            display: none;
        }
        .nav-user-link.is-loading,
        .nav-user-link.is-loading:hover {
            background: #ffe8dc;
            border-color: #f0bea9;
            color: #6e4335;
            cursor: wait;
            pointer-events: none;
        }
        .nav-user-link.is-loading .nav-btn-icon,
        .nav-user-link.is-loading .nav-user-link-label {
            display: none;
        }
        .nav-user-link.is-loading .nav-btn-spinner {
            display: inline-block;
        }
        .nav-user-link.is-loading .nav-user-link-loading-text {
            display: inline-block;
        }
        .nav-user-install-btn {
            box-shadow: none;
            cursor: pointer;
            font-family: inherit;
            margin-top: 0;
            text-align: left;
        }
        .nav-user-install-btn[hidden] {
            display: none;
        }
        .logout-form--dropdown button {
            width: 100%;
            justify-content: flex-start;
            gap: 8px;
            border-radius: 10px;
            padding: 9px 12px;
            font-size: 0.9rem;
            font-weight: 700;
            background: #fff3ec;
            border: 1px solid #ffd6c6;
            color: #7a4f40;
            box-shadow: none;
            margin: 0;
        }
        .logout-form--dropdown .logout-spinner {
            width: 15px;
            height: 15px;
            border-radius: 50%;
            border: 2px solid rgba(122, 79, 64, 0.28);
            border-top-color: #7a4f40;
            display: none;
            flex-shrink: 0;
            animation: auth-btn-spin 0.8s linear infinite;
        }
        .logout-form--dropdown button.is-loading,
        .logout-form--dropdown button.is-loading:hover {
            background: #ffe8dc;
            border-color: #f0bea9;
            color: #6e4335;
            cursor: wait;
        }
        .logout-form--dropdown button.is-loading .logout-spinner {
            display: inline-block;
        }
        .logout-form--dropdown button.is-loading .nav-btn-icon {
            display: none;
        }
        .logout-form--dropdown button:hover {
            background: #ffe8dc;
            border-color: #f0bea9;
            color: #6e4335;
        }
        .logout-form button {
            --btn-bg: #fff8f3;
            --btn-border: #f0cdbf;
            --btn-text: #8a5a49;
            margin-top: 0;
            color: var(--btn-text);
            text-decoration: none;
            font-weight: 600;
            font-size: 0.92rem;
            letter-spacing: 0.2px;
            border: 1px solid var(--btn-border);
            border-radius: 8px;
            padding: 7px 12px;
            transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
            display: inline-flex;
            align-items: center;
            background: var(--btn-bg);
            white-space: nowrap;
            cursor: pointer;
            justify-content: center;
        }
        .logout-form button:hover {
            color: #7a4f40;
            border-color: #e8b9a5;
            background: #fff2ea;
        }
        .logout-form button:focus-visible {
            outline: 2px solid #ebb9a6;
            outline-offset: 2px;
        }
        .nav-ask:hover {
            color: #232526;
        }
        .nav-btn .nav-btn-spinner {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 2px solid rgba(138, 90, 73, 0.28);
            border-top-color: #8a5a49;
            display: none;
            flex-shrink: 0;
            animation: auth-btn-spin 0.8s linear infinite;
        }
        .nav-btn.is-loading .nav-btn-spinner {
            display: inline-block;
        }
        .nav-btn.is-loading .nav-btn-icon,
        .nav-btn.is-loading .nav-home-icon {
            display: none;
        }
        .nav-btn.is-loading {
            cursor: wait;
            pointer-events: none;
        }
        .nav-home {
            margin-left: 18px;
            margin-right: 18px;
        }
        .nav-home .nav-home-icon {
            width: 24px;
            height: 24px;
            flex-shrink: 0;
            transition: filter 0.2s ease;
        }
        .nav-home:hover .nav-home-icon {
            filter: saturate(1.08);
        }
        nav a {
            color: #e09a7e;
            text-decoration: none;
            margin: 0 18px;
            font-weight: 700;
            font-family: 'Inter', Arial, sans-serif;
            font-size: 1.08rem;
            letter-spacing: 1px;
            transition: color 0.2s;
            display: flex;
            align-items: center;
            touch-action: manipulation;
        }
        nav a:hover {
            color: #232526;
        }
        hr {
            border: none;
            border-top: 1px solid #e7bdbb;
            margin-bottom: 24px;
            opacity: 0.3;
        }
        button, input[type="submit"] {
            background: #e7bdbb;
            color: #232526;
            border: none;
            border-radius: 8px;
            padding: 12px 28px;
            font-size: 1.08rem;
            font-weight: 700;
            cursor: pointer;
            margin-top: 10px;
            box-shadow: 0 2px 8px #e7bdbb55;
            transition: background 0.2s, color 0.2s;
            touch-action: manipulation;
        }
        button:hover, input[type="submit"]:hover {
            background: #e09a7e;
            color: #fff;
        }
        textarea, input[type="text"], input[type="email"], input[type="password"] {
            width: 100%;
            padding: 14px;
            border-radius: 10px;
            border: 1.5px solid #e7bdbb;
            background: #f7f4f1;
            color: #232526;
            margin-bottom: 14px;
            font-size: 1rem;
            transition: border 0.2s;
        }
        textarea:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus {
            outline: none;
            border-color: #e09a7e;
        }
        .auth-wrap {
            width: min(460px, 92vw);
            background: #fff8f4;
            border: 1px solid #f3d8cb;
            border-radius: 14px;
            box-shadow: 0 8px 24px rgba(224, 154, 126, 0.1);
            padding: 24px;
            margin-top: 6px;
        }
        .auth-wrap h2 {
            margin: 0 0 8px;
            color: #ce7f5f;
        }
        .auth-wrap p {
            margin: 0 0 12px;
            color: #75685e;
        }
        .auth-form label {
            display: block;
            font-size: 0.88rem;
            color: #6e6056;
            margin-bottom: 6px;
            font-weight: 700;
        }
        .auth-form ul.errorlist,
        .errorlist {
            color: #b04545;
            margin: 0 0 10px 0;
            padding-left: 18px;
        }
        .auth-switch {
            margin-top: 14px;
            text-align: center;
        }
        .messages-wrap {
            position: fixed;
            top: calc(var(--nav-height) + var(--toast-gap));
            right: 16px;
            width: min(380px, calc(100vw - 32px));
            z-index: 9;
            pointer-events: none;
        }
        .flash-message {
            border-radius: 10px;
            padding: 10px 14px;
            background: #fff3ec;
            border: 1px solid #ffd8c7;
            color: #644f43;
            margin-bottom: 8px;
            font-weight: 600;
            box-shadow: 0 8px 22px rgba(67, 40, 28, 0.12);
            pointer-events: auto;
            opacity: 0;
            transform: translate3d(24px, 0, 0);
            animation: toast-slide-in 260ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
            transition: opacity 220ms ease, transform 220ms ease, max-height 220ms ease, margin 220ms ease, padding 220ms ease;
            max-height: 120px;
            overflow: hidden;
            will-change: transform, opacity;
        }
        .flash-message.is-dismissing {
            opacity: 0;
            transform: translate3d(18px, -6px, 0);
            max-height: 0;
            margin-bottom: 0;
            padding-top: 0;
            padding-bottom: 0;
            border-width: 0;
        }
        @keyframes toast-slide-in {
            from {
                opacity: 0;
                transform: translate3d(24px, 0, 0);
            }
            to {
                opacity: 1;
                transform: translate3d(0, 0, 0);
            }
        }
        @keyframes auth-btn-spin {
            to {
                transform: rotate(360deg);
            }
        }
        /* ── Notification Bell ── */
        .nav-notif-menu {
            position: relative;
            display: flex;
            align-items: center;
        }
        .nav-notif-trigger {
            position: relative;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
        }
        .notif-badge {
            position: absolute;
            top: 2px;
            right: 2px;
            min-width: 16px;
            height: 16px;
            border-radius: 8px;
            background: #e05252;
            color: #fff;
            font-size: 0.67rem;
            font-weight: 700;
            line-height: 16px;
            text-align: center;
            padding: 0 3px;
            box-sizing: border-box;
            pointer-events: none;
        }
        .notif-panel {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            width: min(520px, calc(100vw - 24px));
            box-sizing: border-box;
            background: #fff8f4;
            border: 1px solid #f3d8cb;
            border-radius: 14px;
            box-shadow: 0 10px 32px rgba(90, 59, 45, 0.18);
            opacity: 0;
            transform: translateY(-6px);
            pointer-events: none;
            transition: opacity 0.2s ease, transform 0.2s ease;
            z-index: 30;
            display: flex;
            flex-direction: column;
            max-height: min(460px, calc(100vh - 100px));
        }
        .nav-notif-menu.is-open .notif-panel {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }
        .notif-panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 16px 10px;
            border-bottom: 1px solid #f3d8cb;
            flex-shrink: 0;
        }
        .notif-panel-title {
            font-size: 0.95rem;
            font-weight: 700;
            color: #5e4a3f;
        }
        .notif-header-btns {
            display: flex;
            gap: 6px;
            flex-wrap: nowrap;
        }
        .notif-hdr-btn {
            position: relative;
            font-size: 0.76rem;
            font-weight: 700;
            padding: 4px 9px;
            border-radius: 6px;
            border: 1px solid #f0cdbf;
            background: #fff2ea;
            color: #7a4f40;
            cursor: pointer;
            transition: background 0.15s;
            font-family: 'Inter', Arial, sans-serif;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        .notif-hdr-btn:hover {
            background: #ffe8dc;
            color: #6e4335;
        }
        .notif-hdr-btn--danger {
            border-color: #f5c0c0;
            background: #fff5f5;
            color: #b94444;
        }
        .notif-hdr-btn--danger:hover {
            background: #ffe2e2;
            color: #a03030;
        }
        .notif-hdr-btn[disabled] {
            opacity: 0.65;
            cursor: not-allowed;
        }
        .notif-hdr-btn-label {
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .notif-hdr-btn-spinner {
            width: 13px;
            height: 13px;
            border-radius: 50%;
            border: 2px solid rgba(122, 79, 64, 0.24);
            border-top-color: currentColor;
            display: none;
            flex-shrink: 0;
            animation: auth-btn-spin 0.8s linear infinite;
        }
        .notif-hdr-btn.is-loading {
            cursor: wait;
            pointer-events: none;
        }
        .notif-hdr-btn.is-loading .notif-hdr-btn-spinner {
            display: inline-block;
        }
        .notif-confirm-modal {
            position: fixed;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(35, 28, 24, 0.42);
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 0.18s ease, visibility 0.18s ease;
            z-index: 120;
        }
        .notif-confirm-modal.is-open {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }
        .notif-confirm-dialog {
            width: min(420px, calc(100vw - 32px));
            box-sizing: border-box;
            background: #fff8f4;
            border: 1px solid #f3d8cb;
            border-radius: 18px;
            box-shadow: 0 24px 54px rgba(67, 40, 28, 0.24);
            padding: 22px;
        }
        .notif-confirm-title {
            margin: 0;
            font-size: 1rem;
            font-weight: 700;
            color: #4e3c33;
        }
        .notif-confirm-copy {
            margin: 10px 0 0;
            font-size: 0.92rem;
            line-height: 1.5;
            color: #6d574c;
        }
        .notif-confirm-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 18px;
        }
        .notif-confirm-btn {
            border: 1px solid #f0cdbf;
            border-radius: 10px;
            background: #fff2ea;
            color: #7a4f40;
            font: inherit;
            font-size: 0.9rem;
            font-weight: 700;
            padding: 9px 14px;
            cursor: pointer;
            transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
        }
        .notif-confirm-btn:hover {
            background: #ffe8dc;
            border-color: #e8b9a5;
            color: #6e4335;
        }
        .notif-confirm-btn:focus-visible {
            outline: 2px solid #ebb9a6;
            outline-offset: 2px;
        }
        .notif-confirm-btn--danger {
            background: #fff1f1;
            border-color: #f2c5c5;
            color: #b94444;
        }
        .notif-confirm-btn--danger:hover {
            background: #ffe2e2;
            border-color: #e7b2b2;
            color: #a03030;
        }
        .notif-detail-modal {
            position: fixed;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(35, 28, 24, 0.42);
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 0.18s ease, visibility 0.18s ease;
            z-index: 121;
        }
        .notif-detail-modal.is-open {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }
        .notif-detail-dialog {
            width: min(560px, calc(100vw - 32px));
            max-height: min(78vh, 720px);
            box-sizing: border-box;
            background: #fff8f4;
            border: 1px solid #f3d8cb;
            border-radius: 18px;
            box-shadow: 0 24px 54px rgba(67, 40, 28, 0.24);
            padding: 20px 20px 18px;
            display: flex;
            flex-direction: column;
        }
        .notif-detail-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 14px;
            padding-bottom: 12px;
            border-bottom: 1px solid #f3d8cb;
        }
        .notif-detail-title {
            margin: 0;
            font-size: 1.05rem;
            line-height: 1.35;
            font-weight: 700;
            color: #4e3c33;
        }
        .notif-detail-close {
            flex-shrink: 0;
            border: 1px solid #f0cdbf;
            border-radius: 10px;
            background: #fff2ea;
            color: #7a4f40;
            font: inherit;
            font-size: 0.82rem;
            font-weight: 700;
            padding: 7px 10px;
            cursor: pointer;
            transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
        }
        .notif-detail-close:hover {
            background: #ffe8dc;
            border-color: #e8b9a5;
            color: #6e4335;
        }
        .notif-detail-close:focus-visible {
            outline: 2px solid #ebb9a6;
            outline-offset: 2px;
        }
        .notif-detail-time {
            margin: 10px 0 0;
            font-size: 0.78rem;
            color: #aa968d;
        }
        .notif-detail-message {
            margin-top: 14px;
            padding-right: 4px;
            overflow-y: auto;
            font-size: 0.94rem;
            line-height: 1.58;
            color: #6d574c;
            white-space: pre-wrap;
            word-break: break-word;
        }
        .notif-list {
            overflow-y: auto;
            flex: 1;
            padding: 6px 0;
        }
        .global-call-overlay {
            position: fixed;
            inset: 0;
            z-index: 200;
            background: radial-gradient(120% 100% at 0% 0%, rgba(230, 143, 108, 0.26) 0%, rgba(17, 23, 31, 0.95) 58%, #070b11 100%);
        }
        .global-call-overlay[hidden] {
            display: none;
        }
        .global-call-layout {
            width: 100%;
            height: 100%;
            box-sizing: border-box;
            display: grid;
            place-items: center;
            padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 24px);
        }
        .global-call-card {
            width: min(440px, 100%);
            border-radius: 22px;
            border: 1px solid rgba(255, 255, 255, 0.16);
            background: linear-gradient(170deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.06) 100%);
            box-shadow: 0 24px 40px rgba(0, 0, 0, 0.3);
            backdrop-filter: blur(7px);
            padding: 22px 20px;
            text-align: center;
            color: #f6f8fb;
        }
        .global-call-subtitle {
            margin: 0;
            font-size: 0.79rem;
            letter-spacing: 0.09em;
            text-transform: uppercase;
            color: rgba(236, 243, 250, 0.72);
        }
        .global-call-avatar {
            width: 94px;
            height: 94px;
            border-radius: 50%;
            margin: 16px auto 10px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            font-weight: 700;
            color: #fff;
            background: linear-gradient(150deg, rgba(230, 143, 108, 0.95) 0%, rgba(191, 101, 71, 0.95) 100%);
            border: 1px solid rgba(255, 255, 255, 0.25);
            box-shadow: 0 0 0 0 rgba(230, 143, 108, 0.7);
            animation: global-call-pulse 1.8s ease-out infinite;
        }
        .global-call-caller {
            margin: 0;
            font-size: 1.08rem;
            font-weight: 700;
            color: #fff;
        }
        .global-call-mode {
            margin: 6px 0 0;
            color: rgba(236, 243, 250, 0.9);
            font-size: 0.88rem;
        }
        .global-call-hint {
            margin: 14px 0 0;
            font-size: 0.78rem;
            color: rgba(236, 243, 250, 0.76);
        }
        .global-call-actions {
            margin-top: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            flex-wrap: wrap;
        }
        .global-call-btn {
            min-width: 122px;
            height: 46px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: #fff;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-weight: 700;
            font-size: 0.95rem;
            padding: 0 14px;
        }
        .global-call-btn--accept {
            background: linear-gradient(135deg, #2fbf77 0%, #22995f 100%);
        }
        .global-call-btn--decline {
            background: linear-gradient(135deg, #d84f4f 0%, #bc3f3f 100%);
        }
        @keyframes global-call-pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(230, 143, 108, 0.7);
            }
            70% {
                box-shadow: 0 0 0 18px rgba(230, 143, 108, 0);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(230, 143, 108, 0);
            }
        }
        .notif-item {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 10px 14px;
            border-bottom: 1px solid #f5ece7;
            cursor: default;
            transition: background 0.13s;
        }
        .notif-item:focus-visible {
            outline: 2px solid #ebb9a6;
            outline-offset: -2px;
        }
        .notif-item:last-child {
            border-bottom: none;
        }
        .notif-item:hover {
            background: #fff2eb;
        }
        .notif-item.is-unread {
            background: #fff8f5;
        }
        .notif-item.is-unread:hover {
            background: #fff0e8;
        }
        .notif-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #e09a7e;
            flex-shrink: 0;
            margin-top: 5px;
            transition: opacity 0.2s;
        }
        .notif-item.is-read .notif-dot {
            opacity: 0;
        }
        .notif-body {
            flex: 1;
            min-width: 0;
        }
        .notif-item-title {
            font-size: 0.87rem;
            font-weight: 700;
            color: #4e3c33;
            margin-bottom: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .notif-item.is-read .notif-item-title {
            font-weight: 600;
            color: #7a6860;
        }
        .notif-item-msg {
            font-size: 0.82rem;
            color: #7a6860;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .notif-item-time {
            font-size: 0.74rem;
            color: #b0a098;
            margin-top: 3px;
        }
        .notif-empty-msg {
            text-align: center;
            color: #c0aaa3;
            padding: 32px 16px;
            font-size: 0.9rem;
        }
        .notif-toaster-wrap {
            position: fixed;
            top: calc(var(--nav-height) + var(--toast-gap));
            left: 16px;
            width: min(340px, calc(100vw - 32px));
            z-index: 9;
            pointer-events: none;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .notif-toast {
            border-radius: 10px;
            padding: 11px 14px 11px 12px;
            background: #fff8f4;
            border: 1px solid #f0cdbf;
            color: #5e3f35;
            font-size: 0.87rem;
            font-weight: 600;
            box-shadow: 0 8px 22px rgba(67, 40, 28, 0.14);
            pointer-events: auto;
            opacity: 0;
            transform: translate3d(-24px, 0, 0);
            animation: notif-toast-in 280ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
            transition: opacity 220ms ease, transform 220ms ease, max-height 220ms ease, margin 220ms ease, padding 220ms ease;
            max-height: 140px;
            overflow: hidden;
            display: flex;
            align-items: flex-start;
            gap: 9px;
        }
        .notif-toast.is-dismissing {
            opacity: 0;
            transform: translate3d(-18px, -6px, 0);
            max-height: 0;
            margin-bottom: 0;
            padding-top: 0;
            padding-bottom: 0;
            border-width: 0;
        }
        .notif-toast-icon {
            flex-shrink: 0;
            width: 18px;
            height: 18px;
            stroke: #e09a7e;
            fill: none;
            stroke-width: 1.9;
            margin-top: 1px;
        }
        .notif-toast-text .notif-toast-title {
            font-weight: 700;
            color: #4e3c33;
            margin-bottom: 2px;
        }
        .notif-toast-text .notif-toast-msg {
            color: #7a6860;
            font-weight: 400;
        }
        @keyframes notif-toast-in {
            from { opacity: 0; transform: translate3d(-24px, 0, 0); }
            to   { opacity: 1; transform: translate3d(0, 0, 0); }
        }
        .card {
            background: #f7f4f1;
            border-radius: 10px;
            padding: 16px 16px;
            margin-bottom: 18px;
            box-shadow: 0 2px 8px #e7bdbb33;
        }
        .ai-response {
            background: #f3e6de;
            border-left: 4px solid #e7bdbb;
            padding: 14px 18px;
            border-radius: 8px;
            margin-top: 18px;
            color: #232526;
        }
        .logo-loader {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }
        .logo-loader-img {
            opacity: 0;
            transform: scale(0.98);
            transition: opacity 0.3s ease, transform 0.3s ease;
        }
        .logo-loader-shimmer {
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: linear-gradient(110deg, #f6e8df 8%, #fff8f3 36%, #f6e8df 62%);
            background-size: 200% 100%;
            animation: logo-shimmer 1.1s linear infinite;
            transition: opacity 0.25s ease;
            pointer-events: none;
        }
        .logo-loader.is-loaded .logo-loader-img {
            opacity: 1;
            transform: scale(1);
        }
        .logo-loader.is-loaded .logo-loader-shimmer {
            opacity: 0;
        }
        [data-theme="dark"] .logo-loader-shimmer {
            background: linear-gradient(110deg, #2f2926 8%, #3a322f 36%, #2f2926 62%);
            background-size: 200% 100%;
        }
        @keyframes logo-shimmer {
            from {
                background-position: 160% 0;
            }
            to {
                background-position: -40% 0;
            }
        }
        @media (prefers-reduced-motion: reduce) {
            .logo-loader-shimmer {
                animation: none;
            }
            .logo-loader-img {
                transition: opacity 0.15s ease;
                transform: none;
            }
        }
        .chat-message {
            margin-bottom: 10px;
            padding: 8px 12px;
            border-radius: 8px;
            background: #f3e6de;
        }
        .chat-message .sender {
            color: #e09a7e;
            font-weight: 700;
        }
        .chat-box {
            border: 1.5px solid #e7bdbb;
            background: #f7f4f1;
            height: 300px;
            overflow-y: scroll;
            margin-bottom: 14px;
            border-radius: 12px;
            padding: 10px;
        }

        body.prompt-modal-open {
            overflow: hidden;
        }
        .prompt-modal {
            position: fixed;
            inset: 0;
            z-index: 140;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 0.26s ease, visibility 0.26s ease;
        }
        .prompt-modal.is-open {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }
        .prompt-modal-backdrop {
            position: absolute;
            inset: 0;
            background: rgba(22, 13, 10, 0.45);
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
        }
        .prompt-modal-dialog {
            --dialog-origin-x: 50%;
            --dialog-origin-y: 50%;
            position: absolute;
            width: min(960px, calc(100vw - 30px));
            height: min(84vh, 760px);
            top: 50%;
            left: 50%;
            right: auto;
            bottom: auto;
            transform: translate(-50%, -50%) scale(0.96);
            margin: 0;
            border-radius: 22px;
            border: 1px solid #efc9bb;
            background: linear-gradient(180deg, rgba(255, 250, 247, 0.88) 0%, rgba(255, 245, 239, 0.91) 100%), url('../images/promptBG.png');
            background-size: auto, cover;
            background-position: center, center;
            background-attachment: scroll, fixed;
            background-color: #fffaf7;
            box-shadow: 0 28px 60px rgba(63, 35, 25, 0.32);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transform-origin: var(--dialog-origin-x) var(--dialog-origin-y);
            opacity: 0;
            transition: all 0.32s cubic-bezier(0.21, 1, 0.36, 1), opacity 0.24s ease;
        }
        .prompt-modal.is-open .prompt-modal-dialog {
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
        }
        .prompt-modal.is-open .prompt-modal-dialog.is-expanded {
            top: 10px;
            left: 8px;
            right: 8px;
            bottom: 10px;
            width: auto;
            height: auto;
            margin: 0;
            transform: translate(0, 0) scale(1);
            border-radius: 16px;
        }
        .prompt-modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 16px 18px;
            border-bottom: 1px solid #f1d9d0;
            background: rgba(255, 255, 255, 0.76);
            flex-shrink: 0;
        }
        .prompt-modal-title {
            margin: 0;
            font-size: 1.06rem;
            color: #583f35;
        }
        .prompt-modal-header-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .prompt-modal-expand {
            margin: 0;
            padding: 8px;
            border-radius: 8px;
            border: 1px solid #efc7b8;
            background: #fff0e8;
            color: #7a4f40;
            width: 36px;
            height: 36px;
            min-width: 36px;
            min-height: 36px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background-color 0.2s ease, border-color 0.2s ease;
        }
        .prompt-modal-expand svg {
            width: 18px;
            height: 18px;
        }
        .prompt-modal-expand:hover {
            background: #ffe5d8;
            border-color: #e8b8a9;
        }
        .prompt-modal-expand:active {
            filter: brightness(0.96);
        }
        .prompt-modal-close {
            margin: 0;
            padding: 8px 12px;
            border-radius: 10px;
            border: 1px solid #efc7b8;
            background: #fff0e8;
            color: #7a4f40;
            font-size: 0.86rem;
            font-weight: 700;
        }
        .prompt-modal-chat {
            position: relative;
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding: 18px;
            background: radial-gradient(circle at 12% 4%, rgba(255, 235, 225, 0.8) 0%, rgba(255, 250, 246, 0.8) 45%, rgba(255, 245, 238, 0.86) 100%);
        }
        .prompt-modal-chat:empty::before {
            content: "Ask anything about your pet care, symptoms, food, or vaccinations.";
            color: #b08472;
            font-size: 0.95rem;
            margin: auto;
            text-align: center;
            max-width: 540px;
            line-height: 1.5;
        }
        .prompt-modal-message {
            max-width: min(78%, 680px);
            padding: 11px 14px;
            border-radius: 14px;
            font-size: 0.96rem;
            line-height: 1.5;
            white-space: pre-wrap;
            word-break: break-word;
        }
        .prompt-modal-message--user {
            align-self: flex-end;
            background: linear-gradient(135deg, #ffe6da 0%, #f9c7b0 100%);
            color: #3f2b24;
            border-bottom-right-radius: 4px;
        }
        .prompt-modal-message--ai {
            align-self: flex-start;
            background: #fff;
            color: #3f2b24;
            border: 1px solid #f1dbd2;
            border-bottom-left-radius: 4px;
        }
        .prompt-modal-message--ai.is-streaming {
            position: relative;
        }
        .prompt-modal-message--ai.is-streaming::after {
            content: "";
            display: inline-block;
            width: 7px;
            height: 14px;
            margin-left: 4px;
            border-radius: 999px;
            background: #c98366;
            animation: prompt-blink 0.8s ease-in-out infinite;
            vertical-align: text-bottom;
        }
        .prompt-modal-limit-note {
            margin: 0;
            padding: 8px 18px 0;
            font-size: 0.84rem;
            color: #946958;
            line-height: 1.4;
        }
        .prompt-modal-limit-note a {
            color: #a0583f;
            font-weight: 700;
        }
        .prompt-modal-form {
            display: flex;
            align-items: flex-end;
            gap: 10px;
            padding: 12px 14px 14px;
            border-top: 1px solid #f1d9d0;
            background: rgba(255, 255, 255, 0.92);
            flex-shrink: 0;
        }
        .prompt-modal-form textarea {
            margin: 0;
            height: 40px;
            min-height: 40px;
            max-height: 140px;
            resize: none;
            border-radius: 14px;
            border: 1px solid #efcabd;
            background: #fffdfc;
            padding: 8px 12px;
            color: #46322b;
            font-size: 0.96rem;
            line-height: 1.35;
        }
        .prompt-modal-form button {
            margin: 0;
            padding: 0 14px;
            border-radius: 12px;
            font-size: 0.85rem;
            font-weight: 700;
            min-width: 74px;
            min-height: 46px;
            flex: 0 0 auto;
            align-self: flex-end;
        }
        #prompt-modal-send {
            width: 40px;
            height: 40px;
            min-width: 40px;
            min-height: 40px;
            padding: 0;
            border-radius: 14px;
            background: linear-gradient(135deg, #e09a7e, #c97857);
            color: #fff;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 8px 16px rgba(161, 98, 73, 0.25);
        }
        #prompt-modal-send:hover {
            filter: brightness(0.98);
            transform: translateY(-1px);
        }
        #prompt-modal-send:active {
            transform: translateY(0);
        }
        .prompt-modal-send-icon {
            width: 18px;
            height: 18px;
            display: block;
        }
        #prompt-modal-stop {
            width: 40px;
            height: 40px;
            min-width: 40px;
            min-height: 40px;
            padding: 0;
            border-radius: 14px;
            background: #f3e5de;
            color: #7a4f40;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0;
        }
        #prompt-modal-stop::before {
            content: "";
            width: 13px;
            height: 13px;
            border-radius: 3px;
            background: currentColor;
            display: block;
        }
        #prompt-modal-stop span {
            display: none;
        }
        #prompt-modal-send[hidden],
        #prompt-modal-stop[hidden] {
            display: none !important;
        }
        @keyframes prompt-blink {
            0%, 100% { opacity: 0.25; }
            50% { opacity: 1; }
        }
        @media (max-width: 1024px) {
            body.nav-home-centered .nav-mobile-wrapper {
                justify-content: center;
            }
            body.nav-home-centered .nav-home {
                flex: 0 0 auto;
                margin: 0 auto;
            }
            body.nav-home-centered .nav-right {
                display: none;
            }
            html, body {
                font-size: 15px;
            }
            :root {
                --nav-height: 72px;
                --toast-gap: 10px;
            }
            body {
                padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 15px);
            }
            .container {
                padding-top: 0;
                padding-bottom: var(--nav-height);
                min-width: 100vw;
                width: 100vw;
            }
            .glass {
                max-width: 100vw;
                padding: 8px 2vw var(--mobile-bottom-safe-area) 2vw;
                width: 100vw;
                height: auto;
            }
            nav {
                top: auto;
                bottom: 10px;
                left: 10px;
                right: 10px;
                width: auto;
                border: 1px solid rgba(255, 255, 255, 0.76);
                border-top-color: rgba(255, 255, 255, 0.9);
                border-radius: 22px;
                background: linear-gradient(140deg, rgba(255, 251, 247, 0.78), rgba(245, 229, 219, 0.52));
                -webkit-backdrop-filter: blur(20px) saturate(165%);
                backdrop-filter: blur(20px) saturate(165%);
                box-shadow:
                    0 -10px 30px rgba(90, 59, 45, 0.16),
                    inset 0 1px 0 rgba(255, 255, 255, 0.65);
                padding: 0.35rem 0.35rem calc(0.4rem + env(safe-area-inset-bottom)) 0.35rem;
                overflow: visible;
            }
            nav::before {
                content: "";
                position: absolute;
                inset: 0;
                border-radius: inherit;
                border: 1px solid rgba(255, 255, 255, 0.42);
                pointer-events: none;
            }
            .nav-mobile-wrapper {
                justify-content: space-between;
                align-items: center;
                width: 100%;
            }
            .nav-spacer {
                display: none;
            }
            .nav-logo {
                height: 32px;
                width: 32px;
            }
            .nav-home .nav-home-icon {
                width: 24px;
                height: 24px;
            }
            .nav-ask {
                font-size: 1rem;
            }
            .nav-right {
                flex: 3;
                gap: 0;
                margin: 0;
                justify-content: space-between;
            }
            .nav-theme-item {
                display: none !important;
            }
            .profile-chip-meta {
                display: none;
            }
            .nav-user-dropdown {
                top: auto;
                bottom: calc(100% + 10px);
                right: 8px;
                min-width: 164px;
            }
            .nav-home {
                flex: 1;
                margin: 0;
                border-radius: 12px;
                display: inline-flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 4px;
                padding: 6px 4px;
            }
            .nav-right > li {
                flex: 1;
                justify-content: center;
            }
            .nav-mobile-chat-item {
                display: flex !important;
            }
            .nav-btn {
                border: 0;
                background: transparent;
                box-shadow: none;
                border-radius: 12px;
                padding: 6px 4px;
                font-size: 0.84rem;
                flex-direction: column;
                gap: 4px;
                min-width: 56px;
            }
            .nav-btn-icon {
                width: 22px;
                height: 22px;
            }
            .nav-item-label {
                display: inline-block;
            }
            .nav-user-trigger {
                border: 0;
                background: transparent;
                box-shadow: none;
                border-radius: 12px;
                padding: 6px 4px;
                margin: 0;
                display: inline-flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 4px;
                min-width: 56px;
            }
            .logout-form button {
                padding: 5px 9px;
                font-size: 0.84rem;
            }
            .glass {
                padding: 4px 0 var(--mobile-bottom-safe-area) 0;
            }
            nav {
                padding: 0.2rem 0.2rem calc(0.2rem + env(safe-area-inset-bottom)) 0.2rem;
            }
            .messages-wrap {
                top: 10px;
                right: 8px;
                width: min(360px, calc(100vw - 16px));
            }
            .notif-panel {
                position: fixed;
                top: auto;
                bottom: calc(var(--nav-height) + 10px);
                left: 12px;
                right: 12px;
                width: auto;
                max-width: none;
                max-height: calc(100vh - var(--nav-height) - 24px);
            }
            .notif-toaster-wrap {
                top: 12px;
            }
            .mobile-theme-toggle {
                display: inline-flex;
            }
            .notif-header-btns {
                flex-wrap: wrap;
            }
            .notif-hdr-btn {
                font-size: 0.7rem;
                padding: 3px 7px;
                flex: 1;
                min-width: 90px;
            }
            .notif-detail-modal {
                align-items: center;
                padding: 10px;
            }
            .notif-detail-dialog {
                width: 100%;
                max-height: min(76vh, 560px);
                border-radius: 16px;
                padding: 16px 14px 14px;
            }
            .notif-detail-title {
                font-size: 0.98rem;
            }
            .notif-detail-message {
                font-size: 0.9rem;
                line-height: 1.52;
            }
            .prompt-modal-dialog {
                width: min(100vw - 16px, 900px);
                height: min(86vh, 740px);
                margin-top: max(8px, env(safe-area-inset-top, 0px));
                border-radius: 18px;
            }
            .prompt-modal-form {
                padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
            }
        }
        @media (max-width: 700px) {
            .nav-btn-icon,
            .nav-home .nav-home-icon {
                width: 20px;
                height: 20px;
            }
            .nav-item-label {
                font-size: 0.66rem;
            }
            .prompt-modal-expand {
                display: none !important;
            }
            .prompt-modal-dialog {
                width: 100vw;
                height: 100dvh;
                margin: 0;
                border-radius: 0;
                border-left: 0;
                border-right: 0;
            }
            .prompt-modal-header {
                padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 12px;
            }
            .prompt-modal-chat {
                padding: 12px;
                gap: 10px;
            }
            .prompt-modal-message {
                max-width: 88%;
                font-size: 0.92rem;
            }
            .prompt-modal-form {
                gap: 8px;
                padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
            }
            .prompt-modal-form textarea {
                height: 38px;
                min-height: 38px;
                font-size: 0.92rem;
                padding: 7px 11px;
            }
            .prompt-modal-form button {
                min-width: 66px;
                min-height: 44px;
                font-size: 0.78rem;
                padding: 0 10px;
            }
            #prompt-modal-send {
                width: 38px;
                height: 38px;
                min-width: 38px;
                min-height: 38px;
                padding: 0;
            }
            #prompt-modal-stop {
                width: 38px;
                height: 38px;
                min-width: 38px;
                min-height: 38px;
            }
            .prompt-modal-send-icon {
                width: 17px;
                height: 17px;
            }
        }

        /* ══════════════════════════════════════════════
           Dark mode overrides
           ══════════════════════════════════════════════ */
        [data-theme="dark"] .profile-chip-name { color: #e0d4cc; }
        [data-theme="dark"] .profile-chip-email { color: #a08880; }

        [data-theme="dark"] .nav-user-trigger {
            background: #2e2825;
            border-color: #4a3730;
            color: #d4b4a8;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
        }
        [data-theme="dark"] .nav-user-trigger:hover,
        [data-theme="dark"] .nav-user-trigger:active {
            background: #3d3330;
            border-color: #5e4540;
            color: #f0e0d8;
        }

        [data-theme="dark"] .nav-user-dropdown {
            background: #2a2320;
            border-color: #4a3730;
            box-shadow: 0 10px 32px rgba(0,0,0,0.45);
        }
        [data-theme="dark"] .nav-user-link {
            background: #332b28;
            border-color: #4a3730;
            color: #d4b4a8;
        }
        [data-theme="dark"] .nav-user-link:hover,
        [data-theme="dark"] .nav-user-link.is-loading {
            background: #3d3330;
            border-color: #5e4540;
            color: #e8d0c8;
        }
        [data-theme="dark"] .logout-form--dropdown button {
            background: #332b28;
            border-color: #4a3730;
            color: #d4b4a8;
        }
        [data-theme="dark"] .logout-form--dropdown button:hover,
        [data-theme="dark"] .logout-form--dropdown button.is-loading {
            background: #3d3330;
            border-color: #5e4540;
            color: #e8d0c8;
        }
        [data-theme="dark"] .nav-btn {
            --btn-bg: #2e2825;
            --btn-border: #4a3730;
            --btn-text: #d4b4a8;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
        }
        [data-theme="dark"] .mobile-theme-toggle {
            background: rgba(46, 40, 37, 0.92);
            border-color: #4a3730;
            color: #d4b4a8;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
        }
        [data-theme="dark"] .mobile-theme-toggle:hover {
            background: rgba(61, 51, 48, 0.95);
            border-color: #5e4540;
            color: #f0e0d8;
        }
        [data-theme="dark"] .nav-btn:hover {
            background: #3d3330;
            border-color: #5e4540;
            color: #f0e0d8;
        }
        [data-theme="dark"] nav a { color: #e09a7e; }
        [data-theme="dark"] .nav-ask:hover { color: #f0e8e4; }
        [data-theme="dark"] nav a:hover { color: #f0e8e4; }
        [data-theme="dark"] .nav-btn:hover {
            background: #3d3330;
            border-color: #5e4540;
            color: #f0e0d8;
        }

        [data-theme="dark"] .flash-message {
            background: #2e2420;
            border-color: #4a3730;
            color: #d4c0b8;
            box-shadow: 0 8px 22px rgba(0,0,0,0.35);
        }
        [data-theme="dark"] .flash-message.is-error,
        [data-theme="dark"] .flash-message[data-level="error"] {
            background: #3a2222;
            border-color: #6a3535;
            color: #f0c0b8;
        }
        [data-theme="dark"] .flash-message.is-success,
        [data-theme="dark"] .flash-message[data-level="success"] {
            background: #1e2e22;
            border-color: #2e5435;
            color: #a8e0b8;
        }

        [data-theme="dark"] .notif-panel {
            background: #2a2320;
            border-color: #4a3730;
            box-shadow: 0 10px 32px rgba(0,0,0,0.45);
        }
        [data-theme="dark"] .notif-panel-header {
            border-bottom-color: #3d3330;
        }
        [data-theme="dark"] .notif-panel-title { color: #e0d0c8; }
        [data-theme="dark"] .notif-hdr-btn {
            background: #332b28;
            border-color: #4a3730;
            color: #d4b4a8;
        }
        [data-theme="dark"] .notif-hdr-btn:hover { background: #3d3330; color: #f0e0d8; }
        [data-theme="dark"] .notif-hdr-btn--danger {
            background: #3a2222;
            border-color: #6a3535;
            color: #f0a0a0;
        }
        [data-theme="dark"] .notif-hdr-btn--danger:hover { background: #4a2a2a; color: #f8b8b8; }
        [data-theme="dark"] .notif-confirm-dialog {
            background: #2a2320;
            border-color: #4a3730;
            box-shadow: 0 24px 54px rgba(0,0,0,0.48);
        }
        [data-theme="dark"] .notif-confirm-title { color: #f0e8e4; }
        [data-theme="dark"] .notif-confirm-copy { color: #c4b0a8; }
        [data-theme="dark"] .notif-confirm-btn {
            background: #332b28;
            border-color: #4a3730;
            color: #d4b4a8;
        }
        [data-theme="dark"] .notif-confirm-btn:hover {
            background: #3d3330;
            border-color: #5e4540;
            color: #f0e0d8;
        }
        [data-theme="dark"] .notif-confirm-btn--danger {
            background: #432d2d;
            border-color: #6d4545;
            color: #f0b0b0;
        }
        [data-theme="dark"] .notif-confirm-btn--danger:hover {
            background: #523434;
            border-color: #7a4d4d;
            color: #ffd2d2;
        }
        [data-theme="dark"] .notif-detail-dialog {
            background: #2a2320;
            border-color: #4a3730;
            box-shadow: 0 24px 54px rgba(0,0,0,0.48);
        }
        [data-theme="dark"] .notif-detail-header {
            border-bottom-color: #3d3330;
        }
        [data-theme="dark"] .notif-detail-title {
            color: #f0e8e4;
        }
        [data-theme="dark"] .notif-detail-time {
            color: #8f7a73;
        }
        [data-theme="dark"] .notif-detail-message {
            color: #c4b0a8;
        }
        [data-theme="dark"] .notif-detail-close {
            background: #332b28;
            border-color: #4a3730;
            color: #d4b4a8;
        }
        [data-theme="dark"] .notif-detail-close:hover {
            background: #3d3330;
            border-color: #5e4540;
            color: #f0e0d8;
        }
        [data-theme="dark"] .notif-item { border-bottom-color: #3d3330; }
        [data-theme="dark"] .notif-item:hover { background: #2e2825; }
        [data-theme="dark"] .notif-item.is-unread { background: #2c2522; }
        [data-theme="dark"] .notif-item.is-unread:hover { background: #352e2a; }
        [data-theme="dark"] .notif-item-title { color: #e8d8d0; }
        [data-theme="dark"] .notif-item.is-read .notif-item-title { color: #a09090; }
        [data-theme="dark"] .notif-item-msg { color: #a09090; }
        [data-theme="dark"] .notif-item-time { color: #7a6a64; }
        [data-theme="dark"] .notif-empty-msg { color: #6a5a54; }

        [data-theme="dark"] .notif-toast {
            background: #2e2825;
            border-color: #4a3730;
            color: #d4c0b8;
            box-shadow: 0 8px 22px rgba(0,0,0,0.35);
        }
        [data-theme="dark"] .notif-toast-text .notif-toast-title { color: #e8d8d0; }
        [data-theme="dark"] .notif-toast-text .notif-toast-msg { color: #a09090; }

        [data-theme="dark"] .auth-wrap {
            background: #2a2320;
            border-color: #4a3730;
        }
        [data-theme="dark"] .auth-wrap h2 { color: #e09a7e; }
        [data-theme="dark"] .auth-wrap p { color: #a09080; }
        [data-theme="dark"] .auth-form label { color: #b0a098; }
        [data-theme="dark"] textarea,
        [data-theme="dark"] input[type="text"],
        [data-theme="dark"] input[type="email"],
        [data-theme="dark"] input[type="password"] {
            background: #332f2c;
            border-color: #4a3f3c;
            color: #f0e8e4;
        }
        [data-theme="dark"] .card {
            background: #2c2724;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        }
        [data-theme="dark"] .prompt-modal-backdrop {
            background: rgba(9, 7, 6, 0.55);
        }
        [data-theme="dark"] .prompt-modal-dialog {
            border-color: #4a3730;
            background: linear-gradient(180deg, rgba(43, 37, 34, 0.93) 0%, rgba(36, 31, 28, 0.94) 100%), url('../images/promptBG.png');
            background-size: auto, cover;
            background-position: center, center;
            background-attachment: scroll, fixed;
            background-color: #241f1c;
            box-shadow: 0 28px 60px rgba(0, 0, 0, 0.48);
        }
        [data-theme="dark"] .prompt-modal-header,
        [data-theme="dark"] .prompt-modal-form {
            background: rgba(36, 30, 28, 0.9);
            border-color: #3d3330;
        }
        [data-theme="dark"] .prompt-modal-title {
            color: #ecdad2;
        }
        [data-theme="dark"] .prompt-modal-expand {
            background: #332b28;
            border-color: #4a3730;
            color: #d9b5a7;
        }
        [data-theme="dark"] .prompt-modal-expand:hover {
            background: #3f342e;
            border-color: #5a483f;
        }
        [data-theme="dark"] .prompt-modal-close {
            background: #332b28;
            border-color: #4a3730;
            color: #d9b5a7;
        }
        [data-theme="dark"] .prompt-modal-chat {
            background: radial-gradient(circle at 12% 4%, rgba(74, 57, 48, 0.35) 0%, rgba(46, 38, 34, 0.75) 45%, rgba(36, 30, 28, 0.88) 100%);
        }
        [data-theme="dark"] .prompt-modal-chat:empty::before {
            color: #b39589;
        }
        [data-theme="dark"] .prompt-modal-message--user {
            background: linear-gradient(135deg, #5c3f35 0%, #8c5b49 100%);
            color: #f5e6df;
        }
        [data-theme="dark"] .prompt-modal-message--ai {
            background: #2f2926;
            border-color: #4a3f3c;
            color: #efdcd4;
        }
        [data-theme="dark"] .prompt-modal-form textarea {
            background: #322c29;
            border-color: #4a3f3c;
            color: #f0e8e4;
        }
        [data-theme="dark"] .prompt-modal-limit-note {
            color: #b99e94;
        }
        [data-theme="dark"] .prompt-modal-limit-note a {
            color: #e0ab95;
        }
        [data-theme="dark"] #prompt-modal-stop {
            background: #4b3932;
            color: #e0c5ba;
        }
        @media (max-width: 1024px) {
            [data-theme="dark"] nav {
                border-color: rgba(255, 255, 255, 0.2);
                border-top-color: rgba(255, 255, 255, 0.28);
                background: linear-gradient(140deg, rgba(44, 37, 33, 0.78), rgba(29, 24, 22, 0.6));
                box-shadow:
                    0 -12px 34px rgba(0, 0, 0, 0.38),
                    inset 0 1px 0 rgba(255, 255, 255, 0.1);
            }
            [data-theme="dark"] nav::before {
                border-color: rgba(255, 255, 255, 0.1);
            }
            [data-theme="dark"] .nav-btn,
            [data-theme="dark"] .nav-user-trigger,
            [data-theme="dark"] .nav-btn:hover,
            [data-theme="dark"] .nav-user-trigger:hover,
            [data-theme="dark"] .nav-user-trigger:active {
                background: transparent;
                border-color: transparent;
                box-shadow: none;
            }
        }

        .onboarding-walkthrough {
            position: fixed;
            right: 18px;
            bottom: calc(var(--nav-height) + 18px);
            z-index: 92;
            width: min(360px, calc(100vw - 24px));
            pointer-events: none;
        }
        .onboarding-card {
            pointer-events: auto;
            border-radius: 18px;
            border: 1px solid #f0c9b8;
            background: linear-gradient(160deg, #fffdf9 0%, #fff3ea 100%);
            box-shadow: 0 18px 34px rgba(120, 78, 58, 0.18);
            padding: 14px;
        }
        .onboarding-kicker {
            margin: 0;
            font-size: 0.68rem;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: #c57452;
            font-weight: 700;
        }
        .onboarding-journey-tagline {
            margin: 6px 0 0;
            font-size: 0.76rem;
            line-height: 1.3;
            color: #9e7463;
            font-weight: 600;
        }
        .onboarding-title {
            margin: 8px 0 0;
            font-size: 1.02rem;
            color: #5f3f34;
            font-weight: 700;
            line-height: 1.25;
        }
        .onboarding-copy {
            margin: 6px 0 0;
            color: #7f5b4b;
            font-size: 0.86rem;
            line-height: 1.35;
        }
        .onboarding-progress-row {
            margin-top: 12px;
            display: grid;
            gap: 6px;
        }
        .onboarding-progress-track {
            height: 7px;
            border-radius: 999px;
            background: #f4ddd1;
            overflow: hidden;
        }
        .onboarding-progress-track > span {
            display: block;
            height: 100%;
            border-radius: inherit;
            background: linear-gradient(90deg, #ef966f 0%, #d06949 100%);
            transition: width 0.3s ease;
        }
        .onboarding-progress-label {
            font-size: 0.74rem;
            color: #9a6f5d;
            font-weight: 600;
        }
        .onboarding-dots {
            display: flex;
            align-items: center;
            gap: 5px;
            margin-top: 8px;
        }
        .onboarding-dot {
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: #e9c6b8;
        }
        .onboarding-dot.is-active {
            width: 18px;
            background: #d97e5c;
        }
        .onboarding-dot.is-complete {
            background: #6ca978;
        }
        .onboarding-actions {
            margin-top: 12px;
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 8px;
        }
        .onboarding-btn {
            border: 1px solid #e6bca9;
            border-radius: 10px;
            background: #fff7f2;
            color: #7a5242;
            padding: 8px 10px;
            font: inherit;
            font-size: 0.81rem;
            font-weight: 600;
            cursor: pointer;
        }
        .onboarding-btn--primary {
            border-color: #d87856;
            background: linear-gradient(140deg, #eb8f68 0%, #cc6644 100%);
            color: #fff;
        }
        .onboarding-footer {
            margin-top: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
        }
        .onboarding-link {
            border: 0;
            background: transparent;
            color: #8b6454;
            font: inherit;
            font-size: 0.76rem;
            font-weight: 600;
            cursor: pointer;
            padding: 2px 0;
        }
        .onboarding-link--danger {
            color: #b35f4b;
        }
        .onboarding-spotlight-target {
            position: relative;
            z-index: 93;
            outline: 3px solid rgba(227, 132, 94, 0.55);
            outline-offset: 3px;
            border-radius: 10px;
            transition: outline-color 0.2s ease;
        }

        [data-theme="dark"] .onboarding-card {
            background: linear-gradient(160deg, #312723 0%, #251e1b 100%);
            border-color: #4a3730;
            box-shadow: 0 18px 34px rgba(0, 0, 0, 0.44);
        }
        [data-theme="dark"] .onboarding-kicker {
            color: #ef9f7b;
        }
        [data-theme="dark"] .onboarding-journey-tagline {
            color: #bb9a8f;
        }
        [data-theme="dark"] .onboarding-title {
            color: #f0ddd5;
        }
        [data-theme="dark"] .onboarding-copy {
            color: #c8aba0;
        }
        [data-theme="dark"] .onboarding-progress-track {
            background: #3f302b;
        }
        [data-theme="dark"] .onboarding-progress-label {
            color: #b99589;
        }
        [data-theme="dark"] .onboarding-dot {
            background: #62473f;
        }
        [data-theme="dark"] .onboarding-btn {
            border-color: #5a433a;
            background: #2f2623;
            color: #dfbfb3;
        }
        [data-theme="dark"] .onboarding-btn--primary {
            border-color: #d87856;
            background: linear-gradient(140deg, #eb8f68 0%, #c45f3f 100%);
            color: #fff;
        }
        [data-theme="dark"] .onboarding-link {
            color: #bb9a8f;
        }
        [data-theme="dark"] .onboarding-link--danger {
            color: #d88f77;
        }

        @media (max-width: 1024px) {
            .onboarding-walkthrough {
                left: 12px;
                right: 12px;
                bottom: calc(var(--nav-height) + 10px);
                width: auto;
            }
            .onboarding-card {
                border-radius: 15px;
                padding: 12px;
            }
        }
