/* =====================================================================
   عائلتي — modern UI
   ===================================================================== */
:root {
  --pri: #0f8a74; --pri-2: #16b394; --pri-ink: #0a5c4e; --pri-soft: #e4f5f0; --grad: linear-gradient(135deg, #0f8a74, #19b89a);
  --accent: #ff7a59; --accent-soft: #ffeee8;
  --bg: #f5f2ec; --surface: #ffffff; --surface-2: #f3efe8; --chat-bg: #efe9df;
  --ink: #17221f; --muted: #7a8784; --line: rgba(23, 34, 31, 0.08);
  --mine: #d6f2e9; --theirs: #ffffff;
  --red: #e5484d; --green: #22a06b; --blue: #3b82f6; --gold: #f5b83d;
  --shadow-sm: 0 1px 2px rgba(16, 24, 22, .05), 0 1px 1px rgba(16, 24, 22, .03);
  --shadow: 0 6px 24px rgba(16, 24, 22, .07), 0 1px 3px rgba(16, 24, 22, .05);
  --shadow-lg: 0 20px 50px rgba(16, 24, 22, .18);
  --r: 20px; --r-sm: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --glass: rgba(245, 242, 236, .78);
  color-scheme: light;
}
html[data-theme=dark] {
  --pri: #2cc5a4; --pri-2: #3fd9b6; --pri-ink: #8ef0d8; --pri-soft: rgba(44, 197, 164, .14); --grad: linear-gradient(135deg, #12907a, #2cc5a4);
  --accent-soft: rgba(255, 122, 89, .15);
  --bg: #0e1513; --surface: #17201d; --surface-2: #1e2926; --chat-bg: #0b1210;
  --ink: #e8f0ed; --muted: #8b9a96; --line: rgba(255, 255, 255, .07);
  --mine: #164a3f; --theirs: #1c2724;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 6px 24px rgba(0, 0, 0, .35); --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5);
  --glass: rgba(14, 21, 19, .8);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overscroll-behavior: none;
  font-family: 'Tajawal', 'Plus Jakarta Sans', -apple-system, 'Segoe UI', Tahoma, sans-serif; font-size: 16px; -webkit-font-smoothing: antialiased; }
html[dir=ltr] body { font-family: 'Plus Jakarta Sans', 'Tajawal', -apple-system, 'Segoe UI', sans-serif; font-size: 15.5px; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; text-align: inherit; }
input, textarea, select { font: inherit; color: inherit; }
input[type=date], input[type=time] { min-height: 48px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; } .block { display: block; } .pad { padding: 14px; } .center { margin: 8px auto; display: flex; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.ic { display: inline-flex; width: 22px; height: 22px; flex: none; }
.ic svg { width: 100%; height: 100%; }
.ic.tiny { width: 14px; height: 14px; vertical-align: -2px; }
.ic.hang svg, .cbtn.hang .ic svg { transform: rotate(135deg); }
html[dir=ltr] .ic-back svg, html[dir=ltr] .ic-chevL svg { transform: scaleX(-1); }
html[dir=rtl] .ic-send svg, html[dir=rtl] .flip-x svg { transform: scaleX(-1); }

/* splash / setup */
.splash { height: 100vh; display: grid; place-items: center; align-content: center; gap: 22px; }
.splash img { width: 96px; border-radius: 26px; box-shadow: var(--shadow-lg); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--pri); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.setup-msg { max-width: 420px; margin: 20vh auto; padding: 24px; text-align: center; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 18px; border-radius: 14px;
  background: var(--pri-soft); color: var(--pri-ink); font-weight: 700; transition: transform .12s, filter .12s; }
html[data-theme=dark] .btn { color: var(--pri); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(15, 138, 116, .28); }
.btn.danger { background: rgba(229, 72, 77, .1); color: var(--red); }
.btn.ghost { background: transparent; padding: 8px 10px; }
.btn.small { padding: 8px 13px; font-size: 14px; border-radius: 12px; }
.btn.block { width: 100%; margin-top: 10px; }
.btn:disabled { opacity: .55; }
.btn .ic { width: 18px; height: 18px; }
.link-btn { color: var(--pri); font-weight: 600; padding: 10px; margin-top: 6px; }
.link-btn.small { font-size: 12px; padding: 0 6px; margin: 0; color: var(--muted); }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--pri); flex: none; transition: background .15s; }
.icon-btn:active { background: var(--pri-soft); }
.icon-btn.light { color: #fff; background: rgba(255, 255, 255, .14); }
.chip-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: var(--pri-soft); color: var(--pri); font-weight: 700; font-size: 13px; }
.chip-btn .ic { width: 15px; height: 15px; }
.danger-text { color: var(--red) !important; }
.round-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--pri-soft); color: var(--pri); display: grid; place-items: center; transition: transform .12s; }
.round-btn:active { transform: scale(.92); }
.round-btn .ic { width: 19px; height: 19px; }

