.wrap { max-width: 520px; margin: 0 auto; padding: 16px; }
.center { text-align: center; }
.hero { text-align: center; padding-top: 20px; }
.hero img { border-radius: 18px; }

.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2em; flex: none; }
.who { font-weight: 800; font-size: 1.2em; }

.status { display: flex; gap: 14px; align-items: center; }
.status-icon { font-size: 2em; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #e8f5ee; flex: none; }
.status.bad .status-icon { background: #fdecea; }
.status-title { font-weight: 700; font-size: 1.1em; }

.sos-wrap { display: grid; place-items: center; padding: 8px 0; }
.sos {
  position: relative; width: 200px; height: 200px; border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #ff6b5e, #d92d20 60%, #a51d14); color: #fff;
  box-shadow: 0 10px 30px rgba(217, 45, 32, .45), inset 0 -6px 14px rgba(0, 0, 0, .25);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.sos-text { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.sos b { font-size: 3em; letter-spacing: .06em; }
.sos small { font-size: .85em; opacity: .95; line-height: 1.3; }
.sos-ring { position: absolute; inset: -8px; border-radius: 50%; border: 8px solid rgba(217, 45, 32, .25); }
.sos.holding .sos-ring { border-color: #ffb4ab; animation: fill 2s linear forwards; }
@keyframes fill { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.sos.active { animation: pulse 1s infinite; }
.sos.active b { font-size: 2.2em; }
@keyframes pulse { 50% { box-shadow: 0 0 0 22px rgba(217, 45, 32, .15), 0 10px 30px rgba(217, 45, 32, .5); } }

.switch-row { display: flex; gap: 10px; align-items: center; font-weight: 600; margin: 0; }
.switch-row input { width: 22px; height: 22px; flex: none; }
details summary { font-weight: 700; cursor: pointer; }

.lost, .msg { position: fixed; inset: 0; z-index: 2500; display: grid; place-items: center; padding: 20px; overflow: auto; }
.lost { background: #fff7e6; }
.msg { background: rgba(16, 24, 40, .92); }
.lost-inner, .msg-inner { width: 100%; max-width: 520px; text-align: center; display: flex; flex-direction: column; gap: 14px; }
.lost-name { font-size: 2.2em; font-weight: 900; }
.lost-line { font-size: 1.5em; font-weight: 700; }
.lost-line.small { font-size: 1em; font-weight: 600; color: var(--muted); }
.lost-call { font-size: 1.6em; padding: 22px; direction: ltr; }
.msg-inner { background: #fff; border-radius: 22px; padding: 24px; }
.msg-from { color: var(--muted); font-weight: 600; }
.msg-text { font-size: 1.8em; font-weight: 800; white-space: pre-wrap; word-break: break-word; }
