:root {
  --brand: #6C5CE7;          /* purple accent (verified, primary) */
  --brand-dark: #4b3fc4;
  --teal: #0f9d8f;           /* secondary accent */
  --bg: #ffffff;
  --panel: #f6f6fb;
  --card: #ffffff;
  --ink: #17181f;            /* near-black text */
  --ink-soft: #3a3b47;
  --muted: #8a8d9c;
  --line: #ececf2;
  --ok: #17c37b;
  --warn: #ff9f43;
  --danger: #ff5b6a;
  --nav: #14141b;            /* dark bottom nav */
  --sans: "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --serif: "Georgia", "Times New Roman", "Cambria", serif;
  font-family: var(--sans);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(160deg, #eef0fb, #faf7fb 60%);
  color: var(--ink);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 26px 16px 60px;
}
.hidden { display: none !important; }

/* Phone frame */
.phone {
  width: 390px;
  max-width: 100%;
  background: #0c0c14;
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 26px 60px rgba(40, 30, 90, 0.24);
}
.screen {
  background: var(--bg);
  border-radius: 30px;
  min-height: 760px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Top bar with logo wordmark */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 8px;
}
.brandmark { display: flex; align-items: center; gap: 9px; }
.brandmark img { width: 30px; height: 30px; border-radius: 9px; }
.brandmark .word { font-weight: 800; font-size: 19px; letter-spacing: -.3px; }
.brandmark .word .accent { font-family: var(--serif); font-style: italic; font-weight: 700; color: var(--brand-dark); }
.topbar .tools { display: flex; gap: 14px; color: var(--muted); font-size: 18px; }

.body { flex: 1; overflow-y: auto; padding: 6px 18px 18px; }

/* Big screen title (Hinge-style) */
.screen-title { margin: 6px 2px 12px; }
.screen-title h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.screen-title p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* Verified rosette badge */
.verified { display: inline-flex; vertical-align: middle; width: 18px; height: 18px; margin-left: 5px; }
.verified svg { width: 100%; height: 100%; }

/* Forms */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.input, .select, .textarea {
  width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 14px;
  padding: 12px 13px; font-size: 14px; color: var(--ink); font-family: inherit;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); }
.textarea { min-height: 82px; resize: vertical; }
.hint { font-size: 11px; color: var(--muted); margin-top: 4px; }

