:root {
            --r0: #2a0712;
            --r1: #4a0a1b;
            --r2: #7a1631;
            --r3: #b01f46;
            --r4: #ff4f86;
            --cream: #fff4ea;
            --cream2: #ffe7dc;
            --ink: #12060b;
            --muted: rgba(18,6,11,.64);
            --glass: rgba(255,244,234,.85);
            --glass-border: rgba(176,31,70,.14);
            --shadow: 0 26px 80px rgba(10,1,6,.15);
            --shadow-sm: 0 10px 26px rgba(0,0,0,.08);
            --serif: "Fraunces", ui-serif, Georgia, serif;
            --sans: "Inter", system-ui, -apple-system, sans-serif;
            --nav-offset: 18px;
            --nav-height: 68px;
            --vue-gap: 14px;
            --content-top: 150px;
			--mobile-top-reserve: 0px;
        }

        * { box-sizing: border-box; }
        html, body { height: 100%; scroll-behavior: smooth; }

        body {
            margin: 0;
            font-family: var(--sans);
            color: var(--ink);
            background: transparent;
            padding-top: var(--content-top);
            overflow-x: hidden;
            -webkit-tap-highlight-color: transparent;
        }

        body.search-open {
            overflow: hidden;
        }

        body::before {
            content: "";
            position: fixed;
            inset: 0;
            z-index: -3;
            background:
                radial-gradient(900px 560px at 18% 10%, rgba(255,79,134,.15), transparent 60%),
                radial-gradient(820px 560px at 82% 18%, rgba(176,31,70,.12), transparent 62%),
                radial-gradient(980px 620px at 55% 95%, rgba(122,22,49,.10), transparent 62%),
                linear-gradient(180deg, #fff7f1, var(--cream2));
        }

        body::after {
            content: "";
            position: fixed;
            inset: 0;
            z-index: -2;
            opacity: .06;
            mix-blend-mode: multiply;
            pointer-events: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
        }

        .aurora {
            position: fixed;
            inset: -20%;
            pointer-events: none;
            z-index: -1;
            filter: blur(28px);
            opacity: .58;
            background:
                radial-gradient(520px 380px at 18% 18%, rgba(255,79,134,.22), transparent 65%),
                radial-gradient(620px 420px at 82% 28%, rgba(176,31,70,.18), transparent 66%),
                radial-gradient(520px 420px at 55% 82%, rgba(122,22,49,.14), transparent 66%);
            animation: drift 18s ease-in-out infinite;
        }

        @keyframes drift {
            0%, 100% { transform: translate3d(0,0,0) scale(1); }
            50% { transform: translate3d(2%, -2%, 0) scale(1.03); }
        }

        button, select, input {
            touch-action: manipulation;
            font: inherit;
        }

#navigation {
    position: fixed;
    top: calc(var(--nav-offset) + env(safe-area-inset-top, 0px) + var(--mobile-top-reserve));
    left: 0;
    right: 0;
    max-width: 800px;
    margin: 0 auto;
    background: var(--glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    padding: 12px 18px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    width: min(90%, 800px);
    transition: transform .4s cubic-bezier(.25,.8,.25,1), opacity .3s ease;
    will-change: transform;
}

        #navigation.nav-hidden {
            transform: translateY(calc(-100% - 30px));
            opacity: 0;
            pointer-events: none;
        }

        #navigation button {
            border: 0;
            border-radius: 999px;
            padding: 10px 18px;
            font-size: 14px;
            font-weight: 700;
            color: #ffffff;
            cursor: pointer;
            background: linear-gradient(180deg, rgba(255,79,134,.98), rgba(176,31,70,.92));
            box-shadow: 0 8px 16px rgba(176,31,70,.16);
            transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            flex-shrink: 0;
            min-height: 44px;
        }

        #navigation button svg {
            width: 16px;
            height: 16px;
            transition: transform .3s cubic-bezier(.175,.885,.32,1.275);
            flex-shrink: 0;
        }

        #navigation button:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 14px 24px rgba(176,31,70,.25);
            filter: brightness(1.05);
        }

        #navigation button:hover:not(:disabled) svg { transform: scale(1.12); }

        #navigation button:active:not(:disabled) {
            transform: translateY(1px) scale(.98);
            box-shadow: 0 4px 8px rgba(176,31,70,.15);
        }

        #navigation button:disabled {
            background: rgba(18,6,11,.15);
            color: rgba(255,255,255,.6);
            box-shadow: none;
            cursor: not-allowed;
            opacity: .6;
        }

        #navigation .nav-icon-button {
            width: 44px;
            min-width: 44px;
            height: 44px;
            padding: 0;
            background: rgba(255,255,255,.52);
            color: var(--r2);
            border: 1px solid rgba(176,31,70,.12);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 18px rgba(0,0,0,.05);
        }

        #navigation .nav-icon-button:hover:not(:disabled) {
            background: rgba(255,255,255,.72);
            filter: none;
            box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 12px 24px rgba(176,31,70,.10);
        }

        #navigation .nav-icon-button svg {
            width: 18px;
            height: 18px;
        }

