:root { color-scheme:light dark; --bg:light-dark(#fff,#191e26); --ink:light-dark(#24343a,#ecf2ed); --muted:light-dark(#566366,#acbabc); --soft:light-dark(#eef1f3,#252c34); --line:light-dark(#dce2e5,#353e47); --brand:light-dark(#ad3c27,#ff9d84); --brand-soft:light-dark(#fff0e8,#3c2b28); --bubble:light-dark(#e8efe8,#2c3c37); --blue:light-dark(#305d75,#a4cde5); --danger:light-dark(#ad273b,#ffacb7); --shadow:light-dark(#35423b1c,#00000060); font:400 15px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; background:var(--soft); color:var(--ink); }
:root[data-mode=light] { color-scheme:light; }
:root[data-mode=dark] { color-scheme:dark; }
:root[data-theme=white] { --bg:light-dark(#fff,#1e2228); --soft:light-dark(#eef1f3,#2b3038); --incoming:light-dark(#e8edef,#2d333c); --own:light-dark(#9e4b35,#e8ac8d); --own-ink:light-dark(#fff,#352117); }
:root[data-theme=sand] { --bg:light-dark(#fff,#1e2228); --soft:light-dark(#eef1f3,#2b3038); --incoming:light-dark(#e8edef,#2d333c); --own:light-dark(#9e4b35,#e8ac8d); --own-ink:light-dark(#fff,#352117); }
:root[data-theme=sky] { --bg:light-dark(#eaf1f6,#19242d); --soft:light-dark(#dce7ef,#293946); --incoming:light-dark(#dae5ed,#2a3b48); --own:light-dark(#28658c,#78b6dc); --own-ink:light-dark(#fff,#102736); }
:root[data-theme=sage] { --bg:light-dark(#ecf1e7,#1c2723); --soft:light-dark(#e0e8d8,#2a3931); --incoming:light-dark(#dde5d4,#2b3c32); --own:light-dark(#386a52,#91c6a4); --own-ink:light-dark(#fff,#152e22); }
:root[data-theme=rose] { --bg:light-dark(#f5ecef,#2a2027); --soft:light-dark(#ebdfe6,#3b2e38); --incoming:light-dark(#e9dde4,#3e2f3a); --own:light-dark(#914e68,#dba0b7); --own-ink:light-dark(#fff,#351a28); }
:root[data-theme=lavender] { --bg:light-dark(#f0edf6,#23212d); --soft:light-dark(#e4dfef,#343044); --incoming:light-dark(#e2dcee,#373248); --own:light-dark(#65568e,#b8abe2); --own-ink:light-dark(#fff,#231d39); }
:root[data-theme=peach] { --bg:light-dark(#f7efe5,#2b231e); --soft:light-dark(#efe1d2,#3d322a); --incoming:light-dark(#eddccd,#41342b); --own:light-dark(#9c5435,#e6b28e); --own-ink:light-dark(#fff,#352319); }
* { box-sizing:border-box; }
body { margin:0; padding:0; }
[hidden] { display:none!important; }
button,input,textarea,select { font:inherit; }
button { cursor:pointer; color:inherit; touch-action:manipulation; }
button:focus-visible,input:focus-visible,textarea:focus-visible,a:focus-visible { outline:3px solid var(--blue); outline-offset:3px; }
button:disabled { opacity:.45; cursor:default; }
h1,h2,h3,p { margin:0; }
h1,h2,h3,strong { font-weight:600; }
h1 { font-size:29px; line-height:1.2; letter-spacing:-1px; }
h2 { font-size:21px; line-height:1.25; letter-spacing:-.4px; }
h3 { font-size:16px; }
a { color:var(--blue); }
.app-shell { width:100%; max-width:680px; margin:auto; background:var(--bg); min-height:100dvh; display:flex; flex-direction:column; padding-top:env(safe-area-inset-top); }
.brand-header { display:flex; align-items:center; justify-content:space-between; padding:22px 22px 13px; gap:12px; background:var(--bg); background:light-dark(color-mix(in srgb,var(--bg) 93%,#000),color-mix(in srgb,var(--bg) 85%,#000)); }
.brand-home { display:flex; align-items:center; min-height:44px; min-width:0; padding:0; border:0; border-radius:12px; background:transparent; color:inherit; text-align:left; }
.brand-home:focus-visible { outline:3px solid var(--blue); outline-offset:4px; }
.wordmark { display:flex; align-items:center; gap:5px; font-size:29px; font-weight:600; letter-spacing:-1.4px; }
.brand-mark { width:35px; height:35px; background:var(--brand); color:var(--bg); display:grid; place-items:center; border-radius:12px 12px 12px 4px; transform:rotate(-7deg); font-weight:600; font-size:25px; }
.test-tag { border:1px solid var(--line); padding:4px 8px; border-radius:8px; color:var(--muted); font-size:11px; letter-spacing:.5px; text-transform:uppercase; white-space:nowrap; }
.appearance-controls { display:flex; flex-shrink:0; gap:4px; }
.appearance-controls .icon-btn { border:1px solid var(--line); background:var(--bg); }
.theme-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.theme-choice { display:flex; align-items:center; gap:9px; min-height:58px; border:2px solid var(--line); border-radius:14px; padding:9px; background:var(--bg); text-align:left; font-size:12px; }
.theme-choice[aria-pressed=true] { border-color:var(--blue); }
.theme-choice .icon { width:17px; margin-left:auto; }
.theme-check { display:flex; margin-left:auto; }
.theme-choice[aria-pressed=false] .theme-check { visibility:hidden; }
.theme-swatch { display:block; flex:0 0 28px; width:28px; height:28px; border-radius:9px; border:1px solid #8899aa55; }
.swatch-white { background:#fff; }.swatch-sand { background:#fff; }.swatch-sky { background:#eaf1f6; }.swatch-sage { background:#ecf1e7; }.swatch-rose { background:#f5ecef; }.swatch-lavender { background:#f0edf6; }.swatch-peach { background:#f7efe5; }
#main { flex:1; min-width:0; }
.intro { padding:18px 22px 22px; }
.intro p { color:var(--muted); margin-top:8px; }
.row { display:flex; align-items:center; gap:12px; min-width:0; }
.between { justify-content:space-between; }
.grow { flex:1; min-width:0; }
.icon { display:inline-block; width:21px; height:21px; flex-shrink:0; vertical-align:middle; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.icon-btn { width:44px; min-height:44px; flex:0 0 44px; border:0; background:transparent; border-radius:14px; display:grid; place-items:center; }
.filled { background:var(--brand); color:var(--bg); }
.secondary { background:var(--soft); }
.button { min-height:46px; border:1px solid var(--line); background:var(--bg); color:var(--ink); padding:11px 16px; border-radius:13px; font-weight:600; text-align:center; display:flex; justify-content:center; align-items:center; gap:8px; }
.primary { background:var(--brand); color:var(--bg); border-color:transparent; }
.danger { color:var(--danger); }
.text-btn { border:0; background:transparent; color:var(--brand); font-size:13px; font-weight:600; padding:10px 4px; min-height:44px; }
.stack { display:flex; flex-direction:column; gap:12px; }
.spaced { margin-top:22px; }
.spaced-small { margin-top:14px; }
.section { padding:0 22px 22px; }
.field { display:flex; flex-direction:column; gap:7px; font-size:13px; }
.field input,.field textarea,.field select { width:100%; padding:11px 13px; min-height:46px; background:var(--bg); color:var(--ink); border:1px solid var(--line); border-radius:12px; font-size:16px; }
.field textarea { min-height:90px; resize:vertical; }
.password-control { position:relative; }
.password-control input { padding-right:58px; }
.password-eye { position:absolute; right:2px; top:1px; min-height:44px; color:var(--blue); }
.username { font-size:19px; font-weight:600; overflow-wrap:anywhere; }
.friend-actions { display:flex; flex-wrap:wrap; gap:8px; }
.friend-actions .button { flex:1 1 135px; font-size:13px; padding:10px; text-decoration:none; }
a.button { text-decoration:none; }
.friend-qr { max-width:256px; margin:8px auto 18px; background:#fff; border-radius:12px; overflow:hidden; }
.friend-qr svg { display:block; width:100%; height:auto; shape-rendering:crispEdges; }
.centered { text-align:center; }
.check-row .sub { display:block; font-size:12px; }
.muted { color:var(--muted); }
.small { font-size:12px; }
.tiny { font-size:11px; }
.notice { background:var(--soft); padding:13px 15px; border-radius:13px; display:flex; gap:9px; align-items:flex-start; font-size:12px; }
.notice .icon { width:17px; height:17px; margin-top:1px; }
.notice.good { background:var(--bubble); }
.notice.warning { background:var(--brand-soft); }
.error { color:var(--danger); font-size:13px; }
.form-mode { display:flex; background:var(--soft); padding:4px; border-radius:13px; margin-bottom:22px; }
.child-device-signin { margin-bottom:16px; }
.form-mode button { flex:1; border:0; border-radius:10px; background:transparent; min-height:42px; color:var(--muted); font-weight:600; }
.form-mode button[aria-pressed=true] { background:var(--bg); color:var(--ink); box-shadow:0 2px 6px var(--shadow); }
.bottom-nav { display:flex; justify-content:space-around; gap:8px; margin:14px 16px 0; padding:12px 0 8px; border-top:1px solid var(--line); }
.bottom-nav button { min-height:54px; min-width:74px; border:0; border-radius:13px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; background:transparent; color:var(--muted); font-size:12px; }
.bottom-nav button[aria-current=page] { background:var(--brand-soft); color:var(--brand); }
.app-footer { padding:9px 18px calc(13px + env(safe-area-inset-bottom)); font-size:11px; text-align:center; color:var(--muted); }
.section-head { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 22px 9px; }
.section-head h2 { font-size:12px; letter-spacing:1px; text-transform:uppercase; color:var(--muted); }
.avatar { width:52px; height:52px; flex-shrink:0; display:grid; place-items:center; background:var(--bubble); color:var(--blue); border-radius:20px; font-size:21px; font-weight:600; }
.avatar.group { background:var(--brand-soft); color:var(--brand); }
.avatar.small { width:42px; height:42px; border-radius:15px; font-size:17px; }
.avatar.illustrated { background:var(--soft); overflow:hidden; }
.avatar.illustrated svg { display:block; width:100%; height:100%; }
.unread-badge { display:inline-flex; min-width:30px; height:30px; padding:0 8px; justify-content:center; align-items:center; border-radius:50%; color:var(--own-ink,#fff); background:var(--own,var(--brand)); font-size:12px; font-weight:700; flex-shrink:0; }
.friend-row { width:100%; text-align:left; border-left:0; border-right:0; border-top:0; background:transparent; color:var(--ink); border-radius:12px; padding-left:8px; padding-right:8px; }
.friend-row:hover { background:var(--soft); }
.friend-row .sub { display:block; font-size:12px; color:var(--muted); margin-top:3px; }
.friend-row.unread strong { font-weight:750; }
.row-message-icon { display:grid; place-items:center; width:38px; height:38px; color:var(--blue); }
.chat-row { display:flex; gap:12px; align-items:center; width:100%; text-align:left; border:0; background:transparent; padding:16px 22px; }
.chat-row:hover { background:var(--soft); }
.chat-row+.chat-row { border-top:1px solid var(--line); }
.chat-row p { font-size:13px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:3px; }
.swipe-row { position:relative; overflow:hidden; border-radius:13px; background:#c3332b; isolation:isolate; }
.swipe-row+.swipe-row { border-top:1px solid var(--line); }
.swipe-front { position:relative; z-index:1; display:flex; align-items:stretch; width:100%; background:var(--bg); transform:translateX(var(--swipe-offset,0px)); transition:transform 170ms ease-out; touch-action:pan-y; }
.swipe-row.is-open { --swipe-offset:78px; }
.swipe-row.is-dragging .swipe-front { transition:none; user-select:none; }
.swipe-front>.chat-row, .swipe-front>.friend-row { flex:1 1 auto; min-width:0; border:0; border-radius:0; }
.swipe-front>.chat-row { padding-right:6px; }
.swipe-front>.friend-row { padding-right:4px; }
.swipe-front>.row-actions { width:38px; flex:0 0 38px; height:auto; min-height:52px; border:0; border-radius:0; background:transparent; color:var(--muted); }
.swipe-front>.row-actions:hover { background:var(--soft); color:var(--ink); }
.swipe-trash { position:absolute; inset:0 auto 0 0; width:78px; display:grid; place-items:center; border:0; border-radius:0; background:#c3332b; color:#fff; }
.swipe-trash:disabled { opacity:1; }
.swipe-trash .icon { width:25px; height:25px; stroke:#fff; }
.swipe-trash:focus-visible { outline:3px solid #fff; outline-offset:-6px; }
@media(prefers-reduced-motion:reduce) { .swipe-front { transition:none; } }
.badge { display:inline-flex; align-items:center; padding:3px 7px; border-radius:6px; background:var(--brand-soft); color:var(--brand); font-size:11px; white-space:nowrap; }
.empty { padding:34px 24px; text-align:center; color:var(--muted); }
.empty .icon { width:32px; height:32px; margin-bottom:9px; }
.conv-header { position:sticky; top:0; z-index:3; display:flex; align-items:center; gap:9px; padding:12px 12px; border-bottom:1px solid var(--line); background:var(--bg); }
.conv-header > .avatar.small { width:64px; height:64px; border-radius:22px; font-size:26px; }
.conv-header h1 { font-size:18px; letter-spacing:-.3px; overflow-wrap:anywhere; }
.conversation-layout .conv-header h1 { white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.conv-header .sub { font-size:11px; color:var(--muted); }
.conv-header .header-actions { gap:0; display:flex; flex-shrink:0; }
.conv-header .icon-btn { width:40px; flex-basis:40px; }
.location-card { margin:14px 16px 0; background:var(--bubble); border-radius:20px; overflow:hidden; }
.location-head { padding:12px 13px; width:100%; display:flex; gap:10px; align-items:center; text-align:left; background:transparent; border:0; min-height:60px; }
.location-head strong { font-size:13px; }
.location-head .sub { display:block; font-size:11px; color:var(--muted); margin-top:2px; }
.sharing-row { margin:6px 18px 12px; display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--muted); font-size:12px; }
.sharing-row.active { color:var(--brand); }
.map { height:255px; position:relative; overflow:hidden; background:var(--soft); isolation:isolate; }
.map-tiles { position:absolute; inset:0; overflow:hidden; }
.map-tile { position:absolute; width:256px; height:256px; max-width:none; }
.map-markers { position:absolute; inset:0; pointer-events:none; }
.map-marker { position:absolute; width:36px; height:36px; border-radius:50%; border:3px solid var(--bg); background:var(--brand); color:var(--bg); display:grid; place-items:center; font-weight:600; transform:translate(-50%,-50%); box-shadow:0 3px 9px var(--shadow); }
.map-controls { position:absolute; right:9px; top:9px; display:flex; flex-direction:column; gap:5px; z-index:1; }
.map-controls button { background:var(--bg); border:1px solid var(--line); border-radius:10px; width:40px; height:40px; display:grid; place-items:center; }
.map-credit { position:absolute; bottom:3px; right:5px; padding:2px 4px; font-size:10px; background:var(--bg); z-index:1; border-radius:4px; }
.map-info { position:absolute; top:9px; left:9px; padding:4px 8px; font-size:11px; border-radius:7px; background:var(--bg); z-index:1; }
.location-tabs { display:flex; flex-wrap:wrap; gap:6px; padding:9px 12px; }
.location-tabs button { border:1px solid var(--line); border-radius:9px; padding:7px 9px; min-height:38px; background:var(--bg); font-size:12px; }
.location-tabs button[aria-pressed=true] { background:var(--brand-soft); color:var(--brand); border-color:var(--brand); }
.day { color:var(--muted); text-align:center; font-size:11px; padding:15px 20px; }
.messages { display:flex; flex-direction:column; align-items:flex-start; gap:12px; padding:0 20px 20px; min-height:150px; }
.message { max-width:85%; min-width:0; }
.message.own { align-self:flex-end; }
.message.group-event { align-self:center; max-width:100%; text-align:center; overflow-wrap:anywhere; }
.message-line { display:flex; align-items:flex-end; gap:7px; min-width:0; }
.message.own .message-line { flex-direction:row-reverse; }
.message-content { min-width:0; }
.message-avatar { display:grid; place-items:center; flex:0 0 36px; width:36px; height:39px; overflow:hidden; border-radius:50%; }
.message-avatar svg { display:block; width:36px; height:39px; }
.message-avatar>.avatar.small { width:36px; height:36px; flex:0 0 36px; }
.reactive-setting input[role=switch] { width:24px; height:24px; flex:0 0 24px; accent-color:var(--brand); }
.reactive-setting label { display:grid; gap:4px; }
.reactive-setting .sub { font-size:12px; color:var(--muted); }
.setting.reactive-setting { align-items:flex-start; }
.reactive-setting input[role=switch] { margin-block-start:3px; }
.reaction-guide-link { text-align:left; padding-inline:0; text-decoration:underline; text-underline-offset:.16em; }
.reaction-guide { margin:0; }
.reaction-guide > div { border-top:1px solid var(--line); padding:10px 0; }
.reaction-guide dt { font-weight:700; }
.reaction-guide dd { margin:3px 0 0; overflow-wrap:anywhere; font-size:13px; }
.reaction-guide-emoji { display:block; margin-top:4px; font-size:18px; }
.chat-participants { display:flex; align-items:center; flex-wrap:wrap; gap:7px; flex:0 0 auto; padding:7px 12px; border-bottom:1px solid var(--line); background:var(--bg); }
.chat-participants[hidden] { display:none; }
.chat-participants.is-scrollable { flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; max-height:61px; overscroll-behavior-inline:contain; scrollbar-width:thin; }
.participant-chip { display:inline-flex; align-items:center; flex:0 0 auto; gap:6px; max-width:164px; min-height:32px; padding:3px 9px 3px 3px; border-radius:20px; background:var(--soft); font-size:12px; }
.participant-chip>.avatar.small { width:27px; height:29px; flex:0 0 27px; }
.participant-chip>span:last-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.participant-chip small { display:block; font-size:10px; color:var(--muted); }
.chat-reaction-reveal { position:absolute; inset:0; display:grid; place-items:center; pointer-events:none; }
.chat-reaction-reveal>.avatar { width:52px; height:52px; border-radius:18px; }
@media(prefers-reduced-motion:no-preference) {
  .message.is-reaction-revealing .bubble,.message.is-reaction-revealing .message-avatar,.message.is-reaction-revealing [data-receipt-row] { opacity:0; }
  .message.is-reaction-revealing [data-receipt-row] { pointer-events:none; }
  .chat-reaction-reveal>.avatar { animation:chat-reaction-reveal 2080ms linear both; }
}
@media(prefers-reduced-motion:reduce) { .chat-reaction-reveal { display:none; } }
@keyframes chat-reaction-reveal { 0%,36.0577% { transform:scale(1) rotate(0); opacity:1; } 41.4663% { transform:scale(1.1) rotate(3deg); } 47.3077% { transform:scale(1) rotate(-2deg); } 57.6923%,93.75% { transform:scale(1) rotate(0); opacity:1; } 100% { transform:scale(.05); opacity:0; } }
.message .sender { display:block; font-size:11px; color:var(--muted); padding:0 4px 3px; }
.message .bubble { padding:11px 14px; border-radius:18px 18px 18px 5px; background:var(--incoming,var(--soft)); overflow-wrap:anywhere; white-space:pre-wrap; }
.message.own .bubble { background:var(--own,var(--brand)); color:var(--own-ink,#fff); border-radius:18px 18px 5px 18px; }
.message-link { color:inherit; font-weight:600; text-decoration:underline; text-underline-offset:2px; overflow-wrap:anywhere; }
.message-link:focus-visible { outline:2px solid currentColor; outline-offset:2px; border-radius:2px; }
.message .timestamp { display:block; font-size:11px; color:var(--muted); padding:4px 3px 0; }
.message.own .timestamp { text-align:right; }
.message .timestamp-button { width:100%; background:none; border:0; min-height:26px; cursor:pointer; }
.message:focus-visible { outline:2px solid var(--brand); outline-offset:5px; border-radius:12px; }
.message .message-removed { opacity:.7; font-style:italic; }
.message-action-list { display:grid; gap:10px; }
.message-action-list .button { justify-content:flex-start; }
.message-body { position:relative; }
.message-receipt { position:absolute; bottom:3px; right:5px; display:flex; align-items:center; justify-content:flex-end; gap:3px; min-width:21px; min-height:21px; padding:0; background:none; border:0; border-radius:16px; color:var(--muted); cursor:pointer; }
.message-receipt.has-readers { bottom:0; right:-8px; transform:translateY(50%); }
.message-body:has(.message-receipt:not(.has-readers))>.bubble { padding-right:34px; }
.message-body:has(.message-receipt.has-readers)+.timestamp { padding-top:13px; }
.reader-stack { display:flex; align-items:center; padding-left:4px; }
.reader-stack>.avatar.small { width:20px; height:20px; flex:0 0 20px; border:1.5px solid var(--bg); margin-left:-4px; font-size:10px; }
.reader-stack>.avatar.small svg { width:20px; height:20px; }
.reader-more { font-size:11px; padding-left:2px; }
.unseen-circle { display:block; width:11px; height:11px; border:1.5px solid #a1a9ad; border-radius:50%; margin-right:2px; }
.seen-people { display:grid; gap:15px; }
.seen-person { display:flex; align-items:center; gap:10px; }
.seen-person>.avatar.small { flex:0 0 32px; width:32px; height:32px; }
.seen-person .sub { margin-top:3px; font-size:12px; color:var(--muted); }
.photo-card { background:var(--soft); padding:4px; border-radius:18px 18px 18px 5px; border:0; display:block; width:230px; max-width:100%; text-align:left; }
.own .photo-card { background:var(--own,var(--brand)); color:var(--own-ink,#fff); border-radius:18px 18px 5px 18px; }
.own .photo-card .photo-note { color:inherit; opacity:.88; }
.photo-card img { display:block; width:100%; height:165px; object-fit:cover; border-radius:14px; }
.photo-card img[hidden], .photo-placeholder[hidden] { display:none; }
.photo-placeholder { min-height:165px; padding:18px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:10px; text-align:center; font-size:13px; color:inherit; }
.photo-placeholder.is-loading::before, .photo-progress { content:''; display:inline-block; width:25px; height:25px; border:3px solid currentColor; border-right-color:transparent; border-radius:50%; animation:photo-progress 1s linear infinite; opacity:.65; }
.photo-preparing { text-align:center; padding:20px 0; }
@keyframes photo-progress { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .photo-placeholder.is-loading::before, .photo-progress { animation:none; } }
.photo-card .caption { display:block; padding:7px 9px; font-size:13px; overflow-wrap:anywhere; }
.photo-card .photo-note { display:flex; align-items:center; gap:5px; padding:0 9px 7px; color:var(--muted); font-size:11px; }
.photo-card .photo-note .icon { width:13px; height:13px; }
.composer { position:sticky; bottom:0; background:var(--bg); border-top:1px solid var(--line); display:flex; align-items:flex-end; gap:8px; padding:12px 14px calc(12px + env(safe-area-inset-bottom)); z-index:2; }
.composer-tools { display:grid; gap:3px; flex:0 0 44px; }
.reaction-picker-button { background:var(--soft); color:var(--accent); }
.composer textarea { min-width:0; flex:1; min-height:45px; height:45px; max-height:140px; padding:10px 12px; border:1px solid transparent; background:var(--soft); color:var(--ink); border-radius:14px; resize:vertical; font-size:16px; }
.composer textarea::placeholder { color:var(--muted); }
.connection { text-align:center; font-size:11px; color:var(--muted); padding:7px 18px; }
.connection.offline { color:var(--danger); background:var(--brand-soft); }
.contact-row,.setting { display:flex; align-items:center; gap:12px; padding:18px 0; border-bottom:1px solid var(--line); }
.contact-row p,.setting p { color:var(--muted); font-size:12px; margin-top:3px; }
.profile-settings-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:14px 0 4px; }
.profile-settings-actions .button { min-width:0; font-size:13px; padding:9px 8px; line-height:1.25; gap:6px; }
.profile-settings-actions .button:only-child { grid-column:1/-1; }
.profile-settings-actions .icon { width:18px; height:18px; }
.profile-settings-actions .username-setting-button { background:var(--own); color:var(--own-ink); border-color:transparent; }
.appearance-setting { width:100%; background:transparent; border:0; border-bottom:1px solid var(--line); text-align:start; }
.appearance-setting strong,.message-alert-setting strong { font-size:16px; }
.appearance-setting-copy { display:block; color:var(--muted); font-size:12px; margin-top:3px; }
.message-alert-setting { min-height:60px; padding:10px 0; cursor:pointer; }
.message-alert-setting input { appearance:none; flex:none; width:46px; height:27px; margin:0; border:1px solid var(--muted); border-radius:99px; background:var(--soft); position:relative; cursor:pointer; }
.message-alert-setting input::before { content:""; position:absolute; inset:3px auto 3px 3px; width:19px; border-radius:50%; background:var(--muted); }
.message-alert-setting input:checked { background:var(--brand); border-color:var(--brand); }
.message-alert-setting input:checked::before { transform:translateX(19px); background:var(--bg); }
.message-alert-setting input:disabled { opacity:.55; cursor:default; }
@media (forced-colors:active) { .message-alert-setting input::before { background:CanvasText; } }
.check-row { display:flex; align-items:center; gap:12px; padding:13px 0; border-bottom:1px solid var(--line); min-height:58px; }
.check-row input { width:21px; height:21px; accent-color:var(--brand); flex-shrink:0; }
.code { font-family:ui-monospace,monospace; letter-spacing:2px; font-size:19px; word-break:break-all; }
.overlay { position:fixed; inset:0; background:#162a3299; z-index:20; display:flex; justify-content:center; align-items:center; padding:20px 16px; overflow:auto; }
.dialog { width:100%; max-width:430px; padding:20px; border-radius:24px; background:var(--bg); box-shadow:0 15px 70px var(--shadow); max-height:calc(100dvh - 40px); overflow:auto; }
.dialog-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:15px; }
.dialog-head h2 { font-size:20px; }
.dialog p { margin:8px 0 16px; color:var(--muted); font-size:13px; }
.dialog .account-detail-email { overflow-wrap:anywhere; }
.dialog .account-change-form .error { color:var(--danger); margin:0; }
.dialog-actions { display:flex; flex-direction:column; gap:10px; margin-top:20px; }
.dialog .report-form p { margin:0; }
.reaction-picker-list { display:grid; gap:3px; }
.reaction-picker-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(76px,auto) 44px; align-items:center; gap:7px; padding:3px 0; }
.reaction-picker-row + .reaction-picker-row { border-top:1px solid var(--line); }
.reaction-picker-choice { min-height:44px; padding:6px 8px; font-size:13px; }
.reaction-picker-emoji { font-size:19px; }
.dialog .report-form .error { color:var(--danger); }
.report-form .dialog-actions { margin-top:2px; }
.report-target,.report-reference { overflow-wrap:anywhere; }
.account-moderation-notice { display:flex; flex-shrink:0; align-items:center; justify-content:space-between; gap:8px; padding:6px 16px; background:var(--brand-soft); border-bottom:1px solid var(--line); }
.account-moderation-notice p { min-width:0; overflow-wrap:anywhere; }
.account-moderation-notice .text-btn { flex-shrink:0; }
.report-person-choice { flex-wrap:wrap; justify-content:flex-start; text-align:start; overflow-wrap:anywhere; }
.report-person-choice small { color:var(--muted); }
.av-crop-stage { position:relative; width:min(100%,320px); aspect-ratio:1; margin:0 auto 12px; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#e8ecef; touch-action:none; user-select:none; }
.av-crop-stage>canvas { display:block; width:100%; height:100%; pointer-events:none; }
.av-crop-box { position:absolute; border:2px solid #fff; box-shadow:0 0 0 1px #24343a,0 0 0 500px #0007; cursor:move; touch-action:none; }
.av-crop-box:focus-visible { outline:3px solid var(--blue); outline-offset:4px; }
.av-crop-handle { position:absolute; width:30px; height:30px; padding:0; border:0; border-radius:4px; background:transparent; touch-action:none; }
.av-crop-handle::after { content:''; position:absolute; inset:8px; background:#fff; border:1px solid #24343a; border-radius:2px; }
.av-crop-nw { top:-16px; left:-16px; cursor:nwse-resize; }
.av-crop-ne { top:-16px; right:-16px; cursor:nesw-resize; }
.av-crop-sw { bottom:-16px; left:-16px; cursor:nesw-resize; }
.av-crop-se { bottom:-16px; right:-16px; cursor:nwse-resize; }
.av-crop-stage.is-dragging,.av-crop-stage.is-dragging .av-crop-box { cursor:grabbing; }
.av-crop-preview-row { display:flex; align-items:center; gap:12px; margin:0 0 12px; color:var(--muted); font-size:12px; }
.av-crop-preview-row .av-image-preview { width:64px; height:64px; aspect-ratio:1; flex:0 0 64px; margin:0; border-radius:50%; border:1px solid var(--line); }
.av-crop-preview-row>span { flex:1; }
.dialog .av-crop-help { font-size:12px; margin:0 0 12px; }
.av-crop-control output { font-variant-numeric:tabular-nums; float:right; }
.av-crop-position { margin:0 0 12px; }
.av-crop-position summary { min-height:36px; font-size:12px; cursor:pointer; color:var(--muted); }
.photo-view { width:100%; max-height:55dvh; object-fit:contain; border-radius:14px; background:var(--soft); }
.photo-preview { width:100%; max-height:230px; object-fit:contain; border-radius:14px; background:var(--soft); }
#toast { position:fixed; bottom:calc(24px + env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); z-index:30; width:max-content; max-width:calc(100% - 32px); padding:12px 17px; border-radius:13px; background:var(--ink); color:var(--bg); font-size:13px; box-shadow:0 5px 22px var(--shadow); }
.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; }
.invitations { padding:0 22px 12px; }
.invite-card { background:var(--brand-soft); border-radius:15px; padding:15px; margin-bottom:10px; }
.invite-card p { font-size:13px; margin-bottom:10px; }
.invite-card .button { min-height:40px; font-size:13px; padding:7px 12px; }
.banner { margin:10px 18px; padding:12px 14px; background:var(--brand-soft); border-radius:12px; color:var(--brand); font-size:12px; }
@media(min-width:700px) { body { padding:20px; } .app-shell { border-radius:26px; overflow:clip; min-height:calc(100dvh - 40px); box-shadow:0 12px 50px var(--shadow); } }
@media(max-width:370px) { .conv-header { gap:4px; padding-left:7px; padding-right:7px; } .conv-header .icon-btn { width:36px; flex-basis:36px; } .conv-header h1 { font-size:16px; } .avatar.small { width:36px; height:36px; } .conv-header > .avatar.small { width:56px; height:56px; border-radius:19px; font-size:23px; } .message { max-width:91%; } }
@media(prefers-reduced-motion:no-preference) { .button,.chat-row,.bottom-nav button { transition:background .15s ease; } }
@media(prefers-reduced-motion:no-preference) { .avatar.has-unread { animation:friend-message-pulse 1.8s ease-in-out infinite; } }
@keyframes friend-message-pulse { 0%,100% { box-shadow:0 0 0 0 color-mix(in srgb,var(--own,var(--brand)) 40%,transparent); } 50% { box-shadow:0 0 0 7px color-mix(in srgb,var(--own,var(--brand)) 0%,transparent); } }
.app-shell.is-conversation { height:var(--app-height,100dvh); min-height:0; overflow:hidden; }
.is-conversation .brand-header { padding:8px 14px; flex-shrink:0; border-bottom:1px solid var(--line); }
.is-conversation .wordmark { font-size:22px; }
.is-conversation .brand-mark { width:28px; height:28px; font-size:20px; }
.is-conversation #main { min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.is-conversation .app-footer { display:none; }
.conversation-layout { display:flex; flex-direction:column; flex:1; min-height:0; overflow:hidden; }
.conversation-layout .conv-header { position:relative; flex-shrink:0; }
.conversation-scroll { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.conversation-layout .composer { position:relative; flex:0 0 auto; margin-top:auto; align-items:flex-end; padding-bottom:max(10px,env(safe-area-inset-bottom)); }
.conversation-layout .composer textarea { height:72px; min-height:72px; max-height:144px; line-height:24px; resize:none; }
.conversation-layout .connection { flex-shrink:0; padding:3px 10px; font-size:10px; }
.shared-avatar-pin { border-color:#fff; width:38px; height:38px; padding:0; overflow:hidden; background:#277ba6; color:#fff; }
.shared-avatar-pin svg { width:100%; height:100%; }
.map-status { padding:5px 12px; }
.avatar-page-header { display:flex; align-items:center; gap:10px; padding:12px 18px 18px; }
.avatar-page-header h1 { font-size:25px; }
.app-shell.is-avatar { height:var(--app-height,100dvh); min-height:0; overflow:hidden; }
.is-avatar #main { min-height:0; overflow-y:auto; }
.is-avatar .brand-header { flex-shrink:0; padding:8px 14px; border-bottom:1px solid var(--line); }
.is-avatar .brand-mark { width:28px; height:28px; font-size:20px; }
.is-avatar .wordmark { font-size:22px; }
.is-avatar .app-footer { display:none; }
.avatar-page .av-heading { display:none; }
.avatar-page .av-top { padding-top:0; }
.avatar-page-header { padding:9px 14px; }
@media(min-width:700px) { .app-shell.is-conversation { height:calc(var(--app-height,100dvh) - 40px); min-height:0; } }
@media(min-width:700px) { .app-shell.is-avatar { height:calc(var(--app-height,100dvh) - 40px); min-height:0; } }
