:root {
  --rose: #c2185b; --rose-soft: #fce4ec; --ink: #2b2230; --muted: #7a6f80;
  --bg: #fff8fa; --card: #fff; --line: #f0dbe3; --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line); }
header h1 { margin: 0; font-size: 1.4rem; color: var(--rose); }
nav { display: flex; gap: 6px; flex-wrap: wrap; }
main { max-width: 640px; margin: 24px auto; padding: 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 4px 18px rgba(194, 24, 91, 0.06); }
.narrow { max-width: 420px; margin: 0 auto; }
.tagline { color: var(--muted); text-align: center; margin-top: 0; }
label { display: block; margin: 10px 0; font-size: 0.9rem; color: var(--muted); flex: 1; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; color: var(--ink); background: #fff; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1; min-width: 110px; }
button { padding: 9px 16px; border: 0; border-radius: 999px; background: var(--rose); color: #fff; font: inherit; cursor: pointer; }
button:hover { filter: brightness(1.08); }
button.ghost, nav button { background: transparent; color: var(--rose); border: 1px solid var(--line); }
nav button.active { background: var(--rose-soft); }
.tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.tabs button { flex: 1; background: transparent; color: var(--muted); border: 1px solid var(--line); }
.tabs button.active { background: var(--rose-soft); color: var(--rose); }
.error { color: #b00020; min-height: 1.2em; }
.muted { color: var(--muted); }

.profile-card { text-align: center; }
.profile-card img, .avatar { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; background: var(--rose-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 3.5rem; color: var(--rose); }
.score { display: inline-block; margin: 6px 0; padding: 4px 12px; border-radius: 999px; background: var(--rose-soft); color: var(--rose); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0; }
.chip { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.85rem; }
.chip.shared { background: var(--rose-soft); border-color: var(--rose); }
.actions { display: flex; gap: 16px; justify-content: center; margin-top: 16px; }
.actions button { width: 64px; height: 64px; font-size: 1.6rem; padding: 0; }
.actions .pass { background: #fff; color: var(--muted); border: 1px solid var(--line); }

.list { list-style: none; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; }
.list .avatar, .list img { width: 48px; height: 48px; font-size: 1.3rem; border-radius: 50%; object-fit: cover; }

#messages { display: flex; flex-direction: column; gap: 6px; min-height: 240px; max-height: 55vh; overflow-y: auto; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.msg { max-width: 75%; padding: 8px 12px; border-radius: 14px; background: #f3eef5; align-self: flex-start; overflow-wrap: anywhere; }
.msg.mine { background: var(--rose); color: #fff; align-self: flex-end; }
#form-chat input { flex: 4; margin: 0; }
#form-chat button { flex: 1; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--rose); color: #fff; padding: 12px 20px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.15); }

button.link { background: none; color: var(--muted); padding: 4px; margin-top: 12px; font-size: 0.85rem; text-decoration: underline; }
.chat-head { align-items: center; }
.chat-head h2 { flex: 4; }
.chat-head button { flex: 0 0 auto; }
