/* Contacts++ web app. Builds on the site palette in /styles.css. */
body.webapp { background: var(--paper); min-height: 100vh; }
.boot, .noscript { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 12px; color: var(--muted); }
.boot img { width: 56px; margin: auto; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; transform: scale(.94); } }

/* Shell */
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side-nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 14px; border-right: 1px solid var(--line); background: #fff; overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: 10px; font: 800 22px Manrope; padding: 4px 10px 18px; }
.side-brand img { width: 34px; height: 34px; border-radius: 10px; }
.side-brand b { color: var(--green); }
.side-nav nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; font-weight: 600; color: #34504c; position: relative; }
.side-nav nav a:hover { background: #eef6f2; }
.side-nav nav a.active { background: var(--mint); color: var(--ink); }
.nav-icon { width: 24px; text-align: center; font-size: 18px; }
.nav-divider { height: 1px; background: var(--line); margin: 10px 8px; }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #b3261e; color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.side-user { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 8px; }
.chip-link { display: flex; align-items: center; gap: 10px; }
.chip-link b { display: block; } .chip-link small { color: var(--muted); }
.view { min-width: 0; padding: 24px clamp(16px, 4vw, 40px) max(96px, calc(32px + env(safe-area-inset-bottom))); outline: none; }
.bottom-nav { display: none; }
.mobile-top { display: none; }
#root.full .app-shell { display: block; }

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .side-nav { display: none; }
  .mobile-top { height: 58px; padding: max(8px, env(safe-area-inset-top)) 14px 8px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 18; }
  .mobile-brand { display: flex; align-items: center; gap: 7px; color: var(--ink); font: 800 18px Manrope; }
  .mobile-brand img { width: 30px; height: 30px; border-radius: 9px; }
  .mobile-brand b { color: var(--green); }
  .mobile-top > div { display: flex; gap: 4px; }
  .mobile-alert { position: relative; }
  .mobile-alert .badge { position: absolute; top: -4px; right: -5px; }
  .view { padding: 16px 16px max(112px, calc(88px + env(safe-area-inset-bottom))); }
  .bottom-nav { display: flex; position: fixed; inset: auto 0 0 0; height: calc(68px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: #fff; border-top: 1px solid var(--line); z-index: 20; }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--muted); position: relative; }
  .bottom-nav a.active { color: var(--ink); }
  .bottom-nav a.active .nav-icon { background: var(--mint); border-radius: 14px; }
  .bottom-nav .nav-icon { width: 52px; height: 28px; display: grid; place-items: center; }
  .bottom-nav .badge { position: absolute; top: 4px; left: 54%; margin: 0; }
}

/* Page layout */
.page { max-width: 760px; margin: 0 auto; }
.page.narrow { max-width: 520px; text-align: center; padding-top: 10vh; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font: 800 clamp(26px, 4vw, 34px) Manrope; letter-spacing: -1px; margin: 0; flex: 1; }
.page-head .back { font-size: 22px; padding: 4px 8px; border-radius: 10px; }
.section-title { font: 700 18px Manrope; margin: 26px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 18px; margin-bottom: 14px; }
.panel h3 { margin: 0 0 6px; font: 700 17px Manrope; }
.row { display: flex; align-items: center; gap: 12px; }
.row > .grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 12px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; }
.tabs button, .tabs a { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.tabs .on { background: var(--mint); border-color: var(--mint); }
.list { background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.list > * + * { border-top: 1px solid var(--line); }
.item { display: flex; align-items: center; gap: 14px; padding: 13px 16px; }
a.item:hover, button.item:hover { background: #f4faf7; }
button.item { width: 100%; text-align: left; border: 0; background: none; font: inherit; cursor: pointer; }
.item .grow { flex: 1; min-width: 0; }
.item a.grow { color: inherit; text-decoration: none; }
.item b { display: block; } .item .sub { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .meta { color: var(--muted); font-size: 12px; text-align: right; flex: none; }
.unread b, .unread .sub { color: var(--ink); font-weight: 700; }
.count { background: var(--green); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; display: inline-block; margin-top: 4px; }
.avatar { border-radius: 50%; flex: none; object-fit: cover; display: inline-grid; place-items: center; background: var(--mint); color: var(--ink); font-weight: 700; }
.verified { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 5px; border-radius: 50%; background: #1d6fe0; color: #fff; font-size: 10px; vertical-align: 1px; }
.empty { text-align: center; padding: 48px 18px; color: var(--muted); }
.empty-icon { font-size: 40px; margin-bottom: 6px; }
.empty h3 { color: var(--ink); font: 700 19px Manrope; margin: 6px 0; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: var(--muted); }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { color: #b3261e; }
.linkButton { background: none; border: 0; color: var(--green); font: inherit; font-weight: 700; cursor: pointer; padding: 6px 0; text-align: left; }
.pill, .cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; text-decoration: none; }
button.pill, button.cta { cursor: pointer; }
button:disabled, .cta[aria-disabled] { opacity: .55; cursor: default; }
.cta.danger { background: #b3261e; }
.cta.small, .pill.small { padding: 8px 14px; font-size: 14px; }
[data-busy] { position: relative; color: transparent !important; }
[data-busy]::after { content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.pill[data-busy]::after { border-color: var(--line); border-top-color: var(--green); }

/* Forms */
.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.field small { font-weight: 400; color: var(--muted); }
input.input, select.input, textarea.input { width: 100%; padding: 12px 14px; border: 1px solid #cfdcd6; border-radius: 12px; background: #fff; font: inherit; font-weight: 400; color: var(--ink); }
textarea.input { resize: vertical; min-height: 96px; }
.input:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--green); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.switch input { width: 44px; height: 24px; accent-color: var(--green); flex: none; }

/* Auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(700px 400px at 90% 0%, rgba(201,247,221,.7), transparent 60%), var(--paper); }
.auth-card { width: min(440px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 28px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.auth-card img.logo { width: 56px; height: 56px; border-radius: 16px; }
.auth-card h1 { font: 800 28px Manrope; letter-spacing: -1px; margin: 0; }
.auth-card .phone-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 8px; }
.otp { letter-spacing: 8px; font-size: 22px !important; text-align: center; }

/* Feed */
.composer textarea { border: 0; padding: 4px 0; min-height: 70px; outline: none; width: 100%; font: inherit; font-size: 17px; resize: vertical; }
.composer-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; }
.composer-bar select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); font: inherit; background: #fff; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumbs figure { position: relative; margin: 0; }
.thumbs img, .thumbs video { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; }
.thumbs button { position: absolute; top: 4px; right: 4px; border: 0; border-radius: 50%; width: 24px; height: 24px; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.like-burst { position: absolute; font-size: 64px; pointer-events: none; transform: translate(-50%, -50%) scale(.4); animation: like-burst .8s ease-out forwards; }
@keyframes like-burst { 30% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 60% { transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1); } }
.post { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px; margin-bottom: 12px; }
.post-head { display: flex; gap: 12px; align-items: center; }
.post-head .who { flex: 1; min-width: 0; }
.post-head .who b { display: block; }
.post-head .who small { color: var(--muted); }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 8px; background: #eef6f2; color: #2f5550; margin-left: 4px; }
.tag.boost { background: #fff1c7; color: #7a4b00; }
.post-body { margin: 10px 0 6px; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.media-grid { display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 10px 0; }
.media-grid img, .media-grid video { width: 100%; max-height: 480px; object-fit: cover; border-radius: 14px; background: #eef2f0; display: block; }
.media-cell { position: relative; margin: 0; }
.media-buttons { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; }
.media-buttons button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 16px; cursor: pointer; }
.photo-viewer { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; }
.photo-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.photo-viewer button { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; font-size: 18px; cursor: pointer; }
.post-actions { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.post-actions button { border: 0; background: none; padding: 8px 10px; border-radius: 10px; font: inherit; font-weight: 600; color: #4b625e; cursor: pointer; }
.post-actions button:hover { background: #f1f6f4; }
.post-actions .on { color: var(--green); }
.reactions { display: flex; gap: 4px; }
.reactions button { font-size: 20px; padding: 6px; }
.comments { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; display: grid; gap: 10px; }
.comment { display: flex; gap: 10px; } .comment .bubble { background: #f2f6f4; border-radius: 14px; padding: 8px 12px; flex: 1; }
.comment .bubble b { font-size: 14px; } .comment .bubble p { margin: 2px 0 0; overflow-wrap: anywhere; }
.menu-button { border: 0; background: none; font-size: 20px; cursor: pointer; padding: 4px 8px; border-radius: 10px; color: var(--muted); }
.life { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.life .card-mini { flex: none; width: 250px; background: var(--mint); border-radius: 16px; padding: 12px 14px; }
.life .card-mini small { display: block; color: #2f5550; margin-top: 4px; }

/* Chats */
.chat-layout { display: grid; grid-template-columns: 340px 1fr; gap: 0; height: calc(100vh - 48px); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: #fff; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-list .search { padding: 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.thread { display: flex; flex-direction: column; min-height: 0; }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.thread-head .grow b { display: block; }
.thread-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: #f7faf8; }
.msg { max-width: min(78%, 560px); padding: 9px 13px; border-radius: 18px; line-height: 1.45; position: relative; overflow-wrap: anywhere; }
.msg.in { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.out { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 6px; }
.msg.out a { color: #fff; text-decoration: underline; }
.msg .stamp { font-size: 11px; opacity: .7; margin-top: 3px; text-align: right; }
.msg img, .msg video { max-width: 280px; border-radius: 12px; display: block; margin-bottom: 4px; }
.msg .quote { font-size: 13px; border-left: 3px solid currentColor; padding-left: 8px; opacity: .8; margin-bottom: 4px; }
.msg.deleted { font-style: italic; opacity: .6; }
.msg .react-chip { position: absolute; bottom: -10px; right: 8px; background: #fff; border: 1px solid var(--line); border-radius: 99px; font-size: 12px; padding: 0 6px; color: var(--ink); }
.day-sep { align-self: center; font-size: 12px; color: var(--muted); font-weight: 600; margin: 10px 0 4px; }
.call-entry { align-self: center; display: inline-flex; gap: 6px; align-items: center; margin: 6px 0; padding: 7px 14px; border: 0; border-radius: 16px; background: var(--surface-2, rgba(127,127,127,.12)); color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.call-entry .stamp { color: var(--muted); font-size: 12px; }
.call-entry.missed { color: #d1453b; }
.stars { display: flex; gap: 4px; justify-content: center; font-size: 28px; }
.stars .icon-button { font-size: 28px; color: #e0a100; }
.composer-row { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.composer-row textarea { flex: 1; resize: none; max-height: 140px; min-height: 44px; padding: 11px 14px; border-radius: 22px; border: 1px solid #cfdcd6; font: inherit; }
.icon-button { border: 0; background: #eef6f2; width: 44px; height: 44px; border-radius: 50%; font-size: 18px; cursor: pointer; flex: none; display: grid; place-items: center; }
.icon-button.send { background: var(--green); color: #fff; }
.reply-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #eef6f2; font-size: 13px; }
.reply-bar .grow { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .chat-layout { grid-template-columns: 1fr; height: calc(100vh - 100px); border-radius: 18px; }
  .chat-layout.has-thread .chat-list { display: none; }
  .chat-layout:not(.has-thread) .thread { display: none; }
}

/* Profile */
.profile-hero { display: flex; gap: 18px; align-items: center; }
.profile-hero h1 { margin: 0; font: 800 28px Manrope; letter-spacing: -.5px; }
.facts { display: grid; gap: 0; }
.fact { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); align-items: center; }
.fact:first-child { border-top: 0; }
.fact .label { color: var(--muted); font-size: 13px; }
.fact .value { font-weight: 600; overflow-wrap: anywhere; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.qr { width: 180px; height: 180px; }

/* Dialogs & toasts */
dialog.modal { border: 0; border-radius: 24px; padding: 0; width: min(480px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0,0,0,.25); }
dialog.modal.wide { width: min(680px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(10,30,28,.45); }
.modal-body { padding: 22px; display: grid; gap: 14px; max-height: 86vh; }
.modal-body h2 { margin: 0; font: 700 21px Manrope; }
.modal-content { overflow-y: auto; display: grid; gap: 12px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 92px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; z-index: 100; transition: .25s; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast-action { margin-left: 10px; background: transparent; border: 1px solid rgba(255,255,255,.6); color: #fff; border-radius: 999px; padding: 4px 12px; font: inherit; cursor: pointer; }
.toast.error { background: #8f1d1d; }
.toast.success { background: var(--green); }
@media (min-width: 861px) { .toast { bottom: 32px; } }

/* Components set display; the hidden attribute must still win. */
[hidden] { display: none !important; }
.post-body a, .bubble a, .msg a, .panel p a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
@media (min-width: 861px) { .mobile-only { display: none; } }
.post video[data-autoplay] { cursor: pointer; }
.mention { font-weight: 600; text-decoration: none; }
.mention.me { background: #fff1a8; color: #5b4400; border-radius: 5px; padding: 1px 3px; }
.group-posting-notice { padding: 14px 16px max(14px, env(safe-area-inset-bottom)); text-align: center; background: var(--mint); color: var(--muted); font-weight: 600; }
.group-admin .compact { width: auto; min-width: 105px; }
.danger-text { color: #b3261e; }

/* Safety Circle — uses the same paper, mint, green and Manrope system. */
.safety-page { max-width: 820px; }
.safety-home { max-width: 620px; margin: 0 auto; }
.safety-intro { text-align: center; }
.safety-intro h2 { margin: 0; font: 800 26px Manrope; letter-spacing: -.5px; }
.safety-intro p { margin: 5px 0 0; }
.safety-panic-wrap { display: grid; justify-items: center; padding: 28px 0 22px; }
.safety-panic { width: 190px; height: 190px; border: 12px solid #ffe4e1; border-radius: 50%; background: linear-gradient(145deg,#ef5b55,#c52f2b); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 16px 36px rgba(197,47,43,.25); font: inherit; cursor: pointer; user-select: none; touch-action: none; transition: transform .7s ease, box-shadow .2s; }
.safety-panic.holding { transform: scale(.94); box-shadow: 0 8px 20px rgba(197,47,43,.35); }
.safety-panic span { font-size: 38px; }
.safety-panic b { font: 700 20px Manrope; margin-top: 6px; }
.safety-panic small { margin-top: 4px; opacity: .86; }
.safety-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.safety-action { min-height: 118px; border: 1px solid var(--line); border-radius: 22px; background: #fff; padding: 17px; text-align: left; color: var(--ink); cursor: pointer; box-shadow: 0 6px 18px rgba(18,58,45,.05); }
.safety-action:hover { background: #f7fbf9; }
.safety-action > span { width: 40px; height: 40px; border-radius: 13px; background: var(--mint); display: grid; place-items: center; color: var(--green); font-size: 20px; margin-bottom: 11px; }
.safety-action b,.safety-action small,.safety-readiness b,.safety-readiness small { display: block; }
.safety-action b,.safety-readiness b { font: 700 16px Manrope; }
.safety-action small,.safety-readiness small { color: var(--muted); margin-top: 4px; line-height: 1.35; }
.safety-readiness { width: 100%; border: 0; border-radius: 22px; background: var(--mint); color: var(--ink); margin-top: 13px; padding: 16px; display: flex; align-items: center; gap: 13px; text-align: left; cursor: pointer; }
.safety-readiness > span:nth-child(2) { flex: 1; }
.safety-score { width: 50px; height: 50px; border-radius: 50%; border: 5px solid var(--green); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.safety-score.large { width: 64px; height: 64px; font-size: 15px; }
.safety-disclaimer { text-align: center; max-width: 560px; margin: 16px auto; }
.safety-work { margin-top: 22px; display: grid; gap: 14px; scroll-margin-top: 20px; }
.safety-button-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.safety-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; background: rgba(8,30,24,.52); }
.safety-countdown { max-width: 420px; text-align: center; }
.safety-count { width: 92px; height: 92px; margin: 0 auto; border-radius: 50%; background: #ffe4e1; color: #b3261e; display: grid; place-items: center; font: 800 36px Manrope; }
.ready-icon { width: 32px; height: 32px; border-radius: 50%; background: #fff1d4; color: #805600; display: grid; place-items: center; font-weight: 800; }
.ready-icon.done { background: var(--mint); color: var(--green); }
.safety-incident { background: #fff0ee; border-color: #f2c5c1; }
.safety-incident.test { background: var(--mint); border-color: var(--line); }
.location-panel { display: block; color: inherit; }
.safety-history-row { width: 100%; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; font: inherit; }
@media (max-width:560px) {
  .safety-actions { grid-template-columns: 1fr 1fr; }
  .safety-panic { width: 170px; height: 170px; }
  .safety-action { padding: 14px; min-height: 110px; }
  .safety-button-grid { grid-template-columns: 1fr; }
}

/* Permission problems: bold, explains the fix, dismissable. */
.notice { position: relative; margin: 0 0 12px; padding: 14px 40px 14px 16px; border-radius: 14px; border: 2px solid #d97706; background: #fff7ed; color: #7c2d12; }
.notice b { font-weight: 800; }
.notice p { margin: 6px 0 0; }
.notice .dismiss { position: absolute; top: 8px; right: 8px; border: 0; background: none; font-size: 20px; line-height: 1; color: inherit; cursor: pointer; }
.notice.floating { position: fixed; z-index: 50; right: 16px; bottom: 88px; left: 16px; max-width: 440px; margin: 0 0 0 auto; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.notice.floating .cta { margin-top: 10px; }
.scope-icon { margin-left: 6px; font-size: 13px; cursor: help; }

/* Internet calls */
.call-overlay { position: fixed; inset: 0; z-index: 200; background: linear-gradient(#1c3b31, #0e1a16); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 32px 16px; }
.call-overlay .call-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.call-overlay .call-info { position: relative; text-align: center; margin-top: 8vh; }
.call-overlay.has-video .call-info { position: absolute; top: 16px; left: 16px; margin: 0; text-align: left; text-shadow: 0 1px 6px #000; }
.call-overlay .call-info h2 { margin: 16px 0 6px; font-size: 26px; }
.call-overlay .call-info p { margin: 0; color: rgba(255,255,255,.75); }
.call-overlay .call-avatar .avatar { width: 112px; height: 112px; font-size: 40px; margin: 0 auto; }
.call-overlay .call-local { position: absolute; top: 16px; right: 16px; width: 120px; height: 168px; object-fit: cover; border-radius: 14px; border: 1px solid rgba(255,255,255,.4); transform: scaleX(-1); background: #000; }
.call-overlay .call-request { position: relative; background: #fff; color: var(--ink); border-radius: 16px; padding: 16px; max-width: 360px; text-align: center; }
.call-overlay .call-request .row { justify-content: center; gap: 8px; }
.call-overlay .call-controls { position: relative; display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin-bottom: 4vh; }
.call-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; color: #fff; cursor: pointer; font: inherit; }
.call-btn span { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 26px; }
.call-btn.on span { background: #fff; }
.call-btn.end span { background: #e53935; }
.call-btn.accept span { background: #24b47e; }
.call-btn small { font-size: 12px; }
.calls-page .page-head p { margin: 4px 0 0; }
.calls-page .page-head > div { flex: 1; }
.call-row.missed b, .call-row.missed .sub, .call-row.missed .call-direction { color: #b3261e; }
.call-person { display: flex; }
.call-row > a.grow { color: inherit; text-decoration: none; }
.empty-actions { display: flex; gap: 8px; justify-content: center; margin: -30px 0 38px; }
.favorite-button { color: #9a6b00; font-size: 22px; }
.favorite-button.on { background: #fff4cc; }
.scope-guide { padding: 24px 16px; color: var(--muted); }
.scope-guide b { color: var(--ink); }
.scope-guide p { margin: 6px 0 14px; }
.chat-scopes { margin: 8px 12px; }
.method-row { display: grid; grid-template-columns: 120px 130px minmax(180px, 1fr) 40px; gap: 8px; align-items: center; }
@media (max-width:620px) { .method-row { grid-template-columns: 1fr 1fr 40px; } .method-row [data-method-value] { grid-column: 1 / 3; } }
.verified-link { display: block; color: inherit; text-decoration: none; }
.verified-hero { display: flex; gap: 16px; align-items: center; }
.verified-large { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #1d6fe0; color: #fff; font-size: 30px; font-weight: 800; }
.verified-hero h2 { margin: 0 0 4px; }

/* Voice notes and shared locations in chats */
.voice-note { width: 270px; max-width: 100%; min-height: 38px; display: grid; grid-template-columns: 38px minmax(90px,1fr) auto; align-items: center; gap: 6px; }
.voice-note button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--green); color: #fff; cursor: pointer; font-weight: 800; }
.voice-note input { width: 100%; accent-color: var(--green); }
.voice-note span { font-size: 11px; white-space: nowrap; color: var(--muted); }
.voice-note audio { display: none; }
.location-card { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; }
.location-card .pin { width: 44px; height: 44px; border-radius: 12px; background: #e3f4ec; display: grid; place-items: center; font-size: 22px; }
.location-card span:last-child { display: flex; flex-direction: column; }
.location-card small { color: var(--muted, #6b7a75); }
.location-card .open { color: var(--green); font-weight: 600; }
.icon-button.recording { background: #e53935; color: #fff; }