/* auth */
.auth { max-width: 400px; margin: 0 auto; padding: calc(48px + var(--safe-t)) 24px 40px; text-align: center; }
.auth-logo { width: 92px; height: 92px; border-radius: 26px; box-shadow: 0 16px 40px rgba(15, 138, 116, .3); }
.auth h1 { margin: 20px 0 6px; font-size: 30px; letter-spacing: -.3px; }
.seg { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; margin: 24px 0 16px; }
.seg button { flex: 1; padding: 10px; border-radius: 11px; font-weight: 700; color: var(--muted); text-align: center; transition: .2s; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg.small { margin: 6px 0 0; width: 100%; }
.seg.small button { padding: 8px 6px; font-size: 14px; }
.auth-form { display: grid; gap: 10px; text-align: start; }
.auth-form input, .field input, .settings > input, .settings textarea, .bp-row input, .two-col input {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
.auth-form input:focus, .field input:focus, .settings > input:focus, .settings textarea:focus { border-color: var(--pri); box-shadow: 0 0 0 4px var(--pri-soft); }
.form-err { color: var(--red); font-size: 14px; min-height: 18px; }

/* shell */
.shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + var(--safe-t)) 16px 8px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.3px; }
.brand img { width: 36px; height: 36px; border-radius: 11px; box-shadow: var(--shadow-sm); }
.brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
main { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 20px; }
.bottomnav { display: flex; margin: 0 10px calc(8px + var(--safe-b)); padding: 6px; background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); }
.nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 2px; font-size: 11.5px; color: var(--muted); font-weight: 700; text-align: center; }
.nb-ic { position: relative; display: grid; place-items: center; width: 52px; height: 30px; border-radius: 15px; transition: background .2s; }
.nav-btn.on { color: var(--pri); }
.nav-btn.on .nb-ic { background: var(--pri-soft); }
.badge { position: absolute; top: -4px; inset-inline-end: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent);
  color: #fff; font-size: 11px; font-style: normal; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.tab { animation: fadeUp .25s ease-out; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 18px 10px; }
.section-head h2 { margin: 0; font-size: 24px; letter-spacing: -.3px; }

