/* =====================================================================
   One design system, four brand skins. Mobile-first, works at 320px.
   No frameworks: the whole app shell is a few dozen KB for budget phones.
   ===================================================================== */
:root { --radius: 18px; --pad: 18px; --nav-h: 64px; --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }

[data-brand="raaz"] { --bg:#13112f; --bg2:#1b1942; --surface:#211f4d; --surface2:#2b2862; --text:#f3ede3; --muted:#b4acc9; --border:#36327a;
  --accent:#f2a33a; --accent-ink:#1a1030; --accent2:#e0558a; --ok:#5fd3a1; --warn:#ffcf70; --danger:#ff6b8a;
  --font-display:"Cormorant Garamond", Georgia, serif; --radius:16px; color-scheme: dark; }
[data-brand="humtum"] { --bg:#fff6f2; --bg2:#ffe9e8; --surface:#ffffff; --surface2:#fdeef1; --text:#4a1028; --muted:#8e5a6d; --border:#f6d3dc;
  --accent:#d6336c; --accent-ink:#ffffff; --accent2:#ff8fab; --ok:#2f9e6e; --warn:#b26a00; --danger:#c92a2a;
  --font-display:"Fraunces", Georgia, serif; --radius:24px; color-scheme: light; }
[data-brand="rishta"] { --bg:#faf7f0; --bg2:#f2ecdf; --surface:#ffffff; --surface2:#f4efe2; --text:#173a2e; --muted:#5f6f66; --border:#e3d7b3;
  --accent:#1f5c47; --accent-ink:#fbf8f1; --accent2:#b8902f; --ok:#2f7d57; --warn:#8a5a00; --danger:#a12a2a;
  --font-display:"Marcellus", Georgia, serif; --radius:10px; color-scheme: light; }
[data-brand="unscripted"] { --bg:#0a0a0b; --bg2:#121214; --surface:#18181b; --surface2:#222226; --text:#f4f4f0; --muted:#a1a1a6; --border:#2c2c31;
  --accent:#c6ff3d; --accent-ink:#0a0a0b; --accent2:#ff5a5f; --ok:#c6ff3d; --warn:#ffb020; --danger:#ff5a5f;
  --font-display:"Anton", Impact, "Arial Narrow", sans-serif; --radius:14px; color-scheme: dark; }

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.45; min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--accent); }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; display: flex; flex-direction: column; }
.page { flex: 1; padding: var(--pad); padding-bottom: calc(var(--nav-h) + 28px); }
.page.full { padding-bottom: var(--pad); }
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: .01em; line-height: 1.05; }
[data-brand="unscripted"] .display { font-weight: 400; text-transform: uppercase; letter-spacing: .02em; }
[data-brand="rishta"] .display { font-weight: 400; }
h1.display { font-size: clamp(40px, 12vw, 64px); }
h2 { font-family: var(--font-display); font-size: 28px; line-height: 1.15; margin-bottom: 8px; font-weight: 700; }
[data-brand="unscripted"] h2 { font-weight: 400; text-transform: uppercase; font-size: 30px; }
[data-brand="rishta"] h2 { font-weight: 400; }
h3 { font-size: 16px; margin: 18px 0 8px; }
.muted { color: var(--muted); } .small { font-size: 13.5px; } .tiny { font-size: 12px; } .center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; } .grow { flex: 1; min-width: 0; }
.mt { margin-top: 12px; } .mt2 { margin-top: 22px; } .mb { margin-bottom: 12px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 18px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); font-weight: 700; width: 100%; transition: transform .08s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn.soft { background: var(--surface2); color: var(--text); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.sm { width: auto; min-height: 38px; padding: 8px 14px; font-size: 14px; }
[data-brand="humtum"] .btn { border-radius: 999px; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface2); font-size: 20px; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--surface); margin: 0 8px 8px 0; font-size: 14.5px; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.field { display: block; margin: 14px 0; }
.field > span { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.input { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: calc(var(--radius) * .7); border: 1.5px solid var(--border); background: var(--surface); outline: none; }
.input:focus { border-color: var(--accent); }
textarea.input { min-height: 96px; resize: vertical; }
.toggle { width: 52px; height: 30px; border-radius: 99px; background: var(--border); position: relative; flex: none; transition: background .2s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px #0003; }
.toggle.on { background: var(--accent); } .toggle.on::after { left: 25px; }
input[type=range] { width: 100%; accent-color: var(--accent); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
[data-brand="humtum"] .card { border: 0; box-shadow: 0 10px 30px rgba(122, 24, 56, .09); }
[data-brand="rishta"] .card { box-shadow: 0 1px 0 var(--border); }
.card.tap { width: 100%; text-align: left; display: flex; gap: 12px; align-items: center; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); width: 100%; text-align: left; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface2); color: var(--text); margin: 0 4px 4px 0; }
.badge.accent { background: var(--accent); color: var(--accent-ink); }
.badge.ok { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.notice { padding: 12px 14px; border-radius: 12px; font-size: 14px; background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); margin: 8px 0; }
.notice.info { background: var(--surface2); border-color: var(--border); }
.empty { text-align: center; padding: 40px 12px; color: var(--muted); }
.empty .display { color: var(--text); font-size: 26px; margin-bottom: 8px; }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }
.progress { height: 6px; border-radius: 99px; background: var(--surface2); overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); transition: width .3s; }