.btn {
  display: block; width: 100%; border: none; border-radius: 999px; padding: 14px;
  font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 8px;
  background: var(--brand); color: #fff; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: scale(.99); }
.btn.secondary { background: #fff; color: var(--brand-dark); border: 1.5px solid var(--line); }
.btn.secondary:hover { background: #f4f3ff; }
.btn.google { background: #fff; color: #333; border: 1.5px solid var(--line); }
.btn.danger { background: var(--danger); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.small { width: auto; padding: 10px 16px; font-size: 13px; margin: 0; }
.row { display: flex; align-items: center; gap: 11px; }
.row .grow { flex: 1; }
.split { display: flex; gap: 10px; }
.muted { color: var(--muted); font-size: 12px; }
.strong { font-weight: 700; }
.center { text-align: center; }
.serif { font-family: var(--serif); }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* Filter chips (outlined pills) */
.chip { display: inline-flex; align-items: center; gap: 5px; background: #fff; color: var(--ink); border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 13px; font-size: 13px; font-weight: 600; margin: 3px 4px 3px 0; cursor: pointer; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
select.chip { appearance: none; padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 13px center, right 8px center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

.pill { font-size: 11px; padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.pill.ok { background: rgba(23,195,123,.14); color: #0f9d63; }
.pill.warn { background: rgba(255,159,67,.18); color: #cf7b17; }
.pill.danger { background: rgba(255,91,106,.14); color: #d43d4d; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 15px; margin-bottom: 14px; box-shadow: 0 6px 18px rgba(30,25,70,.04); }

/* Avatars with ring + verified support */
.avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #a29bfe); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.avatar.lg { width: 96px; height: 96px; font-size: 34px; }
.avatar.ring { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }
.avatar.photo { padding: 0; overflow: hidden; cursor: pointer; }
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scaleX(-1); }

/* Profile hero (my profile / full profile) */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 4px; }
.hero .name { font-size: 24px; font-weight: 800; margin-top: 12px; letter-spacing: -.4px; }
.hero .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.hero-edit { position: relative; }
.hero-edit .edit-badge { position: absolute; right: 2px; bottom: 6px; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; }

/* Vitals row: icon + value cells with dividers */
.vitals { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin: 10px 0 14px; background: #fff; box-shadow: 0 6px 18px rgba(30,25,70,.04); }
.vital { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 14px 8px; font-weight: 700; font-size: 14px; }
.vital + .vital { border-left: 1px solid var(--line); }
.vital .ic { font-size: 15px; }

/* Attribute rows: line icon + text + divider */
.attrs { background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 6px 18px rgba(30,25,70,.04); }
.attr { display: flex; align-items: flex-start; gap: 13px; padding: 15px; }
.attr + .attr { border-top: 1px solid var(--line); }
.attr .ic { font-size: 18px; width: 22px; text-align: center; flex-shrink: 0; }
.attr .val { font-size: 15px; line-height: 1.4; }
.attr .lbl { font-size: 12px; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.attr .val.big { font-family: var(--serif); font-size: 19px; line-height: 1.35; }

/* Selfie verification */
.viewfinder { aspect-ratio: 3/4; border-radius: 22px; background: #14152a; overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; }
.viewfinder video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.viewfinder img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.viewfinder .overlay { position: absolute; inset: 0; display:flex; align-items:center; justify-content:center; pointer-events:none; }
.viewfinder .face { width: 128px; height: 158px; border: 2px dashed rgba(255,255,255,.5); border-radius: 50% 50% 46% 46%; }
.viewfinder .lock { position: absolute; top: 12px; right: 14px; font-size: 11px; color: #cfd2f4; background: rgba(0,0,0,.4); padding: 5px 10px; border-radius: 999px; }
.viewfinder .gesture { position: absolute; bottom: 12px; left: 14px; font-size: 12px; color:#fff; background: rgba(0,0,0,.4); padding: 5px 11px; border-radius: 999px; }
.dots { display: flex; gap: 8px; justify-content: center; margin: 12px 0 4px; }
.dot { width: 28px; height: 6px; border-radius: 999px; background: var(--line); }
.dot.done { background: var(--ok); }
.dot.current { background: var(--brand); }

.selfie-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.selfie-thumb { aspect-ratio: 1; border-radius: 16px; background: linear-gradient(135deg,#e7e7f6,#f2f2fb); display:flex; align-items:center; justify-content:center; font-size: 20px; color: var(--muted); overflow: hidden; text-align:center; }
.selfie-thumb img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.selfie-thumb.today { background: linear-gradient(135deg, var(--brand), #a29bfe); color: #fff; cursor: pointer; font-weight: 700; }

/* Search result card (photo-forward) */
.discover-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; margin-bottom: 16px; box-shadow: 0 8px 22px rgba(30,25,70,.06); cursor: pointer; }
.discover-photo { width: 100%; aspect-ratio: 4/5; background: linear-gradient(135deg,#e7e7f6,#f2f2fb); position: relative; display:flex; align-items:center; justify-content:center; color: var(--muted); font-size: 48px; font-weight: 800; }
.discover-photo img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.discover-like { position: absolute; right: 14px; bottom: -22px; width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: #fff; border: 3px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 8px 20px rgba(108,92,231,.4); }
.discover-body { padding: 26px 16px 16px; }
.discover-body .dname { font-size: 20px; font-weight: 800; }
.discover-body .dmeta { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.bubble { max-width: 78%; padding: 10px 13px; border-radius: 16px; font-size: 13px; line-height: 1.35; }
.bubble.them { background: var(--panel); align-self: flex-start; border-bottom-left-radius: 5px; }
.bubble.me { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.meter { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.meter > span { display: block; height: 100%; background: var(--warn); }
.rating { font-size: 26px; color: var(--warn); cursor: pointer; letter-spacing: 3px; }

/* 1-10 rating scale */
.rating-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rate-pill { border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 12px; padding: 12px 0; font-weight: 800; font-size: 15px; cursor: pointer; }
.rate-pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Section header */
.section-h { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 15px; margin: 6px 2px 8px; }

/* Banners */
.banner { border-radius: 14px; padding: 11px 13px; font-size: 12px; margin-bottom: 12px; }
.banner.info { background: #f0eefe; color: var(--brand-dark); }
.banner.warn { background: rgba(255,159,67,.14); color: #c9781a; }
.banner.danger { background: rgba(255,91,106,.12); color: #cf4353; }
.banner.ok { background: rgba(23,195,123,.12); color: #0f9d63; }

/* Bottom nav (dark) */
.tabbar { display: flex; background: var(--nav); padding: 6px 4px 8px; }
.tabbar .tab { flex: 1; text-align: center; padding: 8px 0; font-size: 10px; color: #8b8ca3; background: none; border: none; cursor: pointer; font-weight: 600; }
.tabbar .tab .ic { font-size: 19px; display: block; margin-bottom: 2px; filter: grayscale(1) opacity(.7); }
.tabbar .tab.active { color: #fff; }
.tabbar .tab.active .ic { filter: none; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 13px; z-index: 200; box-shadow: 0 12px 34px rgba(0,0,0,.28); }

/* Mirror (selfie) display — default for user photos; toggled by Flip */
.mirror { transform: scaleX(-1); }

/* Photo lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(6, 7, 18, .9); display: flex; align-items: center; justify-content: center; z-index: 150; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 18px; box-shadow: 0 24px 70px rgba(0,0,0,.6); }
.lightbox .close { position: absolute; top: 16px; right: 22px; font-size: 34px; line-height: 1; color: #fff; background: none; border: none; cursor: pointer; }
.lightbox .lb-tools { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.lightbox .lb-btn { background: rgba(255,255,255,.14); color: #fff; border: 1.5px solid rgba(255,255,255,.32); border-radius: 999px; padding: 10px 20px; font-weight: 700; font-size: 14px; cursor: pointer; }
.lightbox .lb-btn:hover { background: rgba(255,255,255,.24); }

/* Admin (desktop) */
.admin-wrap { width: 780px; max-width: 100%; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: 0 16px 44px rgba(40,30,90,.12); }
.admin-head { display:flex; align-items:center; gap:12px; margin-bottom: 18px; }
.admin-head img { width: 40px; height: 40px; border-radius: 11px; }
.admin-head .brand { font-weight: 800; font-size: 20px; }
.admin-head .brand .accent { font-family: var(--serif); font-style: italic; color: var(--brand-dark); }
.kv { display:flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv .k { color: var(--muted); }
table.users { width: 100%; border-collapse: collapse; font-size: 13px; }
table.users th, table.users td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
a.link { color: var(--brand-dark); font-size: 13px; font-weight: 600; }
