/* Huntuva design preview v0.4 — tokens, layout, components.
   Light = pure #FFFFFF, Dark = pure #000000. Both themes are designed separately. */

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;color-scheme:light dark;scroll-behavior:smooth}
html[data-theme=light]{color-scheme:light}
html[data-theme=dark]{color-scheme:dark}

:root{
  /* Fallback (light) for browsers without light-dark() */
  --bg:#fff;--fg:#0a0a0b;--muted:#585b63;--surface:#f4f4f5;--surface-2:#e9e9ec;--line:rgba(10,10,11,.1);
  --glass:rgba(255,255,255,.76);--glass-line:rgba(10,10,11,.08);--accent:#1646a0;--on-accent:#fff;
  --brand-blue:#1646a0;--brand-gold:#d6a52b;--on-gold:#1a1300;--danger:#b3261e;--shadow:0 10px 34px rgba(0,0,0,.12);--scrim:rgba(0,0,0,.45);
  --ring:var(--accent);
  --font-ui:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",sans-serif;
  --font-display:"Iowan Old Style","Palatino Linotype","Book Antiqua",Palatino,Georgia,"Noto Serif",serif;
  --safe-t:env(safe-area-inset-top,0px);--safe-b:env(safe-area-inset-bottom,0px);
  --top-h:60px;--dock-h:60px;--rail-w:76px;--card-r:32px;
  --act-b:calc(84px + var(--safe-b));--info-b:calc(var(--act-b) + 86px);
  --ease:cubic-bezier(.3,.8,.3,1);--s1:4px;--s2:8px;--s3:12px;--s4:16px;--s5:24px;--s6:32px;
  --viz-a:#417dff;--viz-b:#ffd45b;
}
@supports (color:light-dark(#000,#fff)){
  :root{
    --bg:light-dark(#fff,#000);--fg:light-dark(#0a0a0b,#fff);--muted:light-dark(#585b63,#a4a7af);
    --surface:light-dark(#f4f4f5,#111113);--surface-2:light-dark(#e9e9ec,#1c1c1f);--line:light-dark(rgba(10,10,11,.1),rgba(255,255,255,.13));
    --glass:light-dark(rgba(255,255,255,.76),rgba(22,22,24,.66));--glass-line:light-dark(rgba(10,10,11,.08),rgba(255,255,255,.14));
    --accent:light-dark(#1646a0,#f5c84c);--on-accent:light-dark(#fff,#1a1300);
    --brand-blue:light-dark(#1646a0,#83aafa);--brand-gold:light-dark(#d6a52b,#f5c84c);
    --danger:light-dark(#b3261e,#ff8a80);--shadow:light-dark(0 10px 34px rgba(0,0,0,.12),0 10px 34px rgba(0,0,0,.7));--scrim:light-dark(rgba(0,0,0,.4),rgba(0,0,0,.66));
  }
}

body{margin:0;background:var(--bg);color:var(--fg);font:400 16px/1.45 var(--font-ui);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;overscroll-behavior-y:none}
h1,h2,h3,p{margin:0}
h1{font:600 clamp(32px,5.4vw,44px)/1.02 var(--font-display);letter-spacing:-.035em}
h2{font:650 17px/1.25 var(--font-ui);letter-spacing:-.012em}
h3{font:650 15px/1.3 var(--font-ui)}
a{color:inherit}
img{display:block}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:fixed;left:12px;top:-60px;z-index:100;background:var(--fg);color:var(--bg);padding:12px 18px;border-radius:999px;text-decoration:none;font-weight:600;transition:top .15s}
.skip:focus{top:calc(10px + var(--safe-t))}
.muted{color:var(--muted)}
.small{font-size:13px}
:focus-visible{outline:2px solid var(--ring);outline-offset:3px;border-radius:12px}
button{font:inherit;color:inherit;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.ic{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.ic.fill{fill:currentColor}
.logo{display:block;width:40px;height:auto;max-height:40px;object-fit:contain;flex:none;background:transparent;border:0;border-radius:0;padding:0}

/* ---------- surfaces & controls ---------- */
.glass{background:var(--glass);-webkit-backdrop-filter:blur(24px) saturate(1.7);backdrop-filter:blur(24px) saturate(1.7);border:1px solid var(--glass-line);box-shadow:var(--shadow)}
.onphoto{--glass:rgba(20,20,22,.4);--glass-line:rgba(255,255,255,.24);--ring:#fff;color:#fff}
.btn{min-height:48px;padding:0 22px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--fg);font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;transition:transform .15s,background .15s,opacity .15s;text-decoration:none}
.btn:active{transform:scale(.97)}
.btn--primary{background:var(--fg);color:var(--bg);border-color:transparent}
.btn--accent{background:var(--accent);color:var(--on-accent);border-color:transparent}
.btn--danger{color:var(--danger)}
.btn--sm{min-height:44px;padding:0 16px;font-size:14px}
.btn[disabled]{opacity:.45;cursor:not-allowed}
.iconbtn{width:48px;height:48px;border-radius:50%;display:inline-grid;place-items:center;padding:0;border:0;background:var(--surface);color:var(--fg);cursor:pointer;transition:transform .15s,background .15s;text-decoration:none}
.iconbtn.glass{border:1px solid var(--glass-line)}
.iconbtn:active{transform:scale(.93)}
.iconbtn--sm{width:44px;height:44px}
.chip{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:0 12px;border-radius:999px;font-size:13px;font-weight:550;background:var(--surface);color:var(--fg)}
.onphoto .chip,.chip--glass{background:rgba(255,255,255,.16);color:#fff;border:1px solid rgba(255,255,255,.22);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
.sim{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:0 11px;border-radius:999px;font-size:12px;font-weight:650;letter-spacing:.01em;background:color-mix(in srgb,var(--brand-gold) 22%,transparent);color:var(--fg);border:1px dashed color-mix(in srgb,var(--brand-gold) 70%,transparent)}
.sim .ic{width:15px;height:15px}
button.sim{cursor:pointer;font-family:inherit;min-height:44px;padding:0 16px}
.seg{display:inline-flex;gap:4px;padding:4px;border-radius:999px;background:var(--surface);max-width:100%;overflow-x:auto;scrollbar-width:none}
.seg.glass{background:var(--glass)}
.seg button{min-height:44px;padding:0 16px;border:0;border-radius:999px;background:transparent;color:var(--muted);font-weight:600;font-size:14px;white-space:nowrap;cursor:pointer;transition:background .2s,color .2s}
.seg button[aria-pressed=true],.seg button[aria-selected=true],.seg button[aria-checked=true]{background:var(--fg);color:var(--bg)}
.panel{background:var(--surface);border-radius:24px;padding:20px;border:1px solid var(--line)}
.panel>*+*{margin-top:12px}
.row{display:flex;align-items:center;gap:12px}
.spread{justify-content:space-between}
.wrap{flex-wrap:wrap}
.field{width:100%;min-height:48px;border-radius:16px;border:1px solid var(--line);background:var(--bg);color:var(--fg);padding:0 16px;font:inherit;font-size:16px}
.field::placeholder{color:var(--muted)}

/* avatar crops the face out of the 3:4 portrait illustration */
.avatar{position:relative;display:block;overflow:hidden;border-radius:50%;background:linear-gradient(160deg,var(--t1,#888),var(--t2,#444));flex:none;width:var(--s,48px);height:var(--s,48px)}
.avatar img{position:absolute;width:250%;max-width:none;left:-75%;top:-75%}
.avatar b{position:absolute;inset:0;display:grid;place-items:center;font-weight:700;color:#fff}

/* ---------- app shell ---------- */
.app{min-height:100dvh}
.view{display:none}
.view.show{display:block;animation:enter .28s ease both}
@keyframes enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
main:focus,main:focus-visible{outline:none}
.page-head{margin-bottom:22px}
.page-head p{margin-top:8px;max-width:46ch}
.cards{display:grid;gap:16px}
.noscript{padding:24px}

.topbar{position:fixed;z-index:30;top:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:calc(8px + var(--safe-t)) 12px 8px;height:calc(var(--top-h) + var(--safe-t));pointer-events:none}
.topbar>*{pointer-events:auto}
.topbar .iconbtn{width:46px;height:46px}
.topbar__center{flex:1;display:flex;justify-content:center;min-width:0}
.topbar__title{font:600 17px/1 var(--font-ui);padding:0 18px;min-height:44px;display:grid;place-items:center;border-radius:999px}

.dock{position:fixed;z-index:31;left:50%;transform:translateX(-50%);bottom:calc(12px + var(--safe-b));width:min(calc(100% - 32px),400px);height:var(--dock-h);display:flex;gap:2px;padding:5px;border-radius:999px}
.dock a{flex:1;min-width:0;display:flex;align-items:center;justify-content:center;gap:7px;border-radius:999px;color:var(--muted);text-decoration:none;position:relative;transition:flex .3s cubic-bezier(.3,.8,.3,1),background .25s,color .25s}
.dock a span{display:none;font-size:13px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dock a[aria-current=page]{flex:2.1;background:var(--accent);color:var(--on-accent)}
.dock a:not([aria-current=page]):active{background:var(--surface)}
.dock a[aria-current=page] span{display:inline}
.dock .dot,.rail .dot{position:absolute;top:10px;right:calc(50% - 20px);width:9px;height:9px;border-radius:50%;background:var(--danger);border:2px solid var(--bg)}
.dock a[aria-current=page] .dot{display:none}

.rail{display:none;position:fixed;z-index:30;left:16px;top:16px;bottom:16px;width:var(--rail-w);border-radius:36px;flex-direction:column;align-items:stretch;padding:14px 10px}
.rail__logo{display:flex;align-items:center;justify-content:center;gap:10px;min-height:56px;text-decoration:none;font:650 20px/1 var(--font-ui);letter-spacing:-.04em}
.rail__word{display:none;font-family:"Baskerville","Iowan Old Style","Palatino Linotype",Georgia,serif;font-style:normal;font-weight:700;font-size:27px;line-height:1;letter-spacing:-.045em;font-variant-ligatures:common-ligatures;font-kerning:normal;text-transform:none}
.rail__nav{display:grid;gap:6px;margin-top:18px}
.rail__nav a,.rail__tool{display:flex;align-items:center;justify-content:center;gap:14px;min-height:52px;border-radius:20px;color:var(--muted);text-decoration:none;font-weight:600;font-size:15px;position:relative;border:0;background:transparent;cursor:pointer;transition:background .2s,color .2s}
.rail__nav a:hover,.rail__tool:hover{background:var(--surface);color:var(--fg)}
.rail__nav a[aria-current=page]{background:var(--accent);color:var(--on-accent)}
.rail__nav a span,.rail__tool span{display:none}
.rail__tool{margin-top:auto}
.rail .dot{top:8px;right:14px}

.detail{display:none}

/* ---------- Discover ---------- */
.discover__modes{display:none}
.rings{display:flex;gap:12px;overflow-x:auto;scrollbar-width:none;padding:2px 6px 10px;flex:none}
.ring{flex:none;width:68px;display:grid;justify-items:center;gap:6px;background:none;border:0;padding:0;color:var(--fg);font-size:12px;font-weight:550;cursor:pointer;min-height:44px}
.ring__halo{padding:3px;border-radius:50%;background:conic-gradient(from 200deg,var(--brand-blue),var(--brand-gold),var(--brand-blue));transition:transform .15s}
.ring:active .ring__halo{transform:scale(.94)}
.ring.seen .ring__halo{background:var(--line)}
.ring .avatar{--s:56px;border:3px solid var(--bg)}
.ring--you .ring__halo{background:var(--surface-2)}
.ring--you .avatar{background:var(--surface);color:var(--fg)}
.ring--you .avatar b{color:var(--fg)}
.ring span.nm{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.deck{position:relative;flex:1;min-height:0;width:100%}
.card{position:absolute;inset:0;border-radius:var(--card-r);overflow:hidden;background:linear-gradient(160deg,var(--t1),var(--t2));color:#fff;touch-action:none;user-select:none;-webkit-user-select:none;will-change:transform;box-shadow:0 24px 50px -24px rgba(0,0,0,.55);cursor:grab;--ring:#fff}
.card.dragging{cursor:grabbing}
.card:focus-visible{outline-offset:-4px;outline-width:3px}
.card--under{transform:scale(.94) translateY(12px);opacity:.92;pointer-events:none;transition:transform .32s cubic-bezier(.3,.8,.3,1)}
.card--under.rise{transform:none}
.card__img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 30%;opacity:0;transition:opacity .28s;pointer-events:none;-webkit-user-drag:none}
.card__img.on{opacity:1}
.card::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(to bottom,rgba(0,0,0,.42),transparent 24%,transparent 42%,rgba(0,0,0,.82))}
.card__initial{position:absolute;inset:0;display:none;place-items:center;font:600 120px var(--font-display);opacity:.35}
.card.noimg .card__initial{display:grid}
.card__top{position:absolute;z-index:2;left:16px;right:16px;top:14px;display:grid;gap:12px}
.card__bars{display:flex;gap:5px}
.card__bars i{flex:1;height:3px;border-radius:3px;background:rgba(255,255,255,.35);transition:background .2s}
.card__bars i.on{background:#fff}
.card__flags{display:flex;justify-content:space-between;align-items:center}
.card .sim{background:rgba(20,20,22,.45);color:#fff;border-color:rgba(255,255,255,.4);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
.card__info{position:absolute;z-index:2;left:0;right:0;bottom:var(--info-b);padding:0 22px;display:grid;gap:10px;pointer-events:none}
.card__name{font:600 clamp(36px,9.5vw,48px)/.98 var(--font-display);letter-spacing:-.035em;text-shadow:0 2px 24px rgba(0,0,0,.35)}
.card__name small{font:400 .72em var(--font-display);opacity:.92;margin-left:6px}
.card__meta{display:flex;align-items:center;gap:6px;font-size:14px;opacity:.95}
.card__meta .ic{width:16px;height:16px}
.card__chips{display:flex;flex-wrap:wrap;gap:6px}
.card__prompt{font:italic 400 17px/1.35 var(--font-display);opacity:.95;max-width:34ch;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.stamp{position:absolute;z-index:3;top:96px;padding:6px 16px;border:3px solid;border-radius:14px;font:800 28px/1 var(--font-ui);letter-spacing:.1em;opacity:0;pointer-events:none}
.stamp--like{left:22px;transform:rotate(-12deg);color:#f5c84c;border-color:#f5c84c}
.stamp--pass{right:22px;transform:rotate(12deg);color:#fff;border-color:#fff}
.deck__actions{position:absolute;left:0;right:0;bottom:var(--act-b);display:flex;justify-content:center;align-items:center;gap:14px;z-index:5;pointer-events:none}
.deck__actions>*{pointer-events:auto}
.act{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;padding:0;cursor:pointer;color:#fff;background:rgba(24,24,27,.42);border:1px solid rgba(255,255,255,.28);-webkit-backdrop-filter:blur(22px) saturate(1.5);backdrop-filter:blur(22px) saturate(1.5);transition:transform .18s cubic-bezier(.3,1.4,.5,1),background .2s;--ring:#fff}
.act:hover{background:rgba(24,24,27,.6)}
.act:active{transform:scale(.9)}
.act .ic{width:26px;height:26px}
.act--like{width:74px;height:74px;background:var(--brand-gold);border-color:transparent;color:#1a1300;box-shadow:0 10px 30px -6px rgba(214,165,43,.7)}
.act--like:hover{background:var(--brand-gold);filter:brightness(1.06)}
.act--like .ic{width:32px;height:32px;fill:currentColor;stroke:none}
.act--sm{width:46px;height:46px}
.act--sm .ic{width:21px;height:21px}
.act[disabled]{opacity:.4;pointer-events:none}
.empty{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;gap:14px;text-align:center;padding:24px;border-radius:var(--card-r);background:var(--surface);border:1px solid var(--line)}
.empty .ic{width:44px;height:44px;color:var(--accent)}
.empty p{max-width:30ch}

/* detail content (sheet + desktop aside) */
.dp{display:grid;gap:18px}
.dp__photo{width:100%;aspect-ratio:4/3;object-fit:cover;object-position:50% 25%;border-radius:22px;background:var(--surface)}
.dp h3.cap{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-weight:700;margin-bottom:8px}
.dp__chips{display:flex;flex-wrap:wrap;gap:8px}
.quote{padding:16px 18px;border-radius:20px;background:var(--surface);border:1px solid var(--line)}
.quote small{display:block;color:var(--muted);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;margin-bottom:4px}
.quote p{font:400 19px/1.35 var(--font-display)}
.track{display:flex;align-items:center;gap:14px;padding:12px;border-radius:20px;background:var(--surface);border:1px solid var(--line)}
.track__art{width:52px;height:52px;border-radius:12px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,var(--t1,#1646a0),var(--t2,#d6a52b));flex:none}
.track strong{display:block;line-height:1.2}
.dp__acts{display:flex;gap:10px;flex-wrap:wrap}

/* ---------- Connections ---------- */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin-top:18px}
.tile{position:relative;aspect-ratio:3/4;border-radius:26px;overflow:hidden;background:linear-gradient(160deg,var(--t1),var(--t2));color:#fff;border:0;padding:0;text-align:left;cursor:pointer;--ring:#fff}
.tile img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 30%}
.tile::after{content:"";position:absolute;inset:0;background:linear-gradient(transparent 50%,rgba(0,0,0,.75))}
.tile__txt{position:absolute;z-index:2;left:14px;right:14px;bottom:12px;display:grid;gap:2px}
.tile__txt strong{font:600 22px/1.05 var(--font-display);letter-spacing:-.02em}
.tile__txt span{font-size:12px;opacity:.9}
.tile .chip{position:absolute;z-index:2;top:10px;left:10px;min-height:26px;font-size:12px;background:var(--brand-gold);color:#1a1300;border:0}
.state{display:grid;justify-items:center;gap:12px;text-align:center;padding:48px 16px;margin-top:18px;border:1px dashed var(--line);border-radius:28px}
.state .ic{width:40px;height:40px;color:var(--accent)}
.state p{max-width:32ch}

/* ---------- Capture / Profile ---------- */
.swatches{display:flex;gap:10px}
.swatch{width:44px;height:44px;border-radius:50%;border:3px solid var(--bg);box-shadow:0 0 0 1.5px var(--line);cursor:pointer;padding:0}
.swatch[aria-checked=true]{box-shadow:0 0 0 3px var(--accent)}
.vibes{display:flex;flex-wrap:wrap;gap:8px}
.vibes button{min-height:44px;padding:0 16px;border-radius:999px;border:1px solid var(--line);background:var(--bg);font-weight:600;cursor:pointer}
.vibes button[aria-pressed=true]{background:var(--fg);color:var(--bg);border-color:transparent}
.preview{height:150px;border-radius:20px;display:flex;align-items:flex-end;padding:14px;color:#fff;font:600 22px/1.1 var(--font-display);background:var(--g);position:relative;overflow:hidden}
.preview span{position:relative;text-shadow:0 1px 14px rgba(0,0,0,.4)}
.themes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.theme-opt{display:grid;gap:10px;justify-items:center;padding:12px 8px;border-radius:20px;border:2px solid var(--line);background:var(--bg);cursor:pointer;font-weight:600;min-height:44px}
.theme-opt[aria-checked=true]{border-color:var(--accent)}
.theme-opt .mini{width:100%;max-width:92px;aspect-ratio:3/4;border-radius:12px;border:1px solid rgba(128,128,128,.45);position:relative;overflow:hidden;display:grid;align-content:end;padding:6px;gap:4px}
.mini i{display:block;height:7px;border-radius:4px}
.mini--light{background:#fff}.mini--light i{background:#e6e6e8}.mini--light i:first-child{background:#1646a0;width:60%}
.mini--dark{background:#000}.mini--dark i{background:#222}.mini--dark i:first-child{background:#f5c84c;width:60%}
.mini--sys{background:linear-gradient(105deg,#fff 50%,#000 50%)}.mini--sys i{background:#8884}.mini--sys i:first-child{background:#1646a0;width:60%}
.theme-opt .ic{width:20px;height:20px}
.theme-opt{font-size:14px}
.list{display:grid;gap:0}
.list li{list-style:none;display:flex;gap:12px;align-items:flex-start;padding:12px 0;border-top:1px solid var(--line)}
.list li:first-child{border-top:0}
.list{margin:0;padding:0}
.badge{flex:none;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;padding:3px 9px;border-radius:999px;background:var(--surface-2);color:var(--fg)}
.badge--sim{background:color-mix(in srgb,var(--brand-gold) 30%,transparent)}
.badge--plan{background:var(--surface-2);color:var(--muted)}

/* ---------- Chats ---------- */
.chats{display:block}
.chats__thread{display:none}
.chats.has-thread .chats__list{display:none}
.chats.has-thread .chats__thread{display:flex}
.conv{display:flex;align-items:center;gap:14px;width:100%;min-height:72px;padding:10px 12px;margin:0 -12px;border-radius:22px;text-decoration:none;color:inherit;position:relative}
.conv:hover{background:var(--surface)}
.conv[aria-current=true]{background:var(--surface)}
.conv .avatar{--s:52px}
.conv__txt{min-width:0;flex:1}
.conv__txt strong{display:block}
.conv__txt span{display:block;color:var(--muted);font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.unread{width:10px;height:10px;border-radius:50%;background:var(--accent);flex:none}
.thread{flex-direction:column;min-height:calc(100dvh - var(--top-h) - var(--safe-t) - 24px);gap:12px}
.thread__head{display:flex;align-items:center;gap:12px;position:sticky;top:calc(var(--safe-t) + 8px);z-index:25;padding:6px 8px;border-radius:999px}
.thread__head .avatar{--s:46px}
.thread__who{flex:1;min-width:0}
.thread__who strong{display:block;line-height:1.2}
.thread__who span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.notice{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:16px;font-size:13px;background:color-mix(in srgb,var(--brand-gold) 16%,transparent);border:1px dashed color-mix(in srgb,var(--brand-gold) 65%,transparent)}
.notice .ic{width:18px;height:18px;margin-top:1px}
.msgs{flex:1;display:flex;flex-direction:column;gap:6px;padding:6px 0 12px}
.day{align-self:center;font-size:12px;color:var(--muted);margin:6px 0}
.bubble{max-width:min(80%,520px);padding:11px 16px;border-radius:22px 22px 22px 6px;background:var(--surface);overflow-wrap:anywhere;animation:pop .22s ease both}
.bubble.mine{align-self:flex-end;border-radius:22px 22px 6px 22px;background:var(--accent);color:var(--on-accent)}
@keyframes pop{from{opacity:0;transform:translateY(6px) scale(.98)}to{opacity:1;transform:none}}
.typing{display:flex;gap:4px;padding:14px 16px;width:fit-content;border-radius:22px 22px 22px 6px;background:var(--surface)}
.typing i{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:blink 1.1s infinite}
.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}
@keyframes blink{0%,60%,100%{opacity:.3;transform:none}30%{opacity:1;transform:translateY(-3px)}}
.composer{position:sticky;bottom:calc(var(--dock-h) + var(--safe-b) + 24px);display:flex;gap:8px;align-items:center;padding:8px;border-radius:999px;margin-top:auto}
.composer input{flex:1;min-width:0;min-height:44px;border:0;background:transparent;color:var(--fg);font:inherit;font-size:16px;padding:0 8px;outline:none}
.composer:focus-within{outline:2px solid var(--ring);outline-offset:2px}
.composer .iconbtn{width:44px;height:44px}
.composer .iconbtn.send{background:var(--accent);color:var(--on-accent)}

/* ---------- Sheets, viewer, toasts ---------- */
dialog{color:var(--fg);padding:0;border:0;max-width:none;max-height:none}
dialog::backdrop{background:var(--scrim);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.sheet{background:transparent;width:100%;height:100%;overflow:visible}
.sheet[open]{display:grid;align-items:end;justify-items:center}
.sheet__in{width:100%;max-width:560px;max-height:min(88dvh,820px);overflow:auto;background:var(--bg);border:1px solid var(--line);border-radius:32px 32px 0 0;padding:8px 20px calc(24px + var(--safe-b));animation:up .32s cubic-bezier(.3,.8,.3,1) both;overscroll-behavior:contain}
@keyframes up{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
.sheet__grab{width:44px;height:5px;border-radius:5px;background:var(--line);margin:4px auto 10px}
.sheet__head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;position:sticky;top:0;background:var(--bg);padding:4px 0;z-index:2}
.sheet__head h2{font:600 26px/1.1 var(--font-display);letter-spacing:-.02em}
.sheet__body{display:grid;gap:16px}
.sheet--center[open]{align-items:center}
.sheet--center .sheet__in{border-radius:32px;text-align:center}
.sheet--center .sheet__head{justify-content:center}
.sheet--center .sheet__head h2{font-size:34px}
.sheet--center .sheet__head button{position:absolute;right:16px;top:16px}
.pair{display:flex;justify-content:center;padding:8px 0}
.pair .avatar{--s:104px;border:4px solid var(--bg)}
.pair .avatar+.avatar{margin-left:-22px}
.radio-list{display:grid;gap:8px}
.radio-list label{display:flex;align-items:center;gap:12px;min-height:48px;padding:0 14px;border-radius:16px;border:1px solid var(--line);cursor:pointer}
.radio-list input{accent-color:var(--accent);width:20px;height:20px}

.viewer{width:100%;height:100%;background:#000;overflow:hidden}
.viewer[open]{display:block}
.viewer::backdrop{background:#000}
.vw{position:absolute;inset:0;display:grid;place-items:center;--ring:#fff;color:#fff}
.vw__stage{position:relative;width:min(100%,calc(100dvh * .62));height:100%;overflow:hidden;background:#111;touch-action:manipulation;user-select:none;-webkit-user-select:none}
.vw__bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.vw__stage::after{content:"";position:absolute;inset:0;background:linear-gradient(rgba(0,0,0,.5),transparent 24%,transparent 58%,rgba(0,0,0,.7));pointer-events:none}
.vw__top{position:absolute;z-index:3;left:12px;right:12px;top:calc(10px + var(--safe-t));display:grid;gap:12px}
.vw__bars{display:flex;gap:4px}
.vw__bars i{flex:1;height:3px;border-radius:3px;background:rgba(255,255,255,.3);overflow:hidden}
.vw__bars i b{display:block;height:100%;background:#fff;width:var(--p,0%)}
.vw__who{display:flex;align-items:center;gap:10px}
.vw__who .avatar{--s:40px}
.vw__who div{flex:1;min-width:0;line-height:1.2}
.vw__who small{opacity:.85}
.vw__sticker{position:absolute;z-index:3;left:50%;top:47%;transform:translateX(-50%) rotate(-3deg);max-width:80%;padding:14px 20px;border-radius:18px;background:rgba(255,255,255,.92);color:#111;font:600 26px/1.15 var(--font-display);text-align:center;box-shadow:0 10px 40px rgba(0,0,0,.35)}
.vw__sticker small{display:block;font:600 12px var(--font-ui);letter-spacing:.06em;text-transform:uppercase;color:#555;margin-top:6px}
.vw__bottom{position:absolute;z-index:3;left:12px;right:12px;bottom:calc(14px + var(--safe-b));display:flex;gap:10px;align-items:center}
.vw__bottom .field{background:rgba(20,20,22,.45);border-color:rgba(255,255,255,.3);color:#fff;border-radius:999px;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
.vw__bottom .field::placeholder{color:rgba(255,255,255,.75)}
.vw .iconbtn{background:rgba(20,20,22,.45);color:#fff;border:1px solid rgba(255,255,255,.28);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);width:44px;height:44px}
.vw__zones{position:absolute;inset:0;z-index:2;display:grid;grid-template-columns:1fr 2fr}
.vw__zones button{background:none;border:0;cursor:pointer;-webkit-tap-highlight-color:transparent}

.toasts{position:fixed;z-index:90;left:0;right:0;bottom:calc(var(--dock-h) + var(--safe-b) + 26px);display:grid;justify-items:center;gap:8px;pointer-events:none;padding:0 16px}
.toast{pointer-events:auto;display:flex;align-items:center;gap:14px;max-width:min(100%,460px);padding:10px 10px 10px 18px;border-radius:999px;background:var(--fg);color:var(--bg);font-size:14px;font-weight:550;box-shadow:var(--shadow);animation:pop .25s ease both}
.toast button{min-height:40px;padding:0 16px;border-radius:999px;border:0;background:color-mix(in srgb,var(--bg) 18%,transparent);color:var(--bg);font-weight:700;cursor:pointer}

/* ---------- Mobile (< 720px) ---------- */
@media (max-width:719.98px){
  .discover__modes{display:none!important}
  main{padding:calc(var(--top-h) + var(--safe-t) + 10px) 16px calc(var(--dock-h) + var(--safe-b) + 44px)}
  body[data-view=discover]{overflow:hidden}
  body[data-view=discover] main{padding:0}
  #discover.show{display:flex;flex-direction:column;height:100dvh;padding:calc(var(--top-h) + var(--safe-t)) 8px 8px}
  .composer{bottom:calc(var(--dock-h) + var(--safe-b) + 24px)}
  .topbar .seg button{padding:0 11px;font-size:13px}
  body[data-thread="1"] .topbar{display:none}
  body[data-thread="1"] main{padding-top:calc(var(--safe-t) + 10px)}
  .toasts{bottom:auto;top:calc(var(--top-h) + var(--safe-t) + 6px)}
  .sheet--center .sheet__in{margin:auto 16px;width:calc(100% - 32px)}
  .sheet--center[open]{align-items:center}
}

/* ---------- Tablet / desktop (>= 720px) ---------- */
@media (min-width:720px){
  :root{--card-r:36px;--act-b:24px;--info-b:calc(24px + 88px)}
  .dock,.topbar{display:none}
  .rail{display:flex}
  main{margin-left:calc(var(--rail-w) + 32px);padding:28px 28px 48px;min-height:100dvh}
  .toasts{bottom:28px;padding-left:calc(var(--rail-w) + 32px)}
  .composer{bottom:20px}
  .thread{min-height:calc(100dvh - 76px)}
  #discover.show{display:flex;flex-direction:column;align-items:center;height:100dvh;margin:-28px -28px -48px;padding:20px 28px 24px;gap:6px}
  body[data-view=discover]{overflow:hidden}
  .discover__modes{display:block;flex:none}
  .rings{max-width:100%;padding-bottom:6px}
  .ring:first-child{margin-left:auto}.ring:last-child{margin-right:auto}
  .deck{flex:1;width:min(100%,calc((100dvh - 190px) * .76))}
  .sheet[open]{align-items:center}
  .sheet__in{border-radius:32px;max-height:min(86dvh,820px);animation-name:pop}
  .grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}
  .cards{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
  .cards .wide{grid-column:1/-1}
  .chats{display:grid;grid-template-columns:340px minmax(0,1fr);gap:28px;align-items:start}
  .chats__thread{display:flex}
  .chats.has-thread .chats__list{display:block}
  .thread__back{display:none}
  .thread--empty{display:grid;place-content:center;justify-items:center;text-align:center;gap:10px;color:var(--muted);border:1px dashed var(--line);border-radius:28px;min-height:420px}
  .page-wrap{max-width:900px}
}
@media (min-width:1100px){
  :root{--rail-w:224px}
  .rail__logo{justify-content:flex-start;padding-left:14px}
  .rail__word{display:inline}
  .rail__nav a,.rail__tool{justify-content:flex-start;padding:0 18px}
  .rail__nav a span,.rail__tool span{display:inline}
  .rail .dot{right:auto;left:38px}
  body[data-view=discover] main{margin-right:400px}
  .detail{position:fixed;z-index:20;top:0;right:0;bottom:0;width:400px;padding:28px 28px 28px 8px;overflow:auto}
  body[data-view=discover] .detail{display:block}
  main{padding-left:12px;padding-right:12px}
  #discover.show{margin:-28px -12px -48px}
  .cards{max-width:1000px}
}
@media (min-width:720px) and (max-width:1099.98px){ main{padding-left:12px;padding-right:20px} #discover.show{margin:-28px -20px -48px -12px} }

@media (max-height:640px) and (min-width:720px){ .card__prompt{display:none} }
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}
@media (forced-colors:active){ .act,.btn,.chip{border:1px solid ButtonText} }

/* ---------- On Repeat now-playing strip ---------- */
.np{display:flex;align-items:center;gap:10px;min-height:52px;width:fit-content;max-width:100%;padding:6px 8px 6px 6px;border-radius:999px;cursor:pointer;text-align:left;color:#fff;background:rgba(20,20,22,.42);border:1px solid rgba(255,255,255,.26);-webkit-backdrop-filter:blur(18px) saturate(1.5);backdrop-filter:blur(18px) saturate(1.5);--ring:#fff;transition:transform .15s}
.np:active{transform:scale(.97)}
.np__art{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;flex:none;background:linear-gradient(135deg,var(--t1,#1646a0),var(--t2,#d6a52b))}
.np__art .ic{width:20px;height:20px}
.np__txt{display:grid;min-width:0;line-height:1.2}
.np__txt strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.np__txt span{font-size:12px;opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.np__same{flex:none;font-size:11px;font-weight:700;padding:3px 8px;border-radius:999px;background:var(--brand-gold);color:#1a1300}
.np__eq{display:flex;align-items:flex-end;gap:2px;height:16px;flex:none}
.np__eq i{width:3px;height:30%;border-radius:2px;background:currentColor;opacity:.85}
.np.playing .np__eq i{animation:eq .9s ease-in-out infinite}
.np.playing .np__eq i:nth-child(2){animation-delay:.2s}.np.playing .np__eq i:nth-child(3){animation-delay:.4s}
@keyframes eq{0%,100%{height:25%}50%{height:100%}}
.np__play{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;flex:none;background:rgba(255,255,255,.22)}
.np__play .ic{width:16px;height:16px}
.np--flat{width:100%;background:var(--surface);color:var(--fg);border-color:var(--line);-webkit-backdrop-filter:none;backdrop-filter:none;--ring:var(--accent)}
.np--flat .np__txt{flex:1}
.np--flat .np__play{background:var(--accent);color:var(--on-accent)}
.chip--local{background:color-mix(in srgb,var(--brand-gold) 26%,transparent);border:1px solid color-mix(in srgb,var(--brand-gold) 70%,transparent);color:var(--fg)}
.card__top{gap:10px}
.np__eq i:nth-child(1){height:45%}.np__eq i:nth-child(2){height:90%}.np__eq i:nth-child(3){height:65%}

/* ==============================================================
   v0.5 premium pass — appended layer. Overrides earlier rules on purpose.
   Glass only on media overlays + navigation, each with an opaque fallback.
   ===================================================================== */
:root{--glass:rgba(255,255,255,.86)}
@supports (color:light-dark(#000,#fff)){:root{--glass:light-dark(rgba(255,255,255,.84),rgba(20,20,22,.78))}}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .glass{background:var(--bg)}.onphoto{--glass:#1c1c1f}
  .act,.np,.card .sim,.chip--glass,.vw .iconbtn{background:rgba(24,24,27,.82)}
}
.glass{-webkit-backdrop-filter:blur(22px) saturate(1.5);backdrop-filter:blur(22px) saturate(1.5);box-shadow:0 1px 0 rgba(255,255,255,.04) inset,0 8px 28px rgba(0,0,0,.14)}
.dock a{min-height:44px}
.dock a .ic{width:23px;height:23px}
/* soft fade so list text never runs under the dock */
@media (max-width:719.98px){
  body:not([data-view=discover]):not([data-thread="1"])::after{content:"";position:fixed;z-index:29;left:0;right:0;bottom:0;height:calc(var(--dock-h) + var(--safe-b) + 40px);background:linear-gradient(to bottom,transparent,var(--bg) 70%);pointer-events:none}
}

/* ----- portrait card: calmer, more photographic ----- */
.card::after{background:linear-gradient(to bottom,rgba(0,0,0,.34),rgba(0,0,0,.08) 16%,transparent 34%,rgba(0,0,0,.06) 46%,rgba(0,0,0,.34) 62%,rgba(0,0,0,.62) 78%,rgba(0,0,0,.84))}
.card__img{transform:scale(1.04);transition:opacity .28s,transform 6s ease-out}
.card__img.on{transform:scale(1)}
.card .sim{min-height:30px;padding:0 12px 0 10px;font-size:12px;font-weight:600;letter-spacing:.01em;border:1px solid rgba(255,255,255,.26);background:rgba(20,20,22,.38)}
.card button.sim{position:relative;isolation:isolate;min-height:44px;padding:0 14px 0 12px;background:none;border:0;-webkit-backdrop-filter:none;backdrop-filter:none}
.card button.sim::before{content:"";position:absolute;z-index:-1;inset:7px 0;border-radius:999px;background:rgba(20,20,22,.38);border:1px solid rgba(255,255,255,.26);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
.card__name{font-size:clamp(38px,10vw,50px);text-shadow:0 2px 28px rgba(0,0,0,.4)}
.card__meta{font-size:14px;font-weight:500;letter-spacing:.01em;opacity:.92}
.card__chips{gap:0;flex-wrap:wrap}
.card__chips .chip{min-height:0;padding:0;background:none;border:0;-webkit-backdrop-filter:none;backdrop-filter:none;font-size:13.5px;font-weight:500;color:rgba(255,255,255,.92);letter-spacing:.01em}
.card__chips .chip+.chip::before{content:"";display:inline-block;width:3px;height:3px;border-radius:50%;background:var(--viz-b);margin:0 9px;opacity:.9}
.card__prompt{font-size:17px;max-width:32ch;opacity:.9}
.card__info{gap:9px}
.act{background:rgba(20,20,22,.34);border-color:rgba(255,255,255,.22);transition:transform .18s var(--ease),background .2s}
.act--like{background:var(--brand-gold);border-color:transparent;box-shadow:0 10px 28px -8px rgba(214,165,43,.65)}
.act--like:hover{background:var(--brand-gold)}
.act--like.pulse{animation:heart .42s var(--ease)}
@keyframes heart{0%{transform:scale(1)}35%{transform:scale(1.18)}100%{transform:scale(1)}}

/* ----- Moments strip ----- */
.ring__halo{padding:2.5px}
.ring{font-size:12px;font-weight:500;color:var(--muted)}
.ring.seen .ring__halo{background:var(--line)}

/* ----- top bar ----- */
.topbar__title{font:600 16px/1 var(--font-ui);letter-spacing:-.01em}

/* ----- flat settings: grouped rows, quiet dividers, no nested cards ----- */
.panel{background:none;border:0;border-radius:0;padding:0}
.cards{gap:28px}
.group{display:grid;gap:0}
.group__title{font:700 12px/1 var(--font-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin:0 0 6px}
.group__box{border-top:1px solid var(--line)}
.grow{display:grid;gap:10px;padding:16px 0;border-bottom:1px solid var(--line)}
.grow:last-child{border-bottom:0}
.grow__top{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px}
.grow__label{font-weight:600}
.grow p{max-width:52ch}
.seg--fit{display:flex;width:100%}
.seg--fit button{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 10px}
.seg--fit .ic{width:18px;height:18px}
.seg--fit button[aria-checked=true]{background:var(--fg);color:var(--bg)}
.themes{display:block}
.theme-opt{border:0;padding:0 14px;min-height:44px;background:transparent;display:inline-flex}
.switch{position:relative;width:52px;height:44px;border:0;background:none;cursor:pointer;padding:0;flex:none}
.switch::before{content:"";position:absolute;left:0;top:6px;width:52px;height:32px;border-radius:999px;background:var(--surface-2);transition:background .2s}
.switch::after{content:"";position:absolute;top:10px;left:4px;width:24px;height:24px;border-radius:50%;background:var(--bg);box-shadow:0 1px 4px rgba(0,0,0,.3);transition:transform .22s var(--ease)}
.switch[aria-checked=true]::before{background:var(--accent)}
.switch[aria-checked=true]::after{transform:translateX(20px);background:var(--on-accent)}
.hit{display:inline-grid;place-items:center;min-width:44px;min-height:44px}
.list li{padding:14px 0}

/* ----- details sheet: quieter surfaces ----- */
.quote{background:none;border:0;border-left:2px solid var(--brand-gold);border-radius:0;padding:2px 0 2px 16px}
.quote p{font-size:21px}
.dp__chips .chip{background:transparent;border:1px solid var(--line);font-weight:500}
.sheet__in{border-radius:28px 28px 0 0}
dialog[open]::backdrop{animation:fade .24s ease both}
@keyframes fade{from{opacity:0}to{opacity:1}}
.toast{background:var(--glass);color:var(--fg);border:1px solid var(--glass-line);-webkit-backdrop-filter:blur(20px) saturate(1.5);backdrop-filter:blur(20px) saturate(1.5);font-weight:500}
.toast button{background:var(--surface-2);color:var(--fg)}
.toast{line-height:1.3;padding-right:18px}.toast:has(button){padding-right:10px}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.toast{background:var(--bg)}}

/* ----- On Repeat: compact profile song player ----- */
.np{min-height:48px;padding:5px 6px 5px 5px;gap:9px;background:rgba(20,20,22,.36);border-color:rgba(255,255,255,.2)}
.np__art{width:38px;height:38px}
.np__txt strong{font-size:13.5px;font-weight:600}
.np__txt span{font-size:11.5px}
.np__play{width:36px;height:36px}
.np--flat{border-radius:20px;min-height:60px;padding:8px 10px 8px 8px}
.np--flat .np__art{width:44px;height:44px;border-radius:12px}
.prov{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin:10px 0 0;padding:0;list-style:none;font-size:12px;font-weight:600;color:var(--muted)}
.prov li{display:inline-flex;align-items:center;gap:6px;padding:0}
.prov li+li::before{content:"";width:3px;height:3px;border-radius:50%;background:currentColor;opacity:.5;margin-right:4px}
.viz{position:relative;margin-top:10px;border-radius:20px;background:var(--surface);overflow:hidden}
.viz canvas{display:block;width:100%;height:92px}
.viz__bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 6px 6px 14px;font-size:12px;color:var(--muted)}
.viz__bar button{min-width:44px;min-height:44px;border:0;background:none;color:var(--fg);font-weight:600;font-size:13px;cursor:pointer;border-radius:999px;padding:0 12px}
.viz--off canvas{opacity:.25}
.viz.is-static canvas{opacity:.85}

@media (prefers-reduced-motion:reduce){
  .card__img{transform:none!important;transition:opacity .01ms!important}
  .act--like.pulse{animation:none}
}

/* ----- v0.5 fixes after first screenshot review ----- */
.np--flat{background:var(--surface);color:var(--fg);border-color:var(--line)}
.sim{border-style:solid;border-width:1px;font-weight:600}
.cards>.panel,.cards>.group{padding-top:22px;border-top:1px solid var(--line)}
.cards>.group:first-child,.cards>.panel:first-child{border-top:0;padding-top:0}
@media (min-width:720px){.cards>.panel:nth-child(2),.cards>.group:nth-child(2){border-top:0;padding-top:0}}
.cards>.group>.group__box{border-top:0}
.cards>.group{border-top:0;padding-top:0}
@media (max-width:719.98px){
  .thread{min-height:calc(100dvh - var(--safe-t) - var(--safe-b) - var(--dock-h) - 54px)}
  .dock a[aria-current=page]{flex:2.6;padding:0 8px;font-size:13px}
}

/* ----- short and narrow phones ----- */
@media (max-width:719.98px) and (max-height:700px){
  .card__prompt,.card__chips{display:none}
  .card__name{font-size:clamp(32px,9vw,40px)}
}
@media (max-width:359.98px){
  .topbar{gap:6px;padding-left:8px;padding-right:8px}
  .topbar .iconbtn{width:44px;height:44px}
  .topbar .seg{padding:3px;gap:2px}
  .topbar .seg button{padding:0 8px;font-size:12.5px}
}
/* settings columns flow top-to-bottom so short groups do not leave gaps */
@media (min-width:720px){
  #profCards.cards{display:block;columns:2;column-gap:48px;max-width:1000px}
  #profCards>.group{break-inside:avoid;margin-bottom:32px}
  #profCards>.wide{column-span:all}
}
.panel>.btn+.btn{margin-top:0;margin-left:8px}
.btn--ghost{background:transparent}

/* Chat essentials preview: text, photos, voice notes, audio calls. */
.bubble--attachment{display:grid;gap:5px;min-width:170px}
.bubble__graphic{display:grid;place-items:center;min-height:86px;border-radius:14px;background:color-mix(in srgb,var(--brand-blue) 12%,var(--surface));color:var(--fg)}
.bubble__graphic .ic{width:33px;height:33px}
.bubble--voice{display:flex;align-items:center;gap:10px;max-width:min(90%,330px)}
.voice__play{flex:none;width:44px;height:44px;display:grid;place-items:center;border:1px solid currentColor;border-radius:50%;background:transparent;color:inherit;cursor:pointer}
.voice__wave{display:flex;align-items:center;gap:2px;min-width:54px;flex:1;height:30px}
.voice__wave i{display:block;width:3px;flex:1;border-radius:3px;background:currentColor;opacity:.7}
.call-demo{display:grid;justify-items:center;text-align:center;gap:14px;padding:14px 8px}

/* Media permission UI is a local demonstration, not encryption. */
.bubble--muted{opacity:.65;font-style:italic;font-size:13px}
.attachment__once{min-height:44px;width:100%;padding:10px 12px;border-radius:14px;border:1px solid currentColor;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.attachment__once:disabled{opacity:.7;cursor:default}
.attachment__delete{min-height:40px;min-width:62px;padding:4px 10px;border:1px solid currentColor;border-radius:999px;background:transparent;color:inherit;font-size:12px;font-weight:650;cursor:pointer}
.bubble--voice{flex-wrap:wrap}

/* Mode landing sections: only Dating contains one fictional example profile. */
body[data-view=discover][data-mode=friendship] .rings,
body[data-view=discover][data-mode=social] .rings{display:none}
.mode-panel{height:100%;display:flex;flex-direction:column;justify-content:center;gap:18px;overflow:auto;padding:clamp(12px,3vw,38px) max(10px,2vw);color:var(--fg)}
.mode-panel__eyebrow{font-size:11px;letter-spacing:.15em;font-weight:750;color:var(--brand-blue)}
.mode-panel__title{font:600 clamp(31px,5vw,52px)/1.08 var(--font-display);letter-spacing:-.04em;max-width:14ch}
.mode-panel__intro{max-width:46ch;font-size:clamp(15px,1.8vw,18px);color:var(--fg)}
.mode-panel__features{display:grid;gap:0;margin-top:4px}
.mode-panel__feature{display:flex;gap:16px;padding:12px 0;border-top:1px solid var(--line);align-items:baseline}
.mode-panel__feature strong{display:block;font-size:15px}
.mode-panel__number{font-size:12px;color:var(--brand-gold);font-weight:750}
.mode-panel__actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
body[data-view=discover][data-mode=friendship] .detail,
body[data-view=discover][data-mode=social] .detail{display:none}
@media(min-width:1100px){
  body[data-view=discover][data-mode=friendship] main,
  body[data-view=discover][data-mode=social] main{margin-right:0}
}
@media(max-width:719.98px){
  .mode-panel{padding:16px 12px}
  .mode-panel__features{gap:2px}
  .mode-panel__actions .btn{font-size:13px}
}

/* v0.5 responsive composition audit: keep the portrait prominent on tablet/laptop. */
@media (min-width:720px) and (max-width:1499.98px){
  body[data-view=discover] main{margin-right:0}
  body[data-view=discover] .detail{display:none}
  #discover.show{gap:8px}
  #discover .deck{width:min(100%, 580px, calc((100dvh - 174px) * .84))}
}
@media (min-width:720px) and (max-width:1099.98px){
  #discover.show{padding-top:14px;padding-bottom:16px}
  #discover .deck{width:min(100%, 540px, calc((100dvh - 165px) * .8))}
}
@media (min-width:1100px) and (max-width:1499.98px){
  #discover .deck{width:min(100%, 650px, calc((100dvh - 170px) * .9))}
}
@media (min-width:1500px){
  body[data-view=discover] main{margin-right:350px}
  body[data-view=discover] .detail{width:350px;padding:22px 24px 22px 8px}
  #discover .deck{width:min(100%,620px,calc((100dvh - 180px) * .86))}
}
@media (max-width:719.98px){
  #discover.show{gap:4px;padding-left:10px;padding-right:10px}
  #discover .rings{width:100%;justify-content:center}
  #discover .deck{min-height:0;width:100%}
}

/* Age preferences: compact discovery filter that remains readable at phone widths. */
.age-filter{width:100%;display:flex;justify-content:center;align-items:center;flex:none;min-height:44px}
.age-filter[hidden]{display:none}
.age-filter__button{min-height:44px;display:inline-flex;align-items:center;gap:8px;background:var(--surface);color:var(--fg);border:1px solid var(--line);border-radius:999px;padding:0 16px;cursor:pointer;font-size:13px;font-weight:650}
.age-filter__button .ic{width:18px;height:18px}
.age-filter__fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}
.age-filter__fields label{display:grid;gap:6px;font-size:14px;font-weight:600}
.age-filter__select{min-height:48px;width:100%;border:1px solid var(--line);border-radius:12px;padding:0 12px;background:var(--surface);color:var(--fg);font:inherit}
.age-filter__error{color:var(--danger)}
#sheetBody:has(.age-filter__fields)>.btn{margin:4px 8px 6px 0}
@media(max-width:719.98px){#discover .age-filter{min-height:44px}#discover .age-filter__button{min-height:44px}}

/* v0.6 Discover simplification: fewer controls, more photo, moments on separate screen. */
body[data-view=discover] #rings{display:none!important}
#discover.show{gap:4px}
#discover .deck{width:min(100%,560px,calc((100dvh - 156px)*.84))}
#discover .card__top .np{display:none}
#discover .card__prompt{display:none}
#discover .card__info{padding-bottom:96px}
#discover .card__name small{margin-left:0;font:inherit}
#discover .deck__actions--simple{display:flex;justify-content:center;align-items:center;gap:12px;bottom:14px;left:14px;right:14px;width:auto;z-index:5}
#discover .discover-cta{border:1px solid rgba(255,255,255,.45);min-height:52px;border-radius:999px;padding:0 24px;display:inline-flex;align-items:center;justify-content:center;gap:9px;flex:1;font:700 15px var(--font-ui);cursor:pointer;box-shadow:0 9px 24px rgba(0,0,0,.18)}
#discover .discover-cta .ic{width:18px;height:18px}
#discover .discover-cta--next{background:rgba(19,19,19,.5);color:#fff;backdrop-filter:blur(12px)}
#discover .discover-cta--next .ic{transform:rotate(180deg)}
#discover .discover-cta--connect{background:#e5b331;color:#15130c;border-color:#e5b331}
#discover .card__flags .sim{background:rgba(20,20,20,.42);border:1px solid rgba(255,255,255,.24);color:#fff}
.moments-feature{grid-column:1/-1;display:grid;gap:8px;padding:14px 0}
.moments-feature__items{display:flex;gap:10px;flex-wrap:wrap}
.moments-feature__item{min-height:64px;display:flex;align-items:center;gap:10px;padding:8px 14px;border:1px solid var(--line);background:var(--surface);border-radius:18px;font:600 13px var(--font-ui);color:var(--fg);cursor:pointer}
.moments-feature__item>.ic{width:24px;height:24px}
@media(max-width:719.98px){
 #discover .deck{width:100%}
 #discover .card__info{padding-bottom:92px}
 #discover .discover-cta{min-height:50px;padding:0 16px}
}
@media(min-width:720px){
 #discover .deck{width:min(100%,640px,calc((100dvh - 148px)*.9))}
}

/* Card details remain keyboard/touch accessible despite the draggable portrait. */
#discover .card__info{bottom:80px;padding-bottom:0}
#discover .card__name{pointer-events:auto}
#discover .card__name-button{pointer-events:auto;padding:0;border:0;background:transparent;color:#fff;font:inherit;letter-spacing:inherit;text-align:left;text-shadow:inherit;cursor:pointer;min-height:44px}
#discover .card__name-button:focus-visible{outline:2px solid #fff;outline-offset:4px}
#discover .card__name-button small{font:400 .72em var(--font-display);opacity:.96}
@media(max-width:359.98px){#discover .card__info{bottom:76px}#discover .card__chips{display:none}}

/* v0.7: native-app-inspired utility bar and editorial Moments studio. */
.topbar__actions{display:flex;align-items:center;gap:6px;flex:none}
.topbar__actions .iconbtn{width:44px;height:44px;flex:none}
.topbar__actions .ic{width:21px;height:21px}
.topbar__messages{position:relative}
.topbar__snap{background:var(--fg);color:var(--bg);border-color:transparent}
.snap-intro{display:flex;align-items:center;gap:12px;padding:14px 0 10px}
.snap-intro>.ic{width:38px;height:38px;color:var(--accent)}
.snap-intro h2{font:600 23px/1.15 var(--font-display)}
.moments-studio{padding:20px 0 12px;gap:14px}
.moments-studio__heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.moments-studio__heading h2{font:600 clamp(25px,4vw,36px)/1.08 var(--font-display);letter-spacing:-.035em;margin-top:5px}
.eyebrow{font:750 10px/1.2 var(--font-ui);letter-spacing:.16em;color:var(--muted)}
.moments-studio__rail{display:flex;gap:20px;overflow-x:auto;padding:8px 2px 15px;scrollbar-width:thin;scroll-snap-type:x proximity}
.moments-studio__person{display:flex;align-items:center;flex-direction:column;gap:5px;min-width:96px;min-height:132px;padding:4px 2px;border:0;background:none;color:var(--fg);font:650 13px var(--font-ui);cursor:pointer;scroll-snap-align:start}
.moments-studio__person small{font:500 11px var(--font-ui);color:var(--muted)}
.moments-studio__portrait{width:88px;height:88px;border-radius:50%;border:2px solid var(--brand-gold);padding:4px;display:grid;place-items:center;overflow:hidden}
.moments-studio__portrait .avatar{width:74px!important;height:74px!important;border-radius:50%}
.moments-studio__portrait--you{border:1.5px dashed var(--muted);background:var(--surface)}
.moments-studio__portrait--you .ic{width:27px;height:27px}
.moments-studio__person:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:14px}
@media(max-width:440px){.topbar{gap:3px;padding-left:6px;padding-right:6px}.topbar__actions{gap:3px}.topbar__actions .iconbtn{width:44px;height:44px}.topbar__center .seg button{padding:0 5px;font-size:11.5px}}
@media(min-width:441px) and (max-width:719.98px){.topbar__center .seg button{padding:0 6px}}
@media(min-width:720px){.moments-studio__rail{gap:28px}.moments-studio{padding-top:28px}}

/* Comfortable link hit area for the prototype feedback action. */
a[href^="mailto:"]{display:inline-flex;align-items:center;min-height:44px}

/* Brand V2 is a vector mark without a circular disc, padding, or background. */
picture{display:contents}

/* v0.8 account entry: editorial mobile-first onboarding, no fake authentication. */
body[data-view="account"] .dock{display:none}
body[data-view="account"] .topbar__center{visibility:hidden}
.account{min-height:calc(100dvh - 120px);display:grid;align-content:center;gap:28px;width:min(100%,940px);margin:0 auto;padding:48px 22px 90px}
.account__intro{display:flex;flex-direction:column;align-items:flex-start;gap:18px}
.account__intro h1{font:600 clamp(38px,7vw,76px)/.99 var(--font-display);letter-spacing:-.055em;max-width:650px}
.account__intro p{font:400 clamp(16px,2vw,20px)/1.5 var(--font-ui);max-width:480px;color:var(--muted)}
.account__card{display:flex;flex-direction:column;gap:12px;padding:26px;border:1px solid var(--line);border-radius:28px;background:var(--surface)}
.account__card h2{font:600 23px/1.15 var(--font-display);letter-spacing:-.025em}
.account__provider,.account__email{display:flex;align-items:center;justify-content:center;gap:14px;width:100%;min-height:54px;border-radius:16px;border:1px solid var(--line);background:var(--bg);color:var(--fg);font:650 15px var(--font-ui);cursor:pointer}
.account__provider-mark{font-size:21px;font-weight:750;min-width:24px;text-align:center}
.account__email{background:var(--fg);color:var(--bg);border-color:var(--fg)}
.account__separator{display:flex;align-items:center;gap:12px;color:var(--muted);font:500 13px var(--font-ui);margin:2px 0}
.account__separator:before,.account__separator:after{content:"";flex:1;height:1px;background:var(--line)}
.account__legal{font:400 12px/1.55 var(--font-ui);color:var(--muted);margin-top:6px}
.account__preview{display:inline-flex;align-items:center;justify-content:center;min-height:44px;color:var(--fg);font:650 13px var(--font-ui);text-decoration:underline;text-underline-offset:4px}
@media(min-width:760px){.account{grid-template-columns:1.15fr .85fr;align-items:center;gap:60px;padding:80px 36px}.account__card{padding:34px}}

/* Keep Discover actions above the fixed mobile dock. The previous overlap blocked real taps. */
@media(max-width:719.98px){
 #discover .deck__actions--simple{bottom:calc(var(--dock-h) + 24px + var(--safe-b))}
 #discover .card__info{bottom:calc(var(--dock-h) + 100px + var(--safe-b))}
}
/* Moment stickers are visual content, not interactive hit targets. */
.vw__sticker{pointer-events:none}
/* 320px: Messages is already in the dock, so the top bar gives its space to the mode switch */
@media (max-width:359.98px){.topbar__messages{display:none}}

/* ---------- v0.5 responsive fixes (found by tests/responsive-audit.mjs; measured, not guessed) ---------- */
/* Top bar: the Dating/Friendship/Social switch needs 175px. The Messages shortcut duplicates the dock's Chats tab
   (same unread dot), so it is hidden below 380px, and the bar is tightened at 320px. */
@media(max-width:379.98px){.topbar__messages{display:none}}
@media(max-width:359.98px){.topbar{gap:2px;padding-left:4px;padding-right:4px}.topbar__actions{gap:2px}}
/* Dock: every item stays a 44px target even on 320px phones. */
.dock a{min-width:44px}
@media(max-width:359.98px){.dock{width:calc(100% - 16px);padding:6px 4px;gap:0}.dock a span{font-size:12px}}
/* Toast action and Moment heart meet the 44px target rule and cannot be squeezed by flex. */
.toast button{min-height:44px;min-width:44px}
.vw__bottom .iconbtn{flex:none;width:44px}
.vw__bottom .field{min-width:0}
/* Friendship/Social panels: centre only when there is room (flex centring with overflow clips the top), and clear the dock. */
.mode-panel{justify-content:flex-start}
.mode-panel>:first-child{margin-top:auto}
.mode-panel>:last-child{margin-bottom:auto}
@media(max-width:719.98px){.mode-panel{padding-bottom:calc(var(--dock-h) + var(--safe-b) + 32px)}
  /* Discover toasts sit below the age-filter row so they never cover a control while visible. */
  body[data-view=discover] .toasts{top:calc(var(--top-h) + var(--safe-t) + 56px)}}
.toasts{pointer-events:none}
/* Caption sticker: left:50% limited its shrink-to-fit width to half the stage (4-line wrap at 320px). */
.vw__sticker{width:max-content}

/* ---------- feedback sheet ---------- */
.list--num{counter-reset:q}
.list--num li::before{counter-increment:q;content:counter(q);flex:none;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:750;background:var(--surface-2);color:var(--fg)}
.feedback__text{height:auto;min-height:0;padding:12px 14px;line-height:1.45;font-size:13px;resize:none}
/* Sheet close button must never be squeezed below 44px by a long title (seen at 320px in Firefox). */
.sheet__head .iconbtn{flex:none}
/* Contrast: gold 01/02/03 numerals were 2.2:1 on white (axe color-contrast). Darker gold in light mode, unchanged in dark. */
.mode-panel__number{color:#8a6200}
@supports (color:light-dark(#000,#fff)){.mode-panel__number{color:light-dark(#8a6200,#f5c84c)}}

/* =====================================================================
   Mobile UI refinement: navigation + Discover (branch design/mobile-ui-discover)
   Phones only (< 720px). Tablet and desktop layouts are untouched.
   Goals: quieter top bar (logo | mode switch | one action), a labelled floating tab bar,
   a taller photo card that ends above the dock, fewer borders, one quiet demo label.
   The logo artwork, size and animation are NOT changed; only the frame around it is removed.
   ===================================================================== */
@media (max-width: 719.98px) {
  :root { --top-h: 56px; --dock-h: 64px; --card-r: 28px; }

  /* ---- top bar ---- */
  .topbar { padding: calc(6px + var(--safe-t)) 10px 6px; gap: 8px; }
  .topbar::before { content: ""; position: absolute; z-index: -1; inset: 0 0 -14px; background: linear-gradient(to bottom, var(--bg) 58%, transparent); pointer-events: none; }
  body[data-view=discover] .topbar::before { display: none; }                   /* never haze the photo card */
  .topbar > a.brand-link { width: 44px; height: 44px; }                        /* V2 logo link: no frame (see v2-logo-integration) */
  .topbar .topbar__snap, .topbar .topbar__messages { display: none; }            /* Chats is in the tab bar; Quick Snap moved into the Appearance sheet */
  .topbar__actions { gap: 0; }
  .topbar__actions .iconbtn.glass { width: 44px; height: 44px; background: var(--surface); border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .topbar .seg.glass { background: var(--surface); border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 3px; gap: 2px; }
  .topbar .seg button { padding: 0 13px; font-size: 13px; font-weight: 650; letter-spacing: -.005em; }
  .topbar__title.glass { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0; font: 600 17px/1 var(--font-ui); letter-spacing: -.01em; }

  /* ---- floating tab bar: every tab is icon + label, the active tab is tinted ---- */
  .dock { bottom: calc(10px + var(--safe-b)); width: min(calc(100% - 24px), 420px); height: var(--dock-h); padding: 4px; gap: 0; border: 0; border-radius: 32px; box-shadow: var(--shadow), inset 0 0 0 .5px var(--glass-line); }
  .dock a { flex: 1; flex-direction: column; gap: 3px; padding: 0; border-radius: 26px; transition: background .2s, color .2s; }
  .dock a span { display: block; max-width: 100%; padding: 0; font-size: 10.5px; font-weight: 600; line-height: 1; letter-spacing: 0; white-space: nowrap; }
  .dock a .ic { width: 24px; height: 24px; }
  .dock a[aria-current=page] { flex: 1; padding: 0; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }
  .dock a[aria-current=page] span { font-weight: 700; }
  .dock a[aria-current=page] .ic { fill: currentColor; fill-opacity: .16; stroke-width: 2.1; }
  .dock .dot { top: 7px; right: calc(50% - 21px); }

  /* ---- Discover: taller card that ends above the dock, one filter pill on the photo ---- */
  #discover.show { height: 100dvh; gap: 0; padding: calc(var(--top-h) + var(--safe-t)) 8px calc(var(--dock-h) + 20px + var(--safe-b)); }
  #discover .deck { width: 100%; }
  #discover .age-filter { position: absolute; z-index: 7; top: calc(var(--top-h) + var(--safe-t) + 27px); right: 24px; width: auto; min-height: 0; }
  #discover .age-filter__button { position: relative; isolation: isolate; min-height: 44px; padding: 0 14px 0 12px; gap: 6px; background: none; border: 0; color: #fff; font-size: 13px; font-weight: 600; }
  #discover .age-filter__button::before { content: ""; position: absolute; z-index: -1; inset: 7px 0; border-radius: 999px; background: rgba(20, 20, 22, .38); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  #discover .age-filter__button .ic { width: 17px; height: 17px; }
  #discover .card__flags .sim { background: none; border: 0; }
  .card button.sim::before { border: 0; }
  .card .sim { font-weight: 600; }
  #discover .card__info { bottom: 82px; padding: 0 20px; gap: 8px; }
  #discover .deck__actions--simple { left: 14px; right: 14px; bottom: 14px; gap: 10px; }
  #discover .discover-cta { min-height: 52px; border: 0; font: 650 15px/1 var(--font-ui); letter-spacing: .005em; box-shadow: 0 8px 22px rgba(0, 0, 0, .2); }
  #discover .discover-cta--next { background: rgba(255, 255, 255, .2); color: #fff; -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .28), 0 8px 22px rgba(0, 0, 0, .18); }
  #discover .empty { border: 0; }
}
@supports (color: light-dark(#000, #fff)) {
  /* a little more opaque than the shared glass so labels keep 4.5:1 over any content scrolling underneath (axe-verified) */
  @media (max-width: 719.98px) { .dock { background: light-dark(rgba(255, 255, 255, .9), rgba(24, 24, 26, .9)); } }
}
@media (max-width: 379.98px) {
  .dock a span { font-size: 10px; }
  .dock { width: calc(100% - 16px); padding: 2px; }   /* a little more room per tab: Firefox measures "Connections" ~1px wider than Chromium */
}
@media (max-width: 359.98px) {
  .topbar { padding-left: 6px; padding-right: 6px; gap: 4px; }
  .topbar .seg button { padding: 0 8px; font-size: 12.5px; }
  #discover .age-filter__pre { display: none; }
}
@media (max-width: 339.98px) {
  .dock a:not([aria-current=page]) span { display: none; }   /* too narrow for five labels: icons only, the active tab keeps its label */
  .dock a[aria-current=page] { flex: 1.6; }                  /* and is wide enough that even "Connections" never clips */
  .dock { width: calc(100% - 16px); }
}
=======
/* Isolated V2 logo candidate: no decorative disc around navigation mark. */
.topbar .brand-link{display:flex;align-items:center;justify-content:center;flex:none;width:46px;height:46px;min-width:44px;min-height:44px;background:transparent;border:0;border-radius:0;text-decoration:none}
.topbar .brand-link:focus-visible,.rail__logo:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.topbar .logo,.rail .logo{border-radius:0;background:transparent;box-shadow:none;filter:none}
.account__brand{display:block;width:clamp(108px,24vw,160px);height:auto;aspect-ratio:439/388;object-fit:contain;background:transparent}

/* =====================================================================
   Integrated UI candidate: page actions (Snap, Settings), settings panel, calmer empty state.
   ===================================================================== */
.page-head--row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; max-width: 1000px; }   /* keeps the action next to the content column on wide screens */
.page-head--row > div { min-width: 0; flex: 1; }
.page-head__act { flex: none; margin-top: 2px; }
.page-head--row .iconbtn.page-head__act { background: var(--surface); }

/* Connections empty state: plain centred content instead of a dashed box */
.state { border: 0; border-radius: 0; padding: 56px 16px 24px; margin-top: 8px; }

/* Settings: bottom sheet on phones (default dialog), right-hand side panel from 720px */
.cards.settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: none; }
@keyframes slide-left { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 720px) {
  .sheet--side[open] { align-items: stretch; justify-items: end; }
  .sheet--side .sheet__in { max-width: 440px; width: 100%; max-height: none; height: 100dvh; border-radius: 28px 0 0 28px; border-right: 0; padding: 22px 26px 28px; animation-name: slide-left; }
  .sheet--side .sheet__grab { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sheet--side .sheet__in { animation: none; } }

/* Profile: a clean, minimal screen (settings, privacy and About live behind the gear) */
#profCards.cards { display: block; columns: 1; max-width: 520px; }
.profile-card { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 20px 0 8px; }
.profile-card h2 { font: 600 28px/1.1 var(--font-display); letter-spacing: -.02em; margin-top: 8px; }
.profile-card .avatar b { font-size: 30px; }
.profile-stats { display: flex; gap: 44px; margin: 12px 0 16px; }
.profile-stat { display: grid; gap: 3px; justify-items: center; }
.profile-stat strong { font: 600 26px/1 var(--font-display); }
.profile-stat span { font-size: 13px; color: var(--muted); }
@media (min-width: 720px) { .profile-card { justify-items: start; text-align: left; padding-top: 8px; } }
.moments-studio__heading { align-items: center; gap: 12px; }
.moments-studio__heading .sim { white-space: nowrap; flex: none; }

/* =====================================================================
   Steps 1 and 2: immersive Discover + welcome slideshow.
   Colours stay Huntuva blue/yellow (gold #e5b331 / #f5c84c). Light and dark both start from #FFFFFF / #000000.
   ===================================================================== */

/* ---------- Discover: round floating controls (all widths) ---------- */
#discover .deck__actions--simple { gap: 18px; justify-content: center; align-items: center; }
#discover .discover-cta { flex: none; flex-grow: 0; width: 60px; height: 60px; min-height: 60px; padding: 0; gap: 0; border-radius: 50%; }
#discover .discover-cta--connect { width: 76px; height: 76px; min-height: 76px; background: #e5b331; color: #15130c; box-shadow: 0 14px 34px -8px rgba(229, 179, 49, .6); }
#discover .discover-cta .ic { width: 26px; height: 26px; }
#discover .discover-cta--connect .ic { width: 32px; height: 32px; fill: currentColor; stroke: none; }
#discover .discover-cta:active { transform: scale(.92); }
.card__name { letter-spacing: -.03em; }
.card::after { background: linear-gradient(to bottom, rgba(0, 0, 0, .42), transparent 22%, transparent 46%, rgba(0, 0, 0, .5) 66%, rgba(0, 0, 0, .86)); }

@media (max-width: 719.98px) {
  /* the photo is the screen: edge to edge, under the translucent top bar, with the tab bar floating over it */
  #discover.show { padding: 0; }
  #discover .deck { position: absolute; inset: 0; width: 100%; }
  .card { border-radius: 0; box-shadow: none; }
  #discover .card__top { top: calc(var(--top-h) + var(--safe-t) + 4px); }
  #discover .age-filter { top: calc(var(--top-h) + var(--safe-t) + 17px); }
  #discover .deck__actions--simple { left: 0; right: 0; bottom: calc(var(--dock-h) + 24px + var(--safe-b)); }
  #discover .card__info { bottom: calc(var(--dock-h) + 24px + 76px + 22px + var(--safe-b)); padding: 0 24px; }
  #discover .empty { inset: calc(var(--top-h) + var(--safe-t) + 8px) 12px calc(var(--dock-h) + 28px + var(--safe-b)); }
  #discover .mode-panel { padding-top: calc(var(--top-h) + var(--safe-t) + 24px); }
  body[data-view=discover][data-photo="1"] .topbar .seg.glass { background: rgba(20, 20, 22, .4); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); }
  body[data-view=discover][data-photo="1"] .topbar .seg button { color: rgba(255, 255, 255, .85); }
  body[data-view=discover][data-photo="1"] .topbar .seg button[aria-pressed=true] { background: #fff; color: #111; }
  body[data-view=discover][data-photo="1"] .topbar__actions .iconbtn.glass { background: rgba(20, 20, 22, .4); color: #fff; -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); }
  body[data-view=discover][data-photo="1"] .topbar .logo { filter: drop-shadow(0 1px 8px rgba(0, 0, 0, .45)); }
  /* the tab bar floats over the photo as dark glass, active tab in Huntuva gold (both themes) */
  body[data-view=discover][data-photo="1"] .dock { --muted: rgba(255, 255, 255, .8); --accent: #f5c84c; background: rgba(18, 18, 20, .5); -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .18), 0 10px 30px rgba(0, 0, 0, .3); }
  body[data-view=discover][data-photo="1"] .dock a { color: rgba(255, 255, 255, .82); }
  body[data-view=discover][data-photo="1"] .dock a[aria-current=page] { color: #f5c84c; }
}

/* ---------- Welcome slideshow ---------- */
body[data-view=welcome] { overflow: hidden; }
#welcomeWrap { width: 100%; height: 100%; display: grid; place-items: center; }
#welcome.show { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: var(--bg); animation: none; }
.welcome { position: relative; width: 100%; height: 100dvh; overflow: hidden; background: #000; color: #fff; isolation: isolate; --ring: #fff; touch-action: pan-y; }
@media (min-width: 720px) { .welcome { width: min(100%, 480px); height: min(calc(100dvh - 48px), 900px); border-radius: 36px; box-shadow: var(--shadow); } }
.welcome :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.wslides { position: absolute; inset: 0; z-index: 0; }
.wslide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.wslide.on { opacity: 1; }
.wslide__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.04); transition: transform 6s ease-out; -webkit-user-drag: none; user-select: none; }
.wslide.on .wslide__img { transform: scale(1); }
.wscrim { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent 26%, transparent 40%, rgba(0, 0, 0, .4) 60%, rgba(0, 0, 0, .88)); }
.wtop { position: absolute; z-index: 3; left: 16px; right: 16px; top: calc(12px + var(--safe-t)); display: grid; gap: 6px; }
.wprog { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.wprog__seg { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.wprog__seg span { display: block; height: 100%; width: 0; background: #fff; border-radius: 3px; }
.wprog__seg.done span { width: 100%; }
.wprog__seg.run span { width: 100%; animation: wfill 4s linear both; }
.wprog__seg.run.hold span { animation-play-state: paused; }
@keyframes wfill { from { width: 0; } to { width: 100%; } }
.wtop__row { display: flex; align-items: center; gap: 4px; min-height: 44px; }
.wtop__label { display: flex; }
.wlogo-sm { display: block; flex: none; width: 40px; height: auto; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .5)); }
.wtop__sp { flex: 1; }
.welcome button.sim { position: relative; isolation: isolate; min-height: 44px; padding: 0 14px 0 12px; background: none; border: 0; color: #fff; font-size: 12px; font-weight: 600; }
.welcome button.sim::before { content: ""; position: absolute; z-index: -1; inset: 7px 0; border-radius: 999px; background: rgba(20, 20, 22, .4); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.wskip { min-height: 44px; min-width: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: #fff; font: 650 15px var(--font-ui); cursor: pointer; text-shadow: 0 1px 8px rgba(0, 0, 0, .45); }
.wbtn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; padding: 0; border: 0; background: rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: #fff; cursor: pointer; }
.wbtn[disabled] { opacity: .3; cursor: default; }
.wbtn--next .ic { transform: rotate(180deg); }
.wpause { width: 44px; height: 44px; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .45)); }
.wpause .ic { width: 20px; height: 20px; }
.wnav { position: absolute; z-index: 3; left: 10px; right: 10px; top: 36%; display: flex; justify-content: space-between; pointer-events: none; margin-top: -24px; }
.wnav .wbtn { pointer-events: auto; }
.wbottom { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 0 22px calc(24px + var(--safe-b)); display: grid; gap: 18px; }
.wcap { display: grid; gap: 6px; }
.wcap__mode { font: 700 12px/1 var(--font-ui); letter-spacing: .16em; color: #f5c84c; }
.wcap__title { font: 600 clamp(34px, 9.5vw, 46px)/1.02 var(--font-display); letter-spacing: -.03em; text-shadow: 0 2px 24px rgba(0, 0, 0, .4); }
.wcap__sub { font-size: 16px; opacity: .92; }
.wcta { display: grid; gap: 10px; }
.wcta[hidden] { display: none; }
.wcta:not([hidden]) { animation: wcta .6s ease both; }
@keyframes wcta { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wcta a { min-height: 52px; border-radius: 999px; display: grid; place-items: center; text-decoration: none; font: 700 16px var(--font-ui); cursor: pointer; }
.wcta__main { background: #e5b331; color: #15130c; box-shadow: 0 12px 30px -10px rgba(229, 179, 49, .6); }
.wcta__alt { background: rgba(255, 255, 255, .2); color: #fff; -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .3); }
.wcta a.wcta__demo { min-height: 44px; font-weight: 600; font-size: 14px; color: rgba(255, 255, 255, .9); }
@media (prefers-reduced-motion: reduce) {
  .wslide { transition: none; }
  .wslide__img, .wslide.on .wslide__img { transition: none; transform: none; }
  .wcta:not([hidden]) { animation: none; }
}
@media (max-height: 600px) { .wcap__sub { display: none; } }

/* the full-bleed Discover card fades in (a slide would shift the photo off the screen edge) */
#discover.show { animation-name: fade; }


/* Welcome opening: the animated V2 logo on a plain theme background for about 3 s, then the slideshow. */
.wopen { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--bg); color: var(--fg); transition: opacity .5s ease .18s, visibility 0s linear .68s; }   /* background dissolves into the portrait only AFTER the content has gone */
.wopen > *, .wopen__logo img, .wopen__logo svg { transition: opacity .18s ease; }   /* the <picture> wrapper is display:contents, so the image itself must fade */
.wopen__logo img, .wopen__logo svg { display: block; width: min(52vw, 190px); height: auto; }
.wopen__tag { font: 600 26px/1.1 var(--font-display); letter-spacing: -.02em; }
.wopen__go { min-height: 44px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--fg); color: var(--bg); font: 650 15px var(--font-ui); cursor: pointer; }
.welcome[data-open=false] .wopen > *, .welcome[data-open=false] .wopen__logo img, .welcome[data-open=false] .wopen__logo svg { opacity: 0; }   /* logo, tagline and Continue vanish first (0.18 s): nothing ghosts over the face */
.welcome[data-open=false] .wopen { opacity: 0; visibility: hidden; pointer-events: none; }
.welcome[data-open=true] .wprog, .welcome[data-open=true] .wtop__row > :not(.wskip), .welcome[data-open=true] .wtop__label, .welcome[data-open=true] .wnav, .welcome[data-open=true] .wbottom { visibility: hidden; }
.welcome[data-open=true] .wskip { color: var(--fg); text-shadow: none; }
.welcome[data-open=true] :focus-visible { outline-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .wopen, .wopen > *, .wopen__logo img, .wopen__logo svg { transition: none; } }

/* narrow phones: the longer AI-generated label and the age filter would collide, so the age pill sits on a second row under it */
@media (max-width: 379.98px) { #discover .age-filter { right: auto; left: 16px; top: calc(var(--top-h) + var(--safe-t) + 61px); } }

/* toasts must clear the second-row age pill on narrow phones; slide arrows must clear the caption on short screens */
@media (max-width: 379.98px) { body[data-view=discover] .toasts { top: calc(var(--top-h) + var(--safe-t) + 112px); } }
@media (max-height: 560px) { .wnav { top: calc(128px + var(--safe-t)); margin-top: 0; } }

/* Portraits: Friendship/Social previews use an original AI-generated portrait as the background (faces stay clear: content sits low and short). */
.mode-photo { position: absolute; inset: 0; overflow: hidden; border-radius: var(--card-r); background: #000; color: #fff; isolation: isolate; --muted: rgba(255, 255, 255, .85); --fg: #fff; --ring: #fff; }
.mode-photo__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; z-index: -2; }
.mode-photo__scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(0, 0, 0, .45), transparent 24%, transparent 52%, rgba(0, 0, 0, .62) 68%, rgba(0, 0, 0, .88)); pointer-events: none; }
.mode-photo .mode-panel { position: relative; height: 100%; }
.mode-photo .mode-panel__features, .mode-photo .mode-panel__intro, .mode-photo .small.muted { display: none; }
.mode-photo .mode-panel__eyebrow { color: #f5c84c; }
.mode-photo .mode-panel__title { max-width: 16ch; text-shadow: 0 2px 24px rgba(0, 0, 0, .4); }
.mode-photo .btn { background: rgba(255, 255, 255, .2); color: #fff; border: 0; -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .3); }
.mode-photo .btn--accent { background: #e5b331; color: #15130c; box-shadow: none; }
.mode-photo__tag { position: absolute; z-index: 2; top: 16px; left: 16px; isolation: isolate; min-height: 44px; padding: 0 14px 0 12px; background: none; border: 0; color: #fff; font-size: 12px; font-weight: 600; }
.mode-photo__tag::before { content: ""; position: absolute; z-index: -1; inset: 7px 0; border-radius: 999px; background: rgba(20, 20, 22, .4); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
@media (max-width: 719.98px) { .mode-photo__tag { top: calc(var(--top-h) + var(--safe-t) + 17px); } #discover .mode-photo .mode-panel { padding-top: calc(var(--top-h) + var(--safe-t) + 70px); } }
/* the viewer's caption sticker sits below the face of the original portrait */
.vw--portrait .vw__sticker { top: 69%; }

/* content sits at the bottom, below the faces; phones are edge to edge (square corners) */
.mode-photo .mode-panel { justify-content: flex-end; }
.mode-photo .mode-panel > :first-child, .mode-photo .mode-panel > :last-child { margin: 0; }
@media (max-width: 719.98px) { .mode-photo { border-radius: 0; } #discover .mode-photo .mode-panel { padding-top: 0; padding-bottom: calc(var(--dock-h) + var(--safe-b) + 40px); } }

/* short phones: tighter control stack so the name block stays below the face */
@media (max-width: 719.98px) and (max-height: 700px) {
  #discover .deck__actions--simple { bottom: calc(var(--dock-h) + 20px + var(--safe-b)); }
  #discover .discover-cta { width: 56px; height: 56px; min-height: 56px; }
  #discover .discover-cta--connect { width: 68px; height: 68px; min-height: 68px; }
  #discover .card__info { bottom: calc(var(--dock-h) + 20px + 68px + 12px + var(--safe-b)); }
  .mode-photo .mode-panel__eyebrow, .mode-photo .mode-panel__actions .btn:not(.btn--accent) { display: none; }   /* keep the face clear: title + one button */
}

/* Desktop/tablet Discover: lift the card text clear of the round Next/Connect buttons (info bottom 80px overlapped their 14px + 76px stack). Phones keep their own offsets above. */
@media (min-width: 720px) { #discover .card__info { bottom: 112px; } }

/* ---------- Authentication forms (rendered only when the server enables registration; default build shows the preview card) ---------- */
.account__form { display: grid; gap: 14px; }
.afield { display: grid; gap: 6px; }
.afield label { font: 600 14px var(--font-ui); }
.afield__input { min-height: 50px; width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; background: var(--bg); color: var(--fg); font: 400 16px var(--font-ui); }
.afield__input:focus-visible, .afield__toggle:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.afield__hint { font: 400 12px/1.5 var(--font-ui); color: var(--muted); }
.afield__row { display: flex; gap: 8px; }
.afield__row .afield__input { flex: 1; min-width: 0; }
.afield__toggle { min-height: 50px; min-width: 64px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--fg); font: 600 13px var(--font-ui); cursor: pointer; }
.acheck { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; font: 400 14px/1.45 var(--font-ui); cursor: pointer; }
.acheck input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--accent); }
.account__msg { min-height: 20px; font: 500 14px/1.45 var(--font-ui); color: var(--muted); }
.account__msg.is-error { color: light-dark(#b3261e, #ff8a80); }
.account__msg.is-ok { color: var(--fg); }
.account__links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.account__link { display: inline-flex; align-items: center; min-height: 44px; color: var(--fg); font: 650 13px var(--font-ui); text-decoration: underline; text-underline-offset: 4px; }
.account__provider[aria-disabled=true] { opacity: .72; }
.account__email { text-decoration: none; }
.account__turnstile { min-height: 65px; }

/* ---------- Animated V2 logo (inline SVG): the ORIGINAL hugging movement, on EVERY Huntuva logo (navigation, sidebar, welcome, sign-in) ----------
   Measured from the 9 frames of the founder-approved huntuva-logo.gif (0.18 s each): every GIF frame was registered against the V2 artwork (whole figures,
   translate + rotate; the V2 pose equals GIF frame 5 of 9). One direction = a short hold apart, the original sequence (figures come together into the hug,
   sway as in frames 6-9, settle into the exact V2 pose), then a hold in the hug. The loop plays that path forward and then the SAME path in reverse
   (animation-direction: alternate), so every turning point is a hold and nothing ever jumps. The heart only follows its measured vertical settle. All logos
   share one phase (--hv-phase, set in app.js). No pulse, scale, spin, bounce or fade. Reduced motion: no animation, the static V2 logo is shown.
   Limits: arms/legs change SHAPE in the GIF and its small spark marks are extra drawings; rigid V2 pieces cannot reproduce them, so they are not invented. */
.hv-blue, .hv-yellow, .hv-heart { transform-box: view-box; animation-duration: 3.12s; animation-iteration-count: infinite; animation-direction: alternate; animation-timing-function: linear; animation-fill-mode: none; animation-delay: var(--hv-phase, 0s); }
.hv-blue   { transform-origin: 168.9px 203.1px; animation-name: hv-hug-blue; }
.hv-yellow { transform-origin: 265.8px 229.9px; animation-name: hv-hug-yellow; }
.hv-heart  { animation-name: hv-heart-settle; }
@keyframes hv-hug-blue {
  0%, 9.62% { transform: translate(-11.1px, -4px) rotate(2.6deg); }
  15.38% { transform: translate(-9.1px, -0.1px) rotate(3.5deg); }
  21.15% { transform: translate(-6.2px, 0.3px) rotate(4.5deg); }
  26.92% { transform: translate(-3.4px, 3.8px) rotate(1.9deg); }
  32.69% { transform: translate(0px, 0px) rotate(0.2deg); }
  38.46% { transform: translate(1.3px, 0.7px) rotate(0deg); }
  44.23% { transform: translate(-4.1px, 0.8px) rotate(2.7deg); }
  50% { transform: translate(-1.8px, 1.5px) rotate(1.7deg); }
  55.77% { transform: translate(0.2px, 1.9px) rotate(1.7deg); }
  61.54%, 100% { transform: translate(0px, 0px) rotate(0deg); }
}
@keyframes hv-hug-yellow {
  0%, 9.62% { transform: translate(17.6px, 0px) rotate(-1.5deg); }
  15.38% { transform: translate(15.1px, -1.3px) rotate(-2.7deg); }
  21.15% { transform: translate(13px, -1px) rotate(-2.3deg); }
  26.92% { transform: translate(2.1px, 0.6px) rotate(0deg); }
  32.69% { transform: translate(0px, -0.1px) rotate(-0.1deg); }
  38.46% { transform: translate(-9px, 2.6px) rotate(1.5deg); }
  44.23% { transform: translate(-2.6px, 3.2px) rotate(-0.3deg); }
  50% { transform: translate(2.9px, 3.3px) rotate(-0.6deg); }
  55.77% { transform: translate(5.9px, 4.5px) rotate(-0.3deg); }
  61.54%, 100% { transform: translate(0px, 0px) rotate(0deg); }
}
@keyframes hv-heart-settle {
  0%, 9.62% { transform: translate(0px, -2.7px); }
  15.38% { transform: translate(0px, -2.6px); }
  21.15% { transform: translate(0px, -3px); }
  26.92% { transform: translate(0px, -1.4px); }
  32.69% { transform: translate(0px, 0px); }
  38.46% { transform: translate(0px, 0px); }
  44.23% { transform: translate(0px, -0.4px); }
  50% { transform: translate(0px, -0.4px); }
  55.77% { transform: translate(0px, -0.3px); }
  61.54%, 100% { transform: translate(0px, 0px); }
}
@media (prefers-reduced-motion: reduce) { .hv-blue, .hv-yellow, .hv-heart { animation: none !important; } }