/* ---------- avatars & photos ---------- */
.avatar { border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; overflow: hidden; position: relative; background-size: cover; background-position: center; }
.avatar.veil::after, .photo.veil::after { content: ""; position: absolute; inset: 0; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.photo { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface2) center/cover no-repeat; aspect-ratio: 4/5; display: flex; align-items: flex-end; }
.photo .shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.72)); }
.photo .over { position: relative; padding: 16px; color: #fff; width: 100%; z-index: 1; }
.photo .over .name { font-family: var(--font-display); font-size: 30px; line-height: 1.05; }
[data-brand="unscripted"] .photo .over .name { text-transform: uppercase; }
.photo .lock { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(0,0,0,.45); color: #fff; padding: 5px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }

/* ---------- navigation ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: 12px var(--pad); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.topbar .title { font-family: var(--font-display); font-size: 22px; font-weight: 700; flex: 1; }
[data-brand="unscripted"] .topbar .title { font-weight: 400; text-transform: uppercase; }
.nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: var(--surface); border-top: 1px solid var(--border); z-index: 20; }
.nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; color: var(--muted); position: relative; }
.nav button svg { width: 24px; height: 24px; }
.nav button.on { color: var(--accent); font-weight: 700; }
[data-brand="humtum"] .nav { border-radius: 22px 22px 0 0; border: 0; box-shadow: 0 -8px 24px rgba(122,24,56,.08); }
.dot { position: absolute; top: 10px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--accent2); }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; height: 100dvh; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 12px var(--pad); display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 80%; padding: 10px 13px; border-radius: 18px; font-size: 15px; background: var(--surface2); word-wrap: break-word; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.msg .warn { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--warn); }
.msg.me .warn { color: inherit; opacity: .85; }
.msg-time { font-size: 11px; color: var(--muted); text-align: center; margin: 8px 0; }
.composer { display: flex; gap: 8px; padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
.composer .input { border-radius: 999px; }

/* ---------- overlays ---------- */
.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(64px + env(safe-area-inset-top)); max-width: min(92vw, 520px); width: max-content; padding: 12px 16px; border-radius: 14px;
  background: var(--text); color: var(--bg); font-size: 14.5px; z-index: 100; box-shadow: 0 10px 30px #0004; animation: up .25s ease; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto; background: var(--bg); border-radius: 24px 24px 0 0; padding: 22px var(--pad) calc(22px + env(safe-area-inset-bottom)); animation: up .25s ease; }
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--border); margin: -8px auto 14px; }
@keyframes up { from { transform: translate(var(--tx, 0), 16px); opacity: 0; } }
.toast { --tx: -50%; }
@keyframes fade { from { opacity: 0; } }

