:root {
  --pink: #ff4d6d; --pink-d: #e0345a; --bg: #fff5f7; --card: #fff; --text: #2b2230; --muted: #8b7e91;
  --line: #f0dfe5; --ok: #22b573;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--pink-d); }
#root { height: 100%; display: flex; justify-content: center; }
.shell { width: 100%; max-width: 480px; height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.top { padding: calc(12px + env(safe-area-inset-top)) 16px 12px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-weight: 800; font-size: 22px; color: var(--pink); letter-spacing: -.5px; }
main { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 16px 16px; }
nav.tabs { display: flex; border-top: 1px solid var(--line); background: var(--card); padding-bottom: env(safe-area-inset-bottom); }
nav.tabs button { flex: 1; border: 0; background: none; padding: 12px 4px; font-size: 13px; color: var(--muted); }
nav.tabs button.on { color: var(--pink); font-weight: 700; }
.auth { margin: auto; width: 100%; max-width: 380px; padding: 24px 20px; }
.auth h1 { margin: 0 0 4px; font-size: 34px; color: var(--pink); letter-spacing: -1px; }
.auth p.sub { margin: 0 0 20px; color: var(--muted); }
form.stack { display: flex; flex-direction: column; gap: 12px; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px;
}
textarea { min-height: 90px; resize: vertical; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.check input { margin-top: 3px; }
.btn { border: 0; border-radius: 999px; padding: 13px 20px; font-weight: 700; background: var(--pink); color: #fff; }
a.btn { display: block; text-align: center; text-decoration: none; }
.btn:hover { background: var(--pink-d); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: #fff; color: var(--pink-d); border: 1px solid var(--line); }
.btn.danger { background: #fff; color: #c0152f; border: 1px solid #f3c1ca; }
.link { background: none; border: 0; color: var(--pink-d); text-decoration: underline; padding: 8px; }
.err { color: #c0152f; font-size: 14px; min-height: 18px; }
.card { background: var(--card); border-radius: 20px; box-shadow: 0 6px 24px rgba(120, 40, 70, .12); overflow: hidden; }
.deck { padding-top: 4px; }
.swipecard { position: relative; touch-action: pan-y; user-select: none; transition: transform .2s ease; }
.swipecard.dragging { transition: none; }
.swipecard img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover; background: #eee; pointer-events: none; max-height: 52dvh; }
.swipecard .info { padding: 14px 16px 16px; }
.swipecard .nm { font-size: 24px; font-weight: 800; }
.swipecard .bio { margin: 6px 0 0; color: #5a4d60; white-space: pre-wrap; overflow-wrap: anywhere; }
.flag { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.35); color: #fff; }
.actions { display: flex; justify-content: center; gap: 28px; margin-top: 16px; }
.round { width: 64px; height: 64px; border-radius: 50%; border: 0; background: #fff; font-size: 28px; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.round.like { color: var(--pink); }
.round.pass { color: #7a6f80; }
.round:disabled { opacity: .5; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.banner { background: #fff0c9; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: #fff; border: 0; border-radius: 16px; padding: 10px; }
.item img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: #eee; }
.item > div { flex: 1; min-width: 0; }
.item .t { font-weight: 700; }
.item .s { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;  }
.chat { display: flex; flex-direction: column; height: 100%; }
.chathead { display: flex; align-items: center; gap: 8px; padding: 4px 0 8px; }
.chathead .nm { flex: 1; font-weight: 800; font-size: 18px; }
.msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.msg { max-width: 78%; padding: 8px 12px; border-radius: 16px; background: #fff; align-self: flex-start; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.mine { align-self: flex-end; background: var(--pink); color: #fff; }
.compose { display: flex; gap: 8px; padding-top: 8px; }
.compose input { flex: 1; padding: 12px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 16px; }
.avatar-edit { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 8px 0; }
.avatar-edit img { width: 160px; height: 200px; object-fit: cover; border-radius: 16px; background: #eee; }
.avatar-edit .ph { width: 160px; height: 200px; border-radius: 16px; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.hidden-input { display: none; }
.overlay { position: fixed; inset: 0; background: rgba(30, 10, 25, .7); display: flex; align-items: center; justify-content: center; z-index: 10; padding: 20px; }
.modal { background: #fff; border-radius: 24px; padding: 28px 24px; text-align: center; max-width: 340px; width: 100%; }
.modal h2 { margin: 0 0 8px; font-size: 30px; color: var(--pink); }
.modal .row { margin-top: 16px; }
#toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); background: #2b2230; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90%; text-align: center; z-index: 20; }
#toast.show { opacity: 1; }
.fine { color: var(--muted); font-size: 12px; text-align: center; margin-top: 12px; }
body.doc { background: var(--bg); height: auto; }
.docbox { max-width: 600px; margin: 0 auto; padding: 24px 20px; line-height: 1.5; }