.banner { display: flex; align-items: center; gap: 10px; margin: 4px 14px 8px; padding: 12px 14px; border-radius: 18px; background: var(--accent-soft); color: #b04a2e; font-size: 14px; font-weight: 500; }
html[data-theme=dark] .banner { color: #ffb39e; }
.banner > span:not(.ic):not(.bd-emoji) { flex: 1; }
.banner > .ic { flex: none; }
.banner b { font-weight: 800; }
.banner.live { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(15, 138, 116, .3); animation: glow 1.8s ease-in-out infinite; }
.banner.bday, html[data-theme=dark] .banner.bday { background: linear-gradient(135deg, #ff9a76, #ffcf67); color: #4a2400; }
.bd-emoji { font-size: 24px; flex: none !important; }
.bn-x { width: 26px; height: 26px; display: grid; place-items: center; opacity: .6; }
.bn-x .ic { width: 16px; height: 16px; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px rgba(22, 179, 148, .2); } }

/* avatars */
.avatar { border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; object-fit: cover; flex: none; background: var(--pri); }
.avatar.fam { background: var(--grad); }
.avatar.fam .ic { width: 55%; height: 55%; }
.av-wrap { position: relative; }
.online { position: absolute; bottom: 1px; inset-inline-start: 1px; width: 14px; height: 14px; border-radius: 50%; background: var(--green); border: 2.5px solid var(--bg); }

/* chat list */
.list-label { padding: 18px 20px 6px; font-size: 13px; color: var(--muted); font-weight: 800; letter-spacing: .2px; }
.hint { margin: 0 20px 6px; font-size: 13px; color: var(--muted); }
.chat-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 2px 10px; border-radius: 20px; transition: background .15s; }
.chat-row:active { background: var(--surface-2); }
.chat-row.fam-row { background: var(--surface); margin: 4px 12px 2px; box-shadow: var(--shadow); padding: 12px; }
.cr-mid { flex: 1; min-width: 0; }
.cr-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.cr-top b { font-size: 16.5px; }
.cr-time { font-size: 12px; color: var(--muted); }
.cr-last { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.cr-last span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-last.typing, small.typing { color: var(--pri) !important; font-weight: 700; }
.chat-row.unread .cr-last { color: var(--ink); font-weight: 700; }
.chat-row.unread .cr-time { color: var(--accent); font-weight: 700; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.cr-actions { display: flex; gap: 6px; }
.empty { text-align: center; padding: 30px 24px; }
.empty p:first-child { font-size: 17px; font-weight: 700; }

/* chat view */
.chat-view, .album-view { position: fixed; inset: 0; background: var(--chat-bg); display: flex; flex-direction: column; z-index: 20; animation: slideIn .22s ease-out; }
.album-view { background: var(--bg); z-index: 25; }
@keyframes slideIn { from { transform: translateX(-24px); opacity: .4; } }
html[dir=ltr] .chat-view, html[dir=ltr] .album-view { animation-name: slideInL; }
@keyframes slideInL { from { transform: translateX(24px); opacity: .4; } }
.chat-head { display: flex; align-items: center; gap: 6px; padding: calc(8px + var(--safe-t)) 6px 8px; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); z-index: 2; }
.ch-click { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.ch-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ch-mid b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-mid small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-input { flex: 1; border: 0; background: var(--surface-2); border-radius: 14px; padding: 11px 14px; outline: none; }
.search-results { position: absolute; top: calc(60px + var(--safe-t)); inset-inline: 0; bottom: 0; background: var(--bg); z-index: 3; overflow-y: auto; }
.sr-row { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.sr-top { display: flex; justify-content: space-between; }
.sr-top small { color: var(--muted); }
.msgs-wrap { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 10px 6px; }
.day-sep { text-align: center; margin: 14px 0 8px; position: sticky; top: 4px; z-index: 1; }
.day-sep span { background: var(--glass); backdrop-filter: blur(10px); padding: 5px 14px; border-radius: 12px; font-size: 12px; color: var(--muted); font-weight: 700; box-shadow: var(--shadow-sm); }
.time-sep { text-align: center; font-size: 11px; color: var(--muted); margin: 10px 0 4px; opacity: .8; }
.row { display: flex; margin: 1.5px 0; }
.row.mine { justify-content: flex-end; }
.row.theirs { justify-content: flex-start; }
.bubble { max-width: 80%; padding: 8px 12px 6px; border-radius: 20px; background: var(--theirs); box-shadow: var(--shadow-sm); position: relative; cursor: default; }
.bubble.mine { background: var(--mine); border-start-end-radius: 6px; }
.bubble.theirs { border-start-start-radius: 6px; }
.bubble.has-media { padding: 4px 4px 6px; }
.bubble .text { white-space: pre-wrap; word-break: break-word; line-height: 1.55; padding: 0 4px; }
.bubble .text.deleted { color: var(--muted); font-style: italic; font-size: 14px; }
.bubble a, .post-text a { color: var(--pri); }
.sender { font-size: 12.5px; font-weight: 800; padding: 0 4px 2px; }
.meta { display: flex; gap: 6px; justify-content: flex-end; align-items: center; font-size: 11px; color: var(--muted); padding: 0 4px; min-height: 0; }
.meta:empty { display: none; }
.m-time { display: none; }
.bubble.show-time .m-time { display: inline; animation: fadeUp .2s; }
.ticks { font-size: 12px; letter-spacing: -2px; color: var(--muted); font-weight: 700; }
.ticks.read { color: var(--blue); }
.ticks.pending { letter-spacing: 0; }
.react-row { display: flex; margin: -4px 10px 3px; position: relative; z-index: 1; }
.react-row.mine { justify-content: flex-end; }
.reacts { display: flex; gap: 4px; flex-wrap: wrap; }
.react-chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 14px; border: 1.5px solid transparent; }
.react-chip.mine { border-color: var(--pri); }
.react-chip small { font-size: 11px; font-weight: 700; color: var(--muted); }
.quote { border-inline-start: 3px solid var(--pri); background: rgba(0, 0, 0, .04); border-radius: 10px; padding: 5px 9px; margin: 2px 2px 5px; font-size: 13px; display: flex; flex-direction: column; cursor: pointer; }
html[data-theme=dark] .quote { background: rgba(255, 255, 255, .05); }
.quote span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-wrap.flash .bubble { animation: flash 1.4s; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 4px var(--gold); } }
.media-img, .media-video { display: block; max-width: 100%; max-height: 360px; border-radius: 16px; background: var(--surface-2); }
.media-img { cursor: zoom-in; }
.bubble .media-img, .bubble .media-video { width: 260px; object-fit: cover; }
.media-audio { width: 250px; max-width: 100%; height: 42px; display: block; }
.file-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(0, 0, 0, .04); text-decoration: none; color: inherit; min-width: 220px; }
html[data-theme=dark] .file-card { background: rgba(255, 255, 255, .05); }
.fc-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--blue); color: #fff; display: grid; place-items: center; flex: none; }
.fc-meta { display: flex; flex-direction: column; min-width: 0; }
.fc-meta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.fc-meta small { color: var(--muted); font-size: 12px; }
.loc-card { display: block; width: 250px; border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; background: var(--surface-2); }
.loc-map { position: relative; height: 130px; background-size: cover; background-position: center; }
.loc-pin { position: absolute; transform: translate(-50%, -100%); color: var(--red); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
html[dir=rtl] .loc-pin { transform: translate(50%, -100%); }
.loc-pin .ic { width: 30px; height: 30px; }
.loc-pin svg { fill: var(--red); stroke: #fff; }
.loc-foot { display: flex; align-items: center; gap: 6px; padding: 8px 10px; font-size: 13px; font-weight: 700; }
.loc-foot small { margin-inline-start: auto; font-weight: 400; font-size: 9px; color: var(--muted); }
.loc-foot .ic { width: 16px; height: 16px; color: var(--red); }
.call-log, .sys-msg { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px auto; padding: 7px 14px; width: fit-content; max-width: 90%;
  background: var(--glass); backdrop-filter: blur(10px); border-radius: 14px; font-size: 13px; color: var(--muted); box-shadow: var(--shadow-sm); text-align: center; }
.call-log { cursor: pointer; }
.call-log .ic { width: 16px; height: 16px; color: var(--pri); }
.call-log.missed .ic, .call-log.missed span { color: var(--red); }
.sys-msg.party { background: linear-gradient(135deg, #ffe1d2, #fff1c9); color: #6b3a00; font-weight: 700; }
.mention { color: var(--pri); font-weight: 800; }
.mention-pop { position: fixed; z-index: 300; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; display: grid; gap: 2px; }
.mention-pop button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; font-weight: 600; }
.mention-pop button:active { background: var(--pri-soft); }

.composer { background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding: 8px 8px calc(8px + var(--safe-b)); }
.composer-row, .rec-bar { display: flex; align-items: flex-end; gap: 6px; }
.composer textarea { flex: 1; resize: none; border: 0; background: var(--surface); border-radius: 22px; padding: 11px 16px; max-height: 120px; outline: none; line-height: 1.4; box-shadow: var(--shadow-sm); }
.send-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 4px 12px rgba(15, 138, 116, .3); transition: transform .12s; }
.send-btn:active { transform: scale(.92); }
.send-btn.small { width: 38px; height: 38px; }
.reply-bar { display: flex; align-items: center; gap: 8px; margin: 0 4px 8px; padding: 8px 12px; border-radius: 14px; background: var(--surface); border-inline-start: 4px solid var(--pri); color: var(--pri); }
.rb-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--ink); }
.rb-mid span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-bar { height: 4px; background: var(--pri-soft); border-radius: 4px; margin: 0 6px 8px; overflow: hidden; }
.upload-bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.rec-bar { align-items: center; }
.rec-mid { flex: 1; display: flex; align-items: center; gap: 10px; background: rgba(229, 72, 77, .1); border-radius: 22px; padding: 11px 16px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.rec-time { font-weight: 800; font-variant-numeric: tabular-nums; }
.attach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 6px 0 4px; }
.attach-grid button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; text-align: center; }
.ag-ic { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow); }
.react-pick { display: flex; justify-content: space-between; background: var(--surface-2); border-radius: 999px; padding: 6px 10px; margin-bottom: 6px; }
.react-pick button { font-size: 28px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; transition: transform .12s; }
.react-pick button:active { transform: scale(1.3); }
.react-pick button.on { background: var(--pri-soft); }
.edit-ta { width: 100%; }