.chapter-picker {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    flex: 1;
    margin: 0 4px;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 300px;
    min-width: 220px;
    background: rgba(255,255,255,.52);
    border: 1px solid rgba(176,31,70,.12);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 18px rgba(0,0,0,.05);
    transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
    overflow: hidden;
    min-height: 44px;
}

        .select-wrapper:hover {
            transform: translateY(-1px);
            border-color: rgba(176,31,70,.22);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 12px 24px rgba(176,31,70,.10);
        }

        .select-wrapper:focus-within {
            border-color: rgba(255,79,134,.42);
            box-shadow: 0 0 0 4px rgba(255,79,134,.12), inset 0 1px 0 rgba(255,255,255,.65), 0 12px 26px rgba(176,31,70,.12);
            background: rgba(255,255,255,.72);
        }

        #infoPageSelect {
            width: 100%;
            min-width: 0;
            font-family: var(--serif);
            font-size: 18px;
            font-weight: 700;
            color: var(--r2);
            letter-spacing: .01em;
            background: transparent;
            border: none;
            outline: none;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            padding: 13px 46px 13px 20px;
            text-align: center;
            text-align-last: center;
        }

        #infoPageSelect option {
            color: var(--ink);
            background: #fffaf6;
            font-family: var(--sans);
            font-weight: 600;
            font-size: 15px;
        }

        .select-icon {
            position: absolute;
            right: 14px;
            width: 16px;
            height: 16px;
            color: var(--r2);
            pointer-events: none;
            opacity: .9;
            transition: transform .2s ease, opacity .2s ease;
        }

        .select-wrapper:hover .select-icon,
        .select-wrapper:focus-within .select-icon {
            transform: translateY(1px) scale(1.08);
            opacity: 1;
        }

