/* Connect Surf — night-ocean UI: light-blue waves, Nexus purple/pink, glass cards */
:root {
  --bg: #050f24; --bg-2: #0a1a3a;
  --glass: rgba(140, 200, 255, .07); --glass-2: rgba(140, 200, 255, .12);
  --edge: rgba(120, 205, 255, .22); --edge-2: rgba(120, 205, 255, .4);
  --text: #f2f7ff; --dim: #a9b8d6; --mute: #7184a8;
  --cyan: #00d4ff; --sky: #5fd0ff; --purple: #9d4edd; --pink: #ff107a; --green: #3ee38a;
  --grad: linear-gradient(120deg, #00d4ff, #9d4edd 52%, #ff107a);
  --grad-warm: linear-gradient(120deg, #ff107a, #9d4edd);
  --font: "Plus Jakarta Sans", "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* ---------- ocean backdrop ---------- */
.ocean { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(900px 600px at 110% -10%, rgba(157,78,221,.35), transparent 60%),
              radial-gradient(700px 520px at -20% 30%, rgba(255,16,122,.18), transparent 60%),
              linear-gradient(180deg, #04102a 0%, #071c40 55%, #0a2a58 100%); }
.stars { position: absolute; inset: 0; background-image:
  radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent), radial-gradient(1px 1px at 64% 9%, #cfe9ff 50%, transparent),
  radial-gradient(1.4px 1.4px at 82% 32%, #fff 50%, transparent), radial-gradient(1px 1px at 33% 46%, #bfe3ff 50%, transparent),
  radial-gradient(1.2px 1.2px at 52% 27%, #fff 50%, transparent), radial-gradient(1px 1px at 8% 62%, #d9f1ff 50%, transparent),
  radial-gradient(1.3px 1.3px at 91% 58%, #fff 50%, transparent), radial-gradient(1px 1px at 41% 71%, #cfe9ff 50%, transparent),
  radial-gradient(1px 1px at 72% 48%, #fff 50%, transparent), radial-gradient(1.2px 1.2px at 24% 84%, #e6f6ff 50%, transparent);
  opacity: .55; animation: twinkle 6s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .25; } }
.waves { position: absolute; left: 0; right: 0; bottom: 0; height: 46vh; }
.waves svg { position: absolute; bottom: 0; width: 200%; height: 100%; }
.waves .w1 { animation: drift 22s linear infinite; opacity: .22; }
.waves .w2 { animation: drift 15s linear infinite reverse; opacity: .16; bottom: -14px; }
.waves .w3 { animation: drift 30s linear infinite; opacity: .12; bottom: -30px; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

#app { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; min-height: 100vh; padding: calc(12px + var(--safe-t)) 16px calc(104px + var(--safe-b)); }

/* ---------- brand ---------- */
.tile { display: inline-grid; place-items: center; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 800; letter-spacing: -.04em; position: relative; overflow: hidden; box-shadow: 0 6px 22px rgba(157,78,221,.45); }
.tile::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 8% 5%, rgba(5,18,43,.75), transparent 60%); }
.tile span { position: relative; }
.tile.sm { height: 38px; padding: 0 12px; font-size: 16px; }
.tile.lg { height: 64px; padding: 0 20px; font-size: 30px; border-radius: 18px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.03em; }
.wordmark.lg { font-size: 34px; gap: 12px; }
.surf-badge { display: inline-block; width: 34px; height: 26px; background: var(--grad);
  -webkit-mask: url(/assets/badge.svg) center/contain no-repeat; mask: url(/assets/badge.svg) center/contain no-repeat; }
.wordmark.lg .surf-badge { width: 52px; height: 39px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- top of discover ---------- */
.search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.search svg { width: 18px; height: 18px; stroke: var(--dim); fill: none; stroke-width: 2; flex: none; }
.search input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font-size: 15px; }
.search input::placeholder { color: var(--mute); }
.top-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 14px 0 6px; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill.hot { background: var(--grad-warm); box-shadow: 0 6px 18px rgba(255,16,122,.35); justify-self: start; }
.pill.ghost { border: 1px solid var(--edge-2); color: #bfe6ff; background: rgba(0,212,255,.06); justify-self: end; }
.pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; }

/* avatars */
.av { position: relative; flex: none; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(140deg, #1d3a72, #3b2470); color: #fff; font-weight: 800; overflow: visible; }
.av img, .av .ini { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; }
.av.ring { padding: 3px; background: var(--grad); }
.av.ring img, .av.ring .ini { border: 2.5px solid var(--bg); background: linear-gradient(140deg, #1d3a72, #3b2470); }
.av .dot { position: absolute; right: 2%; bottom: 2%; width: 26%; height: 26%; min-width: 11px; min-height: 11px; border-radius: 50%; background: var(--green); border: 2.5px solid var(--bg); box-shadow: 0 0 10px rgba(62,227,138,.8); }

.here { display: flex; gap: 14px; overflow-x: auto; padding: 14px 2px 6px; scrollbar-width: none; }
.here::-webkit-scrollbar { display: none; }
.here button { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 64px; flex: none; }
.here small { font-size: 11.5px; color: var(--dim); width: 64px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.here .plus { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--cyan); color: #04102a; display: grid; place-items: center; font-weight: 900; font-size: 15px; border: 2.5px solid var(--bg); }

.sec-h { display: flex; align-items: center; justify-content: space-between; margin: 20px 2px 10px; }
.sec-h h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.sec-h a, .sec-h small { font-size: 12.5px; color: #ffb3d6; font-weight: 600; }

/* events */
.ev-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
.ev-row::-webkit-scrollbar { display: none; }
.ev-card { position: relative; flex: none; width: 74%; height: 168px; border-radius: 20px; overflow: hidden; scroll-snap-align: start; border: 1px solid var(--edge); text-align: left; background: var(--grad); }
.ev-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ev-card .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,16,42,0) 30%, rgba(4,16,42,.9)); }
.ev-card .art { position: absolute; inset: 0; background: radial-gradient(circle at 20% 10%, rgba(5,18,43,.6), transparent 60%); }
.ev-card .art::after { content: "🌊"; position: absolute; right: 14px; top: 10px; font-size: 40px; opacity: .9; }
.ev-card .txt { position: absolute; left: 14px; right: 14px; bottom: 12px; }
.ev-card b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.ev-card small { font-size: 12px; color: #d4e4ff; }
.ev-card .going { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 999px; background: rgba(4,16,42,.6); backdrop-filter: blur(8px); font-size: 11px; font-weight: 700; }
.empty-ev { padding: 18px; border-radius: 18px; border: 1px dashed var(--edge); color: var(--dim); font-size: 13.5px; text-align: center; }

/* people cards */
.people { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.pcard { position: relative; display: flex; gap: 14px; align-items: center; padding: 16px 14px 14px; border-radius: 20px; background: linear-gradient(160deg, rgba(20,48,98,.55), rgba(10,26,58,.55)); border: 1px solid var(--edge); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); text-align: left; width: 100%; }
.pcard .mood { position: absolute; top: -10px; left: 16px; max-width: 70%; padding: 3px 10px; border-radius: 999px; background: linear-gradient(90deg, rgba(0,212,255,.95), rgba(157,78,221,.95)); font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 4px 14px rgba(0,212,255,.3); }
.pcard .who { flex: 1; min-width: 0; }
.pcard .nm { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 16px; letter-spacing: -.02em; }
.pcard .nm .lock { font-size: 12px; opacity: .7; }
.pcard p { margin: 2px 0 6px; color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .rel { flex: none; font-size: 11.5px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: var(--glass-2); color: #bfe6ff; }
.pcard .rel.on { background: rgba(62,227,138,.15); color: var(--green); }
.soc-mini { display: flex; gap: 6px; }
.soc-mini span { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; }
.soc-mini svg { width: 12px; height: 12px; }

/* bottom nav */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); z-index: 20; width: min(488px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 6px; border-radius: 24px; background: rgba(10, 28, 62, .72); border: 1px solid var(--edge); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border-radius: 16px; font-size: 10.5px; font-weight: 600; color: var(--mute); }
.nav a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav a.on { color: #fff; background: rgba(0,212,255,.1); }
.nav a.on svg { stroke: var(--cyan); }
.nav .badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 10px rgba(255,16,122,.6); }

/* ---------- generic screens ---------- */
.head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-height: 44px; }
.head h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.03em; flex: 1; }
.back { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--edge); }
.back svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.card { padding: 18px; border-radius: 20px; background: var(--glass); border: 1px solid var(--edge); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: 16px; font-weight: 800; font-size: 15px; background: var(--grad); color: #fff; box-shadow: 0 10px 26px rgba(157,78,221,.35); width: 100%; }
.btn.sec { background: var(--glass-2); box-shadow: none; border: 1px solid var(--edge); }
.btn.sm { height: 40px; font-size: 13.5px; border-radius: 12px; width: auto; padding: 0 16px; }
.btn.blue { background: linear-gradient(120deg, #1aa7ff, #4f6bff); box-shadow: 0 8px 20px rgba(26,167,255,.35); }
.btn.warm { background: var(--grad-warm); }
.btn:disabled { opacity: .5; }
.muted { color: var(--dim); }
.small { font-size: 12.5px; color: var(--mute); }
.list { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--glass); border: 1px solid var(--edge); width: 100%; text-align: left; }
.row .grow { flex: 1; min-width: 0; }
.row b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row small { display: block; color: var(--dim); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .time { font-size: 11px; color: var(--mute); align-self: flex-start; }
.row .count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.tabs { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); margin-bottom: 14px; }
.tabs button { flex: 1; height: 38px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--dim); }
.tabs button.on { background: var(--grad); color: #fff; }
.blank { text-align: center; padding: 40px 20px; color: var(--dim); }
.blank .big { font-size: 44px; margin-bottom: 10px; }

/* ---------- profile ---------- */
.prof-top { display: flex; align-items: center; gap: 18px; }
.prof-top .stats { flex: 1; }
.prof-top .stats b { font-size: 22px; font-weight: 800; display: block; line-height: 1; }
.prof-top .stats small { color: var(--dim); font-size: 12px; }
.prof-actions { display: flex; gap: 8px; margin-top: 12px; }
.prof-name { margin: 16px 0 2px; font-size: 22px; font-weight: 800; letter-spacing: -.03em; display: flex; align-items: center; gap: 8px; }
.prof-handle { color: var(--dim); font-size: 13.5px; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(62,227,138,.12); color: var(--green); }
.status-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.mood-line { margin-top: 12px; font-size: 14px; }
.mood-line b { color: #bfe6ff; }
.bio { margin-top: 8px; color: #dbe6fb; white-space: pre-wrap; }
.locked { margin-top: 16px; padding: 16px; border-radius: 18px; border: 1px dashed var(--edge-2); color: var(--dim); text-align: center; font-size: 13.5px; }
.socials { display: grid; gap: 8px; margin-top: 18px; }
.soc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--edge); }
.soc .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.soc .ic svg { width: 19px; height: 19px; }
.soc b { display: block; font-size: 14px; }
.soc small { color: var(--dim); font-size: 12.5px; }
.soc .go { margin-inline-start: auto; color: var(--mute); }
.menu-link { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--edge); width: 100%; text-align: left; font-weight: 600; }
.menu-link span { margin-inline-start: auto; color: var(--mute); }

/* ---------- chat ---------- */
.chat { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; }
.chat-bar { display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--safe-t)) 14px 10px; background: rgba(6,18,44,.75); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--edge); }
.chat-bar .grow { flex: 1; min-width: 0; }
.chat-bar b { display: block; font-weight: 800; }
.chat-bar small { color: var(--dim); font-size: 12px; }
.msgs { flex: 1; overflow-y: auto; padding: 16px 14px 10px; display: flex; flex-direction: column; gap: 6px; }
.day { align-self: center; font-size: 11.5px; color: var(--mute); margin: 10px 0 4px; }
.bub { max-width: 78%; padding: 10px 14px; border-radius: 20px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; animation: pop .18s ease; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.bub.them { align-self: flex-start; background: rgba(30, 58, 110, .78); border: 1px solid var(--edge); border-bottom-left-radius: 6px; }
.bub.me { align-self: flex-end; background: linear-gradient(120deg, #1aa7ff, #6a4cff 60%, #9d4edd); border-bottom-right-radius: 6px; box-shadow: 0 6px 18px rgba(26,167,255,.25); }
.bub time { display: block; font-size: 10.5px; opacity: .65; margin-top: 3px; text-align: right; }
.seen { align-self: flex-end; font-size: 11px; color: var(--mute); margin-top: -2px; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px calc(10px + var(--safe-b)); background: rgba(6,18,44,.8); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--edge); }
.composer textarea { flex: 1; resize: none; max-height: 120px; min-height: 44px; padding: 11px 16px; border-radius: 22px; background: var(--glass-2); border: 1px solid var(--edge); color: var(--text); outline: none; }
.composer button { width: 44px; height: 44px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; flex: none; }
.composer svg { width: 20px; height: 20px; fill: #fff; }

/* ---------- forms ---------- */
.field { display: block; margin-top: 14px; }
.field > span { display: block; font-size: 12px; font-weight: 700; color: var(--dim); margin: 0 0 6px 4px; letter-spacing: .02em; }
.inp { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px; background: rgba(5,15,36,.55); border: 1px solid var(--edge); color: var(--text); outline: none; }
.inp:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,212,255,.15); }
textarea.inp { resize: vertical; min-height: 84px; }
.at { position: relative; } .at::before { content: "@"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--mute); } .at .inp { padding-left: 30px; }
.photo-pick { display: flex; align-items: center; gap: 16px; }
.photo-pick .av { cursor: pointer; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button { padding: 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); text-align: left; }
.seg button b { display: block; font-size: 14px; }
.seg button small { color: var(--dim); font-size: 12px; line-height: 1.35; display: block; margin-top: 2px; }
.seg button.on { border-color: var(--cyan); background: rgba(0,212,255,.1); box-shadow: 0 0 0 1px var(--cyan) inset; }
.toggle { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); width: 100%; text-align: left; }
.toggle .grow { flex: 1; } .toggle b { display: block; font-size: 14px; } .toggle small { color: var(--dim); font-size: 12px; }
.sw { width: 50px; height: 30px; border-radius: 999px; background: #2a3b60; position: relative; flex: none; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; }
.sw.on { background: var(--green); } .sw.on::after { transform: translateX(20px); }
.soc-inputs { display: grid; gap: 8px; }
.soc-in { display: flex; align-items: center; gap: 10px; }
.soc-in .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.soc-in .ic svg { width: 19px; height: 19px; }
.err { color: #ff7aa8; font-weight: 600; font-size: 13.5px; min-height: 1em; margin-top: 10px; }

/* welcome */
.welcome { min-height: calc(100vh - 140px); display: flex; flex-direction: column; justify-content: center; gap: 22px; text-align: center; align-items: center; }
.welcome h1 { margin: 0; font-size: 38px; line-height: 1.05; letter-spacing: -.04em; font-weight: 800; }
.welcome p { margin: 0; color: var(--dim); max-width: 32ch; }
.feat { display: grid; gap: 10px; width: 100%; text-align: left; }
.feat div { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--edge); font-size: 14px; }
.feat span { font-size: 22px; }

/* event detail */
.ev-hero { height: 220px; border-radius: 22px; overflow: hidden; position: relative; background: var(--grad); border: 1px solid var(--edge); }
.ev-hero img { width: 100%; height: 100%; object-fit: cover; }
.ev-hero .art::after { content: "🌊"; position: absolute; right: 20px; bottom: 16px; font-size: 64px; }
.ev-meta { display: grid; gap: 8px; margin: 16px 0; }
.ev-meta div { display: flex; gap: 10px; align-items: center; color: #dbe6fb; }
.faces { display: flex; align-items: center; }
.faces .av { margin-left: -10px; border: 2px solid var(--bg); } .faces .av:first-child { margin-left: 0; }

/* toast + sheet */
.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translateX(-50%); z-index: 60; padding: 12px 18px; border-radius: 999px; background: rgba(10,28,62,.95); border: 1px solid var(--edge-2); font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: calc(100% - 32px); text-align: center; animation: pop .2s; }
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(2,8,20,.6); }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 41; width: min(520px, 100%); max-height: 88vh; overflow-y: auto; padding: 20px 18px calc(20px + var(--safe-b)); border-radius: 26px 26px 0 0; background: #0b1d42; border: 1px solid var(--edge); animation: up .25s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translate(-50%, 100%); } }
.qr-box { background: #fff; padding: 16px; border-radius: 20px; display: inline-block; }
.qr-box img, .qr-box canvas { display: block; width: 220px !important; height: 220px !important; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }

/* ---------- photo ---------- */
.cam-wrap { position: relative; flex: none; }
.cam { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-size: 15px; border: 3px solid var(--bg); }
.nudge { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 18px; text-align: start;
  background: linear-gradient(120deg, rgba(0,212,255,.14), rgba(255,16,122,.14)); border: 1px dashed var(--edge-2); }
.nudge .grow { flex: 1; } .nudge b { display: block; font-size: 14px; } .nudge small { color: var(--dim); font-size: 12px; } .nudge > span:last-child { font-size: 22px; }

/* ---------- badges ---------- */
.lvl { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.lvl.l1, .lvl-pill.l1 { background: rgba(208,139,77,.22); color: #f2b98a; }
.lvl.l2, .lvl-pill.l2 { background: rgba(0,212,255,.18); color: #8be9ff; }
.lvl.l3, .lvl-pill.l3 { background: rgba(157,78,221,.28); color: #d9b8ff; }
.lvl.l4, .lvl-pill.l4 { background: linear-gradient(120deg, #ffcf4a, #ff107a); color: #fff; box-shadow: 0 0 14px rgba(255,16,122,.45); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lvl-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }

/* ---------- loyalty card ---------- */
.loy { margin-top: 18px; padding: 18px; border-radius: 22px; background: linear-gradient(160deg, rgba(20,48,98,.65), rgba(42,31,107,.55)); border: 1px solid var(--edge-2); }
.loy-h { display: flex; justify-content: space-between; align-items: baseline; }
.loy-h b { font-size: 16px; } .loy-h span { font-weight: 800; color: var(--cyan); }
.cups { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 14px 0 10px; }
.cups i { aspect-ratio: 1; border-radius: 50%; border: 2px dashed rgba(160,210,255,.35); display: grid; place-items: center; font-style: normal; font-size: 18px; }
.cups i.on { border: 0; background: var(--grad); box-shadow: 0 4px 14px rgba(157,78,221,.4); }
.loy-ready { padding: 10px 12px; border-radius: 14px; background: rgba(62,227,138,.14); color: var(--green); font-weight: 700; font-size: 13.5px; }
.badge-card { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; padding: 14px; border-radius: 18px; background: rgba(5,15,36,.45); border: 1px solid var(--edge); }
.badge-card .b-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: var(--glass-2); flex: none; }
.badge-card.l1 .b-ic { background: rgba(208,139,77,.25); } .badge-card.l2 .b-ic { background: rgba(0,212,255,.2); } .badge-card.l3 .b-ic { background: rgba(157,78,221,.3); }
.badge-card.l4 .b-ic { background: linear-gradient(120deg, #ffcf4a, #ff107a); }
.badge-card .grow { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.badge-card b { font-size: 14.5px; } .badge-card small { color: var(--dim); font-size: 12px; }
.lv-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0 2px; }
.lv-bar i { height: 30px; border-radius: 10px; display: grid; place-items: center; font-style: normal; background: rgba(160,210,255,.08); opacity: .45; filter: grayscale(1); }
.lv-bar i.on { opacity: 1; filter: none; background: rgba(160,210,255,.18); }

/* ---------- right-to-left (Arabic) ---------- */
[dir="rtl"] .back svg, [dir="rtl"] .composer svg { transform: scaleX(-1); }
[dir="rtl"] .soc .go { transform: scaleX(-1); }
[dir="rtl"] .pcard .mood { left: auto; right: 16px; }
[dir="rtl"] .cam { right: auto; left: -2px; }
.wordmark, .tile { direction: ltr; unicode-bidi: isolate; }
