:root {
  --bg: #efe8e1; --ink: #1e1b22; --muted: #726a73; --line: rgba(30,27,34,.09);
  --glass: rgba(255,255,255,.62);
  --coral: #ec6a55; --coral-2: #f39a7e; --coral-soft: #fde4dc;
  --teal: #2fbfa9; --teal-soft: #e3f5f1; --teal-ink: #1b6e62;
  --navy: #17202b; --navy-2: #233140; --map-bg: #173039; --blue: #3b82f6;
  --radius: 22px; --shadow: 0 10px 30px rgba(60,40,30,.10);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(60vw 50vh at 85% 0%, #f8d5c4 0, transparent 60%),
                    radial-gradient(50vw 50vh at 0% 100%, #d6e7e2 0, transparent 60%);
  background-attachment: fixed;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; }
h1, h2 { margin: 0; letter-spacing: -.02em; }
h2 { font-size: 17px; margin-bottom: 12px; }
.ic { width: 20px; height: 20px; flex: none; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 200px 1fr; gap: 20px; max-width: 1320px; margin: 0 auto; padding: 20px; min-height: 100vh; }
.nav, .panel {
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius); box-shadow: var(--shadow);
}
.nav { position: sticky; top: 20px; height: calc(100vh - 40px); display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; padding: 4px 10px 18px; color: var(--coral); }
.brand .ic { fill: currentColor; }
.brand span { color: var(--ink); }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; color: var(--muted); font-size: 14.5px; font-weight: 500; transition: .15s; position: relative; }
.nav-item:hover { background: rgba(255,255,255,.6); color: var(--ink); }
.nav-item.active { background: #fff; color: var(--coral); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.badge { margin-left: auto; background: var(--coral); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.me-card { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 8px 4px; border-top: 1px solid var(--line); font-size: 14px; }
.me-card small { display: block; color: var(--muted); font-size: 12px; }
.main { min-width: 0; }
.panel { padding: 18px; }

.muted { color: var(--muted); } .small { font-size: 12.5px; } .center { text-align: center; }
.label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 16px 0 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: 14px; transition: .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--coral); color: #fff; border-color: transparent; }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn .ic { width: 16px; height: 16px; }
.link { color: var(--coral); font-weight: 600; font-size: 13px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 99px; font-size: 12.5px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.7); }
.chip.on { background: rgba(236,106,85,.25); border-color: rgba(236,106,85,.55); color: #fff; }
.av { width: var(--s,40px); height: var(--s,40px); border-radius: 50%; display: inline-grid; place-items: center; flex: none; color: #fff; font-weight: 700; font-size: calc(var(--s,40px) * .42);
  background: linear-gradient(135deg, hsl(var(--h) 75% 68%), hsl(calc(var(--h) + 35) 60% 45%)); box-shadow: 0 0 0 2px #fff; }
.verified { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff; flex: none; }
.verified .ic { width: 13px; height: 13px; stroke-width: 3; }

/* ---------- discover ---------- */
.discover { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 20px; align-items: start; }
.profile { position: relative; background: linear-gradient(180deg, var(--navy-2), var(--navy)); color: #fff; border-radius: 28px; overflow: hidden; box-shadow: 0 20px 50px rgba(23,32,43,.35); }
.photo { position: relative; aspect-ratio: 4 / 3.3; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 75% 20%, hsl(calc(var(--h) + 40) 95% 78% / .9), transparent 40%),
              radial-gradient(circle at 20% 80%, hsl(calc(var(--h) - 30) 70% 50% / .8), transparent 50%),
              linear-gradient(160deg, hsl(var(--h) 75% 62%), hsl(calc(var(--h) + 25) 50% 28%)); }
.photo .initial { font-size: clamp(90px, 14vw, 170px); font-weight: 800; color: rgba(255,255,255,.85); letter-spacing: -.05em; text-shadow: 0 10px 40px rgba(0,0,0,.2); }
.photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, var(--navy-2)); }
.photo.sm { aspect-ratio: 1; border-radius: 16px; }
.photo.sm::after { display: none; }
.photo.sm .initial { font-size: 64px; }
.profile-info { padding: 0 24px 100px; margin-top: -64px; position: relative; z-index: 1; }
.name-row { display: flex; align-items: center; gap: 8px; }
.profile h1 { font-size: 32px; }
.loc { display: flex; align-items: center; gap: 4px; color: rgba(255,255,255,.7); font-size: 14px; margin-top: 4px; }
.loc .ic { width: 15px; height: 15px; }
.voice { display: flex; align-items: center; gap: 10px; width: 100%; margin: 16px 0 4px; padding: 7px 14px 7px 7px; border-radius: 99px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); color: #fff; text-align: left; }
.vbtn { width: 34px; height: 34px; border-radius: 50%; background: var(--coral); display: grid; place-items: center; flex: none; }
.vbtn .ic { width: 15px; height: 15px; }
.vtext { font-size: 13.5px; font-weight: 500; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wave { display: flex; align-items: center; gap: 2px; height: 24px; width: 110px; flex: none; }
.wave i { flex: 1; height: var(--h); background: var(--coral-2); border-radius: 2px; opacity: .75; }
.voice.on .wave i { animation: wave .6s ease-in-out var(--d) infinite alternate; opacity: 1; }
@keyframes wave { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
.bio { color: rgba(255,255,255,.82); line-height: 1.55; font-size: 14.5px; margin: 12px 0 0; }
.profile .label { color: rgba(255,255,255,.55); }
.actions { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; justify-content: center; gap: 18px; z-index: 2; }
.round { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; transition: .15s; flex: none; }
.round:hover { transform: scale(1.07); }
.round.pass { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.round.like { background: var(--coral); color: #fff; box-shadow: 0 10px 25px rgba(236,106,85,.5); }
.round .ic { width: 24px; height: 24px; }
.round.like .ic { fill: currentColor; }
.round.sm { width: 42px; height: 42px; }
.round.sm .ic { width: 18px; height: 18px; }
.round.primary { background: var(--coral); color: #fff; }
.side { display: grid; gap: 16px; min-width: 0; }
.score { display: flex; gap: 18px; align-items: center; }
.score p { margin: 0 0 6px; font-size: 14px; line-height: 1.5; }
.score .label { margin-top: 0; }
.ring { position: relative; width: var(--size); height: var(--size); flex: none; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .track { stroke: var(--coral-soft); }
.ring .val { stroke: var(--coral); stroke-linecap: round; }
.ring b { font-size: calc(var(--size) * .24); font-weight: 800; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; }
.title { font-weight: 700; font-size: 15px; }
.msgs { display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 80%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--coral); color: #fff; border-bottom-right-radius: 6px; }
.bubble.them { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.typing { display: flex; gap: 4px; padding: 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
.gmini-body { display: grid; grid-template-columns: 160px 1fr; gap: 14px; align-items: start; }

/* ---------- map ---------- */
.map { width: 100%; height: auto; border-radius: 16px; display: block; }
.map .water { fill: #0f252c; }
.map .streets line { stroke: rgba(140,200,200,.09); stroke-width: 1; }
.map .major { stroke: rgba(140,200,200,.22); stroke-width: 2.5; fill: none; }
.map .area { fill: rgba(180,230,225,.55); font-size: 17px; font-weight: 600; }
.map .radius { fill: rgba(47,191,169,.14); stroke: var(--teal); stroke-width: 2; }
.map .me { fill: var(--teal); stroke: #fff; stroke-width: 2; }
.map .me-pulse { fill: none; stroke: var(--teal); stroke-width: 2; animation: pulse 2s infinite; transform-origin: 160px 160px; }
@keyframes pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(4); opacity: 0; } }
.pin { cursor: pointer; transition: opacity .2s; }
.pin circle { stroke: #fff; stroke-width: 2; }
.pin text { fill: #fff; font-size: 12px; font-weight: 700; pointer-events: none; }
.pin .lbl { font-size: 10px; font-weight: 600; fill: rgba(255,255,255,.85); }
.pin.out { opacity: .3; }

.grow { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.7); border: 1px solid var(--line); cursor: pointer; margin-bottom: 8px; transition: .15s; }
.grow:hover { background: #fff; }
.gtop b { display: block; font-size: 14px; }
.gtop span { font-size: 12px; }
.gbot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
.faces { display: flex; }
.faces .av { --s: 24px; margin-left: -6px; font-size: 10px; }
.faces .av:first-child { margin-left: 0; }

/* ---------- generic views ---------- */
.vhead { margin: 6px 4px 18px; }
.vhead h1 { font-size: 28px; }
.vhead p { margin: 4px 0 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.mcard { padding: 10px; }
.mbody { padding: 12px 6px 6px; }
.mbody .row { margin-top: 12px; }
.empty { max-width: 480px; margin: 60px auto; text-align: center; padding: 36px; }
.empty p { color: var(--muted); }
.empty .row { justify-content: center; }

/* ---------- messages ---------- */
.messages { display: grid; grid-template-columns: 300px 1fr; gap: 20px; height: calc(100vh - 40px); }
.convos { overflow: auto; padding: 14px; }
.convos h2 { padding: 4px 6px; }
.convo { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px; border-radius: 14px; text-align: left; }
.convo:hover { background: rgba(255,255,255,.6); }
.convo.active { background: #fff; }
.convo .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); margin-left: auto; flex: none; }
.ctext { min-width: 0; display: flex; flex-direction: column; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.chat.placeholder { display: grid; place-items: center; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-head > div { min-width: 0; }
.chat .msgs { flex: 1; overflow: auto; padding: 18px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex: none; }
.icon-btn:hover { background: rgba(0,0,0,.05); }
.chat-head .back { display: none; }
.ice { display: flex; gap: 8px; overflow-x: auto; padding: 10px 18px; border-top: 1px solid var(--line); align-items: center; scrollbar-width: none; }
.ice-label { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--teal-ink); white-space: nowrap; }
.ice-label .ic { width: 15px; height: 15px; }
.ice-chip { background: var(--teal-soft); border-color: #bfe8df; color: var(--teal-ink); white-space: nowrap; cursor: pointer; }
.composer { display: flex; gap: 10px; padding: 12px 18px 16px; }
.composer input { flex: 1; min-width: 0; padding: 12px 16px; border-radius: 99px; border: 1px solid var(--line); background: #fff; outline: none; }
.composer input:focus { border-color: var(--coral); }

/* ---------- groups ---------- */
.groups { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; align-items: start; }
.mapcard { background: var(--map-bg); border-color: rgba(255,255,255,.1); padding: 14px; }
.slider { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.92); border-radius: 99px; padding: 8px 16px; margin-bottom: 12px; font-size: 14px; white-space: nowrap; }
.slider input { flex: 1; min-width: 0; accent-color: var(--teal); }
.gpanel { display: flex; flex-direction: column; min-height: 420px; max-height: calc(100vh - 140px); overflow: auto; }
.groups.has-active .gpanel { padding: 0 0 4px; }
.gav { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none;
  background: linear-gradient(135deg, hsl(var(--h) 65% 60%), hsl(calc(var(--h) + 30) 55% 40%)); }
.gpanel .msgs { padding: 16px 18px; flex: 1; }
.gmsg { display: flex; gap: 8px; align-items: flex-end; }
.gmsg.me { justify-content: flex-end; }
.gmsg > div { max-width: 80%; display: flex; flex-direction: column; }
.gmsg.me > div { align-items: flex-end; }
.gmsg .who { font-size: 11.5px; color: var(--muted); margin: 0 0 3px 4px; }
.gmsg .bubble { max-width: none; }
.meetup { padding: 0 18px; }
.meetup .label { margin-top: 4px; }
.meet { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 12px; border: 1px solid var(--line); }
.mdate { width: 44px; height: 44px; border-radius: 12px; background: var(--coral-soft); color: var(--coral); display: grid; place-items: center; flex: none; }
.meet .btn { margin-left: auto; }

/* ---------- video & insights ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.vrow { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.vrow > div { flex: 1; min-width: 0; }
.tips ul { margin: 0; padding-left: 18px; line-height: 1.8; color: var(--muted); font-size: 14px; }
.insights { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ins-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ins-head > div:not(.ring) { flex: 1; min-width: 0; }
.ins-head .ring { flex: none; }
.bar { margin: 10px 0; }
.bar-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.bar-track { height: 7px; border-radius: 99px; background: var(--coral-soft); overflow: hidden; }
.bar-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--coral-2), var(--coral)); border-radius: inherit; }
.tip { margin-top: 14px; padding: 10px 12px; background: var(--teal-soft); color: var(--teal-ink); border-radius: 12px; font-size: 13px; line-height: 1.45; }

/* ---------- modals & toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20,16,20,.55); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .2s; }
.modal { background: #fff; border-radius: 28px; padding: 32px; max-width: 400px; width: 100%; text-align: center; animation: pop .3s cubic-bezier(.2,1.4,.4,1); }
.modal h2 { font-size: 30px; color: var(--coral); margin: 18px 0 6px; }
.pair { display: flex; justify-content: center; }
.pair .av { --s: 96px; box-shadow: 0 0 0 4px #fff; }
.pair .av + .av { margin-left: -18px; }
.modal .row { justify-content: center; margin-top: 22px; }
.call { position: relative; padding: 0; max-width: 760px; aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy); }
.call .photo { position: absolute; inset: 0; aspect-ratio: auto; }
.call .photo::after { display: none; }
.call-top { position: absolute; top: 18px; left: 20px; color: #fff; text-align: left; display: flex; flex-direction: column; font-size: 18px; }
.call-top span { font-size: 13px; opacity: .8; }
.self { position: absolute; right: 16px; top: 16px; width: 24%; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: #2b3a49; display: grid; place-items: center; color: rgba(255,255,255,.7); font-size: 12px; border: 2px solid rgba(255,255,255,.3); }
.self video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.call-ctrl { position: absolute; bottom: 20px; left: 0; right: 0; display: flex; justify-content: center; gap: 16px; }
.call-ctrl .round { background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(8px); }
.call-ctrl .end { background: #e5484d; }
.call-ctrl .end .ic { transform: rotate(135deg); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 99px; font-size: 14px; opacity: 0; transition: .25s; pointer-events: none; z-index: 60; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   GLASS LAYER — frosted panels over a blurred, colorful backdrop
   ========================================================= */
:root {
  --ink: #13213d;
  --muted: #4b5a76;
  /* clear glass: very little white tint, light blur, so the backdrop shows through */
  --ga: .30; /* glass tint, set from Settings → Appearance */
  --glass-bg: linear-gradient(135deg, rgba(255,255,255,var(--ga)), rgba(255,255,255,calc(var(--ga) * .2)));
  --glass-border: rgba(255,255,255,.65);
  --glass-blur: blur(14px) saturate(170%) brightness(1.04);
  --glass-shadow: inset 0 1px 1px rgba(255,255,255,.9), inset 0 -1px 1px rgba(255,255,255,.25), inset 0 0 24px rgba(255,255,255,.18), 0 18px 50px rgba(30,80,150,.18);
  --dark-glass: linear-gradient(160deg, rgba(18,36,70,.30), rgba(10,22,48,.45));
}
body { background: #d6ecff; }

/* light-blue backdrop with soft shapes, so the see-through glass has something to show */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(140deg, #eaf6ff 0%, #c9e6ff 40%, #a9d3fb 100%); }
.backdrop i { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .9; animation: drift 22s ease-in-out infinite alternate; }
.backdrop i:nth-child(1) { width: 42vw; height: 42vw; left: -8vw; top: -12vw; background: #ffffff; }
.backdrop i:nth-child(2) { width: 34vw; height: 34vw; right: -6vw; top: -4vw; background: #7cc4ff; animation-duration: 26s; }
.backdrop i:nth-child(3) { width: 30vw; height: 30vw; left: 32vw; top: 40vh; background: #9ad8ff; opacity: .8; animation-duration: 30s; }
.backdrop i:nth-child(4) { width: 30vw; height: 30vw; left: -6vw; bottom: -10vw; background: #6fb6f5; opacity: .7; animation-duration: 24s; }
.backdrop i:nth-child(5) { width: 22vw; height: 22vw; right: 10vw; bottom: 4vh; background: #b9b4ff; opacity: .55; animation-duration: 28s; }
.vhead h1 { color: var(--ink); }
.vhead p { color: var(--muted); }
.link { color: #c2412b; }
.mapcard .link { color: #ffb3a5; }
.label { color: #4b5a76; }
.profile .label { color: rgba(255,255,255,.7); }
@keyframes drift { to { transform: translate(4vw, 3vh) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .backdrop i { animation: none; } }

/* frosted panels */
.nav, .panel, .mcard, .modal {
  background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.panel, .nav { position: relative; isolation: isolate; }
.panel::before, .nav::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.32), transparent 30%, transparent 75%, rgba(255,255,255,.14)); }
/* bright light-catching rim around each glass edge */
.panel::after, .nav::after, .profile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.15) 35%, rgba(255,255,255,.05) 60%, rgba(255,255,255,.7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; z-index: 3; }
.nav-item:hover { background: rgba(255,255,255,.28); }
.nav-item.active { background: rgba(255,255,255,.62); box-shadow: inset 0 1px 0 #fff, 0 4px 14px rgba(0,0,0,.06); }
.me-card { border-top-color: rgba(255,255,255,.4); }
.btn { background: rgba(255,255,255,.55); border-color: rgba(255,255,255,.7); backdrop-filter: blur(10px); }
.btn.primary { background: linear-gradient(180deg, #f27d68, var(--coral)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 16px rgba(236,106,85,.35); }
.av { box-shadow: 0 0 0 2px rgba(255,255,255,.85); }

/* profile card: photo fills the card, details sit on dark frosted glass */
.profile { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.45); padding: 12px; min-height: 640px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 30px 70px rgba(40,20,10,.35); display: flex; flex-direction: column; justify-content: flex-end; }
.profile > .photo { position: absolute; inset: 0; aspect-ratio: auto; align-items: start; padding-top: 7%; }
.profile > .photo::after { display: none; }
.photo { background:
    radial-gradient(circle at 18% 22%, rgba(255,240,210,.45) 0, transparent 6%),
    radial-gradient(circle at 82% 34%, rgba(255,230,200,.35) 0, transparent 8%),
    radial-gradient(circle at 70% 12%, rgba(255,255,255,.3) 0, transparent 5%),
    radial-gradient(circle at 75% 20%, hsl(calc(var(--h) + 40) 95% 78% / .9), transparent 40%),
    radial-gradient(circle at 20% 80%, hsl(calc(var(--h) - 30) 70% 50% / .8), transparent 50%),
    linear-gradient(160deg, hsl(var(--h) 75% 62%), hsl(calc(var(--h) + 25) 50% 28%)); }
.profile-info { margin: 0; padding: 20px 20px 92px; border-radius: 22px; background: var(--dark-glass);
  border: 1px solid rgba(255,255,255,.2); box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
  backdrop-filter: blur(24px) saturate(170%); -webkit-backdrop-filter: blur(24px) saturate(170%); }
.voice { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.chip { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: rgba(255,255,255,.85); }
.actions { bottom: 32px; }
.round.pass { background: rgba(255,255,255,.18); backdrop-filter: blur(12px); border-color: rgba(255,255,255,.4); }

/* chat bubbles & inputs */
.bubble.them { background: rgba(255,255,255,.6); border-color: rgba(255,255,255,.75); backdrop-filter: blur(8px); }
.bubble.me { background: linear-gradient(180deg, #f27d68, var(--coral)); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.composer input { background: rgba(255,255,255,.55); border-color: rgba(255,255,255,.75); backdrop-filter: blur(10px); }
.chat-head, .ice { border-color: rgba(255,255,255,.4); }
.ice-chip { background: rgba(227,245,241,.7); border-color: rgba(191,232,223,.9); color: var(--teal-ink); }
.convo:hover { background: rgba(255,255,255,.28); }
.convo.active { background: rgba(255,255,255,.6); }

/* group rows, meetup, map */
.grow, .meet { background: rgba(255,255,255,.34); border-color: rgba(255,255,255,.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.6); backdrop-filter: blur(10px); }
.grow:hover { background: rgba(255,255,255,.55); }
.mapcard { background: linear-gradient(160deg, rgba(20,55,62,.55), rgba(10,30,36,.7)); border-color: rgba(255,255,255,.25); }
.mapcard::before { opacity: .35; }
.slider { background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.7); backdrop-filter: blur(12px); }
.map { box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.bar-track, .ring .track { background: rgba(255,255,255,.45); }
.ring .track { stroke: rgba(255,255,255,.55); }
.tip { background: rgba(227,245,241,.55); border: 1px solid rgba(255,255,255,.6); }
.overlay { background: rgba(30,20,20,.3); backdrop-filter: blur(14px); }
.modal { background: linear-gradient(135deg, rgba(255,255,255,.75), rgba(255,255,255,.45)); }
.call { background: var(--navy); }
#toast { background: rgba(30,27,34,.7); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.2); }

/* demo photos: images sit over the colored initial, which shows only if a photo fails */
.av, .gav, .mdate, .photo { position: relative; overflow: hidden; }
.av img, .gav img, .mdate img, .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo img { object-position: center 30%; }
/* photo fills the top of the card; the frosted info panel overlaps only its lower edge */
.profile { min-height: 720px; }
.profile > .photo { bottom: auto; height: 74%; }
.profile > .photo img { object-position: center 18%; }
.photo.sm img { object-position: center 25%; }
.gav { width: var(--s, 40px); height: var(--s, 40px); border-radius: 14px; box-shadow: 0 0 0 2px rgba(255,255,255,.8); }
.gtop { display: flex; align-items: center; gap: 10px; }
.gtop > div { min-width: 0; }
.mdate { width: 56px; height: 56px; border-radius: 14px; }
.pin .ring-edge { fill: none; stroke: #fff; stroke-width: 2.5; }
.pin.in .ring-edge { stroke: #fff; filter: drop-shadow(0 0 4px rgba(47,191,169,.9)); }
/* gentle shade so white text stays readable on top of real photos */
.profile > .photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(10,25,50,.15), transparent 30%, transparent 55%, rgba(10,25,50,.35)); }
.call .photo img { object-position: center 25%; }

/* ---------- group creation & auto-created groups ---------- */
.vhead-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gbadge { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.gbadge .ic { width: 12px; height: 12px; }
.gbadge.auto { background: rgba(47,191,169,.18); color: var(--teal-ink); border: 1px solid rgba(47,191,169,.35); }
.gbadge.user { background: rgba(236,106,85,.15); color: #b4321f; border: 1px solid rgba(236,106,85,.3); }
.gtop span.muted { display: block; }
.ai-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; margin: -4px 0 12px; border-radius: 14px; font-size: 13px; line-height: 1.45;
  background: rgba(227,245,241,.55); border: 1px solid rgba(255,255,255,.7); color: var(--teal-ink); }
.ai-note .ic { width: 16px; height: 16px; margin-top: 1px; }
.gdesc { padding: 12px 18px 0; }
.gdesc .gbadge { margin-top: 0; }
.gdesc p { margin: 8px 0 4px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.modal.create { text-align: left; max-width: 520px; max-height: calc(100dvh - 32px); overflow: auto; padding: 26px; }
.modal.create h2 { font-size: 24px; color: var(--ink); margin: 0 0 4px; }
.modal.create > .muted { margin: 0 0 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; border: 0; padding: 0; min-width: 0; flex: 1; }
.field > span, .field legend { font-size: 13px; font-weight: 600; padding: 0; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.85);
  background: rgba(255,255,255,.6); font: inherit; color: var(--ink); outline: none; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(236,106,85,.18); }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row .field { min-width: 180px; }
.covers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cover { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; cursor: pointer; background: rgba(255,255,255,.4); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.cover input { position: absolute; opacity: 0; pointer-events: none; }
.cover:has(input:checked) { box-shadow: 0 0 0 3px var(--coral); }
.cover:has(input:checked)::after { content: "✓"; position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--coral); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.cover:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.cover:hover img { transform: scale(1.06); }
.modal.create .row { justify-content: flex-end; margin-top: 6px; }

/* ---------- settings ---------- */
.me-card { width: 100%; text-align: left; border-radius: 14px; transition: .15s; }
.me-card:hover, .me-card.active { background: rgba(255,255,255,.4); }
.me-card > div { flex: 1; min-width: 0; }
.me-card > .ic { color: var(--muted); width: 18px; height: 18px; }
.topbar { display: none; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.set-col { display: grid; gap: 16px; min-width: 0; }
.set-profile h2 { margin-top: 18px; }
.set-me { display: flex; align-items: center; gap: 16px; }
.set-me > div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.set-me b { font-size: 18px; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.45); cursor: pointer; }
.panel h2 + .set-row { border-top: 0; padding-top: 2px; }
.set-row > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.set-row b { font-size: 14px; font-weight: 600; }
.set-row small { color: var(--muted); font-size: 12.5px; }
.set-row.col { flex-direction: column; align-items: stretch; gap: 8px; cursor: default; }
.set-row.col > span:first-child { flex-direction: row; justify-content: space-between; }
.set-row input[type=range] { width: 100%; accent-color: var(--coral); }
.set-row input.reverse { direction: rtl; }
.age-range { display: flex; align-items: center; gap: 6px; }
.age-range input { width: 64px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.85); background: rgba(255,255,255,.6); font: inherit; text-align: center; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: rgba(75,90,118,.25); border: 1px solid rgba(255,255,255,.7); transition: .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: .2s; }
.switch input:checked + i { background: var(--coral); border-color: transparent; }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px; }
.chips.pick { gap: 8px; }
.chip-pick { cursor: pointer; }
.chip-pick input { position: absolute; opacity: 0; pointer-events: none; }
.chip-pick span { display: inline-block; padding: 7px 13px; border-radius: 99px; font-size: 13px; background: rgba(255,255,255,.4); border: 1px solid rgba(255,255,255,.8); transition: .15s; }
.chip-pick input:checked + span { background: var(--coral); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(236,106,85,.3); }
.chip-pick input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn.danger { color: #c0392b; }
.no-motion .backdrop i { animation: none; }
@media (max-width: 1050px) { .settings-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .topbar { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 10px; }
  .topbar .brand { display: flex; padding: 0; }
  .top-me { border-radius: 50%; }
}

/* ---------- smart icebreakers ---------- */
.ice { display: block; overflow: visible; padding: 10px 18px 4px; border-top: 1px solid rgba(255,255,255,.45); }
.ice.closed { padding-bottom: 6px; }
.ice-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ice-label { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--teal-ink); padding: 4px 2px; }
.ice-label .ic { width: 15px; height: 15px; }
.ice-label .ic:last-child { transition: transform .2s; }
.ice.closed .ice-label .ic:last-child { transform: rotate(-90deg); }
.ice-tones { display: inline-flex; gap: 2px; padding: 3px; border-radius: 99px; background: rgba(255,255,255,.35); border: 1px solid rgba(255,255,255,.7); }
.ice-tones button { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; color: var(--muted); }
.ice-tones button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.ice-shuffle { width: 30px; height: 30px; margin-left: auto; }
.ice-shuffle .ic { width: 16px; height: 16px; }
.ice-shuffle:hover .ic { transform: rotate(180deg); transition: transform .3s; }
.ice-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px 0 6px; }
.ice-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 8px 12px; border-radius: 14px;
  background: rgba(227,245,241,.55); border: 1px solid rgba(255,255,255,.85); box-shadow: inset 0 1px 0 rgba(255,255,255,.7); transition: .15s; }
.ice-card:hover { background: rgba(227,245,241,.85); transform: translateY(-1px); }
.ice-card.is-poll { background: rgba(253,228,220,.6); }
.ice-tag { align-self: flex-start; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 1px 7px; border-radius: 99px; background: rgba(255,255,255,.7); color: var(--muted); }
.ice-tag.t-playful { color: #b4321f; } .ice-tag.t-deep { color: #4b3fb0; } .ice-tag.t-date { color: var(--teal-ink); }
.is-poll .ice-tag { color: #b4321f; }
.ice-text { text-align: left; font-size: 13px; line-height: 1.4; color: var(--ink); font-weight: 500; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ice-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ice-why { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ice-send { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--coral); color: #fff; box-shadow: 0 3px 8px rgba(236,106,85,.35); }
.ice-send .ic { width: 14px; height: 14px; }
.ice-send:hover { transform: scale(1.08); }
.ice-empty { margin: 8px 0; }
.gpanel .ice { padding-top: 12px; }

/* polls in group chat */
.poll { min-width: 230px; max-width: 300px; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.85); display: flex; flex-direction: column; gap: 6px; }
.poll.mine { border-bottom-right-radius: 6px; }
.poll b { display: flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 2px; }
.poll b .ic { width: 16px; height: 16px; color: var(--coral); }
.poll-opt { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 10px; font-size: 13px; text-align: left;
  background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.9); }
.poll-opt i { position: absolute; inset: 0 auto 0 0; background: rgba(47,191,169,.22); transition: width .4s; }
.poll-opt span, .poll-opt em { position: relative; }
.poll-opt em { font-style: normal; font-weight: 700; color: var(--muted); }
.poll-opt.voted { border-color: var(--teal); }
.poll-opt.voted i { background: rgba(47,191,169,.38); }
.poll-opt.voted span::after { content: " ✓"; color: var(--teal-ink); font-weight: 700; }
.poll small { color: var(--muted); font-size: 11.5px; }
@media (max-width: 860px) {
  .ice-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -18px; padding: 8px 18px 6px; }
  .ice-card { flex: 0 0 78%; scroll-snap-align: start; }
  .ice-tones button { padding: 4px 8px; font-size: 11.5px; }
}

/* ---------- sign-in screen ---------- */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 28px; display: flex; flex-direction: column; gap: 4px; }
.auth-card .brand { padding: 0 0 14px; }
.auth-card h1 { font-size: 26px; }
.auth-card > p.muted { margin: 4px 0 16px; font-size: 14px; }
.auth-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: rgba(255,255,255,.35); border: 1px solid rgba(255,255,255,.7); margin-bottom: 16px; }
.auth-tabs button { flex: 1; padding: 8px; border-radius: 99px; font-weight: 600; font-size: 14px; color: var(--muted); }
.auth-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.auth-main { justify-content: center; padding: 12px; margin-top: 4px; }
.auth-main[disabled] { opacity: .6; cursor: wait; }
.auth-msg { margin: 0 0 8px; padding: 10px 12px; border-radius: 12px; font-size: 13px; }
.auth-msg.err { background: rgba(229,72,77,.12); color: #a1262b; border: 1px solid rgba(229,72,77,.3); }
.auth-msg.ok { background: rgba(47,191,169,.15); color: var(--teal-ink); border: 1px solid rgba(47,191,169,.35); }
.auth-links { display: flex; justify-content: space-between; margin-top: 10px; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0 10px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: rgba(75,90,118,.2); }
.auth-card .btn.auth-gh { justify-content: center; padding: 11px; background: #1f2328; color: #fff; border-color: transparent; }
.auth-card .brand { display: flex; }
.auth-demo { align-self: center; margin-top: 14px; color: var(--muted); }
.auth-loading { position: fixed; inset: 0; display: grid; place-items: center; color: var(--muted); margin: 0; }
.photo-btn { margin-top: 6px; cursor: pointer; }

/* clearer inner glass (light-blue theme) */
.profile { background: rgba(255,255,255,.08); box-shadow: inset 0 1px 1px rgba(255,255,255,.8), 0 26px 60px rgba(30,80,150,.28); }
.grow, .meet { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.7); }
.grow:hover { background: rgba(255,255,255,.42); }
.bubble.them { background: rgba(255,255,255,.45); border-color: rgba(255,255,255,.85); }
.composer input, .slider { background: rgba(255,255,255,.4); border-color: rgba(255,255,255,.8); }
.btn { background: rgba(255,255,255,.35); border-color: rgba(255,255,255,.8); }
.nav-item.active { background: rgba(255,255,255,.5); }
.convo.active { background: rgba(255,255,255,.45); }
.chip.ice-chip { background: rgba(227,245,241,.55); }
.modal { background: linear-gradient(135deg, rgba(255,255,255,.6), rgba(255,255,255,.3)); }
.overlay { background: rgba(60,110,170,.25); }

/* ---------- responsive ---------- */
@media (max-width: 1050px) {
  .discover { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; padding: 12px 12px 92px; gap: 12px; }
  .nav { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; justify-content: space-around;
    border-radius: 22px 22px 0 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 40; gap: 0; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.35)); }
  .brand, .me-card { display: none; }
  .nav-item { flex-direction: column; gap: 3px; font-size: clamp(8.5px, 2.5vw, 10.5px); padding: 8px 1px; flex: 1 1 0; min-width: 0; text-align: center; line-height: 1.15; overflow: hidden; }
  .nav-item span:not(.badge) { word-break: keep-all; hyphens: none; }
  .nav-item.active { background: none; box-shadow: none; }
  .badge { position: absolute; top: 2px; right: calc(50% - 20px); margin: 0; font-size: 10px; }
  .messages { grid-template-columns: 1fr; height: calc(100dvh - 116px); }
  .messages.has-active .convos { display: none; }
  .messages:not(.has-active) .chat { display: none; }
  .chat-head .back { display: grid; }
  .groups { grid-template-columns: 1fr; }
  .gpanel { max-height: none; }
  .profile h1 { font-size: 28px; }
  .profile { min-height: 790px; padding: 10px; }
  .profile > .photo { height: 68%; }
  .profile-info { padding: 18px 16px 92px; }
  .gmini-body { grid-template-columns: 1fr; }
  .gmini-body .map { max-width: 260px; margin: 0 auto; }
  .vhead h1 { font-size: 24px; }
  #toast { bottom: 96px; }
  .call { aspect-ratio: 9 / 14; }
  .self { width: 32%; }
}