#vueToggle {
    position: fixed;
    top: calc(var(--nav-offset) + env(safe-area-inset-top, 0px) + var(--mobile-top-reserve) + var(--nav-height) + var(--vue-gap));
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,244,234,.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--r2);
    box-shadow: 0 8px 18px rgba(0,0,0,.08);
    cursor: pointer;
    z-index: 990;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform .35s cubic-bezier(.25,.8,.25,1), opacity .25s ease, box-shadow .25s ease, background .25s ease;
    min-height: 40px;
    max-width: min(92vw, 420px);
    width: max-content;
    will-change: transform;
}

        #vueToggle:hover {
            background: #ffffff;
            box-shadow: 0 8px 20px rgba(176,31,70,.12);
            transform: translateX(-50%) translateY(-2px);
        }

        #vueToggle:active { transform: translateX(-50%) translateY(1px) scale(.97); }
        #vueToggle svg { width: 14px; height: 14px; flex-shrink: 0; }
		#vueToggle span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#infoPageSelect {
    text-overflow: ellipsis;
}
#navigation .nav-icon-button,
#darkToggle {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
}
#vueToggle {
    max-width: 800px;
}
        #vueToggle.nav-hidden {
            transform: translate(-50%, calc(-100% - 100px));
            opacity: 0;
            pointer-events: none;
        }

        #chatbox {
            max-width: 800px;
            margin: 0 auto 40px auto;
            padding: 25px 20px;
            border-radius: 28px;
            background: rgba(255,244,234,.4);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,.5);
            box-shadow: var(--shadow);
            display: flex;
            flex-direction: column;
            width: 92%;
            min-height: 80vh;
        }

        .message-row {
            display: flex;
            align-items: flex-end;
            width: 100%;
            margin-bottom: 24px;
            gap: 10px;
        }

        .message-row.moi { justify-content: flex-end; }
        .message-row.elle { justify-content: flex-start; }

        .pfp {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            object-fit: cover;
            box-shadow: var(--shadow-sm);
            border: 1px solid rgba(176,31,70,.1);
            animation: popIn .35s cubic-bezier(.175,.885,.32,1.275) backwards;
            flex-shrink: 0;
        }

        .message {
            padding: 12px 16px;
            max-width: 75%;
            line-height: 1.5;
            font-size: 15px;
            position: relative;
            overflow-wrap: anywhere;
            box-shadow: var(--shadow-sm);
            animation: popIn .35s cubic-bezier(.175,.885,.32,1.275) backwards;
        }

        @keyframes popIn {
            from { opacity: 0; transform: translateY(10px) scale(.98); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        .moi .message {
            background: linear-gradient(135deg, rgba(255,79,134,.98), rgba(176,31,70,.92));
            color: #ffffff;
            border-radius: 22px 22px 4px 22px;
        }

        .elle .message {
            background: rgba(255,255,255,.95);
            color: var(--ink);
            border: 1px solid rgba(176,31,70,.08);
            border-radius: 22px 22px 22px 4px;
        }


		
		
		.message {
    padding-bottom: 26px;
}

.message.message-voice-only {
    padding: 0 0 26px 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none;
    width: fit-content;
    max-width: min(78vw, 360px);
    overflow: visible;
}



.timestamp {
    font-size: .68em;
    display: block;
    margin-top: 8px;
    text-align: right;
    opacity: .78;
    font-weight: 700;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.moi .timestamp {
    color: rgba(255,255,255,.84);
}

.elle .timestamp {
    color: var(--muted);
}

@keyframes popReact {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
}

body.dark-mode .reaction {
    border-color: rgba(255,255,255,.10);
    box-shadow:
        0 8px 18px rgba(0,0,0,.24),
        inset 0 1px 0 rgba(255,255,255,.04);
}

body.dark-mode .moi .reaction,
body.dark-mode .elle .reaction {
    background: rgba(35, 29, 48, .96);
    color: #ff8fb1;
}

@media (max-width: 600px) {
    .message {
        padding-bottom: 24px;
    }

    .message.message-voice-only {
        padding-bottom: 24px;
		max-width: min(72vw, 300px);
    }

    .reaction {
        min-width: 26px;
        height: 26px;
        font-size: 13px;
        bottom: 20px;
    }

    .moi .reaction {
        left: -8px;
    }

    .elle .reaction {
        right: -8px;
    }

    .timestamp {
        font-size: .66em;
        margin-top: 7px;
    }
}
		
		
		
		


        .message-text { margin: 0; white-space: pre-wrap; }

		
		.message-body {
    position: relative;
}

.message-body > .message-text:last-child,
.message-body > .message-media-stack:last-child,
.message-body > .voice-note:last-child {
    margin-bottom: 10px;
}

.reaction {
    position: absolute;
    bottom: -55px;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 14px;
    line-height: 1;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.82);
    box-shadow:
        0 8px 18px rgba(0,0,0,.14),
        inset 0 1px 0 rgba(255,255,255,.45);
    animation: popReact .25s cubic-bezier(.175,.885,.32,1.275) backwards;
    animation-delay: .15s;
}

.moi .reaction {
    left: -10px;
    background: rgba(255,255,255,.92);
    color: var(--r3);
}

.elle .reaction {
    right: -10px;
    background: rgba(255,255,255,.94);
    color: var(--r3);
    border-color: rgba(176,31,70,.14);
}

body.dark-mode .reaction {
    border-color: rgba(255,255,255,.10);
    box-shadow:
        0 8px 18px rgba(0,0,0,.24),
        inset 0 1px 0 rgba(255,255,255,.04);
}

body.dark-mode .moi .reaction,
body.dark-mode .elle .reaction {
    background: rgba(35, 29, 48, .96);
    color: #ff8fb1;
}

@media (max-width: 600px) {
    .reaction {
        min-width: 26px;
        height: 26px;
        font-size: 13px;
        bottom: -52px;
    }

    .moi .reaction {
        left: -8px;
    }

    .elle .reaction {
        right: -8px;
    }
}
		

		.message-media-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.media-card {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 14px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.elle .media-card {
    background: transparent;
    border-color: rgba(255,255,255,.10);
}

.moi .media-card {
    background: transparent;
    border-color: rgba(255,255,255,.12);
}

.media-card img,
.media-card video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 0;
}

.media-card img {
    cursor: zoom-in;
}

.media-card.video-card {
    padding: 0;
    background: rgba(16, 8, 12, .18);
}

.media-card.video-card video {
    background: #000;
    max-height: min(62vh, 520px);
}

.moi .media-caption {
    color: rgba(255,255,255,.88);
}

.elle .media-caption {
    color: var(--muted);
}

.media-badge {
    display: none !important;
}

.media-card::after {
    content: none;
}

.zoomable-img,
.media-video,
.media-audio,
.media-gif {
    margin-top: 0;
    border-radius: 0;
    transition: transform .25s ease, filter .25s ease;
}

.media-card:hover img,
.media-card:hover video {
    filter: brightness(1.02);
}

.media-card:hover .zoomable-img {
    transform: scale(1.01);
}

.media-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.media-grid-2 .media-card {
    margin: 0;
}

.missing-media {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 12.5px;
    line-height: 1.45;
    font-style: italic;
    background: rgba(0,0,0,.06);
    border: 1px dashed rgba(176,31,70,.3);
    opacity: .88;
}

.moi .missing-media {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.35);
    color: rgba(255,255,255,.92);
}

.elle .missing-media {
    color: var(--muted);
}

@media (max-width: 600px) {
    .message-media-stack {
        gap: 8px;
    }

    .media-card {
        border-radius: 14px;
    }

    .media-card.video-card video {
        max-height: 48vh;
    }

    .media-card.audio-card {
        padding: 8px;
    }

    .media-caption {
        font-size: 11.5px;
        padding: 7px 9px 9px;
    }

    .media-badge {
        top: 8px;
        left: 8px;
        padding: 5px 8px;
        font-size: 10px;
    }

    .media-grid-2 {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Dark mode médias */
body.dark-mode .elle .media-card {
    background: transparent;
    border-color: rgba(255,255,255,.08);
}

body.dark-mode .moi .media-card {
    background: transparent;
    border-color: rgba(255,255,255,.10);
}

body.dark-mode .media-card.video-card {
    background: transparent;
}

body.dark-mode .media-badge {
    background: rgba(0,0,0,.45);
    border-color: rgba(255,255,255,.14);
}

body.dark-mode .elle .media-caption {
    color: rgba(245,237,243,.68);
}

		
		
		/* ===== LECTEUR VOCAL STYLE INSTAGRAM ===== */
.voice-note {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    padding: 12px 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
    border: 1px solid rgba(255,255,255,.12);
}

		

.moi .message.message-voice-only .timestamp {
    color: rgba(255,255,255,.82);
}

.elle .message.message-voice-only .timestamp {
    color: var(--muted);
}

.message.message-voice-only .message-text:empty {
    display: none;
}

.moi .message.message-voice-only .voice-note {
    background: linear-gradient(135deg, rgba(255,79,134,.98), rgba(176,31,70,.92));
    color: #fff;
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: var(--shadow-sm);
}

.elle .message.message-voice-only .voice-note {
    background: rgba(255,255,255,.96);
    color: var(--ink);
    border: 1px solid rgba(176,31,70,.10);
    box-shadow: var(--shadow-sm);
}

body.dark-mode .elle .message.message-voice-only .voice-note {
    background: rgba(28, 24, 37, .96);
    color: #f5edf3;
    border-color: rgba(255,255,255,.08);
}

.moi .message.message-voice-only .voice-play {
    background: rgba(255,255,255,.16);
    color: #fff;
}

.elle .message.message-voice-only .voice-play {
    background: rgba(18,6,11,.08);
    color: var(--ink);
}

body.dark-mode .elle .message.message-voice-only .voice-play {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.moi .message.message-voice-only .voice-bar {
    background: rgba(255,255,255,.95);
}

.elle .message.message-voice-only .voice-bar {
    background: rgba(18,6,11,.78);
}

body.dark-mode .elle .message.message-voice-only .voice-bar {
    background: rgba(255,255,255,.82);
}

.moi .message.message-voice-only .voice-progress {
    background: rgba(255,255,255,.22);
}

.elle .message.message-voice-only .voice-progress {
    background: rgba(18,6,11,.10);
}

body.dark-mode .elle .message.message-voice-only .voice-progress {
    background: rgba(255,255,255,.10);
}

.moi .message.message-voice-only .voice-progress-fill {
    background: rgba(255,255,255,.98);
}

.elle .message.message-voice-only .voice-progress-fill {
    background: linear-gradient(135deg, rgba(255,79,134,.98), rgba(176,31,70,.92));
}
		
		
		
.moi .voice-note {
    background: linear-gradient(135deg, #6f2cff, #4b2df5);
    color: #fff;
}

.elle .voice-note {
    background: rgba(255,255,255,.92);
    color: var(--ink);
    border-color: rgba(176,31,70,.10);
}

body.dark-mode .elle .voice-note {
    background: rgba(30, 25, 41, .92);
    color: #f5edf3;
    border-color: rgba(255,255,255,.08);
}

.voice-note-main {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.voice-play {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform .18s ease, opacity .18s ease;
}

.voice-play:hover {
    transform: scale(1.04);
}

.voice-play:active {
    transform: scale(.97);
}

.moi .voice-play {
    background: rgba(255,255,255,.18);
    color: #fff;
}

.elle .voice-play {
    background: rgba(18,6,11,.08);
    color: var(--ink);
}

body.dark-mode .elle .voice-play {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.voice-play svg {
    width: 22px;
    height: 22px;
    display: block;
}

.voice-wave-wrap {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.voice-wave {
    position: relative;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 3px;
    overflow: hidden;
}

.voice-bar {
    width: 5px;
    border-radius: 999px;
    flex: 0 0 auto;
    opacity: .92;
    transition: opacity .2s ease, transform .2s ease;
}

.moi .voice-bar {
    background: rgba(255,255,255,.95);
}

.elle .voice-bar {
    background: rgba(18,6,11,.78);
}

body.dark-mode .elle .voice-bar {
    background: rgba(255,255,255,.82);
}

.voice-bar.played {
    opacity: 1;
}

.voice-progress {
    position: relative;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    cursor: pointer;
    overflow: hidden;
}

.moi .voice-progress {
    background: rgba(255,255,255,.22);
}

.elle .voice-progress {
    background: rgba(18,6,11,.10);
}

body.dark-mode .elle .voice-progress {
    background: rgba(255,255,255,.10);
}

.voice-progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    border-radius: inherit;
    transition: width .08s linear;
}

.moi .voice-progress-fill {
    background: rgba(255,255,255,.98);
}

.elle .voice-progress-fill {
    background: linear-gradient(135deg, rgba(255,79,134,.98), rgba(176,31,70,.92));
}

.voice-time {
    min-width: 52px;
    text-align: right;
    font-size: 11px;
    font-weight: 800;
    opacity: .92;
    font-variant-numeric: tabular-nums;
}

.voice-native-audio {
    display: none;
}

@media (max-width: 600px) {
.voice-note {
    padding: 10px 12px 9px;
    border-radius: 18px;
}

.voice-note-main {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 8px;
}

.voice-play {
    width: 40px;
    height: 40px;
}

.voice-wave {
    height: 34px;
    gap: 3px;
}

.voice-bar {
    width: 4px;
}

.voice-time {
    min-width: 46px;
    font-size: 10.5px;
}
		}		
		
		

        .system-msg {
            text-align: center;
            color: var(--r2);
            font-family: var(--serif);
            font-weight: 700;
            font-size: 18px;
            margin: auto 0;
            padding: 24px 10px;
        }

        .chapter-summary {
            text-align: center;
            margin-bottom: 20px;
            color: var(--r2);
            font-family: var(--serif);
            font-size: 18px;
            font-weight: 700;
        }

        .photoLightbox {
            position: fixed;
            inset: 0;
            z-index: 1900;
            display: none;
            place-items: center;
            padding: 16px;
            background: rgba(10,2,7,.65);
            backdrop-filter: blur(12px);
        }

        .photoLightbox.show {
            display: grid;
            animation: fadeIn .25s;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .photoLightboxCard {
            width: min(92vw, 720px);
            background: rgba(255,244,234,.96);
            border: 1px solid rgba(176,31,70,.22);
            border-radius: 22px;
            box-shadow: 0 28px 90px rgba(0,0,0,.26);
            overflow: hidden;
            position: relative;
        }

        .photoLightboxCard img {
            width: 100%;
            height: auto;
            display: block;
        }

        .photoClose {
            position: absolute;
            top: 10px;
            right: 10px;
            border: 0;
            border-radius: 999px;
            padding: 10px 12px;
            cursor: pointer;
            font-weight: 900;
            background: rgba(255,244,234,.95);
            border: 1px solid rgba(176,31,70,.20);
            box-shadow: 0 14px 30px rgba(0,0,0,.12);
            color: var(--r2);
            transition: transform .2s;
            min-width: 40px;
            min-height: 40px;
        }

        .photoClose:hover { transform: scale(1.05); }

        .search-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(10,2,7,.24);
            backdrop-filter: blur(2px);
            opacity: 0;
            pointer-events: none;
            z-index: 1490;
            transition: opacity .25s ease;
        }

        .search-backdrop.open {
            opacity: 1;
            pointer-events: auto;
        }

        .search-panel {
            position: fixed;
            top: 18px;
            right: 18px;
            width: min(420px, calc(100vw - 24px));
            height: calc(100vh - 36px);
            max-height: calc(100svh - 36px);
            background: rgba(255,244,234,.94);
            backdrop-filter: blur(18px);
            -webkit-backdrop-filter: blur(18px);
            border: 1px solid var(--glass-border);
            border-radius: 28px;
            box-shadow: 0 24px 80px rgba(10,1,6,.18);
            z-index: 1600;
            display: flex;
            flex-direction: column;
            transform: translateX(calc(100% + 30px));
            opacity: 0;
            pointer-events: none;
            transition: transform .35s cubic-bezier(.25,.8,.25,1), opacity .25s ease;
            contain: layout paint style;
        }

        .search-panel.open {
            transform: translateX(0);
            opacity: 1;
            pointer-events: auto;
        }

        .search-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 16px;
            padding: 22px 22px 16px;
            border-bottom: 1px solid rgba(176,31,70,.10);
        }

        .search-panel-kicker {
            font-size: 11px;
            font-weight: 800;
            letter-spacing: .12em;
            text-transform: uppercase;
            color: rgba(122,22,49,.66);
            margin-bottom: 6px;
        }

        .search-panel-header h2 {
            margin: 0;
            font-family: var(--serif);
            font-size: 28px;
            color: var(--r2);
        }

        .search-close {
            border: 0;
            background: rgba(255,255,255,.55);
            border: 1px solid rgba(176,31,70,.12);
            color: var(--r2);
            width: 40px;
            height: 40px;
            border-radius: 999px;
            cursor: pointer;
            font-size: 16px;
            font-weight: 800;
            flex-shrink: 0;
        }

        .search-panel-body {
            padding: 18px 22px calc(22px + env(safe-area-inset-bottom, 0px));
            overflow: auto;
            display: flex;
            flex-direction: column;
            gap: 16px;
            overscroll-behavior: contain;
        }

        .search-field label {
            display: block;
            margin-bottom: 7px;
            font-size: 12px;
            font-weight: 700;
            color: rgba(122,22,49,.78);
        }

        .search-field input,
        .search-field select {
            width: 100%;
            border: 1px solid rgba(176,31,70,.12);
            background: rgba(255,255,255,.62);
            color: var(--ink);
            border-radius: 16px;
            padding: 12px 14px;
            font-size: 14px;
            outline: none;
            box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
            min-height: 46px;
        }

        .search-field input:focus,
        .search-field select:focus {
            border-color: rgba(255,79,134,.38);
            box-shadow: 0 0 0 4px rgba(255,79,134,.10);
        }

        .search-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .search-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .filter-chip {
            border: 1px solid rgba(176,31,70,.12);
            background: rgba(255,255,255,.58);
            color: var(--r2);
            border-radius: 999px;
            padding: 9px 12px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            transition: all .2s ease;
            min-height: 40px;
        }

        .filter-chip.active {
            color: #fff;
            background: linear-gradient(135deg, rgba(255,79,134,.98), rgba(176,31,70,.92));
            border-color: transparent;
            box-shadow: 0 10px 18px rgba(176,31,70,.18);
        }

        .search-actions {
            display: flex;
            gap: 10px;
        }

        .search-actions button {
            border: 0;
            border-radius: 16px;
            padding: 12px 14px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            min-height: 46px;
        }

        #searchRun {
            background: linear-gradient(135deg, rgba(255,79,134,.98), rgba(176,31,70,.92));
            color: #fff;
            flex: 1;
        }

        #searchReset {
            background: rgba(255,255,255,.55);
            color: var(--r2);
            border: 1px solid rgba(176,31,70,.12);
        }

        .search-status {
            font-size: 13px;
            color: var(--muted);
            min-height: 18px;
        }

        .search-results {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .search-empty {
            padding: 16px;
            font-size: 14px;
            color: var(--muted);
            background: rgba(255,255,255,.38);
            border: 1px solid rgba(176,31,70,.08);
            border-radius: 18px;
        }

        .search-result {
            background: rgba(255,255,255,.58);
            border: 1px solid rgba(176,31,70,.10);
            border-radius: 18px;
            padding: 14px;
            cursor: pointer;
            transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
        }

        .search-result:hover {
            transform: translateY(-2px);
            border-color: rgba(176,31,70,.20);
            box-shadow: 0 14px 30px rgba(176,31,70,.08);
        }

        .search-result-top {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 4px;
            font-size: 12px;
            color: var(--muted);
            font-weight: 700;
        }

        .search-result-name {
            color: var(--r2);
        }

        .search-result-time {
            font-size: 12px;
            color: var(--muted);
            margin-bottom: 8px;
        }

        .search-result-text {
            font-size: 14px;
            line-height: 1.45;
            color: var(--ink);
            word-break: break-word;
        }

        .search-result-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 10px;
        }

        .search-tag {
            font-size: 11px;
            font-weight: 800;
            padding: 5px 8px;
            border-radius: 999px;
            background: rgba(176,31,70,.10);
            color: var(--r2);
        }

        .message.search-hit {
            outline: 3px solid rgba(255,79,134,.28);
            outline-offset: 3px;
            box-shadow: 0 0 0 8px rgba(255,79,134,.08), var(--shadow-sm);
        }
.message.search-hit {
    outline: 3px solid rgba(255,79,134,.30);
    outline-offset: 3px;
    box-shadow: 0 0 0 10px rgba(255,79,134,.10), var(--shadow-sm);
    animation: searchPulse 1.4s ease;
}

@keyframes searchPulse {
    0% {
        transform: scale(0.985);
        box-shadow: 0 0 0 0 rgba(255,79,134,.00), var(--shadow-sm);
    }
    30% {
        transform: scale(1.015);
        box-shadow: 0 0 0 14px rgba(255,79,134,.16), var(--shadow-sm);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255,79,134,.10), var(--shadow-sm);
    }
}
        ::-webkit-scrollbar { width: 10px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: rgba(176,31,70,.2); border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: rgba(176,31,70,.4); }

        @media (max-width: 720px) {
            body::after { opacity: .03; }
            .aurora {
                opacity: .32;
                filter: blur(18px);
            }

            #navigation,
            #vueToggle,
            #chatbox,
            .search-panel {
                backdrop-filter: blur(10px);
                -webkit-backdrop-filter: blur(10px);
            }

            #chatbox {
                box-shadow: 0 14px 34px rgba(10,1,6,.10);
            }
        }

@media (max-width: 600px) {
    :root {
        --nav-offset: 10px;
        --vue-gap: 10px;
    }

    #navigation {
        width: calc(100% - 12px);
        padding: 7px;
        gap: 6px;
        display: grid;
        grid-template-columns: 42px 42px minmax(0, 1fr) 42px 42px;
        align-items: center;
        border-radius: 22px;
    }

    #btnPrecedent { grid-column: 1; }
    #darkToggle { grid-column: 2; }
    .chapter-picker { grid-column: 3; }
    #searchToggle { grid-column: 4; }
    #btnSuivant { grid-column: 5; }

    #navigation button {
        width: 42px;
        min-width: 42px;
        height: 42px;
        min-height: 42px;
        padding: 0;
        font-size: 0;
        gap: 0;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    #navigation button svg {
        width: 17px;
        height: 17px;
        flex-shrink: 0;
    }

    .chapter-picker {
        min-width: 0;
        width: 100%;
        margin: 0;
        display: block;
    }

    .select-wrapper {
        width: 100%;
        min-width: 0;
        max-width: none;
        min-height: 42px;
        border-radius: 16px;
        display: flex;
        align-items: center;
    }

    #infoPageSelect {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        font-size: 14px;
        padding: 10px 34px 10px 12px;
        text-align: center;
        text-align-last: center;
    }

    #vueToggle {
        width: calc(100% - 12px);
        max-width: calc(100% - 12px);
        min-height: 42px;
        padding: 8px 14px;
        font-size: 12px;
        border-radius: 22px;
    }

    #chatbox {
        padding: 15px 10px;
        width: calc(100% - 10px);
        border-radius: 24px;
    }

    .message {
        max-width: 85%;
        font-size: 14px;
    }

    .pfp {
        width: 26px;
        height: 26px;
    }

    .search-panel {
        top: calc(8px + env(safe-area-inset-top, 0px));
        right: 8px;
        left: 8px;
        width: auto;
        height: calc(100svh - 16px - env(safe-area-inset-top, 0px));
        border-radius: 22px;
    }

    .search-grid {
        grid-template-columns: 1fr;
    }

    .search-actions {
        flex-direction: column;
    }

    .search-panel-header h2 {
        font-size: 24px;
    }
}


		
		
