/* App styles (everything inside the phone). Component class names match js/components.js. */
#phone { font-family: var(--font-sans); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-tap-highlight-color: transparent; }
#phone *, #phone *::before, #phone *::after { box-sizing: border-box; }
:where(#phone) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
#phone button:disabled { opacity: 0.45; cursor: not-allowed; }
#phone :focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
#phone h1, #phone h2, #phone h3, #phone p { margin: 0; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- screen scaffold ---------- */
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.scr-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px var(--gutter) 28px; scrollbar-width: none; display: flex; flex-direction: column; gap: 16px; }
.scr-body::-webkit-scrollbar { display: none; }
.scr-body.flush { padding-left: 0; padding-right: 0; }
.scr-body.center { text-align: center; align-items: center; }
.scr-body > * { flex: none; }
.scr-foot { padding: 12px var(--gutter) 14px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(to top, var(--ink) 70%, transparent); }
.spacer { flex: 1 1 auto !important; min-height: 8px; }
.anim-fwd { animation: in-fwd var(--slow) var(--ease); }
.anim-back { animation: in-back var(--slow) var(--ease); }
.anim-fade { animation: in-fade var(--fast) ease-out; }
@keyframes in-fwd { from { opacity: 0; transform: translateX(28px); } }
@keyframes in-back { from { opacity: 0; transform: translateX(-28px); } }
@keyframes in-fade { from { opacity: 0; } }

.hdr { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 4px var(--gutter) 8px; flex: none; }
.hdr-txt { flex: 1; min-width: 0; }
.hdr-title { font-family: var(--font-display); font-weight: 800; font-size: 17px; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-right { display: flex; gap: 8px; align-items: center; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; display: inline-flex !important; align-items: center; justify-content: center; background: rgb(255 255 255 / 0.08) !important; border: 1px solid var(--line) !important; flex: none; transition: background var(--fast); }
.icon-btn:hover { background: rgb(255 255 255 / 0.15) !important; }
.dot-badge { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--ink); }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: 13.5px; letter-spacing: -0.02em; }
.logo img { width: 30px; height: 30px; object-fit: contain; }
.logo i { color: var(--lime); font-style: normal; }
.logo-dot { width: 26px; height: 26px; border-radius: 9px; background: var(--lime); display: inline-block; }

