:root {
  --orange: #ff6b35;
  --orange-dark: #e55a28;
  --bg: #fff7f2;
  --card: #ffffff;
  --text: #2b2118;
  --muted: #8a7a6d;
  --danger: #d64545;
  --radius: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh;
}
#app { max-width: 520px; margin: 0 auto; padding: 12px; }
.view.hidden, .hidden { display: none !important; }
.center-col { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 16px; gap: 12px; }
.logo { width: 120px; height: 120px; border-radius: 28px; box-shadow: 0 6px 20px rgba(255,107,53,.35); }
h1 { font-size: 2.2rem; margin: 8px 0 0; }
.tagline { color: var(--muted); line-height: 1.5; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08); margin: 12px 0;
  display: flex; flex-direction: column; gap: 10px;
}
.card h2 { margin: 0 0 6px; }
label { font-weight: 600; font-size: .9rem; margin-top: 6px; }
.muted { color: var(--muted); font-size: .85rem; }
.tiny { color: var(--muted); font-size: .75rem; }
.center { text-align: center; }
input, select, textarea {
  width: 100%; padding: 12px; border: 1.5px solid #e5d5c8; border-radius: 12px;
  font-size: 1rem; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); }
.btn {
  border: none; border-radius: 999px; padding: 13px 22px; font-size: 1rem;
  font-weight: 700; cursor: pointer; margin-top: 8px;
}
.btn.primary { background: var(--orange); color: #fff; }
.btn.primary:active { background: var(--orange-dark); }
.btn.ghost { background: transparent; color: var(--orange); border: 2px solid var(--orange); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.round { width: 72px; height: 72px; border-radius: 50%; font-size: 1.8rem; padding: 0; }
.btn.pass { background: #f1ece7; }
.btn.like { background: var(--orange); color: #fff; }
.error { color: var(--danger); font-size: .9rem; min-height: 1.2em; }
.ok { color: #1e9e5a; font-size: .9rem; }
.check { font-weight: 400; font-size: .85rem; line-height: 1.5; }
.check input { width: auto; margin-right: 6px; }
.row { display: flex; gap: 10px; align-items: center; }
.row .btn { flex: 1; }
.topbar {
  display: flex; align-items: center; gap: 10px; padding: 8px 4px;
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.mini-logo { width: 36px; height: 36px; border-radius: 10px; }
.topbar nav { display: flex; gap: 6px; flex: 1; }
.tab { flex: 1; background: transparent; border: none; padding: 10px 4px; font-size: .85rem; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; }
.tab.active { color: var(--orange); border-bottom-color: var(--orange); }
.badge { background: var(--danger); color: #fff; border-radius: 999px; font-size: .7rem; padding: 1px 7px; }
.dcard { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.1); margin-top: 12px; }
.dcard img { width: 100%; height: 380px; object-fit: cover; display: block; background: #eee; }
.dcard .info { padding: 14px 16px; }
.dcard .info h3 { margin: 0 0 4px; font-size: 1.3rem; }
.dcard .info p { margin: 4px 0; color: var(--muted); font-size: .92rem; }
.dcard-actions { display: flex; justify-content: center; gap: 28px; margin: 14px 0; }
.match-item { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: var(--radius); padding: 10px; margin: 8px 0; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.match-item img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.match-item .mname { font-weight: 700; }
.match-item .mlast { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preview-grid img { width: 100%; height: 110px; object-fit: cover; border-radius: 10px; }
.photo-wrap { position: relative; }
.photo-wrap button { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%; width: 26px; height: 26px; cursor: pointer; }
.chat-card { min-height: 70vh; }
.chat-box { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; padding: 8px; background: #faf5f1; border-radius: 12px; }
.msg { max-width: 80%; padding: 9px 13px; border-radius: 16px; font-size: .95rem; line-height: 1.4; }
.msg.me { align-self: flex-end; background: var(--orange); color: #fff; }
.msg.them { align-self: flex-start; background: #e9e2da; }
.msg .mtime { display: block; font-size: .68rem; opacity: .7; margin-top: 3px; }
@media (min-width: 600px) { .dcard img { height: 460px; } }