/* cards & feed */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.stories { display: flex; gap: 12px; overflow-x: auto; padding: 4px 16px 14px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: none; width: 70px; }
.story small { font-size: 12px; font-weight: 600; max-width: 70px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-ring { position: relative; padding: 3px; border-radius: 50%; background: conic-gradient(from 200deg, #ff7a59, #f5b83d, #16b394, #3b82f6, #ff7a59); }
.story-ring .avatar { border: 3px solid var(--bg); }
.story-ring.seen { background: var(--line); }
.story-ring.add { background: transparent; border: 2px dashed var(--line); padding: 1px; }
.story-plus { position: absolute; bottom: 0; inset-inline-end: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; border: 2px solid var(--bg); }
.story-plus .ic { width: 13px; height: 13px; }
.story-ta { width: 100%; border: 0 !important; color: #fff; font-size: 18px; font-weight: 700; text-align: center; padding: 26px 16px !important; border-radius: 18px !important; resize: none; outline: none; }
.story-ta::placeholder { color: rgba(255, 255, 255, .7); }
.color-row { display: flex; gap: 8px; justify-content: center; }
.color-dot { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.or { text-align: center; color: var(--muted); font-size: 13px; }
.story-viewer { position: fixed; inset: 0; z-index: 140; background: #000; color: #fff; display: flex; align-items: center; justify-content: center; }
.sv-media { max-width: 100%; max-height: 100%; object-fit: contain; }
.sv-text { position: absolute; inset: 0; display: grid; place-items: center; padding: 40px; font-size: 26px; font-weight: 800; text-align: center; line-height: 1.5; white-space: pre-wrap; }
.sv-bars { position: absolute; top: calc(10px + var(--safe-t)); inset-inline: 10px; display: flex; gap: 4px; z-index: 3; }
.sv-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; position: relative; }
.sv-bars i.done { background: #fff; }
.sv-bars i.run::after { content: ''; position: absolute; inset: 0; background: #fff; transform-origin: right; animation: sv 5s linear forwards; }
html[dir=ltr] .sv-bars i.run::after { transform-origin: left; }
@keyframes sv { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.sv-head { position: absolute; top: calc(22px + var(--safe-t)); inset-inline: 12px; display: flex; align-items: center; gap: 10px; z-index: 3; }
.sv-head small { opacity: .75; flex: 1; }
.sv-tap { position: absolute; top: 80px; bottom: 80px; width: 40%; z-index: 2; }
.sv-tap.prev { inset-inline-start: 0; }
.sv-tap.next { inset-inline-end: 0; }
.sv-views { position: absolute; bottom: calc(20px + var(--safe-b)); inset-inline: 16px; display: flex; gap: 8px; align-items: center; justify-content: center; background: rgba(0, 0, 0, .45); padding: 10px 14px; border-radius: 14px; font-size: 14px; z-index: 3; }
.posts { display: grid; gap: 14px; padding: 0 12px; }
.feed-composer { margin: 0 12px 16px; padding: 14px; }
.fc-top { display: flex; gap: 10px; align-items: flex-start; }
.fc-top textarea { flex: 1; border: 0; resize: none; background: var(--surface-2); border-radius: 16px; padding: 12px 14px; outline: none; min-height: 58px; }
.fc-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.fc-previews:empty { display: none; }
.fc-thumb { position: relative; width: 76px; height: 76px; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.fc-thumb img, .fc-thumb video { width: 100%; height: 100%; object-fit: cover; }
.fc-x { position: absolute; top: 4px; inset-inline-start: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; }
.fc-x .ic { width: 14px; height: 14px; }
.feed-composer .upload-bar { margin: 10px 0 0; }
.fc-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.post { padding: 14px 0 6px; overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 0 14px; }
.ph-mid { flex: 1; display: flex; flex-direction: column; }
.ph-mid small { color: var(--muted); font-size: 12px; }
.post-text { padding: 10px 16px 4px; white-space: pre-wrap; word-break: break-word; line-height: 1.65; font-size: 16px; }
.link-card { display: flex; align-items: center; gap: 8px; margin: 8px 14px; padding: 11px 13px; border-radius: 14px; background: var(--pri-soft); color: var(--pri); text-decoration: none; font-weight: 700; direction: ltr; }
.post-media { display: grid; gap: 3px; margin-top: 10px; }
.post-media.n2, .post-media.n3, .post-media.n4 { grid-template-columns: 1fr 1fr; }
.post-media.n3 > :first-child { grid-column: span 2; }
.post-media .media-img, .post-media .media-video { width: 100%; max-height: 480px; border-radius: 0; object-fit: cover; }
.post-media.n2 .media-img, .post-media.n3 .media-img, .post-media.n4 .media-img { aspect-ratio: 1; height: 100%; }
.post-media .media-audio { margin: 6px 14px; }
.more-wrap { position: relative; }
.more-wrap .media-img { pointer-events: none; }
.more-n { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; font-size: 28px; font-weight: 800; cursor: pointer; }
.post-actions { display: flex; align-items: center; gap: 4px; padding: 6px 8px 4px; }
.act { display: flex; align-items: center; gap: 5px; padding: 8px 12px; border-radius: 12px; color: var(--muted); font-weight: 700; transition: transform .12s; }
.act:active { transform: scale(.92); }
.act.liked { color: var(--accent); }
.act.liked svg { fill: currentColor; }
.likers { color: var(--muted); font-size: 12px; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.comments { border-top: 1px solid var(--line); padding: 10px 14px 12px; }
.c-list { display: grid; gap: 8px; margin-bottom: 8px; }
.comment { display: flex; gap: 8px; align-items: flex-start; }
.c-body { background: var(--surface-2); border-radius: 16px; padding: 7px 12px; display: flex; flex-direction: column; font-size: 14px; }
.c-body small { color: var(--muted); font-size: 11px; }
.c-form { display: flex; gap: 6px; }
.c-form input { flex: 1; border: 0; background: var(--surface-2); border-radius: 20px; padding: 10px 14px; outline: none; }

/* album */
.albums { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 14px; }
@media (min-width: 640px) { .albums { grid-template-columns: repeat(3, 1fr); } }
.album-card { display: flex; flex-direction: column; gap: 3px; text-align: start; }
.al-cover { aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow); margin-bottom: 6px; position: relative; }
.al-cover img, .al-cover video { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.album-card:active .al-cover img { transform: scale(1.04); }
.al-empty { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); }
.al-empty .ic { width: 40px; height: 40px; }
.album-card b { font-size: 15px; padding: 0 4px; }
.album-card small { color: var(--muted); font-size: 12px; padding: 0 4px; }
.al-scroll { flex: 1; overflow-y: auto; padding-bottom: 100px; }
.al-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
@media (min-width: 640px) { .al-grid { grid-template-columns: repeat(5, 1fr); } }
.al-item { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); }
.al-item img, .al-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.al-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 26px; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.fab { position: fixed; bottom: calc(24px + var(--safe-b)); inset-inline-end: 20px; width: 60px; height: 60px; border-radius: 20px; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 28px rgba(15, 138, 116, .4); z-index: 5; }
.fab .ic { width: 28px; height: 28px; }

/* events */
.day-card, .up-card, .cal-card, .bday-prompt, .today-card { margin: 0 12px 12px; }
.day-card { padding: 14px; display: grid; gap: 4px; }
.up-card { padding: 4px; }
.bday-prompt { padding: 16px; background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.bp-top { display: flex; align-items: center; gap: 12px; }
.bp-top p { margin: 2px 0 0; }
.bp-row { display: flex; gap: 8px; margin-top: 12px; }
.bp-row input { flex: 1; }
.big-emoji { font-size: 40px; line-height: 1; }
.big-emoji.xl { font-size: 64px; }
.today-card { padding: 16px; position: relative; overflow: hidden; }
.today-card.party { background: linear-gradient(135deg, #ff9a76 0%, #ffcf67 100%); color: #3d1f00; }
.today-card.party .muted { color: rgba(61, 31, 0, .7); }
.tc-body { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.tc-body h3 { margin: 2px 0; font-size: 19px; }
.tc-body small { font-weight: 800; opacity: .75; }
.today-card .btn { position: relative; z-index: 1; }
.today-card.party .btn.primary { background: #3d1f00; box-shadow: none; }
.confetti span { position: absolute; top: -30px; font-size: 22px; animation: fall 3.2s linear infinite; }
@keyframes fall { to { transform: translateY(240px) rotate(360deg); opacity: 0; } }
.ev-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 16px; text-align: start; }
.ev-row:active { background: var(--surface-2); }
.ev-row.missed b { color: var(--red); }
.ev-av { position: relative; }
.ev-badge { position: absolute; bottom: -4px; inset-inline-end: -6px; font-size: 16px; }
.ev-emoji { width: 42px; height: 42px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; font-size: 22px; flex: none; }
.ev-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ev-mid b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-mid small { color: var(--muted); font-size: 12.5px; }
.ev-count { font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 10px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.ev-count.soon { background: var(--pri-soft); color: var(--pri); }
.ev-count.today { background: var(--accent); color: #fff; }
.cal-card { padding: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-head b { font-size: 17px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-grid.wd span { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px 0; }
.cal-cell { min-width: 0; aspect-ratio: 1; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 600; font-size: 15px; text-align: center; transition: background .15s; }
.cal-cell:active { background: var(--surface-2); }
.cal-cell.today { background: var(--pri-soft); color: var(--pri); font-weight: 800; }
.cal-cell.sel { background: var(--grad); color: #fff; }
.cal-dots { display: flex; gap: 3px; height: 6px; }
.cal-dots i, .cal-legend i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.cal-dots i.b, .cal-legend i.b { background: var(--accent); }
.cal-dots i.e, .cal-legend i.e { background: var(--blue); }
.cal-cell.sel .cal-dots i { background: #fff; }
.cal-legend { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--muted); padding: 8px 4px 0; }
.cal-legend span { display: flex; align-items: center; gap: 5px; }
.cal-legend .link-btn { margin-inline-start: auto; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-row button { width: 44px; height: 44px; border-radius: 14px; font-size: 22px; background: var(--surface-2); display: grid; place-items: center; }
.emoji-row button.on { background: var(--pri-soft); box-shadow: 0 0 0 2px var(--pri); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chk-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chk-row label { display: flex; align-items: center; gap: 6px; background: var(--surface-2); padding: 9px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--pri); flex: none; }

/* sheets / settings */
.sheet-ov { position: fixed; inset: 0; background: rgba(8, 14, 12, .45); backdrop-filter: blur(2px); z-index: 60; display: flex; align-items: flex-end; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; margin: 0 auto; background: var(--surface); border-radius: 28px 28px 0 0; padding: 8px 18px calc(22px + var(--safe-b)); max-height: 90vh; overflow-y: auto; animation: up .25s cubic-bezier(.2, .9, .3, 1.1); box-shadow: var(--shadow-lg); }
@keyframes up { from { transform: translateY(60px); } }
.sheet-handle { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 14px; }
.help h3, .settings h3 { margin: 4px 0 6px; display: flex; align-items: center; gap: 8px; }
.help ol { padding-inline-start: 22px; line-height: 2; }
.settings { display: grid; gap: 10px; }
.set-av { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--pri); font-size: 13px; font-weight: 700; cursor: pointer; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
.set-group { font-size: 12.5px; font-weight: 800; color: var(--muted); margin-top: 14px; padding: 0 4px; letter-spacing: .3px; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: 14px; background: var(--surface-2); width: 100%; text-align: start; }
.set-row > span:not(.ic) { flex: 1; }
.set-row.col { flex-direction: column; align-items: stretch; gap: 4px; }
.set-row.col > span { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.set-row.slim { background: transparent; padding: 4px; font-size: 14px; }
.set-row .ok { color: var(--green); }
.opt-head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.opt-head h3 { margin: 0; }
.member-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.mchip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
html[dir=rtl] .mchip { padding: 3px 3px 3px 10px; }
.pick-list { display: grid; gap: 4px; max-height: 45vh; overflow-y: auto; }
.pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface-2); }
.pick span { flex: 1; font-weight: 600; }
.adm-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface-2); width: 100%; text-align: start; }

/* toast / lightbox / lock */
#toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translate(-50%, 20px); background: rgba(23, 34, 31, .94); color: #fff; backdrop-filter: blur(10px);
  padding: 12px 18px; border-radius: 16px; font-size: 14px; max-width: 88vw; opacity: 0; pointer-events: none; transition: .25s; z-index: 400; text-align: center; box-shadow: var(--shadow-lg); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .94); z-index: 150; display: grid; place-items: center; animation: fade .15s; }
.lightbox img, .lightbox video { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lb-x, .lb-dl, .lb-del, .lb-nav { position: absolute; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; display: grid; place-items: center; backdrop-filter: blur(8px); }
.lb-x { top: calc(14px + var(--safe-t)); inset-inline-end: 14px; }
.lb-dl { top: calc(14px + var(--safe-t)); inset-inline-start: 14px; }
.lb-del { top: calc(14px + var(--safe-t)); inset-inline-start: 68px; color: #ff8a8d; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-nav.prev { inset-inline-start: 10px; }
.lb-nav.next { inset-inline-end: 10px; }
.lb-count { position: absolute; bottom: calc(18px + var(--safe-b)); left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; background: rgba(0, 0, 0, .45); padding: 6px 12px; border-radius: 12px; white-space: nowrap; }
.lock { position: fixed; inset: 0; z-index: 105; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 30px; text-align: center; }
.lock img { width: 90px; border-radius: 26px; box-shadow: var(--shadow-lg); }

/* incoming + call */
.incoming, .call { position: fixed; inset: 0; z-index: 100; color: #fff; display: flex; flex-direction: column;
  background: radial-gradient(120% 80% at 50% 0%, #1d5a4f 0%, #0a1714 70%); }
.incoming { z-index: 110; }
.in-top { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 20px; }
.in-top h2 { margin: 22px 0 0; font-size: 32px; letter-spacing: -.3px; }
.in-top p { margin: 0; opacity: .8; }
.pulse { border-radius: 50%; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .35); } 100% { box-shadow: 0 0 0 36px rgba(255, 255, 255, 0); } }
.in-actions { display: flex; justify-content: space-around; padding: 30px 20px calc(54px + var(--safe-b)); }
.in-btn, .cb-wrap { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12px; opacity: .95; }
.cbtn { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(10px); transition: transform .12s, background .2s; }
.cbtn:active { transform: scale(.9); }
.in-btn .cbtn { width: 76px; height: 76px; }
.cbtn .ic { width: 25px; height: 25px; }
.cbtn.red { background: var(--red); }
.cbtn.green { background: var(--green); animation: shake 1.2s infinite; }
.cbtn.off { background: #fff; color: #17221f; }
.cbtn.on { background: var(--gold); color: #3a2a00; }
@keyframes shake { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-12deg); } 80% { transform: rotate(12deg); } 90% { transform: rotate(-8deg); } }
.call-top { display: flex; align-items: center; gap: 8px; padding: calc(12px + var(--safe-t)) 12px 8px; z-index: 2; }
.ct-mid { flex: 1; text-align: center; }
.ct-mid b { font-size: 19px; display: block; }
.call-status { font-size: 13.5px; opacity: .8; font-variant-numeric: tabular-nums; }
.stage { flex: 1; position: relative; min-height: 0; }
.waiting { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.tiles { position: absolute; inset: 0 8px; display: grid; gap: 8px; }
.tiles.n1 { grid-template-columns: 1fr; }
.tiles.n2 { grid-template-rows: 1fr 1fr; }
.tiles.n3, .tiles.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.tiles.n5, .tiles.n6 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; }
.tile { position: relative; border-radius: 24px; overflow: hidden; background: #15403a; min-height: 0; }
.tile-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-av { position: absolute; inset: 0; display: none; place-items: center; }
.tile.novideo .tile-video { opacity: 0; }
.tile.novideo .tile-av { display: grid; }
.audio .tile-video { opacity: 0; }
.audio .tile-av { display: grid; }
.tile-name { position: absolute; bottom: 10px; inset-inline-start: 10px; display: flex; align-items: center; gap: 5px; background: rgba(0, 0, 0, .45); backdrop-filter: blur(8px); padding: 5px 11px; border-radius: 12px; font-size: 13px; }
.tile-state { position: absolute; top: 10px; inset-inline-start: 10px; font-size: 12px; opacity: .85; }
.tile-state:empty { display: none; }
.tile-vol { position: absolute; bottom: 8px; inset-inline-end: 8px; width: 38px; height: 38px; border-radius: 50%; background: rgba(0, 0, 0, .45); backdrop-filter: blur(8px); color: #fff; display: grid; place-items: center; }
.tile-vol .ic { width: 18px; height: 18px; }
.self-view { position: absolute; top: calc(76px + var(--safe-t)); inset-inline-end: 14px; width: 104px; height: 144px; object-fit: cover; border-radius: 18px; border: 2px solid rgba(255, 255, 255, .5); z-index: 3; background: #000; box-shadow: var(--shadow-lg); }
.self-view.mirror { transform: scaleX(-1); }
.self-view.hidden { opacity: 0; }
.call-controls { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 16px 10px calc(24px + var(--safe-b)); z-index: 2; }
.mini-info { display: none; }
.call.mini { inset: auto; top: calc(70px + var(--safe-t)); inset-inline-start: 12px; width: 118px; height: 168px; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); cursor: pointer; z-index: 90; }
.call.mini .call-top, .call.mini .call-controls, .call.mini .self-view, .call.mini .vol-pop, .call.mini .tile-name, .call.mini .tile-vol, .call.mini .waiting h2 { display: none; }
.call.mini .tiles { inset: 0; gap: 0; grid-template-columns: 1fr; grid-template-rows: 1fr; }
.call.mini .tile { border-radius: 0; display: none; }
.call.mini .tile:first-child { display: block; }
.call.mini .tile-av .avatar { width: 54px !important; height: 54px !important; }
.call.mini .waiting .avatar { width: 54px !important; height: 54px !important; }
.call.mini .mini-info { display: block; position: absolute; bottom: 0; inset-inline: 0; text-align: center; font-size: 12px; font-weight: 700; padding: 6px; background: rgba(0, 0, 0, .5); z-index: 4; }
.vol-pop { position: absolute; left: 50%; bottom: calc(130px + var(--safe-b)); transform: translateX(-50%); width: min(320px, 90vw); background: var(--surface); color: var(--ink);
  border-radius: 22px; padding: 14px; z-index: 5; box-shadow: var(--shadow-lg); display: grid; gap: 12px; }
.vp-head { display: flex; align-items: center; gap: 10px; }
.vp-head b:first-of-type { flex: 1; }
.vp-row { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.vp-row input { flex: 1; accent-color: var(--pri); }

@media (min-width: 760px) {
  .shell, .chat-view, .album-view { max-width: 760px; margin: 0 auto; inset-inline: 0; }
  .chat-view, .album-view { box-shadow: var(--shadow-lg); }
}

/* maps & live location */
.map-view { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: flex; flex-direction: column; animation: fade .2s; }
.map-box { flex: 1; position: relative; background: var(--surface-2); }
.map-box .leaflet-container { width: 100%; height: 100%; font-family: inherit; }
.map-static { position: absolute; inset: 0; background-size: cover; background-position: center; display: grid; place-items: center; }
.map-static .loc-pin { position: absolute; }
.map-msg { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: var(--surface); padding: 8px 14px; border-radius: 12px; box-shadow: var(--shadow); font-size: 13px; z-index: 500; white-space: nowrap; }
.map-panel { background: var(--surface); border-radius: 26px 26px 0 0; padding: 16px 16px calc(18px + var(--safe-b)); box-shadow: 0 -10px 30px rgba(0, 0, 0, .12); display: grid; gap: 10px; z-index: 2; margin-top: -20px; position: relative; }
.map-panel h4 { margin: 4px 0 0; font-size: 15px; }
.dur-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dur-row .btn { padding: 12px 6px; }
.mp-pin { width: 44px; height: 44px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
.mp-pin span { transform: rotate(45deg); color: #fff; font-weight: 800; font-family: Tajawal, sans-serif; font-size: 18px; }
.mp-me { width: 18px; height: 18px; border-radius: 50%; background: #3b82f6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(59, 130, 246, .25); }
.live-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: rgba(0, 0, 0, .04); min-width: 240px; }
html[data-theme=dark] .live-card { background: rgba(255, 255, 255, .05); }
.lc-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--muted); color: #fff; display: grid; place-items: center; flex: none; }
.live-card.on .lc-ic { background: var(--red); animation: glowR 1.6s infinite; }
@keyframes glowR { 50% { box-shadow: 0 0 0 6px rgba(229, 72, 77, .2); } }
.lc-mid { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lc-mid small { color: var(--muted); font-size: 12px; }
.banner.sharing { background: rgba(229, 72, 77, .12); color: var(--red); }

/* date picker */
.date-field { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); font-weight: 700; color: var(--ink); }
.date-field .ic { color: var(--pri); }
.date-field.empty { color: var(--muted); font-weight: 500; }
.bp-row .date-field { flex: 1; }
.dp-head { display: flex; align-items: center; gap: 6px; }
.dp-sel { flex: 1; padding: 10px 8px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); font-weight: 700; min-width: 0; }
.date-picker .cal-cell:disabled { opacity: .25; }
.dp-chosen { text-align: center; font-weight: 800; color: var(--pri); padding: 4px; }
.map-static .loc-pin { transform: translate(-50%, -100%) !important; }
