:root {
  --bg: #12261F; --bg2: #0E1E18; --card: #1A3329; --line: #2D4B3F; --soft: #214034;
  --text: #FFF4EC; --dim: #D5D9CC; --mute: #92AB9E;
  --pink: #FF5C9E; --coral: #FF6B5E; --ok: #7FD6A0; --err: #FF9A90;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg2); }
body { font-family: 'Poppins', system-ui, sans-serif; color: var(--text); line-height: 1.45; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; color: inherit; cursor: pointer; }
a { color: var(--pink); }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }

.app { max-width: 480px; margin: 0 auto; height: 100dvh; display: flex; flex-direction: column; background: var(--bg); position: relative; overflow: hidden; box-shadow: 0 0 60px rgba(0,0,0,.4); }
.head { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--soft); flex-shrink: 0; }
.wordmark { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.main { flex: 1; overflow-y: auto; min-height: 0; }
.page { min-height: 100%; }
.page.chat { display: flex; flex-direction: column; height: 100%; }
.pad { padding: 20px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; }
.row.gap { gap: 8px; }
.row.between { justify-content: space-between; }
.row.center-y { align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.left { text-align: left; }
.right { text-align: right; }
.muted { color: var(--mute); }
.small { font-size: 13px; }
.tiny { font-size: 10.5px; }
.strong { font-weight: 600; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
p.muted { margin-bottom: 12px; font-size: 14px; }

.input { width: 100%; padding: 13px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font: inherit; font-size: 15px; outline: none; resize: none; }
.input:focus { border-color: var(--coral); }
.input::placeholder { color: var(--mute); }
.label { font-size: 12.5px; color: var(--mute); margin: 14px 0 6px; font-weight: 500; }
.check { display: flex; gap: 10px; font-size: 13px; color: var(--dim); align-items: flex-start; }
.check input { margin-top: 3px; accent-color: var(--coral); }

.btn { background: var(--coral); color: #12261F; font-weight: 600; font-size: 15px; padding: 14px 20px; border: none; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: opacity .15s; }
.btn:hover { opacity: .92; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: #E5484D; color: #fff; }
.btn.sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn.send { padding: 0; width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; }
.link { background: none; border: none; color: var(--pink); font-size: 14px; text-decoration: underline; padding: 6px; }
.danger-link { display: block; margin: 18px auto 0; color: var(--err); }
.icon-btn { background: none; border: none; padding: 8px; border-radius: 10px; display: flex; color: var(--dim); }
.icon-btn:hover { background: var(--soft); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--card); border: 1px solid var(--line); color: var(--dim); padding: 8px 14px; border-radius: 999px; font-size: 13.5px; }
.chip.on { background: rgba(255,107,94,.18); border-color: var(--coral); color: var(--text); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 12px; }
button.card { width: 100%; color: inherit; }
.venue { display: flex; align-items: center; gap: 12px; }
.venue-ic { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,107,94,.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.count { font-size: 20px; font-weight: 700; color: var(--pink); line-height: 1.1; }
.person { display: flex; gap: 14px; align-items: flex-start; }
.bio { font-size: 14px; color: var(--dim); margin-top: 6px; }
.verified { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--ok); margin-left: 8px; font-weight: 500; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); margin-right: 6px; }

.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--soft); }
.avatar.ph { display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--coral); }
.photo-btn { width: 84px; height: 84px; border-radius: 50%; border: 2px dashed var(--line); background: var(--soft); overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.photo-btn img { width: 100%; height: 100%; object-fit: cover; }

.note { background: rgba(255,92,158,.1); border: 1px solid rgba(255,92,158,.35); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; color: var(--dim); margin-bottom: 12px; }
.note.ok { background: rgba(127,214,160,.1); border-color: rgba(127,214,160,.35); color: var(--ok); }

.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--soft); flex-shrink: 0; }
.menu { display: flex; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--soft); }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px; font-size: 14.5px; word-wrap: break-word; overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--coral); color: #12261F; border-bottom-right-radius: 6px; }
.bubble.them { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.compose { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--soft); flex-shrink: 0; }

.badge, .pip { background: var(--pink); color: #12261F; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; font-style: normal; }
.rel { position: relative; display: inline-flex; }
.rel .pip { position: absolute; top: -6px; right: -12px; }

.tabs { display: flex; border-top: 1px solid var(--soft); background: var(--bg2); flex-shrink: 0; padding-bottom: env(safe-area-inset-bottom); }
.tabs button { flex: 1; background: none; border: none; padding: 10px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--mute); }
.tabs button.on { color: var(--coral); }

.auth { padding: 40px 24px; }
.auth-top { text-align: center; margin-bottom: 28px; }
.auth-top h1 { margin: 10px 0 6px; }
.auth-links { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 14px; }
.link-row { display: block; padding: 6px 0; color: var(--dim); text-decoration: none; font-size: 14.5px; }

.sheet-wrap { position: absolute; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; z-index: 50; }
.sheet { width: 100%; background: var(--bg); border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; max-height: 90%; overflow-y: auto; }

.toast { position: absolute; left: 16px; right: 16px; bottom: 84px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; font-size: 14px; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.toast.err { border-color: var(--err); color: var(--err); }
.toast.ok { border-color: var(--ok); color: var(--ok); }
.toast-msg { position: absolute; top: 10px; left: 12px; right: 12px; z-index: 60; display: flex; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.45); }

.spinner { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--coral); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