/* ---------- type ---------- */
.display { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; line-height: 0.95; letter-spacing: -0.02em; font-size: 30px; }
.display.xl { font-size: 36px; }
.display em, .grad { font-style: normal; background: linear-gradient(90deg, var(--lime), var(--aqua) 60%, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.45; text-wrap: pretty; }
.muted { color: var(--muted); font-weight: 500; }
.small { font-size: 12.5px; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }
.sec-h { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; margin-bottom: -6px; }
.sec-h h2 { font-family: var(--font-display); font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: 0.01em; }
.link { color: var(--lime); font-weight: 800; font-size: 13px; display: inline-flex !important; align-items: center; gap: 2px; min-height: 44px; padding: 0 2px !important; }
.link .ic { width: 16px; height: 16px; }

/* ---------- buttons, chips, badges ---------- */
.btn { min-height: 54px; width: 100%; border-radius: var(--r-pill) !important; display: flex !important; align-items: center; justify-content: center; gap: 8px; font-weight: 800 !important; font-size: 15.5px; padding: 0 22px !important; transition: background var(--fast), transform var(--fast), box-shadow var(--fast); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--lime) !important; color: var(--ink) !important; box-shadow: 0 10px 34px -12px var(--lime); }
.btn.primary:hover { background: var(--lime-glow) !important; }
.btn.glass { background: rgb(255 255 255 / 0.09) !important; border: 1px solid var(--line-strong) !important; }
.btn.glass:hover { background: rgb(255 255 255 / 0.16) !important; }
.btn.white { background: #fff !important; color: var(--ink) !important; }
.btn.danger { background: var(--danger) !important; color: #fff !important; box-shadow: 0 10px 34px -14px var(--danger); }
.btn.danger-line { border: 1px solid rgb(255 68 56 / 0.55) !important; color: #ff8a82 !important; }
.btn.ghost { min-height: 46px; color: var(--muted) !important; font-weight: 700 !important; }
.btn.sm { min-height: 44px; width: auto; font-size: 13.5px; padding: 0 16px !important; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 15px !important; border-radius: var(--r-pill) !important; background: rgb(255 255 255 / 0.07) !important; border: 1px solid var(--line) !important; font-weight: 700 !important; font-size: 13.5px; display: inline-flex !important; align-items: center; gap: 6px; white-space: nowrap; transition: background var(--fast), color var(--fast); }
.chip .ic { width: 16px; height: 16px; }
.chip.on { background: var(--lime) !important; color: var(--ink) !important; border-color: var(--lime) !important; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--r-pill); font-size: 11px; font-weight: 800; letter-spacing: 0.03em; white-space: nowrap; background: rgb(255 255 255 / 0.1); color: var(--text); }
.badge .ic { width: 12px; height: 12px; stroke-width: 2.6; }
.badge.lime { background: rgb(164 205 57 / 0.18); color: var(--lime-glow); }
.badge.aqua { background: rgb(47 214 201 / 0.16); color: var(--aqua); }
.badge.sun { background: rgb(255 207 58 / 0.16); color: var(--sun); }
.badge.danger { background: rgb(255 68 56 / 0.2); color: #ff9b94; }
.badge.solid { background: var(--lime); color: var(--ink); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card.tight { padding: 6px 14px; gap: 0; }
.card.glow { background: linear-gradient(140deg, rgb(164 205 57 / 0.16), rgb(47 214 201 / 0.06) 55%, var(--surface)); border-color: rgb(164 205 57 / 0.35); }
.card.alert { background: linear-gradient(140deg, rgb(255 68 56 / 0.22), var(--surface) 70%); border-color: rgb(255 68 56 / 0.5); }
.card.info { background: linear-gradient(140deg, rgb(47 214 201 / 0.14), var(--surface) 70%); border-color: rgb(47 214 201 / 0.35); }
.card h3 { font-size: 16px; font-weight: 800; line-height: 1.25; }
.card-h { display: flex; align-items: flex-start; gap: 12px; }
.card-h > .grow, .grow { flex: 1; min-width: 0; }
.hstack { display: flex; align-items: center; gap: 10px; }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.grid2 > *, .grid3 > * { min-width: 0; }
.input { min-width: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.note { display: flex; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.45; }
.note .ic { width: 16px; height: 16px; margin-top: 1px; color: var(--aqua); }
.note.warn .ic { color: var(--sun); }
.divider { height: 1px; background: var(--line); }

.row { display: flex !important; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 0 !important; border-bottom: 1px solid var(--line) !important; }
.row:last-child { border-bottom: 0 !important; }
.row-ic { width: 42px; height: 42px; border-radius: 14px; background: rgb(255 255 255 / 0.08); display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--lime); }
.row.aqua .row-ic { color: var(--aqua); } .row.danger .row-ic { color: #ff8a82; background: rgb(255 68 56 / 0.14); } .row.danger b { color: #ff8a82; }
.row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-txt b { font-weight: 700; font-size: 15px; line-height: 1.3; }
.row-txt span { font-size: 12.5px; color: var(--muted); font-weight: 500; line-height: 1.4; }
.row-chev { color: var(--faint); width: 18px; height: 18px; }
.avatar { width: var(--s); height: var(--s); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: calc(var(--s) * 0.36); color: var(--ink); flex: none; background: var(--lime); }
.avatar.t-aqua { background: var(--aqua); } .avatar.t-violet { background: var(--violet); color: #fff; } .avatar.t-sun { background: var(--sun); } .avatar.t-magenta { background: var(--magenta); color: #fff; }
.avatar.ring { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--lime); }
.unread { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--lime); color: var(--ink); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

.toggle { width: 56px; height: 34px; border-radius: 17px !important; background: rgb(255 255 255 / 0.16) !important; position: relative; flex: none; transition: background var(--fast); }
.toggle::before { content: ""; position: absolute; inset: -7px 0; }
.toggle span { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: transform var(--fast) var(--ease); box-shadow: 0 2px 6px rgb(0 0 0 / 0.4); }
.toggle.on { background: var(--lime) !important; }
.toggle.on span { transform: translateX(22px); }
.seg { display: flex; padding: 4px; gap: 4px; border-radius: var(--r-pill); background: rgb(255 255 255 / 0.07); border: 1px solid var(--line); }
.seg button { flex: 1; min-height: 40px; border-radius: var(--r-pill) !important; font-weight: 800 !important; font-size: 13px; text-align: center !important; color: var(--muted) !important; display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; transition: background var(--fast), color var(--fast); }
.seg button.on { background: var(--lime) !important; color: var(--ink) !important; }
.seg em { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 9px; background: rgb(0 0 0 / 0.18); }
.seg button:not(.on) em { background: rgb(255 255 255 / 0.12); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-l { font-size: 12.5px; font-weight: 800; letter-spacing: 0.02em; }
.field-l em { font-style: normal; font-weight: 600; color: var(--faint); margin-left: 4px; }
.field-h { font-size: 12px; color: var(--muted); font-weight: 500; }
.input { width: 100%; min-height: 52px; border-radius: var(--r-md); background: rgb(255 255 255 / 0.07); border: 1px solid var(--line-strong); color: var(--text); font: inherit; font-size: 16px; font-weight: 600; padding: 12px 16px; appearance: none; }
.input::placeholder { color: var(--faint); font-weight: 500; }
.input:focus { outline: 2px solid var(--lime); outline-offset: 0; border-color: transparent; }
textarea.input { resize: none; line-height: 1.45; }
.select-wrap { position: relative; display: block; }
.select-wrap .ic { position: absolute; right: 16px; top: 50%; translate: 0 -50%; pointer-events: none; color: var(--muted); }
select.input option { background: #1e1e23; color: #fff; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 18px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty-ic { width: 64px; height: 64px; border-radius: 22px; background: rgb(255 255 255 / 0.08); display: inline-flex; align-items: center; justify-content: center; rotate: -6deg; }
.empty-ic .ic { width: 28px; height: 28px; color: var(--lime); }
.empty h3 { font-family: var(--font-display); text-transform: uppercase; font-weight: 800; font-size: 16px; }
.empty p { color: var(--muted); font-size: 13.5px; font-weight: 500; max-width: 270px; }
.stat { background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: var(--r-md) !important; padding: 12px 14px !important; display: flex !important; flex-direction: column; gap: 2px; }
.stat b { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.1; }
.stat span { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.stat.lime b { color: var(--lime); } .stat.aqua b { color: var(--aqua); } .stat.danger b { color: #ff7c73; } .stat.danger { border-color: rgb(255 68 56 / 0.5) !important; }
.offline-strip { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--r-md); background: rgb(255 207 58 / 0.14); border: 1px solid rgb(255 207 58 / 0.35); color: var(--sun); font-size: 12.5px; font-weight: 700; flex: none; }
.offline-strip .ic { width: 16px; height: 16px; }
.steps { display: flex; gap: 5px; }
.steps i { width: 22px; height: 4px; border-radius: 2px; background: rgb(255 255 255 / 0.18); }
.steps i.on { background: var(--lime); }

/* ---------- photos ---------- */
.photo { display: block; width: 100%; position: relative; background-size: cover; background-position: center; border-radius: var(--r-md) !important; overflow: hidden; --ph: linear-gradient(135deg, #2b2470, #7b5cff); }
.photo.g1 { --ph: linear-gradient(135deg, #0d4f55, #2fd6c9); } .photo.g2 { --ph: linear-gradient(135deg, #5b1240, #e0338f); } .photo.g3 { --ph: linear-gradient(135deg, #3d4f10, #a4cd39); }
.photo.g4 { --ph: linear-gradient(135deg, #5a4308, #ffcf3a); } .photo.g5 { --ph: linear-gradient(135deg, #10305a, #3aa0ff); }
.masonry { columns: 2; column-gap: 8px; }
.masonry .photo { margin-bottom: 8px; break-inside: avoid; }
.ph-tag { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--r-pill); background: rgb(0 0 0 / 0.55); backdrop-filter: blur(8px); font-size: 11px; font-weight: 800; color: #fff; }
.ph-tag .ic { width: 11px; height: 11px; }
.ph-tag.me { left: auto; right: 8px; top: 8px; bottom: auto; background: var(--lime); color: var(--ink); }
.ph-check { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: rgb(0 0 0 / 0.3); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.ph-check.on { background: var(--lime); border-color: var(--lime); }
.ph-check .ic { width: 15px; height: 15px; stroke-width: 3; }
.strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.strip::-webkit-scrollbar { display: none; }
.strip .photo { width: 116px; flex: none; }

/* ---------- hero (event cover) ---------- */
.hero { position: relative; border-radius: 30px; overflow: hidden; min-height: 250px; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; background-size: cover; background-position: center; border: 1px solid var(--line-strong); }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 90% 0%, rgb(224 51 143 / 0.5), transparent 70%), radial-gradient(60% 60% at 0% 20%, rgb(123 92 255 / 0.45), transparent 70%), linear-gradient(to top, var(--ink) 4%, rgb(10 10 10 / 0.35) 55%, transparent); }
.hero > * { position: relative; }
.hero.sm { min-height: 150px; border-radius: var(--r-lg); padding: 14px; }
.hero-top { position: absolute !important; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: flex-start; }
.hero-top .badge:not(.solid) { background: rgb(0 0 0 / 0.62); backdrop-filter: blur(8px); }
.live-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: var(--r-pill); background: rgb(0 0 0 / 0.45); backdrop-filter: blur(10px); border: 1px solid var(--line-strong); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 var(--lime); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 9px rgb(164 205 57 / 0); } }
.sticker { background: var(--lime); color: var(--ink); border-radius: 16px; padding: 8px 12px; text-align: center; rotate: 6deg; box-shadow: 0 10px 30px -8px rgb(164 205 57 / 0.7); }
.sticker b { display: block; font-family: var(--font-display); font-weight: 900; font-size: 17px; line-height: 1; }
.sticker span { font-size: 9.5px; font-weight: 800; letter-spacing: 0.18em; }

/* ---------- map ---------- */
.map { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: #11151b; }
.map.flat { border-radius: 0; border-width: 0 0 1px; }
.map-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pin { position: absolute; translate: -50% -50%; display: inline-flex !important; align-items: center; justify-content: center; font-weight: 800; }
.pin::before { content: ""; position: absolute; inset: -8px; }
.pin-hotel { width: 38px; height: 38px; border-radius: 14px; background: var(--lime) !important; color: var(--ink) !important; box-shadow: 0 6px 18px -4px var(--lime); }
.pin-place { width: 32px; height: 32px; border-radius: 50%; background: #fff !important; color: var(--ink) !important; box-shadow: 0 4px 12px rgb(0 0 0 / 0.5); }
.pin-place .ic { width: 16px; height: 16px; } .pin-place.sel { background: var(--aqua) !important; scale: 1.15; }
.pin-me { width: 18px; height: 18px; border-radius: 50%; background: var(--aqua); border: 3px solid #fff; box-shadow: 0 0 0 0 var(--aqua); animation: pulse-a 1.8s ease-out infinite; }
@keyframes pulse-a { to { box-shadow: 0 0 0 16px rgb(47 214 201 / 0); } }
.pin-guest { width: 34px; height: 34px; border-radius: 50%; background: var(--violet) !important; color: #fff !important; font-size: 11px; border: 2px solid #fff !important; box-shadow: 0 4px 12px rgb(0 0 0 / 0.5); }
.pin-sos { width: 40px; height: 40px; border-radius: 50%; background: var(--danger) !important; color: #fff !important; font-size: 11px; border: 2px solid #fff !important; animation: pulse-d 1.2s ease-out infinite; z-index: 2; }
@keyframes pulse-d { from { box-shadow: 0 0 0 0 rgb(255 68 56 / 0.8); } to { box-shadow: 0 0 0 20px rgb(255 68 56 / 0); } }
.map-cap { position: absolute; left: 10px; bottom: 10px; right: 10px; display: flex; justify-content: space-between; gap: 8px; align-items: flex-end; pointer-events: none; }
.map-cap > * { pointer-events: auto; }
.map-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--r-pill); background: rgb(10 10 10 / 0.78); backdrop-filter: blur(10px); border: 1px solid var(--line-strong); font-size: 11.5px; font-weight: 700; }
.map-pill .ic { width: 13px; height: 13px; color: var(--aqua); }

/* ---------- itinerary timeline ---------- */
.tl { display: flex; flex-direction: column; }
.tl-item { display: grid !important; grid-template-columns: 50px 22px 1fr; gap: 0 8px; width: 100%; padding: 0 !important; min-height: 76px; }
.tl-time { font-weight: 800; font-size: 13.5px; padding-top: 14px; font-variant-numeric: tabular-nums; }
.tl-time small { display: block; font-size: 11px; color: var(--faint); font-weight: 600; }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--line-strong); }
.tl-item:first-child .tl-rail::before { top: 18px; } .tl-item:last-child .tl-rail::before { bottom: calc(100% - 18px); }
.tl-rail i { position: relative; margin-top: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--line-strong); }
.tl-item.done .tl-rail i { background: var(--lime); border-color: var(--lime); opacity: 0.55; }
.tl-item.now .tl-rail i { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 0 5px rgb(164 205 57 / 0.25); }
.tl-item.next .tl-rail i { border-color: var(--aqua); }
.tl-card { margin: 6px 0; padding: 11px 13px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.tl-item.done .tl-card { opacity: 0.6; }
.tl-item.now .tl-card { border-color: rgb(164 205 57 / 0.55); background: linear-gradient(140deg, rgb(164 205 57 / 0.16), var(--surface) 70%); }
.tl-card b { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.tl-card span { font-size: 12.5px; color: var(--muted); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.tl-card span .ic { width: 13px; height: 13px; }
.tl-card .wrap { margin-top: 3px; gap: 6px; }

/* ---------- SOS ---------- */
.sos-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 16px 18px; border-radius: 30px; background: radial-gradient(90% 80% at 50% 0%, rgb(255 68 56 / 0.24), var(--surface) 75%); border: 1px solid rgb(255 68 56 / 0.4); text-align: center; }
.sos-btn { position: relative; width: 168px; height: 168px; border-radius: 50% !important; background: radial-gradient(circle at 35% 28%, #ff7a6e, var(--danger) 45%, var(--danger-deep)) !important; color: #fff !important; display: flex !important; flex-direction: column; align-items: center; justify-content: center; text-align: center !important; box-shadow: 0 0 0 10px rgb(255 68 56 / 0.14), 0 0 0 22px rgb(255 68 56 / 0.07), 0 18px 44px -10px rgb(255 68 56 / 0.7); touch-action: none; user-select: none; -webkit-user-select: none; transition: transform var(--fast); }
.sos-btn b { font-family: var(--font-display); font-weight: 900; font-size: 40px; line-height: 1; letter-spacing: 0.02em; }
.sos-btn span { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 5px; opacity: 0.92; }
.sos-ring { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); rotate: -90deg; pointer-events: none; }
.sos-ring circle { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; opacity: 0; }
.sos-btn.holding { transform: scale(0.95); }
.sos-btn.holding .sos-ring circle { opacity: 1;transition: stroke-dashoffset 1.6s linear; stroke-dashoffset: 0; }
.sos-state { width: 108px; height: 108px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 4px auto 0; }
.sos-state .ic { width: 48px; height: 48px; }
.sos-state.sent { background: var(--danger); color: #fff; animation: pulse-d 1.4s ease-out infinite; }
.sos-state.queued { background: rgb(255 207 58 / 0.16); color: var(--sun); border: 2px dashed var(--sun); }
.sos-state.queued .ic { animation: spin 2.4s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.checklist { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; list-style: none; }
.checklist { margin: 0; padding: 0; }
.checklist .ic { width: 18px; height: 18px; margin-top: 2px; color: var(--lime); }
.checklist li.off { color: var(--muted); } .checklist li.off .ic { color: var(--faint); }
.checklist li.wait .ic { color: var(--sun); }
.checklist small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }

/* ---------- contacts and chat ---------- */
.contact { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.contact-acts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.act { min-height: 56px; border-radius: var(--r-md) !important; background: rgb(255 255 255 / 0.07) !important; border: 1px solid var(--line) !important; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 800 !important; text-align: center !important; transition: background var(--fast); }
.act:hover { background: rgb(255 255 255 / 0.14) !important; }
.act .ic { width: 19px; height: 19px; }
.act.call .ic { color: var(--lime); } .act.wa .ic { color: var(--whatsapp); } .act.mail .ic { color: var(--aqua); } .act.chat .ic { color: var(--violet); filter: brightness(1.4); }
.chat-body { gap: 8px !important; padding-top: 12px !important; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 20px; font-size: 14.5px; font-weight: 500; line-height: 1.4; background: var(--surface-2); align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble.mine { align-self: flex-end; background: var(--lime); color: var(--ink); font-weight: 600; border-radius: 20px; border-bottom-right-radius: 6px; }
.bubble small { display: block; font-size: 11px; font-weight: 800; color: var(--aqua); margin-bottom: 2px; }
.bubble.mine small { color: rgb(0 0 0 / 0.62); }
.bubble time { display: block; font-size: 10.5px; font-weight: 600; opacity: 0.6; margin-top: 3px; text-align: right; }
.bubble.typing { color: var(--muted); font-style: italic; }
.chat-day { align-self: center; font-size: 11px; font-weight: 700; color: var(--faint); padding: 4px 0; }
.composer { display: flex; gap: 8px; padding: 10px var(--gutter) 14px; border-top: 1px solid var(--line); background: var(--ink); align-items: center; }
.composer .input { min-height: 48px; border-radius: var(--r-pill); padding: 10px 18px; font-size: 15px; }
.composer .send { width: 48px; height: 48px; border-radius: 50% !important; background: var(--lime) !important; color: var(--ink) !important; display: inline-flex !important; align-items: center; justify-content: center; flex: none; }

/* ---------- onboarding ---------- */
.fan { position: relative; height: 210px; width: 100%; margin-top: 8px; }
.fan .photo { position: absolute; left: 50%; top: 0; width: 138px; margin-left: -69px; border-radius: 24px !important; box-shadow: 0 0 0 2px rgb(255 255 255 / 0.75), 0 20px 40px -10px #000; }
.fan .photo:nth-child(1) { transform: translateX(-74px) translateY(12px) rotate(-12deg); }
.fan .photo:nth-child(2) { z-index: 2; transform: translateY(-2px); }
.fan .photo:nth-child(3) { transform: translateX(74px) translateY(12px) rotate(12deg); }
.fan-tag { position: absolute; z-index: 3; left: 50%; bottom: -4px; translate: -50% 0; rotate: -7deg; white-space: nowrap; background: var(--lime); color: var(--ink); font-family: var(--font-display); font-weight: 900; font-size: 15px; text-transform: uppercase; padding: 8px 16px; border-radius: 14px; box-shadow: 0 12px 34px -8px var(--lime); }
.opt { display: flex !important; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 14px 16px !important; border-radius: var(--r-lg) !important; background: var(--surface) !important; border: 1.5px solid var(--line) !important; transition: border-color var(--fast), background var(--fast); }
.opt.on { border-color: var(--lime) !important; background: rgb(164 205 57 / 0.1) !important; }
.opt .radio { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; display: inline-flex; align-items: center; justify-content: center; }
.opt.on .radio { border-color: var(--lime); background: var(--lime); color: var(--ink); }
.opt .radio .ic { width: 14px; height: 14px; stroke-width: 3.2; opacity: 0; } .opt.on .radio .ic { opacity: 1; }
.opt b { font-size: 17px; font-weight: 800; display: block; } .opt span.s { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.scanner { position: relative; flex: 1 1 auto !important; min-height: 280px; border-radius: 30px; overflow: hidden; background: radial-gradient(80% 70% at 50% 40%, #2a2a33, #0c0c10); display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); }
.scan-box { position: relative; width: 208px; height: 208px; }
.scan-box::before, .scan-box::after, .scan-box i::before, .scan-box i::after { content: ""; position: absolute; width: 44px; height: 44px; border: 4px solid var(--lime); }
.scan-box::before { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 20px; }
.scan-box::after { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 20px; }
.scan-box i::before { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 20px; }
.scan-box i::after { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 20px; }
.scan-box .qr { position: absolute; inset: 34px; width: auto; height: auto; border-radius: 10px; opacity: 0.9; }
.scan-line { position: absolute; left: 10px; right: 10px; height: 3px; border-radius: 2px; background: var(--lime); box-shadow: 0 0 18px 3px var(--lime); animation: scan 2.2s ease-in-out infinite alternate; }
@keyframes scan { from { top: 12px; } to { top: calc(100% - 15px); } }
.selfie-oval { width: 214px; height: 276px; border-radius: 50%; border: 4px solid var(--lime); background: radial-gradient(60% 50% at 50% 38%, #3a3a46, #15151a); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 600px rgb(0 0 0 / 0.5); }
.selfie-oval .ic { width: 96px; height: 96px; stroke-width: 1.2; color: rgb(255 255 255 / 0.5); }
.shutter { width: 76px; height: 76px; border-radius: 50% !important; background: #fff !important; box-shadow: 0 0 0 5px var(--ink), 0 0 0 8px #fff; margin: 0 auto; display: block !important; position: relative; z-index: 2; }
.big-ic { width: 104px; height: 104px; border-radius: 34px; display: flex; align-items: center; justify-content: center; background: linear-gradient(140deg, rgb(164 205 57 / 0.22), rgb(47 214 201 / 0.1)); border: 1px solid rgb(164 205 57 / 0.4); rotate: -5deg; margin: 8px auto 4px; }
.big-ic .ic { width: 46px; height: 46px; color: var(--lime); }
.big-ic.aqua .ic { color: var(--aqua); }
.done-ring { width: 132px; height: 132px; border-radius: 50%; padding: 4px; background: conic-gradient(from 90deg, var(--lime), var(--aqua), var(--violet), var(--magenta), var(--lime)); margin: 16px auto 4px; position: relative; }
.done-ring > span { width: 100%; height: 100%; border-radius: 50%; background: var(--ink); display: flex; align-items: center; justify-content: center; }
.done-ring > span .ic { width: 52px; height: 52px; stroke-width: 1.5; }
.done-ring > i { position: absolute; right: 0; bottom: 2px; width: 40px; height: 40px; border-radius: 50%; background: var(--lime); color: var(--ink); border: 4px solid var(--ink); display: flex; align-items: center; justify-content: center; }
.done-ring > i .ic { stroke-width: 3.4; }

/* ---------- viewer, uploads, qr ---------- */
.viewer { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 10px; }
.viewer .photo { max-height: 100%; width: auto; max-width: 100%; border-radius: 22px !important; }
.play-big { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; background: rgb(0 0 0 / 0.55); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; }
.play-big .ic { width: 28px; height: 28px; fill: #fff; }
.progress { height: 6px; border-radius: 3px; background: rgb(255 255 255 / 0.12); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--lime), var(--aqua)); transition: width 400ms linear; }
.upl { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.upl:last-child { border-bottom: 0; }
.upl .photo { width: 52px; flex: none; border-radius: 12px !important; }
.upl-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; }
.upl-txt span { font-size: 12px; font-weight: 600; color: var(--muted); }
.upl-txt .err { color: #ff8a82; }
.drop { display: flex !important; flex-direction: column; align-items: center; gap: 8px; text-align: center !important; width: 100%; padding: 26px 18px !important; border-radius: 30px !important; border: 2px dashed rgb(164 205 57 / 0.6) !important; background: rgb(164 205 57 / 0.07) !important; }
.drop .ic { width: 38px; height: 38px; color: var(--lime); }
.drop b { font-family: var(--font-display); font-weight: 800; font-size: 16px; text-transform: uppercase; }
.drop span { font-size: 13px; color: var(--muted); font-weight: 500; }
.qr { width: 100%; height: auto; display: block; border-radius: 14px; }
.qr-card { background: #fff; border-radius: 26px; padding: 18px; width: 220px; margin: 0 auto; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: 0.12em; }

/* ---------- tab bar ---------- */
#tabbar { display: flex; margin: 0 10px 10px; padding: 6px; border-radius: 30px; background: linear-gradient(135deg, rgb(34 32 62 / 0.9), rgb(16 16 22 / 0.92)); border: 1px solid var(--line-strong); box-shadow: 0 16px 40px -14px #000, inset 0 1px 0 rgb(255 255 255 / 0.12); flex: none; }
#tabbar[hidden] { display: none; }
.tab { flex: 1; min-height: 54px; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 24px !important; color: var(--muted) !important; text-align: center !important; transition: color var(--fast), background var(--fast); }
.tab-ic { position: relative; display: inline-flex; }
.tab .ic { width: 21px; height: 21px; }
.tab-l { font-size: 10.5px; font-weight: 800; letter-spacing: 0.01em; }
.tab.on { background: var(--lime) !important; color: var(--ink) !important; }
.tab.sos:not(.on) { color: #ff8a82 !important; }
.tab-badge { position: absolute; top: -5px; right: -9px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #1a1930; }

/* ---------- overlays ---------- */
#sheet { position: absolute; inset: 0; z-index: 40; display: none; }
#sheet.open { display: block; }
.sheet-backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / 0.62); backdrop-filter: blur(3px); animation: in-fade var(--fast); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; overflow-y: auto; scrollbar-width: none; background: #17171c; border-radius: 30px 30px 0 0; border-top: 1px solid var(--line-strong); padding: 10px var(--gutter) 22px; display: flex; flex-direction: column; gap: 14px; animation: sheet-up var(--slow) var(--ease); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet-grab { width: 42px; height: 5px; border-radius: 3px; background: rgb(255 255 255 / 0.25); align-self: center; flex: none; }
.sheet h2 { font-family: var(--font-display); font-weight: 800; font-size: 18px; text-transform: uppercase; line-height: 1.15; }
.os-alert { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 276px; border-radius: 18px; background: rgb(44 44 50 / 0.96); backdrop-filter: blur(20px); text-align: center; overflow: hidden; animation: pop var(--fast) var(--ease); }
@keyframes pop { from { scale: 1.12; opacity: 0; } }
.os-alert h3 { font-size: 16.5px; font-weight: 700; padding: 18px 16px 4px; line-height: 1.3; }
.os-alert p { font-size: 13px; color: rgb(255 255 255 / 0.8); padding: 0 16px 16px; line-height: 1.4; }
.os-alert button { display: block !important; width: 100%; min-height: 46px; text-align: center !important; border-top: 1px solid rgb(255 255 255 / 0.16) !important; color: #4da3ff !important; font-size: 16.5px; }
.os-alert button.bold { font-weight: 700 !important; }
#toast { position: absolute; left: 50%; bottom: 96px; translate: -50% 20px; z-index: 60; max-width: 86%; padding: 11px 18px; border-radius: var(--r-pill); background: #fff; color: var(--ink); font-size: 13.5px; font-weight: 700; text-align: center; opacity: 0; pointer-events: none; transition: opacity var(--fast), translate var(--fast) var(--ease); box-shadow: 0 14px 40px -10px #000; }
#toast.show { opacity: 1; translate: -50% 0; }
#push { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 70; translate: 0 -140%; transition: translate var(--slow) var(--ease); }
#push.show { translate: 0 0; }
.push-card { display: flex !important; gap: 10px; align-items: flex-start; width: 100%; padding: 12px 14px !important; border-radius: 22px !important; background: rgb(40 40 48 / 0.94) !important; backdrop-filter: blur(20px); border: 1px solid var(--line-strong) !important; box-shadow: 0 20px 50px -12px #000; }
.push-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--lime); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.push-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; line-height: 1.35; }
.push-txt b { font-weight: 800; } .push-txt span { color: rgb(255 255 255 / 0.78); font-weight: 500; }
.push-time { font-size: 11px; color: var(--faint); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  #phone *, #phone *::before, #phone *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .sos-btn.holding .sos-ring circle { transition-duration: 1.6s !important; }
}
