.acts{position:sticky;bottom:calc(var(--nav-height) + 8px);z-index:10;background:#2b0a47ed;border-radius:48px;padding:8px;margin:12px 0;backdrop-filter:blur(8px)}
.gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:14px 0}.gallery img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:14px}.interest{display:inline-block;padding:6px 11px;margin:3px;border-radius:99px;background:#ffffff20;font-size:13px}.filter-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.filter-grid label{font-size:13px}.filter-grid input{margin-top:4px}.gold{color:#f3c450;display:inline-flex;vertical-align:middle}.camera-preview{width:100%;border-radius:18px;max-height:55vh;object-fit:cover;transform:scaleX(-1)}.step-line{display:flex;gap:6px;margin:18px 0}.step-line i{height:5px;background:#ffffff30;flex:1;border-radius:4px}.step-line i.on{background:var(--pk)}.notification-link{position:relative;color:inherit;text-decoration:none;margin-left:auto;margin-right:14px}.notification-count{position:absolute;top:-10px;right:-10px}.profile-cover-photo{content-visibility:auto}button:disabled{opacity:.6;cursor:wait}a:focus-visible,button:focus-visible{outline:3px solid #ffb9dd;outline-offset:3px}

/* Conversation claire inspirée du modèle fourni. */
#app:has(.chat-view){background:#fff;color:#25262a;position:fixed;inset:var(--screen-top) 0 auto;width:100%;height:var(--screen-height,100dvh);padding:0 0 var(--nav-height);animation:none;min-height:0;display:flex;flex-direction:column;color-scheme:light}
.chat-view{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
body:has(.chat-view){overflow:hidden}
.chat-view>.chat-header,.chat-view>.chat-footer{position:relative;top:auto;bottom:auto;flex:none}
.chat-view>.chat-header{padding-top:calc(12px + var(--safe-top))}
.chat-header{position:sticky;top:0;z-index:12;display:flex;align-items:center;gap:10px;min-height:82px;padding:12px 14px;border-bottom:1px solid #e9e9ed;background:#fffffff5;backdrop-filter:blur(12px)}
.chat-back{display:grid;place-items:center;flex:none;width:32px;height:44px;background:none;border:0;color:#44474c;cursor:pointer;padding:0}
.chat-person{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none;min-width:0;flex:1}
.chat-person .ava{width:48px;height:48px;flex:none;border:0;background-color:#f7e6f0;color:#a52f6d}
.chat-person>span{min-width:0}.chat-person strong{display:block;font-size:19px;overflow-wrap:anywhere;line-height:1.2}.chat-person strong svg{display:inline-block;vertical-align:middle}.chat-person small{display:block;color:#80838a;font-size:12px;margin-top:4px}
.chat-menu{position:relative;flex:none}.chat-menu summary{cursor:pointer;list-style:none;font-size:28px;padding:0 5px;color:#555861}.chat-menu summary::-webkit-details-marker{display:none}.chat-menu>div{position:absolute;right:0;top:42px;width:180px;background:white;border:1px solid #ececf0;border-radius:14px;box-shadow:0 8px 28px #24123818;padding:5px}.chat-menu button{display:block;width:100%;border:0;background:none;text-align:left;font:inherit;font-size:14px;padding:12px;color:#a2224d;cursor:pointer}
.chat-thread{display:flex;flex-direction:column;align-items:flex-start;flex:1;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scroll-padding-block:16px;padding:clamp(4px,calc(var(--screen-height,100dvh) * .025),22px) 16px clamp(4px,calc(var(--screen-height,100dvh) * .035),30px);overflow-wrap:anywhere;min-width:0}
.chat-message{flex-shrink:0;align-self:flex-start;max-width:85%;min-width:0;margin:0 0 12px;padding:10px 13px;background:#e1f1fc;color:#173e61;border-radius:18px 18px 18px 4px;box-shadow:0 1px 2px #173e6110}
.chat-message.is-mine{align-self:flex-end;background:#ef3862;color:#fff;border-radius:18px 18px 4px 18px}
.chat-message-meta{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:baseline;margin-bottom:5px}.chat-message-meta b{font-size:12px;overflow-wrap:anywhere}.chat-message-meta time{font-size:10px;margin-left:auto;white-space:nowrap;opacity:.85}
.chat-message p{margin:0;font-size:16px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-empty{align-self:stretch;text-align:center;color:#777d86;padding:80px 12px;font-size:17px}.chat-empty p{font-size:14px;line-height:1.6}
.chat-footer{max-height:clamp(64px,calc(100% - 130px - var(--safe-top)),60%);overflow-y:auto;overscroll-behavior-y:contain;z-index:11;background:#fff;border-top:1px solid #f0f0f3;padding:8px 12px 12px}
.chat-quota{font-size:11px;color:#858992;text-align:center;margin:0 0 7px}
.chat-composer{display:flex;gap:8px;align-items:center}.chat-composer input{min-width:0;border:1px solid #dedfe4;border-radius:28px;padding:12px 16px;margin:0;background:#fff;font-size:16px;color:#25262a}.chat-composer input::placeholder{color:#989da6}.chat-composer button{display:grid;place-items:center;width:46px;height:46px;flex:none;border:0;border-radius:50%;background:#ef3862;color:#fff;cursor:pointer}.chat-composer input:focus-visible{outline:2px solid #ef386280;outline-offset:2px}
body:has(.chat-view) #nv{border-top:1px solid #ececf0;border-radius:0}
@media(min-width:600px){#app:has(.chat-view){box-shadow:0 0 48px #16072d44}}
/* Compact media tray, matching MIMI's pink/violet conversation palette. */
.media-tools{display:flex;align-items:center;gap:5px;padding:4px 0 8px;color:#79436c}.media-tools button{display:grid;place-items:center;width:44px;height:44px;border:0;background:#f8edf6;border-radius:50%;color:#a23877;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none}.media-tools span{font-size:11px;line-height:1.4;max-width:150px;color:#765b72}.media-tools .recording{background:#de346b;color:white}.media-library{position:relative;background:#fff5fc;border:1px solid #efdaea;border-radius:18px;padding:14px;color:#53334f;max-height:300px;overflow:auto;margin:8px 0}.media-library h4{margin:12px 0 6px}.media-close{float:right;border:0;background:transparent;color:#79436c;font-size:25px}.emoji-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(43px,1fr));gap:5px}.emoji-grid span{position:relative;text-align:center;padding-bottom:14px}.emoji-grid button{border:0;background:transparent;font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-size:27px;padding:4px;cursor:pointer}.emoji-grid .emoji-favorite{position:absolute;bottom:0;right:1px;font-size:14px;color:#984270;padding:0}.sticker-tabs{display:flex;overflow:auto;gap:7px;padding-bottom:10px;clear:both}.sticker-tabs button,.sticker-download,.voice-preview button{flex-shrink:0;border:1px solid #dcb7d1;border-radius:18px;padding:8px 12px;background:white;color:#793b6c;cursor:pointer}.sticker-tabs [aria-pressed=true]{background:#8c3c83;color:white}.sticker-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:12px}.sticker-grid button{width:100%;border:0;background:transparent;cursor:pointer;color:#89416f}.sticker-grid img{max-width:100%;height:auto}.sticker-delete{font-size:11px}.sticker-import{display:block;border:1px dashed #b87caa;border-radius:12px;padding:12px;font-size:13px}.sticker-import input{display:block;max-width:100%;margin-top:8px}.media-help{font-size:11px;color:#7f6378}.chat-sticker{display:block;object-fit:contain;max-width:100%;height:160px}.voice-bubble{width:250px;max-width:100%}.voice-bubble audio{width:100%;height:42px;display:block}.voice-bubble small{display:block;font-size:11px;margin-top:4px}.voice-preview{background:#fff1f8;color:#693352;border-radius:14px;padding:12px;display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:13px}.voice-preview audio{width:100%;height:40px}.chat-message:has(.voice-bubble){min-width:min(275px,85%)}.chat-message p{font-family:inherit,'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji'}.media-tools button:focus-visible,.media-library button:focus-visible{outline:2px solid #a43b87;outline-offset:2px}@media(max-width:360px){.media-tools span{max-width:130px;font-size:10px}.media-library{padding:10px}.voice-bubble{width:215px}}
.toast{pointer-events:none}

.voice-hint{font-size:11px;color:#85838e;margin:0 0 9px;text-align:center}
.voice-capture{border:1px solid #f5c3cf;border-radius:18px;background:#fff7f9;gap:10px;flex-wrap:wrap}.voice-capture canvas{width:100%;height:40px}.voice-capture b{font-size:12px}.voice-preview button{min-height:40px}.voice-transcript{border:0;background:transparent;color:var(--voice-color);font:inherit;font-size:12px;padding:4px 0;cursor:pointer}.voice-transcript-text{color:#575b67;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}.voice-bubble.playing .voice-track svg{filter:saturate(1.3)}.voice-bubble.playing .voice-track{animation:voice-breathe 1.2s ease-in-out infinite}.voice-dock:empty{display:none}.voice-dock{position:fixed;bottom:84px;left:12px;right:12px;max-width:380px;margin:auto;background:white;border:1px solid #efd5de;border-radius:18px;padding:12px;z-index:100;--voice-color:#ef3862;box-shadow:0 5px 24px #43263922}.voice-dock>button{border:0;background:transparent;color:#777;cursor:pointer}@keyframes voice-breathe{50%{opacity:.75}}@media(prefers-reduced-motion:reduce){.voice-bubble.playing .voice-track{animation:none}}
/* Voice capture replaces only the composer; surrounding conversation tools stay in place. */
.chat-composer{position:relative;isolation:isolate}
.voice-record-bar[hidden],.voice-locked-controls[hidden]{display:none}
.voice-record-bar{position:absolute;inset:0;z-index:1;display:flex;align-items:center;gap:8px;padding:0 8px;background:#fff;border:1px solid #eef0f2;border-radius:28px;box-shadow:0 2px 8px #20252d12;pointer-events:none;animation:voice-bar-in .18s ease-out}
.chat-composer.is-recording{min-height:50px}
.chat-composer.is-recording>input,.chat-composer.is-recording>button[type=submit]{visibility:hidden;pointer-events:none}
.chat-composer.is-recording #voice-record{opacity:0;position:relative;z-index:2}
.voice-record-bar .voice-cancel{display:grid;place-items:center;flex:0 0 38px;width:38px;height:44px;padding:0;border:0;background:transparent;color:#b6bac0;border-radius:50%;pointer-events:auto;cursor:pointer}
.voice-cancel svg{width:28px;height:28px;fill:#f0f1f3;stroke:#a8adb4}
.voice-slide{flex:1;display:flex;align-items:center;justify-content:center;gap:9px;min-width:0;color:#989da5;font-size:clamp(12px,3.6vw,17px);font-weight:500;white-space:nowrap;letter-spacing:-.3px}
.voice-slide>span{font-size:29px;line-height:1;color:#c5c8cd;animation:voice-slide-hint 1.5s ease-in-out infinite}
.voice-record-bar canvas{flex:0 0 45px;width:45px;height:40px}
.voice-capture-status{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:5px 9px 10px;color:#8e949d;font-size:12px}
#voice-clock{font-variant-numeric:tabular-nums;color:#656b74;font-weight:600}
.voice-locked-controls{display:flex;justify-content:flex-end;gap:8px;margin:0 0 12px}
.voice-locked-controls button{min-height:42px;border:1px solid #e4e6e9;border-radius:22px;background:white;padding:8px 17px;color:#696f78;font:inherit;font-size:13px;cursor:pointer}
.voice-locked-controls button:last-child{background:#ef3862;color:white;border-color:#ef3862}
.chat-composer.is-locked #voice-record{pointer-events:none}
.voice-cancel:focus-visible,.voice-locked-controls button:focus-visible{outline:2px solid #ef3862;outline-offset:2px}
@keyframes voice-bar-in{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}
@keyframes voice-slide-hint{50%{transform:translateX(-4px);opacity:.6}}
@media(prefers-reduced-motion:reduce){.voice-record-bar,.voice-slide>span{animation:none}}

/* Compact draft controls share the same audio engine as sent voice messages. */
.voice-preview.voice-draft{display:block;background:transparent;border-radius:0;padding:4px 0 10px;color:#777e87}
.voice-draft-row{display:flex;align-items:center;gap:10px;min-width:0}
.voice-draft-row>button{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:#f1f2f4;color:#858b94}
.voice-draft-row>button svg{width:22px;height:22px}
.voice-draft-row>.voice-draft-send{background:#ef3862;color:#fff}
.voice-draft .voice-bubble{flex:1;min-width:0;width:auto;--voice-color:#26b94a;padding:0}
.voice-draft .voice-player{min-height:50px;padding:5px 10px;background:#fff;border:1px solid #eceef1;border-radius:26px;box-shadow:0 2px 8px #20252d0a;gap:8px}
.voice-draft .voice-play{width:32px;height:36px;flex-basis:32px;background:transparent;color:#26b94a}
.voice-draft .voice-play svg{width:23px;height:23px}
.voice-draft .voice-duration{font-size:12px;color:#737a83;font-variant-numeric:tabular-nums}
.voice-draft .voice-track{min-width:0}
.voice-draft .voice-draft-caption{display:flex;align-items:center;justify-content:space-between;padding:7px 55px 0;font-size:11px;gap:8px}
.voice-draft-caption button{border:0;background:transparent;color:#777e87;min-height:32px;padding:4px 0;font:inherit}
.chat-footer:has(.voice-draft) .chat-composer,.chat-footer:has(.voice-draft) .voice-hint,.chat-footer:has(.is-recording) .voice-hint{display:none}
.voice-draft button:focus-visible{outline:2px solid #ef3862;outline-offset:3px}
@media(max-width:360px){.voice-draft-row{gap:6px}.voice-draft .voice-draft-caption{padding-left:50px;padding-right:0}.voice-slide{gap:5px;font-size:12px}}

.stories-entry{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none;margin:2px 0 18px;padding:12px 14px;background:#ffffff12;border:1px solid #ffffff24;border-radius:20px}.stories-entry>svg{margin-left:auto}.stories-entry small{display:block;opacity:.7;margin-top:3px}.stories-ring{display:grid;place-items:center;flex-shrink:0;width:46px;height:46px;border:2px solid #ff5ca8;border-radius:50%;color:#ff9aca}.stories-heading h1{font-size:36px;line-height:1.1;margin:14px 0}.stories-heading p{line-height:1.6}.story-compose,.story-locked{border:1px solid #ffffff25;background:#ffffff10;border-radius:24px;padding:20px;margin:22px 0}.story-compose h3{margin-top:0}.story-compose .sm{line-height:1.6;opacity:.8}.story-picker{display:flex;gap:10px;margin:16px 0;cursor:pointer}.story-preview{width:100%;max-height:340px;object-fit:contain;border-radius:16px;margin-bottom:14px}.story-preview[hidden]{display:none}.story-locked{text-align:center;padding:28px 20px}.story-locked>svg{color:#f0c56e}.story-locked p{line-height:1.6;opacity:.8}.stories-feed{display:grid;gap:20px}.story-card{overflow:hidden;border-radius:24px;background:#21152b;border:1px solid #ffffff20}.story-card>img{display:block;width:100%;height:440px;object-fit:contain}.story-card>img[hidden]{display:none}.story-caption{padding:18px}.story-caption time{display:block;font-size:12px;opacity:.6;margin-top:5px}.story-caption p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}.story-own{justify-content:space-between;gap:12px}.story-own>div{min-width:0;overflow-wrap:anywhere}.story-own .btn{width:auto;flex-shrink:0;padding:10px;font-size:13px}.story-unavailable{padding:24px;line-height:1.6}

.profile-story-add{position:relative;display:block;flex:none;border-radius:50%;color:inherit;text-decoration:none;touch-action:manipulation}.profile-story-plus{position:absolute;right:-3px;bottom:-3px;display:grid;place-items:center;width:34px;height:34px;border:3px solid #250d35;border-radius:50%;background:var(--pk,#f346a4);color:#fff;font-size:28px;font-weight:500;line-height:1;box-shadow:0 3px 10px #1a063055;transition:transform .15s ease}.profile-story-add:hover .profile-story-plus{transform:scale(1.08)}.profile-story-add:active .profile-story-plus{transform:scale(.94)}.profile-story-add:focus-visible{outline:3px solid #fff;outline-offset:5px}@media(prefers-reduced-motion:reduce){.profile-story-plus{transition:none}}

/* Immersive stories keep the MIMI pink accent around the photographs. */
.stories-title{display:flex;align-items:center;justify-content:space-between;gap:16px}.stories-title .btn{width:auto;display:flex;align-items:center;gap:8px}.story-tray{display:flex;align-items:flex-start;gap:18px;overflow-x:auto;padding:14px 2px 20px;scrollbar-width:none}.story-tray::-webkit-scrollbar{display:none}.story-bubble{display:flex;flex-direction:column;align-items:center;gap:8px;flex:0 0 72px;width:72px;border:0;padding:0;background:none;color:inherit;font:inherit;cursor:pointer}.story-bubble>span:last-child{font-size:12px;max-width:76px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.story-circle{position:relative;display:grid;place-items:center;box-sizing:border-box;flex:none;width:70px;height:70px;min-width:70px;min-height:70px;aspect-ratio:1;border-radius:50%;border:2px solid #ed74aa;padding:3px;font-size:27px;background:#342139}.story-circle img{position:absolute;inset:3px;display:block;box-sizing:border-box;width:calc(100% - 6px);height:calc(100% - 6px);min-width:0;min-height:0;max-width:none;object-fit:cover;object-position:center;border-radius:50%;clip-path:circle(50%)}.story-add .story-circle{border-color:#ffffff38}.story-plus{position:absolute;right:-3px;bottom:-2px;background:var(--pk,#f346a4);border:3px solid #250d35;color:#fff;border-radius:50%;width:27px;height:27px;font-size:22px;line-height:21px}.story-dialog{position:fixed;inset:0;width:100%;height:var(--screen-height,100dvh);top:var(--screen-top);bottom:auto;max-width:none;max-height:none;padding:0;border:0;margin:0;background:#120f16;color:#fff;overflow:hidden}.story-dialog::backdrop{background:#120f16}.story-stage{position:relative;isolation:isolate;height:100%;max-width:480px;margin:auto;overflow:hidden;background:#1b151e}.story-full-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.story-top{position:absolute;z-index:3;top:0;left:0;right:0;display:flex;align-items:center;gap:14px;padding:calc(16px + env(safe-area-inset-top)) 16px 32px;background:linear-gradient(#120f16bc,transparent)}.story-top>b{flex:1}.story-tool{display:grid;place-items:center;min-width:44px;min-height:44px;border:0;border-radius:50%;background:#211a2388;color:#fff;cursor:pointer;font:inherit;font-size:22px}.story-bottom{position:absolute;z-index:3;bottom:0;left:0;right:0;padding:40px 20px calc(22px + env(safe-area-inset-bottom));background:linear-gradient(transparent,#120f16ed 35%)}.story-bottom textarea{box-sizing:border-box;width:100%;resize:none;background:#ffffff18;border:1px solid #ffffff4d;color:#fff;border-radius:16px;padding:12px;font:inherit}.story-bottom textarea::placeholder{color:#e1d5df}.story-bottom .btn{display:flex;align-items:center;justify-content:center;gap:12px}.story-caption-label{display:block;font-size:13px;margin-bottom:8px}.story-progress{position:absolute;z-index:4;top:calc(8px + env(safe-area-inset-top));left:10px;right:10px;display:flex;gap:4px}.story-progress>span{height:3px;flex:1;overflow:hidden;border-radius:4px;background:#ffffff50}.story-progress i{display:block;height:100%;background:#fff;transform-origin:left}.story-view-top{top:14px}.story-view-top>div{flex:1}.story-view-top small{display:block;font-size:12px;opacity:.8;margin-top:4px}.story-tap{position:absolute;z-index:1;top:110px;bottom:110px;width:35%;border:0;background:transparent;cursor:pointer}.story-prev{left:0}.story-next{right:0;width:65%}.story-view-caption{pointer-events:none;padding-top:24px;max-height:35%;overflow:auto}.story-view-caption p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}.story-load{position:absolute;top:45%;left:20px;right:20px;text-align:center;pointer-events:none}.story-dialog button:focus-visible,.story-bubble:focus-visible{outline:3px solid #fff;outline-offset:-3px}.story-dialog:has(.story-editor) .story-full-photo{bottom:200px;height:calc(100% - 200px)}

.follow-stats{display:flex;gap:24px;padding:18px 0;margin:12px 0;border-top:1px solid var(--line,#ffffff24);border-bottom:1px solid var(--line,#ffffff24)}
.follow-stats a,.follow-stats span{display:flex;flex-direction:column;gap:4px;color:inherit;text-decoration:none;font-size:13px}.follow-stats b{font-size:24px}.follow-stats a:hover{color:#ff7ac0}.follow-person{display:flex;align-items:center;gap:12px;min-width:0;flex:1;color:inherit;text-decoration:none}.follow-person span{min-width:0;overflow-wrap:anywhere}.follow-person small{display:block;opacity:.65;margin-top:4px}.follow-row{gap:12px}.follow-row .follow-button{width:auto;flex-shrink:0;font-size:13px;padding:10px 12px;min-height:44px}.follow-button:disabled{opacity:.55;cursor:wait}.follow-button:focus-visible,.follow-stats a:focus-visible{outline:2px solid #ff7ac0;outline-offset:4px}

/* Keep the brand on the center axis independently of the side controls. */
.top{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;min-height:40px}.top>.lgs{grid-column:2;grid-row:1;justify-self:center}.top>.notification-link{grid-column:1;grid-row:1;justify-self:start}.top>.ava{grid-column:3;grid-row:1;justify-self:end}
.story-self{position:relative;cursor:default}.story-self>.story-circle{font:inherit;color:inherit;cursor:pointer;border-color:#ffffff38}.story-self>.has-story{border-color:#ed74aa}.story-self>.story-plus{top:45px;bottom:auto;padding:0;cursor:pointer}.story-self>button:focus-visible{outline:3px solid #fff;outline-offset:3px}

.profile-menu-trigger{display:inline-grid;place-items:center;flex-shrink:0;width:44px;height:44px;padding:0;border:1px solid #ffffff40;border-radius:50%;background:#281138b3;color:inherit;cursor:pointer}
.profile-settings{position:fixed;inset:0 0 0 auto;box-sizing:border-box;margin:0;width:min(380px,100%);max-width:100%;top:var(--screen-top);bottom:auto;height:var(--screen-height,100dvh);max-height:var(--screen-height,100dvh);padding:24px 20px max(24px,env(safe-area-inset-bottom));border:0;border-left:1px solid #ffffff25;background:#281138;color:#fff;overflow-y:auto;overscroll-behavior:contain;box-shadow:-16px 0 60px #17082260}
.profile-settings::backdrop{background:#160920a6}
.profile-settings-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px}
.profile-settings-heading h2{margin:0;font-size:24px}
.profile-settings .row{padding:16px 12px;margin:0;border-radius:0;border-bottom:1px solid #ffffff20;background:transparent;gap:12px;justify-content:space-between;font-size:15px;text-decoration:none;color:inherit}
.profile-settings .row svg{flex-shrink:0}
.profile-settings button.row{margin:18px 0;background:transparent!important;color:#ff9cbf!important;text-align:left}
.profile-settings .sm{line-height:1.7}
body:has(.profile-settings[open]){overflow:hidden}

/* Independent edit and account controls on the member’s own profile. */
.top>.profile-edit-trigger{grid-column:1;grid-row:1;justify-self:start;display:inline-grid;place-items:center;width:44px;height:44px;border:1px solid #ffffff40;border-radius:50%;background:#281138b3;color:inherit;text-decoration:none;touch-action:manipulation}
.top>.profile-menu-trigger{grid-column:3;grid-row:1;justify-self:end}
.profile-edit-trigger:hover{background:#49234f}
.profile-edit-trigger:focus-visible,.profile-menu-trigger:focus-visible{outline:3px solid #ff7ac0;outline-offset:3px}

/* Compact profile access overlays the top-right corner of the discovery photo. */
.discovery-profile-link{position:absolute;top:10px;right:10px;z-index:1;display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:8px 11px;border:1px solid #ffffff40;border-radius:99px;background:rgb(30 18 35 / 62%);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#fff;font-size:12px;font-weight:600;line-height:1.2;text-decoration:none;transition:background .18s}
.discovery-profile-link svg{flex:none}.discovery-profile-link:hover{background:rgb(30 18 35 / 82%)}.discovery-profile-link:active{background:rgb(30 18 35 / 92%)}.discovery-profile-link:focus-visible{outline:3px solid #ffb8dc;outline-offset:2px}

/* The tray keeps native touch scrolling and the existing 70px portraits. */
.story-tray{max-width:100%;min-width:0;box-sizing:border-box;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity}
.story-bubble{scroll-snap-align:start}
.story-circle.story-unseen,.story-self>.has-story{border-color:transparent;background:linear-gradient(#342139,#342139) padding-box,linear-gradient(135deg,#ff5ca8,#a664e8) border-box}
.story-circle.story-seen{border-color:#a29aa8;background:#342139}
.story-bubble:active .story-circle{transform:scale(.96)}

/* Conversation audio is a message bubble; draft/recording controls keep their own layout. */
.chat-thread .chat-message:has(.voice-bubble){box-sizing:border-box;width:fit-content;min-width:0;max-width:min(232px,85%);min-height:68px;padding:5px 8px;border-width:1px;border-radius:15px;box-shadow:none}
.chat-thread .chat-message .voice-bubble{width:214px;max-width:100%;min-width:0;padding:0;margin:0}
.chat-thread .voice-bubble .voice-player{min-height:40px;padding:0;gap:4px}
.chat-thread .voice-bubble .voice-play{width:32px;height:40px;min-height:0;flex:0 0 32px;padding:0}
.chat-thread .voice-bubble .voice-track{height:24px;min-width:24px}
.chat-thread .voice-bubble .voice-speed{height:36px;min-width:34px;padding:2px 3px;border-radius:6px}
.chat-thread .voice-bubble .voice-duration{min-width:30px}
.chat-thread .voice-bubble .voice-transcript,.chat-thread .voice-bubble .voice-transcript-text{display:none}
/* Compact chat media retains MIMI's existing sender colours. */
.chat-message:has(.voice-bubble) .chat-message-meta{margin-bottom:1px;gap:4px 10px}.chat-message:has(.voice-bubble) .chat-message-meta b{font-size:10px}.chat-message:has(.voice-bubble) .chat-message-meta time{font-size:9px}.voice-bubble .voice-transcript{font-size:10px;padding:1px 0}.voice-bubble .voice-transcript-text{font-size:13px}.voice-bubble .voice-seek{touch-action:pan-y}
.chat-composer #mi{min-width:0}.chat-composer #attachment-button{flex-shrink:0;width:36px;padding:4px;background:transparent;color:#a23877}.chat-composer.is-recording #attachment-button{display:none}
.attachment-menu{display:grid;gap:4px;padding:8px;margin:6px 0;border:1px solid #efdaea;border-radius:16px;background:#fff5fc;color:#53334f}.attachment-menu[hidden]{display:none}.attachment-menu button{text-align:left;border:0;border-radius:10px;background:transparent;color:inherit;font:inherit;font-size:14px;min-height:44px;padding:10px;cursor:pointer}.attachment-menu button:hover{background:#f8edf6}.attachment-menu small{font-size:11px;padding:6px 10px;line-height:1.5}.attachment-preview{display:flex;flex-wrap:wrap;gap:10px;padding:12px;margin-bottom:8px;border:1px solid #efdaea;border-radius:16px;background:#fff1f8;color:#693352}.attachment-preview img{display:block;width:100%;max-height:180px;object-fit:contain;border-radius:10px}.attachment-preview>span{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px}.attachment-preview small,.chat-document small{display:block;font-size:11px;opacity:.8;margin-top:4px}.attachment-preview button{border:1px solid #dcb7d1;border-radius:18px;min-height:40px;background:white;color:#793b6c;padding:6px 12px;cursor:pointer}.attachment-preview button:disabled{opacity:.6}.attachment-preview>div{display:flex;gap:8px}.attachment-error:empty{display:none}.attachment-error{font-size:12px;width:100%;margin:0}.chat-photo{display:block;width:240px;max-width:100%;height:240px;object-fit:contain;border-radius:12px}.chat-photo-link{display:block}.attachment-download{display:block;color:inherit;font-size:11px;margin-top:6px}.chat-document{display:flex;align-items:center;gap:10px;max-width:240px;min-height:44px;color:inherit;text-decoration:none}.chat-document>span:last-child{min-width:0}.chat-document b{font-size:13px;overflow-wrap:anywhere}.chat-document>span:first-child{font-size:25px}.attachment-menu button:focus-visible,.attachment-preview button:focus-visible,.chat-document:focus-visible{outline:2px solid #a43b87;outline-offset:2px}
.chat-footer:has(.attachment-preview) .chat-composer,.chat-footer:has(.attachment-preview) .voice-hint,.chat-footer:has(.attachment-preview) .attachment-menu{display:none}

/* The document scrolls on regular pages; only the thread scrolls in a conversation. */
#app>*{min-width:0}
.row>div{min-width:0}
input,select,textarea{min-width:0}
.gallery a{min-width:0;aspect-ratio:1}
.gallery img{display:block;height:100%}
body:has(.story-dialog[open]){overflow:hidden}
.chat-footer .media-library{max-height:min(240px,25svh)}
.chat-footer .attachment-preview img{height:110px}
.story-top>b,.story-view-top>div{min-width:0;overflow-wrap:anywhere}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

.story-editor .story-bottom{max-height:70%;overflow-y:auto;overscroll-behavior-y:contain}
.profile-settings{padding-top:calc(24px + var(--safe-top));padding-left:max(20px,env(safe-area-inset-left,0px));padding-right:max(20px,env(safe-area-inset-right,0px))}

.chat-footer .chat-composer{position:sticky;bottom:0;z-index:1;background:#fff}

/* Snapchat reference proportions, in MIMI's rose and violet palette. */
.voice-recording-panel{padding:8px 0 4px;background:#fff;color:#70345f}
.voice-orbit{position:relative;width:clamp(136px,42vw,180px);aspect-ratio:1;margin:4px auto 8px}
.voice-orbit>svg{display:block;width:100%;height:100%;fill:none;stroke-width:2.5}
.voice-orbit-outline{stroke:#bfc0c7}
#voice-progress{stroke:#ef4775;stroke-width:3.5;stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:100;transform:rotate(65deg);transform-origin:center}
.voice-orbit canvas{position:absolute;width:66%;height:34%;left:17%;top:33%}
.voice-capture-status{justify-content:center;padding:0 0 8px;font-size:10px}
.voice-capture-row{display:flex;align-items:center;gap:8px;border-top:1px solid #f0edf1;padding-top:8px}
.voice-capture-row button{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border:0;border-radius:50%;cursor:pointer}
.voice-stop{background:#fff1f5;color:#d70b49}
.voice-stop span{width:17px;height:17px;border-radius:3px;background:currentColor}
.voice-capture-time{display:flex;align-items:center;justify-content:flex-end;flex:1;min-width:0;height:44px;padding:0 16px;border:1px solid #e2dfe4;border-radius:26px}
.voice-capture-time #voice-clock{color:#d70b49;font-size:17px;font-weight:600}
.voice-capture-send,.voice-draft-row>.voice-draft-send{background:#9342a0;color:#fff}
.chat-footer:has(.voice-recording-panel) .chat-composer{height:0;min-height:0;padding:0;margin:0;border:0}
.chat-footer:has(.voice-recording-panel) .chat-composer>button,.chat-footer:has(.voice-recording-panel) .chat-composer>input{visibility:hidden}
.chat-footer:has(.voice-recording-panel) .voice-record-bar{inset:auto 0 0;height:0;padding:0;border:0;box-shadow:none;overflow:hidden}
.voice-locked-controls{justify-content:center;margin:4px 0 0;gap:18px}
.voice-locked-controls button,.voice-locked-controls button:last-child{border:0;background:transparent;color:#8c6985;font-size:11px;padding:2px 4px;min-height:32px}
.voice-capture-row button:focus-visible{outline:2px solid #9342a0;outline-offset:3px}
.voice-draft-row{gap:8px}
.voice-draft-row>.voice-delete{background:transparent;color:#d70b49}
.voice-draft-row>.voice-delete svg{width:26px;height:26px}
.voice-draft .voice-bubble{--voice-color:#9342a0}
.voice-draft .voice-play{color:#9342a0}
.voice-draft .voice-player{min-height:44px;border:1px solid #e2dfe4;border-radius:26px;padding:3px 12px 3px 7px;box-shadow:none;gap:6px}
.voice-draft .voice-duration{color:#3c303e;font-size:14px}
.voice-draft .voice-track{flex:1}
.voice-draft .voice-track svg{height:25px}
.voice-draft .voice-draft-caption{padding-top:2px}
@media(max-height:550px){.voice-orbit{width:110px;margin:0 auto}.voice-capture-status{padding-bottom:3px}}

/* Messaging appearance is scoped so other pages retain their own palette. */
#app.pg-messages{--msg-bg:#fff;--msg-panel:#fff;--msg-text:#25262a;--msg-muted:#656b76;--msg-line:#e4e0e9;--msg-soft:#faf0f7;--msg-accent:#913269;background:var(--msg-bg);color:var(--msg-text);color-scheme:light}
:root[data-messaging-theme=night] #app.pg-messages{--msg-bg:#1d1426;--msg-panel:#291d33;--msg-text:#f6edf7;--msg-muted:#c3b4cb;--msg-line:#49364f;--msg-soft:#38253e;--msg-accent:#f3a1ce;color-scheme:dark}
.messaging-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.messaging-heading h2{min-width:0;font-size:24px}
.messaging-theme{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:none;min-height:44px;padding:8px 11px;border:1px solid var(--msg-line);border-radius:24px;background:var(--msg-soft);color:var(--msg-accent);font:inherit;font-size:12px;cursor:pointer}
.messaging-theme:hover{filter:brightness(.94)}.messaging-theme:focus-visible{outline:3px solid #d455a1;outline-offset:2px}
.pg-messages .conversation{background:var(--msg-panel);border-color:var(--msg-line)}
.pg-messages .mu,.pg-messages .conversation small{color:var(--msg-muted)}
.pg-messages .chat-header,.pg-messages .chat-footer,.pg-messages .chat-menu>div,.pg-messages .voice-recording-panel,.pg-messages .voice-record-bar{background:var(--msg-panel);border-color:var(--msg-line);color:var(--msg-text)}
.pg-messages .chat-person small,.pg-messages .chat-empty,.pg-messages .chat-quota,.pg-messages .voice-hint,.pg-messages .voice-capture-status,.pg-messages #voice-clock{color:var(--msg-muted)}
.pg-messages .chat-back,.pg-messages .chat-menu summary{color:var(--msg-text)}
.pg-messages .chat-menu button{color:var(--msg-accent)}
.pg-messages .chat-composer input{background:var(--msg-bg);border-color:var(--msg-line);color:var(--msg-text)}
.pg-messages .chat-composer input::placeholder{color:var(--msg-muted)}
:root[data-messaging-theme=night] .pg-messages .chat-message.is-theirs{background:#353048;color:#f1eaf9}
:root[data-messaging-theme=night] .pg-messages .media-library,:root[data-messaging-theme=night] .pg-messages .attachment-menu,:root[data-messaging-theme=night] .pg-messages .attachment-preview,:root[data-messaging-theme=night] .pg-messages .voice-draft .voice-player{background:var(--msg-soft);border-color:var(--msg-line);color:var(--msg-text)}
:root[data-messaging-theme=night] .pg-messages .attachment-preview button,:root[data-messaging-theme=night] .pg-messages .voice-locked-controls button,:root[data-messaging-theme=night] .pg-messages .media-tools button{background:var(--msg-soft);border-color:var(--msg-line);color:var(--msg-accent)}
:root[data-messaging-theme=night] .pg-messages .voice-draft-caption button,:root[data-messaging-theme=night] .pg-messages .voice-draft .voice-duration,:root[data-messaging-theme=night] .pg-messages .media-tools span{color:var(--msg-muted)}
@media(max-width:360px){.chat-header{gap:6px}.chat-header .messaging-theme{padding:8px}.chat-header .messaging-theme span{display:none}}
.pg-messages .chat-footer .chat-composer{background:var(--msg-panel)}
:root[data-messaging-theme=night] .pg-messages .chat-composer #attachment-button{color:var(--msg-accent)}
:root[data-messaging-theme=night] body:has(.pg-messages) #nv{background:#291d33;border-color:#49364f}
:root[data-messaging-theme=night] body:has(.pg-messages) #nv a{color:#c3b4cb}
:root[data-messaging-theme=night] body:has(.pg-messages) #nv a.on{color:#ff83bf}

/* Private conversation photos retain their proportions and survive thread refreshes. */
.chat-photo-link{width:fit-content;max-width:100%;border-radius:12px;overflow:hidden;background:#0000000a}
.chat-photo-link>a{display:block;max-width:100%}
.chat-photo{max-height:320px}
.chat-photo-retry{max-width:240px;min-height:80px;padding:14px;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}
.chat-photo-retry[hidden]{display:none}
.photo-failed>a{display:none}
.chat-person strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-header{min-height:70px}