@media (max-width: 430px) {
    #navigation {
        width: calc(100% - 10px);
        padding: 6px;
        gap: 5px;
        grid-template-columns: 40px 40px minmax(0, 1fr) 40px 40px;
        border-radius: 20px;
    }

    #navigation button {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
    }

    #navigation button svg,
    #darkToggle svg {
        width: 16px;
        height: 16px;
    }

    .select-wrapper {
        min-height: 40px;
        border-radius: 15px;
    }

    #infoPageSelect {
        font-size: 13px;
        padding: 9px 30px 9px 10px;
    }

    #vueToggle {
        width: calc(100% - 10px);
        max-width: calc(100% - 10px);
        min-height: 40px;
        padding-inline: 12px;
    }

    #chatbox {
        width: calc(100% - 8px);
    }
}
        @media (prefers-reduced-motion: reduce) {
            html, body { scroll-behavior: auto; }
            .aurora { animation: none; }
            .message, .pfp, .reaction, .photoLightbox.show {
                animation: none !important;
            }
            #navigation,
            #vueToggle,
            .search-panel,
            .search-backdrop,
            .select-wrapper,
            .search-result,
            #navigation button,
            #darkToggle,
            .zoomable-img {
                transition: none !important;
            }
        }

        /* DARK MODE */
        body.dark-mode {
            --cream: #111118;
            --cream2: #181822;
            --ink: #f5edf3;
            --muted: rgba(245, 237, 243, .68);
            --glass: rgba(23, 20, 31, .84);
            --glass-border: rgba(255, 112, 161, .16);
            --shadow: 0 30px 90px rgba(0,0,0,.42);
            --shadow-sm: 0 12px 28px rgba(0,0,0,.28);
            background: #0e0d14;
        }

        body.dark-mode::before {
            background:
                radial-gradient(900px 560px at 18% 10%, rgba(255,79,134,.16), transparent 60%),
                radial-gradient(820px 560px at 82% 18%, rgba(176,31,70,.16), transparent 62%),
                radial-gradient(980px 620px at 55% 95%, rgba(122,22,49,.18), transparent 62%),
                linear-gradient(180deg, #120f18, #0b0a11);
        }

        body.dark-mode::after {
            opacity: .09;
            mix-blend-mode: screen;
        }

        body.dark-mode .aurora {
            opacity: .42;
        }

        body.dark-mode #navigation,
        body.dark-mode #vueToggle,
        body.dark-mode #darkToggle,
        body.dark-mode #chatbox,
        body.dark-mode .photoLightboxCard {
            color: var(--ink);
        }

        body.dark-mode #navigation {
            background: rgba(19, 16, 26, .82);
            border-color: rgba(255,255,255,.08);
            box-shadow: 0 12px 34px rgba(0,0,0,.32);
        }

        body.dark-mode #navigation button {
            color: #ffffff;
        }

        body.dark-mode #navigation .nav-icon-button {
            background: rgba(24, 20, 33, .88);
            border-color: rgba(255,255,255,.08);
            color: #ffd9e6;
            box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 10px 24px rgba(0,0,0,.24);
        }

        body.dark-mode #navigation .nav-icon-button:hover:not(:disabled) {
            background: rgba(30, 25, 41, .96);
            border-color: rgba(255,255,255,.12);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 12px 28px rgba(0,0,0,.28);
            filter: none;
        }

        body.dark-mode #infoPageSelect,
        body.dark-mode .select-icon,
        body.dark-mode #vueToggle,
        body.dark-mode .chapter-summary,
        body.dark-mode .system-msg,
        body.dark-mode .photoClose {
            color: #ffd9e6;
        }

        body.dark-mode #infoPageSelect option {
            background: #17131f;
            color: #f5edf3;
        }

        body.dark-mode #vueToggle {
            background: rgba(21, 18, 29, .9);
            border-color: rgba(255,255,255,.08);
            box-shadow: 0 8px 24px rgba(0,0,0,.28);
        }

        body.dark-mode #vueToggle:hover {
            background: rgba(31, 26, 42, .96);
        }

        body.dark-mode #chatbox {
            background: rgba(15, 13, 21, .64);
            border-color: rgba(255,255,255,.07);
        }

        body.dark-mode .elle .message {
            background: rgba(28, 24, 37, .96);
            color: #f5edf3;
            border-color: rgba(255,255,255,.06);
        }

        body.dark-mode .elle .timestamp {
            color: rgba(245, 237, 243, .58);
        }

        body.dark-mode .reaction {
            background: rgba(26, 22, 35, .92);
            border-color: rgba(255,255,255,.08);
            box-shadow: 0 8px 20px rgba(0,0,0,.28);
        }

        body.dark-mode .missing-media {
            background: rgba(255,255,255,.05);
            border-color: rgba(255,255,255,.14);
            color: rgba(245, 237, 243, .78);
        }

        body.dark-mode .moi .missing-media {
            background: rgba(255,255,255,.12);
            border-color: rgba(255,255,255,.2);
        }

        body.dark-mode .photoLightbox {
            background: rgba(4, 3, 8, .82);
        }

        body.dark-mode .photoLightboxCard {
            background: rgba(20, 17, 28, .96);
            border-color: rgba(255,255,255,.08);
        }

        body.dark-mode .photoClose {
            background: rgba(30, 25, 40, .96);
            border-color: rgba(255,255,255,.08);
        }

        body.dark-mode ::-webkit-scrollbar-thumb {
            background: rgba(255, 112, 161, .28);
        }

        body.dark-mode ::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 112, 161, .42);
        }

        body.dark-mode .select-wrapper {
            background: rgba(24, 20, 33, .88);
            border-color: rgba(255,255,255,.08);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 10px 24px rgba(0,0,0,.24);
        }

        body.dark-mode .select-wrapper:hover {
            background: rgba(30, 25, 41, .96);
            border-color: rgba(255,255,255,.12);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 12px 28px rgba(0,0,0,.28);
        }

        body.dark-mode .select-wrapper:focus-within {
            background: rgba(34, 28, 46, .98);
            border-color: rgba(255,112,161,.34);
            box-shadow: 0 0 0 4px rgba(255,112,161,.12), 0 12px 28px rgba(0,0,0,.30);
        }

        body.dark-mode #infoPageSelect {
            color: #ffd9e6;
        }

        body.dark-mode .select-icon {
            color: #ffd9e6;
        }


        body.dark-mode #darkToggle {
            background: rgba(21, 18, 29, .92);
            border-color: rgba(255,255,255,.08);
            box-shadow: 0 10px 24px rgba(0,0,0,.32);
        }

        body.dark-mode #darkToggle svg {
            stroke: #fff;
        }
