/* Duo : lagon + hibiscus. Une seule couleur vive (hibiscus) pour ce qui demande l'attention. */

:root {
    color-scheme: light dark;
    --bg: #edf3f1;
    --surface: #ffffff;
    --ink: #12292b;
    --muted: #587073;
    --line: #d5e0dd;
    --lagoon: #0f5257;
    --on-lagoon: #ffffff;
    --hibiscus: #c92a64;
    --on-hibiscus: #ffffff;
    --wall: #e2ece9;
    --bubble-in: #ffffff;
    --font: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    --radius: 18px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0a1415;
        --surface: #122325;
        --ink: #e5f0ee;
        --muted: #8ca5a6;
        --line: #223739;
        --lagoon: #1a6a70;
        --hibiscus: #f0568a;
        --on-hibiscus: #1b0610;
        --wall: #0d1b1c;
        --bubble-in: #1a2e30;
    }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.45 var(--font);
    -webkit-tap-highlight-color: transparent;
}

h1, h2, p { margin: 0; }
a { color: var(--lagoon); }
@media (prefers-color-scheme: dark) { a { color: #7fd0d4; } }

:focus-visible { outline: 3px solid var(--hibiscus); outline-offset: 2px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

/* ---------- Logo ---------- */
.logo { color: var(--lagoon); flex: none; }
.logo-a { fill: currentColor; }
.logo-b { fill: var(--hibiscus); fill-opacity: .88; }
@media (prefers-color-scheme: dark) { .logo { color: #7fd0d4; } }

/* ---------- Barre du haut ---------- */
.topbar {
    position: sticky; top: 0; z-index: 5;
    display: flex; align-items: center; gap: 8px;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    background: var(--lagoon); color: var(--on-lagoon);
}
.topbar .logo { color: var(--on-lagoon); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { margin-left: auto; display: flex; flex: none; gap: 4px; }
.topbar-title { font-size: 18px; font-weight: 700; }

.icon-btn {
    display: inline-grid; place-items: center; flex: none;
    width: 44px; height: 44px; border: 0; border-radius: 50%;
    background: transparent; color: inherit; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: rgb(255 255 255 / .12); }
.composer .icon-btn { color: var(--muted); }
.composer .icon-btn:hover { background: var(--bg); }

/* ---------- Coquille ---------- */
.side { min-width: 0; }
.side-scroll { min-width: 0; }
.side .brand { color: inherit; text-decoration: none; }
.side .topbar .logo { color: var(--on-lagoon); }

.tabs-nav {
    display: flex; gap: 4px; padding: 8px 12px;
    background: var(--surface); border-bottom: 1px solid var(--line);
}
.tab {
    flex: 1; min-height: 38px; padding: 0 10px; border: 0; border-radius: 999px;
    background: transparent; color: var(--muted); font: inherit; font-size: 14px;
    font-weight: 700; cursor: pointer; white-space: nowrap;
}
.tab:hover { background: var(--bg); }
.tab.is-active { background: color-mix(in srgb, var(--lagoon) 14%, transparent); color: var(--lagoon); }

.empty-pane { display: none; }

/* Sur mobile, la sidebar du chat est remplacée par la conversation plein écran. */
.shell-chat .side { display: none; }

@media (min-width: 900px) {
    .shell {
        display: grid;
        grid-template-columns: 360px minmax(0, 1fr);
        height: 100dvh;
        overflow: hidden;
    }

    .shell .side {
        display: flex; flex-direction: column; min-height: 0;
        background: var(--surface); border-right: 1px solid var(--line);
    }
    .shell .side-scroll {
        flex: 1; min-height: 0;
        overflow-y: auto; overscroll-behavior: contain;
    }
    .shell .side .topbar { position: static; }
    .shell .side .page { max-width: none; padding: 16px 14px calc(24px + env(safe-area-inset-bottom)); }
    .shell .side .greeting { font-size: 14px; margin-bottom: 10px; }

    .shell-chat .side { display: flex; }
    .shell-chat .chat-wrap { min-width: 0; min-height: 0; display: grid; }
    .shell-chat .chat { width: 100%; max-width: none; height: 100%; margin: 0; }
    .shell-chat .chat-head { gap: 12px; padding: calc(8px + env(safe-area-inset-top)) 20px 8px; }
    .shell-chat .chat-head h1 { font-size: 19px; }
    .shell-chat .chat-head > .chat-back { display: none; }
    .shell-chat .messages { width: 100%; max-width: 920px; margin-inline: auto; padding: 24px 20px; }
    .shell-chat .msg { max-width: min(78%, 680px); }
    .shell-chat .composer { padding-inline: max(12px, calc((100% - 920px) / 2)); }

    .shell-home .empty-pane {
        display: grid; place-items: center; padding: 32px;
        background: var(--bg);
    }
    .empty-pane-inner { display: grid; justify-items: center; gap: 12px; max-width: 340px; text-align: center; }
    .empty-pane-inner .logo { color: var(--lagoon); }
    .empty-pane-inner h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
    .empty-pane-inner .muted { font-size: 15px; }
    .empty-pane-inner .btn { margin-top: 8px; }
}

/* ---------- Pages ---------- */
.page { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); }
.greeting { font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.block { margin-bottom: 24px; }
.block h2 { font-size: 14px; font-weight: 700; color: var(--muted); margin: 0 4px 8px; }

.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row {
    display: flex; align-items: center; gap: 12px; min-width: 0;
    padding: 12px 14px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius);
    color: inherit; text-decoration: none;
}
.row-link:hover { border-color: var(--lagoon); }
.row-link { text-decoration: none; color: inherit; }
.row form, .row .icon-btn { flex: none; }
.row-main { flex: 1; min-width: 0; display: grid; }
.row-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main .muted { font-size: 14px; }
.preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { flex: none; display: grid; justify-items: end; gap: 4px; font-size: 12px; }

.avatar {
    flex: none; display: grid; place-items: center;
    width: 44px; height: 44px; border-radius: 50%;
    background: hsl(var(--hue, 180) 42% 36%); color: #fff;
    font-weight: 700; font-size: 18px;
}
.avatar-group { background: var(--lagoon); color: var(--on-lagoon); }
.avatar-wrap { position: relative; flex: none; display: inline-grid; }
.presence { position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: #1f9d63; border: 2px solid var(--surface); }
.presence-text { flex: none; font-size: 12px; font-weight: 700; color: #1f8f5b; }

.badge {
    min-width: 22px; padding: 1px 7px; border-radius: 999px;
    background: var(--hibiscus); color: var(--on-hibiscus);
    font-size: 12px; font-weight: 700; text-align: center;
}
.pill { padding: 4px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 13px; white-space: nowrap; }
.pill-admin { background: color-mix(in srgb, var(--lagoon) 16%, transparent); color: var(--lagoon); font-weight: 700; }
.pill-danger { background: color-mix(in srgb, var(--hibiscus) 16%, transparent); color: var(--hibiscus); font-weight: 700; }
.row-status { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }

.empty { display: grid; gap: 8px; justify-items: start; padding: 24px 4px; }

.hint { margin: 16px 4px; }

.danger-zone { padding: 16px; border: 1px solid color-mix(in srgb, var(--hibiscus) 35%, var(--line)); border-radius: var(--radius); }

/* ---------- Boutons et champs ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
    font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--lagoon); color: var(--on-lagoon); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-quiet { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.btn-danger { background: var(--hibiscus); color: var(--on-hibiscus); }
.btn-danger:hover { filter: brightness(1.08); }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 14px; }

.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.form small { font-weight: 400; color: var(--muted); }
input[type="email"], input[type="password"], input[type="text"], input[type="search"], textarea {
    width: 100%; min-height: 46px; padding: 10px 14px;
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--line); border-radius: 14px;
    font: inherit; font-size: 16px; /* 16px évite le zoom automatique sur iPhone */
}
.password-field { position: relative; display: flex; align-items: center; }
.password-field input { padding-right: 52px; width: 100%; }
.password-toggle-btn {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted);
    display: grid; place-items: center; cursor: pointer; border-radius: 8px;
}
.password-toggle-btn:hover { background: var(--bg); color: var(--ink); }
.password-toggle-btn .icon-eye-off { display: none; }
.password-toggle-btn[aria-label="Masquer"] .icon-eye { display: none; }
.password-toggle-btn[aria-label="Masquer"] .icon-eye-off { display: block; }
.form-error, .composer-error:not(:empty) {
    padding: 10px 14px; border-radius: 12px;
    background: color-mix(in srgb, var(--hibiscus) 14%, transparent);
    color: var(--ink); font-size: 14px;
}

.search { display: flex; gap: 8px; }
.search input { flex: 1; }

/* ---------- Connexion / inscription ---------- */
.auth { max-width: 400px; margin: 0 auto; padding: calc(48px + env(safe-area-inset-top)) 20px 32px; display: grid; gap: 28px; }
.auth-brand { display: grid; justify-items: center; gap: 8px; text-align: center; }
.auth-brand h1 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.auth-brand p { color: var(--muted); }
.alt { text-align: center; color: var(--muted); }

/* ---------- Messagerie ---------- */
body.is-chat { overflow: hidden; }
.chat { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; height: 100dvh; max-width: 760px; margin: 0 auto; background: var(--wall); }
.chat-head {
    display: flex; align-items: center; gap: 10px; min-width: 0;
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
    background: var(--lagoon); color: var(--on-lagoon);
}
.chat-title { flex: 1; min-width: 0; display: grid; gap: 1px; }
.chat-head h1 { min-width: 0; font-size: 18px; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-add, .chat-call, .chat-participants { flex: none; }
.chat-head .avatar { width: 38px; height: 38px; font-size: 16px; }
.chat-presence { min-width: 0; font-size: 12px; line-height: 1.2; opacity: .82; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chat-scroll { overflow-y: auto; overscroll-behavior: contain; }
.messages { display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; min-height: 100%; justify-content: flex-end; }
.chat-empty { align-self: center; color: var(--muted); padding: 24px; text-align: center; }

.day { align-self: center; margin: 10px 0 6px; font-size: 12px; color: var(--muted); }
.day span { padding: 3px 12px; border-radius: 999px; background: var(--surface); }

.msg { max-width: 82%; display: flex; }
.msg-mine { align-self: flex-end; }
.msg-theirs { align-self: flex-start; }
.messages .msg-system { display: block; align-self: center; max-width: min(92%, 640px); margin: 4px auto; text-align: center; }
.msg-system .system-text { display: inline-block; max-width: 100%; padding: 5px 12px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12.5px; line-height: 1.4; }

@media (max-width: 480px) {
    .chat-head { gap: 8px; padding-inline: 10px; }
    .chat-head h1 { font-size: 17px; }
    .chat-head .avatar { width: 34px; height: 34px; font-size: 15px; }
    .messages { padding-inline: 10px; }
    .msg { max-width: 88%; }
}

.bubble {
    position: relative; min-width: 64px; padding: 8px 12px 6px;
    border-radius: 18px; overflow-wrap: anywhere;
    box-shadow: 0 1px 0 rgb(0 0 0 / .06);
}
.msg-mine .bubble { background: var(--lagoon); color: var(--on-lagoon); border-bottom-right-radius: 5px; }
.msg-theirs .bubble { background: var(--bubble-in); color: var(--ink); border-bottom-left-radius: 5px; }
.bubble-sender { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 700; opacity: .78; }
.bubble .text { white-space: pre-wrap; }
.bubble time { display: block; margin-top: 2px; text-align: right; font-size: 11px; opacity: .72; }
.bubble-receipt { display: block; margin-top: 1px; text-align: right; font-size: 11px; opacity: .8; }

.bubble-img { display: block; max-width: min(280px, 100%); max-height: 320px; border-radius: 12px; margin-bottom: 4px; }
.bubble-audio { display: block; width: 240px; max-width: 100%; height: 40px; margin: 2px 0 4px; }
.file-card {
    display: flex; align-items: center; gap: 10px; padding: 6px 2px;
    color: inherit; text-decoration: none;
}
.file-card span { display: grid; min-width: 0; }
.file-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.file-card small { opacity: .75; }

/* ---------- Zone de saisie ---------- */
.composer {
    display: grid; gap: 6px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line);
}
.composer-error:empty { display: none; }
.composer-row, .recorder { display: flex; align-items: flex-end; gap: 6px; }
.composer textarea { flex: 1; min-height: 44px; max-height: 140px; resize: none; border-radius: 22px; background: var(--bg); line-height: 1.35; }

.send-btn {
    display: inline-grid; place-items: center; flex: none;
    width: 44px; height: 44px; border: 0; border-radius: 50%;
    background: var(--hibiscus); color: var(--on-hibiscus); cursor: pointer;
}
.send-btn:hover { filter: brightness(1.08); }

.chip {
    display: flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%;
    padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--bg); font-size: 14px;
}
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; width: 28px; height: 28px; border-radius: 50%; }

.recorder { align-items: center; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--hibiscus); animation: pulse 1.2s ease-in-out infinite; }
.rec-label { flex: 1; color: var(--muted); }
.rec-timer { font-variant-numeric: tabular-nums; font-weight: 700; }

@keyframes pulse { 50% { opacity: .25; } }

/* ---------- Notifications ---------- */
.toast {
    position: fixed; z-index: 20; left: 50%; top: calc(12px + env(safe-area-inset-top));
    translate: -50% 0; max-width: calc(100% - 32px);
    padding: 10px 16px; border-radius: 14px;
    background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600;
    animation: toast 4.5s ease forwards; pointer-events: none;
}
@keyframes toast {
    0% { opacity: 0; translate: -50% -8px; }
    8%, 85% { opacity: 1; translate: -50% 0; }
    100% { opacity: 0; translate: -50% 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    .rec-dot { animation: none; }
    .toast { animation-duration: 4.5s; animation-name: toast-fade; }
    @keyframes toast-fade { 0%, 90% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
}

/* ---------- Appels vocaux ---------- */
.call-overlay {
    position: fixed; inset: 0; z-index: 40;
    display: grid; place-items: center;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    background: rgb(5 18 20 / .62);
    backdrop-filter: blur(3px);
}
.call-card {
    display: grid; justify-items: center; gap: 10px;
    width: min(340px, 100%);
    padding: 30px 24px 26px;
    border-radius: 28px;
    background: var(--surface); color: var(--ink);
    box-shadow: 0 24px 70px rgb(0 0 0 / .35);
    text-align: center;
}
.call-avatar { width: 84px; height: 84px; border-radius: 50%; font-size: 32px; margin-bottom: 4px; }
.call-name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.call-status { font-size: 15px; color: var(--muted); }
.call-timer { font-size: 22px; font-weight: 700; color: var(--lagoon); font-variant-numeric: tabular-nums; }
.call-actions { display: flex; justify-content: center; gap: 22px; margin-top: 14px; }
.call-btn {
    display: grid; place-items: center;
    width: 62px; height: 62px; border: 0; border-radius: 50%;
    background: var(--muted); color: #fff; cursor: pointer;
}
.call-btn:hover { filter: brightness(1.08); }
.call-accept { background: #1f9d63; }
.call-decline, .call-hangup { background: #d93a4a; }
.call-mute { background: var(--bg); color: var(--ink); }
.call-mute[aria-pressed="true"] { background: var(--hibiscus); color: var(--on-hibiscus); }
.call-mute .icon-mic-off { display: none; }
.call-mute[aria-pressed="true"] .icon-mic { display: none; }
.call-mute[aria-pressed="true"] .icon-mic-off { display: block; }
.call-overlay.is-ringing .call-avatar { animation: call-ring 1.6s ease-out infinite; }
@keyframes call-ring {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--hibiscus) 45%, transparent); }
    70% { box-shadow: 0 0 0 18px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) {
    .call-overlay.is-ringing .call-avatar { animation: none; }
}

/* ---------- Modales ---------- */
.modal {
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: 0; border: 0; border-radius: 24px;
    background: var(--surface); color: var(--ink);
    box-shadow: 0 24px 70px rgb(0 0 0 / .35);
}
.modal::backdrop { background: rgb(5 18 20 / .55); backdrop-filter: blur(2px); }
.modal[open] { animation: modal-in .16s ease-out; }
@keyframes modal-in {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
}
.modal-inner { display: grid; gap: 18px; padding: 20px; }
.modal-head { display: flex; align-items: flex-start; gap: 12px; }
.modal-head h2 { font-size: 20px; line-height: 1.2; letter-spacing: -.02em; }
.modal-head .muted { margin-top: 4px; font-size: 14px; }
.modal-close { margin: -8px -8px 0 auto; color: var(--muted); }
.modal-actions { display: grid; gap: 10px; }
.modal-actions.is-row { grid-template-columns: 1fr 1fr; }

.participants-list { max-height: min(52vh, 420px); overflow-y: auto; padding-right: 2px; }
.participants-list .row { padding: 8px 10px; }
.btn-remove { flex: none; color: var(--hibiscus); border-color: color-mix(in srgb, var(--hibiscus) 30%, var(--line)); }

.share-options { display: grid; gap: 10px; }
.share-option {
    display: flex; align-items: center; gap: 14px;
    padding: 14px; border: 1px solid var(--line); border-radius: 16px;
    background: var(--surface); color: inherit; text-decoration: none;
}
.share-option:hover { border-color: var(--lagoon); background: color-mix(in srgb, var(--lagoon) 6%, var(--surface)); }
.share-icon {
    display: grid; place-items: center; flex: none;
    width: 44px; height: 44px; border-radius: 14px;
    background: var(--bg); color: var(--lagoon);
}
.share-icon-whatsapp { background: color-mix(in srgb, #25d366 16%, var(--surface)); color: #128c4b; }
.share-copy { display: grid; gap: 1px; min-width: 0; }
.share-copy strong { font-size: 15px; }
.share-copy .muted { font-size: 13px; }
.share-url {
    padding: 10px 12px; border-radius: 12px; background: var(--bg);
    color: var(--muted); font-size: 13px; overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
    .modal[open] { animation: none; }
}

/* ---------- Verrouillage et profil ---------- */
.lock-auth { padding-top: calc(54px + env(safe-area-inset-top)); }
.lock-mark {
    display: grid; place-items: center; width: 76px; height: 76px;
    border-radius: 28px; background: color-mix(in srgb, var(--lagoon) 12%, var(--surface));
    color: var(--lagoon);
}

.is-lock { background: var(--lagoon); }
.lock-screen {
    min-height: 100dvh; width: 100%; max-width: 420px; margin: 0 auto;
    display: grid; align-content: center; gap: 24px;
    padding: calc(40px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom));
    color: var(--on-lagoon); text-align: center;
}
.lock-brand { display: grid; justify-items: center; gap: 10px; }
.lock-brand .logo { color: var(--on-lagoon); }
.lock-brand h1 { font-size: 27px; font-weight: 800; letter-spacing: -.03em; }
.lock-brand p { color: rgb(255 255 255 / .74); max-width: 320px; }
.lock-form { gap: 12px; }
.lock-code {
    min-height: 62px !important; text-align: center;
    font-size: 28px !important; letter-spacing: 12px; font-weight: 700;
    background: rgb(255 255 255 / .1) !important; color: var(--on-lagoon) !important;
    border-color: rgb(255 255 255 / .25) !important;
}
.lock-code::placeholder { color: rgb(255 255 255 / .45); letter-spacing: 8px; }
.lock-screen .btn-primary { background: var(--on-lagoon); color: var(--lagoon); }
.lock-screen .btn-quiet { background: rgb(255 255 255 / .1); color: var(--on-lagoon); border-color: rgb(255 255 255 / .24); }
.lock-fingerprint { display: inline-flex; gap: 8px; margin: 0 auto; }
.lock-status { min-height: 22px; color: #ffd2e0; font-size: 14px; }
.lock-alt { color: rgb(255 255 255 / .66); font-size: 14px; }
.lock-alt a { color: var(--on-lagoon); }

.profile { display: grid; gap: 8px; }
.profile .block { margin-bottom: 10px; }
.form-card {
    display: grid; gap: 14px; padding: 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.profile-id { margin-bottom: 10px; }
.profile-section { gap: 12px; }
.profile-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.profile-section-head strong { display: block; }
.profile-section-head .muted { font-size: 14px; }
.switch-row { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch-row input { width: 20px; height: 20px; margin: 0; accent-color: var(--lagoon); flex: none; }
.switch-row input:disabled { cursor: not-allowed; opacity: .55; }
.profile-details { border-top: 1px solid var(--line); padding-top: 12px; }
.profile-details summary { cursor: pointer; font-weight: 700; color: var(--lagoon); }
@supports (color: color-mix(in srgb, red 50%, blue)) {
    @media (prefers-color-scheme: dark) { .profile-details summary { color: #7fd0d4; } }
}
.profile-details[open] summary { margin-bottom: 12px; }
.profile-details .form { margin-top: 4px; }
.passkey-list { margin-top: 4px; }
.passkey-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--bg); color: var(--lagoon); }
.form-status { min-height: 20px; color: var(--hibiscus); font-size: 14px; }

.notice {
    display: flex; align-items: center; gap: 12px;
    padding: 14px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface);
}
.notice > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.notice .muted { font-size: 13px; }