/* ---------- landing ---------- */
.hero { position: relative; overflow: hidden; padding: 28px var(--pad) 34px; border-radius: 0 0 32px 32px; background: var(--bg2); }
.hero .art { position: absolute; top: 0; right: 0; width: 46%; height: 190px; opacity: .9; pointer-events: none; }
.hero > * { position: relative; }
.hero .kicker { font-size: 12.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.hero p.lead { font-size: 19px; margin: 12px 0 22px; max-width: 30ch; }
.props { display: grid; gap: 12px; margin-top: 22px; }
.prop { display: flex; gap: 14px; align-items: flex-start; }
.prop .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--surface2); display: flex; align-items: center; justify-content: center; flex: none; font-size: 22px; }
.price-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.price { min-width: 140px; scroll-snap-align: start; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--border); }
.price.best { border-color: var(--accent); }
.price .amt { font-family: var(--font-display); font-size: 28px; line-height: 1.1; }
.lang-switch { position: absolute; top: 14px; right: 14px; z-index: 2; }
.lang-switch select { background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 6px 10px; font-size: 13px; }

/* ---------- brand details ---------- */
.jaali { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23f2a33a' stroke-opacity='.22' stroke-width='1.2'%3E%3Cpath d='M24 2l22 22-22 22L2 24z'/%3E%3Ccircle cx='24' cy='24' r='8'/%3E%3Cpath d='M24 16v16M16 24h16'/%3E%3C/g%3E%3C/svg%3E"); }
.gold-rule { height: 1px; background: linear-gradient(90deg, transparent, var(--accent2), transparent); margin: 16px 0; }
.ledger-row { display: grid; grid-template-columns: 26px 1fr; gap: 6px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 14.5px; }
.ledger-row b { color: var(--ok); } .ledger-row b.d { color: var(--accent2); }
.score { font-family: var(--font-display); font-size: 40px; font-weight: 700; color: var(--accent); line-height: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden; background: var(--surface2) center/cover; display: flex; align-items: flex-end; text-align: left; width: 100%; }
.tile .over { position: relative; z-index: 1; padding: 10px; color: #fff; width: 100%; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.ring { width: 140px; height: 140px; margin: 30px auto; border-radius: 50%; border: 3px solid var(--accent); display: flex; align-items: center; justify-content: center; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { transform: scale(1.07); opacity: .55; } }
.call { position: fixed; inset: 0; background: #000; z-index: 60; display: flex; flex-direction: column; }
.call video { width: 100%; height: 100%; object-fit: cover; background: #111; }
.call .remote { flex: 1; position: relative; }
.call .local { position: absolute; right: 14px; top: 14px; width: 30%; max-width: 140px; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; border: 2px solid #fff3; background: #222; z-index: 2; }
.call .placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; gap: 10px; text-align: center; padding: 20px; }
.call .controls { display: flex; justify-content: space-around; padding: 14px 8px calc(18px + env(safe-area-inset-bottom)); background: #0a0a0b; }
.call .controls button { width: 58px; height: 58px; border-radius: 50%; background: #26262b; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; gap: 2px; }
.call .controls button.on { background: var(--accent); color: var(--accent-ink); }
.call .controls button.end { background: var(--accent2); }
.demo-banner { background: var(--accent2); color: #fff; text-align: center; font-size: 12px; font-weight: 700; padding: 6px; letter-spacing: .04em; }
.data-saver .photo:not(.tapped), .data-saver .tile:not(.tapped) { background-image: none !important; }
@media (min-width: 700px) { body { background: var(--bg2); } #app { background: var(--bg); box-shadow: 0 0 0 1px var(--border); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
[data-brand="unscripted"] .hero .art { opacity: .45; }