#darkToggle svg {
    width: 18px;
    height: 18px;
    transition: opacity .25s ease, transform .25s ease;
}

body:not(.dark-mode) #darkToggle .sun {
    display: none;
}

body.dark-mode #darkToggle .moon {
    display: none;
}
        #darkToggle .sun { display: none; }

        body.dark-mode #darkToggle .sun { display: block; }
        body.dark-mode #darkToggle .moon { display: none; }

        body.dark-mode .search-backdrop {
            background: rgba(3,2,8,.42);
        }

        body.dark-mode .search-panel {
            background: rgba(17, 14, 24, .94);
            border-color: rgba(255,255,255,.08);
            box-shadow: 0 24px 80px rgba(0,0,0,.34);
        }

        body.dark-mode .search-panel-header {
            border-bottom-color: rgba(255,255,255,.06);
        }

        body.dark-mode .search-panel-kicker {
            color: rgba(255,217,230,.68);
        }

        body.dark-mode .search-panel-header h2 {
            color: #ffd9e6;
        }

        body.dark-mode .search-close,
        body.dark-mode .search-field input,
        body.dark-mode .search-field select,
        body.dark-mode #searchReset,
        body.dark-mode .filter-chip,
        body.dark-mode .search-result,
        body.dark-mode .search-empty {
            background: rgba(30, 25, 41, .92);
            border-color: rgba(255,255,255,.08);
            color: #f5edf3;
        }

        body.dark-mode .search-field label,
        body.dark-mode .search-status,
        body.dark-mode .search-result-top,
        body.dark-mode .search-result-time,
        body.dark-mode .search-empty {
            color: rgba(245,237,243,.68);
        }

        body.dark-mode .search-result-name,
        body.dark-mode .search-tag {
            color: #ffd9e6;
        }

        body.dark-mode .search-tag {
            background: rgba(255,112,161,.12);
        }

        body.dark-mode .search-result-text {
            color: #f5edf3;
        }