:root {
  --bg: #140c0e;
  --bg2: #1d1216;
  --card: #241318;
  --line: rgba(255, 214, 196, 0.12);
  --ink: #f6ebe4;
  --mute: #c7a79a;
  --rose: #e38a86;
  --rose2: #f3c3b4;
  --ok: #e8c9a8;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(1200px 700px at 10% -10%, #3a1a22 0%, var(--bg) 42%);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}
body { padding: env(safe-area-inset-top) 16px 20px; }

h1, h2, .brand {
  font-family: "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 8px 0 18px;
}
.brand { font-size: 28px; margin: 0; }
.sub { color: var(--mute); font-size: 13px; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.12));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 12px;
}

.girl {
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: pointer;
}
.avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: #3a1f27;
  display: grid;
  place-items: center;
  color: var(--rose2);
  font-size: 22px;
  overflow: hidden;
}
.avatar svg { width: 64px; height: 64px; transform: translateY(4px); }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.meta { flex: 1; min-width: 0; }
.meta b { display: block; font-size: 16px; }
.meta span { color: var(--mute); font-size: 12px; }

.row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn, button, select, input, textarea {
  font: inherit;
  color: var(--ink);
}
.btn, button {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: var(--rose);
  color: #2a0d12;
  font-weight: 650;
}
button.ghost, .ghost {
  background: transparent;
  color: var(--rose2);
  border: 1px solid var(--line);
}
button.danger { background: #8a3a3a; color: #fff; }
button:disabled { opacity: 0.5; }

input, select, textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin: 6px 0 12px;
}
label { font-size: 12px; color: var(--mute); display: block; margin-top: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--mute);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.chip.on { background: #3a2228; color: var(--rose2); border-color: var(--rose); }

.preview {
  border: 1px solid var(--line);
  border-radius: 24px;
  margin: 0 0 16px;
  overflow: hidden;
  background: #1a0e12;
  aspect-ratio: 3 / 4;
  max-height: 420px;
}
.preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

.picks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 6px 0 14px;
}
.picks.two { grid-template-columns: 1fr 1fr; }
button.pick {
  border: 1px solid var(--line);
  background: #1a0f12;
  border-radius: 16px;
  padding: 4px 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--mute);
  font-weight: 500;
}
button.pick.on { border-color: var(--rose); background: #3a2228; }
.thumb {
  width: 100%;
  height: 108px;
  overflow: hidden;
  border-radius: 12px;
  background: #2a151a;
}
.thumb.face img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; display: block; }
.thumb.body {
  height: 196px;
}
.thumb.body img { width: 100%; height: 100%; object-fit: cover; object-position: center 48%; display: block; }
.picks.two .thumb.body { height: 220px; }
.cap { font-size: 11px; line-height: 1.2; text-align: center; }
.pick.on .cap { color: var(--rose2); }

.chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 46vh;
  padding-bottom: 8px;
}
.bubble {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 16px;
  line-height: 1.35;
  font-size: 15px;
  white-space: pre-wrap;
}
.bubble.user { margin-left: auto; background: #3a2228; }
.bubble.assistant { background: #1b1114; border: 1px solid var(--line); }
.bubble img { width: 100%; border-radius: 12px; display: block; }

.composer {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent, var(--bg) 30%);
  padding-top: 12px;
}
.hint { color: #e38a86; font-size: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
