:root {
  color-scheme: light;
  --bg: #fff7f3;
  --surface: #ffffff;
  --surface-2: #fff0ea;
  --ink: #241a19;
  --muted: #7d716e;
  --accent: #ff665a;
  --accent-2: #ff665a;
  --accent-soft: #ffe1dc;
  --nav: rgba(255,255,255,.86);
  --line: rgba(36,26,25,.09);
  --shadow: 0 10px 28px rgba(38,27,24,.12);
  --radius: 20px;
  --font: "DM Sans", sans-serif;
  --display: "DM Sans", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: #ece9e5; }
body { font-family: var(--font); color: var(--ink); overscroll-behavior: none; }
button, input, textarea { font: inherit; }
button { color: inherit; }

#app {
  position: relative;
  width: min(100%, 480px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 0 80px rgba(30,20,20,.12);
}

.market-th { --bg:#fffaf3; --surface-2:#f5eff8; --ink:#2c2730; --muted:#756e78; --accent:#7c3b86; --accent-2:#7c3b86; --accent-soft:#eee2f1; --font:"Noto Sans Thai",sans-serif; --display:"Noto Sans Thai",sans-serif; }
.market-tr { --bg:#faf7f2; --surface-2:#f4ece9; --ink:#272221; --muted:#756b68; --accent:#a3263d; --accent-2:#a3263d; --accent-soft:#f2dfe3; --font:"Manrope",sans-serif; --display:"Noto Serif",serif; }
.market-en { --bg:#faf7f2; --surface-2:#f4ece9; --ink:#272221; --muted:#756b68; --accent:#a3263d; --accent-2:#a3263d; --accent-soft:#f2dfe3; --font:"DM Sans",sans-serif; --display:"Noto Serif",serif; }
.market-ru { --bg:#faf7f2; --surface-2:#f4ece9; --ink:#272221; --muted:#756b68; --accent:#a3263d; --accent-2:#a3263d; --accent-soft:#f2dfe3; --font:"Manrope",sans-serif; --display:"Noto Serif",serif; }
.market-zh { --bg:#fff7f3; --surface-2:#fff0ea; --ink:#241a19; --muted:#7d716e; --accent:#ff665a; --accent-2:#ff665a; --accent-soft:#ffe1dc; --font:"PingFang SC","Microsoft YaHei",sans-serif; --display:"PingFang SC","Microsoft YaHei",sans-serif; }
.market-ko { --bg:#f8f8fa; --surface-2:#efeff5; --ink:#222228; --muted:#74747e; --accent:#5546c9; --accent-2:#5546c9; --accent-soft:#e9e7f8; --font:"Noto Sans KR",sans-serif; --display:"Noto Sans KR",sans-serif; }
.market-ar { --bg:#fbf8f1; --surface-2:#f4eee2; --ink:#28231d; --muted:#756d62; --accent:#187b55; --accent-2:#b58a38; --accent-soft:#e1f0e9; --font:"Noto Sans Arabic",sans-serif; --display:"Noto Sans Arabic",sans-serif; }
.market-pt { --bg:#f6fbf4; --surface-2:#eaf4e5; --ink:#1f2b22; --muted:#68746a; --accent:#16834f; --accent-2:#d29c25; --accent-soft:#dff1e5; --font:"DM Sans",sans-serif; --display:"DM Sans",sans-serif; }
.market-id { --bg:#fff8f7; --surface-2:#fbeae8; --ink:#2d2221; --muted:#796b69; --accent:#d84848; --accent-2:#d84848; --accent-soft:#f8dedd; --font:"DM Sans",sans-serif; --display:"DM Sans",sans-serif; }
.market-es { --bg:#f5faff; --surface-2:#e7f2fb; --ink:#202a34; --muted:#687480; --accent:#3e8ec4; --accent-2:#d3a444; --accent-soft:#dceefa; --font:"DM Sans",sans-serif; --display:"Noto Serif",serif; }
.market-ja { --bg:#fff9f8; --surface-2:#f8eceb; --ink:#2a2324; --muted:#776c6e; --accent:#c64e62; --accent-2:#8f6674; --accent-soft:#f5dfe3; --font:"Noto Sans JP","Hiragino Kaku Gothic ProN",sans-serif; --display:"Noto Sans JP","Hiragino Kaku Gothic ProN",sans-serif; }

.region-europe-west { --bg:#f5f4f1; --surface-2:#e9efed; --ink:#202629; --muted:#687275; --accent:#315f68; --accent-2:#a55e49; --accent-soft:#dfeceb; --radius:18px; --shadow:0 10px 26px rgba(32,49,52,.12); --font:"DM Sans",sans-serif; --display:"DM Sans",sans-serif; }
.region-europe-east { --bg:#fbf6f0; --surface-2:#f3e8df; --ink:#2c2026; --muted:#7b6b70; --accent:#7b2948; --accent-2:#b78b43; --accent-soft:#f1dfe6; --radius:24px; --shadow:0 14px 34px rgba(76,38,52,.15); --font:"DM Sans",sans-serif; --display:"Noto Serif",serif; }
.region-europe-north { --bg:#f5f8fa; --surface-2:#eaf0f3; --ink:#1f2c31; --muted:#6b7b81; --accent:#416f7d; --accent-2:#7896a0; --accent-soft:#e0ebee; --radius:14px; --shadow:0 8px 22px rgba(39,61,69,.09); --font:"DM Sans",sans-serif; --display:"DM Sans",sans-serif; }
.region-europe-west .brand-mark { border-radius:10px; }
.region-europe-east .brand-mark { background:linear-gradient(145deg,var(--accent),#a14d68); box-shadow:0 8px 18px rgba(123,41,72,.2); }
.region-europe-east .page-title { letter-spacing:-.45px; }
.region-europe-north .brand-mark { border:1px solid var(--line); border-radius:8px; color:var(--accent); background:var(--surface); }
.region-europe-north .page-title { font-weight:600; letter-spacing:-.35px; }
.region-europe-north .profile-card,
.region-europe-north .mini-card,
.region-europe-north .profile-hero { box-shadow:var(--shadow); }
.region-europe-north .action { box-shadow:none; }
.region-europe-north .bottom-nav { background:rgba(250,252,253,.97); }

html[dir="rtl"] .page,
html[dir="rtl"] .card-copy,
html[dir="rtl"] .preview-card,
html[dir="rtl"] .preview-message,
html[dir="rtl"] .sheet { text-align:right; }
html[dir="rtl"] .chat-row,
html[dir="rtl"] .setting b,
html[dir="rtl"] .market-option { text-align:right; }
html[dir="rtl"] .check { margin-left:0; margin-right:auto; }
html[dir="rtl"] .unread { margin-left:0; margin-right:auto; }
html[dir="rtl"] .auth-close { left:14px; right:auto; }
html[dir="rtl"] .preview-badge { left:auto; right:14px; }
html[dir="rtl"] .chat-head .icon-btn svg,
html[dir="rtl"] .send-btn svg { transform:scaleX(-1); }
html[dir="rtl"] .message-form input { text-align:right; }
html[dir="rtl"] .bubble { border-radius:18px 18px 5px 18px; }
html[dir="rtl"] .bubble.mine { border-radius:18px 18px 18px 5px; }

.match-intro { position:fixed; z-index:200; top:0; bottom:0; left:50%; width:min(100%,480px); padding:max(20px,env(safe-area-inset-top)) 22px calc(22px + env(safe-area-inset-bottom)); overflow:hidden; color:var(--ink); background:linear-gradient(160deg,color-mix(in srgb,var(--accent-soft) 58%,#fff) 0%,var(--bg) 52%,color-mix(in srgb,var(--accent-soft) 35%,#fff) 100%); transform:translateX(-50%); }
.match-intro.is-leaving { animation:introLeave .36s ease forwards; pointer-events:none; }
@keyframes introLeave { to { opacity:0; transform:translateX(-50%) scale(1.025); } }
.intro-glow { position:absolute; border-radius:50%; filter:blur(3px); opacity:.58; pointer-events:none; }
.intro-glow-one { width:260px; height:260px; top:-120px; right:-100px; background:radial-gradient(circle,var(--accent-soft),transparent 70%); }
.intro-glow-two { width:300px; height:300px; bottom:-170px; left:-150px; background:radial-gradient(circle,var(--accent-soft),transparent 70%); }
.intro-brand { position:relative; z-index:2; display:flex; align-items:center; gap:9px; min-height:38px; font-family:var(--display); font-size:20px; }
.intro-brand .brand-mark { display:grid; }
.intro-brand .brand-mark svg { width:18px; }
.intro-content { position:relative; z-index:2; height:calc(100% - 38px); display:flex; flex-direction:column; align-items:center; padding-top:clamp(24px,6vh,54px); text-align:center; }
.intro-eyebrow { margin:0 0 8px; color:var(--accent); font-size:11px; font-weight:800; letter-spacing:.12em; }
.intro-content h1 { width:100%; max-width:350px; min-height:76px; margin:0; font-family:var(--display); font-size:clamp(27px,7vw,33px); line-height:1.14; letter-spacing:-.8px; display:flex; align-items:center; justify-content:center; }
.intro-note { margin:8px 0 0; color:var(--muted); font-size:12px; }
.match-orbit { position:relative; width:270px; height:270px; flex:none; margin:18px auto 12px; }
.intro-radar, .intro-radar i { position:absolute; inset:50%; border:1px solid color-mix(in srgb,var(--accent) 24%,transparent); border-radius:50%; transform:translate(-50%,-50%); transition:.55s ease; }
.intro-radar i:nth-child(1) { width:104px; height:104px; animation:radarPulse 2.1s ease-out infinite; }
.intro-radar i:nth-child(2) { width:170px; height:170px; animation:radarPulse 2.1s .7s ease-out infinite; }
.intro-radar i:nth-child(3) { width:238px; height:238px; animation:radarPulse 2.1s 1.4s ease-out infinite; }
@keyframes radarPulse { 0% { opacity:.18; transform:translate(-50%,-50%) scale(.86); } 55% { opacity:.8; } 100% { opacity:.12; transform:translate(-50%,-50%) scale(1.05); } }
.intro-core { position:absolute; z-index:3; top:50%; left:50%; width:72px; height:72px; border:7px solid color-mix(in srgb,var(--surface) 88%,transparent); border-radius:50%; display:grid; place-items:center; color:#fff; background:var(--accent); box-shadow:0 14px 34px color-mix(in srgb,var(--accent) 34%,transparent); transform:translate(-50%,-50%); transition:.45s cubic-bezier(.2,.9,.3,1); }
.intro-core span { font-size:27px; line-height:1; }
.intro-avatar-track { position:absolute; z-index:4; inset:0; transform:rotate(var(--intro-angle)); animation:introOrbitTrack 7.2s linear infinite; transition:left .62s cubic-bezier(.2,.9,.3,1),top .62s cubic-bezier(.2,.9,.3,1),transform .62s cubic-bezier(.2,.9,.3,1),opacity .32s; }
.intro-avatar { position:absolute; left:50%; top:31px; width:50px; height:50px; border:3px solid var(--surface); border-radius:50%; background:var(--media) center var(--media-focus-y,20%)/cover no-repeat; box-shadow:0 10px 24px rgba(45,24,25,.16); transform:translate(-50%,-50%) rotate(var(--intro-counter-angle)); animation:introOrbitFace 7.2s linear infinite; }
@keyframes introOrbitTrack { from { transform:rotate(var(--intro-angle)); } to { transform:rotate(calc(var(--intro-angle) + 360deg)); } }
@keyframes introOrbitFace { from { transform:translate(-50%,-50%) rotate(var(--intro-counter-angle)); } to { transform:translate(-50%,-50%) rotate(calc(var(--intro-counter-angle) - 360deg)); } }
.intro-status-row { width:100%; max-width:350px; min-height:21px; display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--muted); font-size:12px; text-align:left; }
.intro-status-row span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.intro-status-row b { flex:none; color:var(--accent); font-size:12px; }
.intro-progress { width:100%; max-width:350px; height:8px; margin-top:9px; overflow:hidden; border-radius:99px; background:color-mix(in srgb,var(--accent-soft) 76%,var(--surface)); }
.intro-progress i { display:block; width:8%; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--accent),color-mix(in srgb,var(--accent) 68%,#ffcf73)); box-shadow:0 0 18px color-mix(in srgb,var(--accent) 42%,transparent); transition:width .9s cubic-bezier(.2,.8,.2,1); }
.intro-cta { width:100%; max-width:350px; min-height:54px; margin-top:18px; border:0; border-radius:18px; color:#fff; background:var(--accent); box-shadow:0 12px 28px color-mix(in srgb,var(--accent) 28%,transparent); font-weight:800; opacity:0; transform:translateY(12px); pointer-events:none; transition:.32s ease; cursor:pointer; }
.match-intro.is-complete .intro-radar { opacity:0; }
.match-intro.is-complete .intro-core { opacity:0; transform:translate(-50%,-50%) scale(.7); }
.match-intro.is-complete .intro-avatar-track { inset:auto; left:50%; top:50%; width:58px; height:58px; animation:none; opacity:0; transform:translate(-50%,-50%) scale(.72); transition:none; }
.match-intro.is-complete .intro-avatar-track .intro-avatar { inset:0; width:100%; height:100%; animation:none; transform:none; }
.match-intro.is-complete .intro-avatar-track.is-selected { left:calc(50% + var(--intro-final-x)); top:calc(50% + var(--intro-final-y)); width:58px; height:58px; animation:introGridIn .48s calc(var(--intro-order) * 28ms) cubic-bezier(.2,.9,.3,1) both,introFloat 2.8s calc(.55s + var(--intro-order) * 90ms) ease-in-out infinite; }
@keyframes introGridIn {
  from { opacity:0; transform:translate(-50%,-50%) scale(.58); }
  to { opacity:1; transform:translate(-50%,-50%) scale(1); }
}
@keyframes introFloat {
  0%,100% { opacity:1; transform:translate(-50%,-50%) translateY(-3px) scale(1); }
  50% { opacity:1; transform:translate(-50%,-50%) translateY(3px) scale(1); }
}
.match-intro.is-complete .intro-cta { opacity:1; transform:translateY(0); pointer-events:auto; }
.match-intro.is-complete .intro-cta:active { transform:scale(.97); }
html[dir="rtl"] .intro-status-row { text-align:right; }
@media (prefers-reduced-motion:reduce) {
  .match-intro:not(.is-complete) .intro-avatar-track { animation:introOrbitTrack 7.2s linear infinite!important; }
  .match-intro:not(.is-complete) .intro-avatar { animation:introOrbitFace 7.2s linear infinite!important; }
  .match-intro.is-complete .intro-avatar-track { animation:none!important; }
  .match-intro.is-complete .intro-avatar-track.is-selected { animation:introGridIn .48s calc(var(--intro-order) * 28ms) cubic-bezier(.2,.9,.3,1) both,introFloat 2.8s calc(.55s + var(--intro-order) * 90ms) ease-in-out infinite!important; }
}

.app-shell { min-height: 100dvh; padding: max(12px, env(safe-area-inset-top)) 16px calc(88px + env(safe-area-inset-bottom)); background:var(--bg); }
.topbar { display:flex; align-items:center; justify-content:space-between; height:52px; position:relative; z-index:10; }
.brand { display:flex; align-items:center; gap:9px; font-family:var(--display); font-weight:700; font-size:21px; letter-spacing:-.5px; }
.brand-mark { width:30px; height:30px; border-radius:50%; display:grid; place-items:center; color:#fff; background:var(--accent); }
.brand-mark svg { width:18px; }
.icon-btn, .avatar-btn { width:42px; height:42px; border:1px solid var(--line); border-radius:50%; background:color-mix(in srgb,var(--surface) 86%,transparent); display:grid; place-items:center; box-shadow:0 8px 24px rgba(30,20,20,.06); cursor:pointer; }
.icon-btn svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.market-pill { border:1px solid var(--line); background:var(--surface); border-radius:12px; height:38px; padding:0 10px; display:flex; align-items:center; gap:7px; font-weight:700; cursor:pointer; }

.page { display:none; animation:fadeIn .28s ease; }
.page.active { display:block; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px) } }
.eyebrow { margin:14px 0 4px; color:var(--accent); font-weight:700; font-size:12px; letter-spacing:.08em; text-transform:uppercase; }
.page-title { margin:0 0 14px; font-family:var(--display); font-size:26px; line-height:1.18; letter-spacing:-.7px; }

.card-stage { position:relative; height:clamp(330px, calc(100dvh - 360px), 520px); margin-top:8px; }
.profile-card { position:absolute; inset:0; border-radius:var(--radius); overflow:hidden; background:var(--surface); box-shadow:var(--shadow); transform-origin:50% 100%; touch-action:none; transition:transform .32s cubic-bezier(.2,.8,.2,1),opacity .24s; }
.profile-card:nth-last-child(2) { transform:scale(.96) translateY(13px); opacity:.8; }
.profile-card:nth-last-child(3) { transform:scale(.92) translateY(25px); opacity:.5; }
.profile-photo { position:absolute; inset:0; background:var(--media) center var(--media-focus-y,20%)/cover no-repeat; }
.profile-video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center 12%; background:#191315; }
.profile-media-shade { position:absolute; inset:0; pointer-events:none; background:linear-gradient(to top,rgba(15,12,12,.86) 0%,rgba(15,12,12,.08) 48%,transparent 72%); }
.photo-top { position:absolute; top:16px; left:16px; right:16px; display:flex; justify-content:space-between; align-items:center; }
.verified, .distance { height:30px; display:flex; align-items:center; gap:5px; padding:0 10px; border-radius:99px; color:#fff; background:rgba(20,15,15,.34); backdrop-filter:blur(10px); font-size:12px; font-weight:600; }
.verified { width:30px; padding:0; justify-content:center; background:#2675d8; }
.card-copy { position:absolute; left:22px; right:22px; bottom:20px; color:#fff; }
.name-line { display:flex; align-items:center; gap:8px; }
.name-line h2 { margin:0; font-family:var(--display); font-size:31px; letter-spacing:-1px; text-shadow:0 2px 12px rgba(0,0,0,.2); }
.name-line span { font-size:23px; font-weight:400; }
.profile-meta { margin:7px 0 12px; display:flex; align-items:center; gap:8px; font-size:13px; opacity:.92; }
.profile-meta i { width:4px; height:4px; border-radius:50%; background:#fff; opacity:.6; }
.bio { margin:0 0 14px; font-size:14px; line-height:1.45; max-width:95%; }
.tags { display:flex; gap:7px; flex-wrap:wrap; }
.tag { padding:7px 10px; border:1px solid rgba(255,255,255,.35); border-radius:99px; font-size:11px; font-weight:600; background:rgba(20,15,15,.18); backdrop-filter:blur(8px); }
.stamp { position:absolute; top:86px; padding:8px 14px; border:3px solid; border-radius:10px; font-size:26px; font-weight:800; opacity:0; transform:rotate(-12deg); }
.stamp.like { left:20px; color:#71f2be; }
.stamp.nope { right:20px; color:#ff8a84; transform:rotate(12deg); }

.actions { display:flex; align-items:center; justify-content:center; gap:14px; margin-top:18px; }
.action { width:54px; height:54px; border:1px solid var(--line); border-radius:50%; background:var(--surface); display:grid; place-items:center; box-shadow:0 5px 14px rgba(45,30,30,.08); cursor:pointer; transition:.18s ease; }
.action:active { transform:scale(.9); }
.action.primary { width:62px; height:62px; color:#fff; background:var(--accent); border-color:var(--accent); box-shadow:none; }
.action.pass { color:#8e8792; }
.action.star { color:var(--accent-2); }
.action svg { width:25px; fill:none; stroke:currentColor; stroke-width:2.2; }

.trust-card { max-width:380px; min-height:52px; margin:11px auto 0; padding:8px 11px; display:flex; align-items:center; gap:10px; border:1px solid color-mix(in srgb,var(--accent) 14%,var(--line)); border-radius:15px; background:color-mix(in srgb,var(--accent-soft) 58%,var(--surface)); box-shadow:0 5px 16px color-mix(in srgb,var(--accent) 7%,transparent); }
.trust-icon { width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; border-radius:11px; color:var(--accent); background:var(--surface); }
.trust-icon svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.trust-copy { min-width:0; display:flex; flex-direction:column; gap:2px; line-height:1.25; }
.trust-copy strong { font-size:11px; }
.trust-copy small { color:var(--muted); font-size:9px; }
.region-europe-east .trust-card { border-radius:18px; background:linear-gradient(135deg,color-mix(in srgb,var(--accent-soft) 74%,var(--surface)),var(--surface)); }
.region-europe-east .trust-icon { border-radius:50%; color:var(--accent-2); }
.region-europe-north .trust-card { border-radius:10px; box-shadow:none; background:var(--surface); }
.region-europe-north .trust-icon { border:1px solid var(--line); border-radius:7px; background:var(--bg); }
.region-europe-west .card-stage,
.region-europe-east .card-stage,
.region-europe-north .card-stage { height:clamp(270px,calc(100dvh - 435px),480px); }
.region-europe-west .actions,
.region-europe-east .actions,
.region-europe-north .actions { margin-top:12px; }

.bottom-nav { position:fixed; z-index:30; left:50%; bottom:0; width:min(100%,480px); height:calc(70px + env(safe-area-inset-bottom)); padding:7px 12px env(safe-area-inset-bottom); display:grid; grid-template-columns:repeat(4,1fr); border-top:1px solid var(--line); background:rgba(255,255,255,.96); transform:translateX(-50%); }
.nav-item { position:relative; border:0; background:transparent; color:var(--muted); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; font-size:10px; font-weight:600; cursor:pointer; }
.nav-item svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2; }
.nav-item.active { color:var(--accent); }
.nav-item.active::before { content:""; position:absolute; top:-7px; width:28px; height:3px; border-radius:0 0 3px 3px; background:var(--accent); }

.likes-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.mini-card { position:relative; aspect-ratio:.78; overflow:hidden; border-radius:24px; background:var(--surface); box-shadow:0 12px 30px rgba(35,20,20,.1); cursor:pointer; }
.mini-photo, .chat-avatar { background:var(--media) center var(--media-focus-y,20%)/cover no-repeat; }
.mini-card .mini-photo { position:absolute; inset:0; }
.mini-card::after { content:""; position:absolute; inset:45% 0 0; background:linear-gradient(transparent,rgba(20,10,10,.82)); }
.mini-copy { position:absolute; z-index:2; left:14px; right:12px; bottom:12px; color:white; }
.mini-copy b { display:block; font-size:17px; }
.mini-copy span { font-size:11px; opacity:.8; }

.story-row { display:flex; gap:14px; overflow:auto; margin:0 -18px 18px; padding:2px 18px 8px; scrollbar-width:none; }
.story { flex:0 0 60px; text-align:center; font-size:10px; color:var(--muted); }
.story .chat-avatar { width:56px; height:56px; border-radius:50%; border:3px solid var(--bg); outline:2px solid var(--accent); margin-bottom:5px; }
.chat-list { display:flex; flex-direction:column; gap:8px; }
.chat-row { width:100%; padding:12px; border:0; border-radius:20px; background:transparent; display:grid; grid-template-columns:54px 1fr auto; align-items:center; gap:12px; text-align:left; cursor:pointer; }
.chat-row:active { background:var(--surface-2); }
.chat-avatar { width:54px; height:54px; border-radius:18px; }
.chat-main { min-width:0; }
.chat-main b { display:block; margin-bottom:3px; }
.chat-main span { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; color:var(--muted); font-size:12px; }
.chat-time { color:var(--muted); font-size:10px; }
.unread { width:9px; height:9px; border-radius:50%; background:var(--accent); margin:6px 0 0 auto; }

.profile-hero { padding:28px 20px 22px; border-radius:32px; background:var(--surface); text-align:center; box-shadow:0 18px 42px rgba(40,30,30,.08); }
.profile-avatar { width:112px; height:112px; margin:0 auto 16px; border-radius:50%; overflow:hidden; border:4px solid var(--bg); outline:1px solid var(--line); background:var(--accent-soft); }
.avatar-illustration { display:block; width:100%; height:100%; }
.avatar-bg { fill:var(--accent-soft); }
.avatar-body, .avatar-heart { fill:var(--accent); }
.avatar-hair, .avatar-hair-fringe { fill:#312727; }
.avatar-face, .avatar-ear, .avatar-hand { fill:#f4c7a8; }
.avatar-blush { fill:#ef8e91; opacity:.62; }
.avatar-eyes path, .avatar-smile { fill:none; stroke:#312727; stroke-width:3; stroke-linecap:round; }
.avatar-arm { fill:none; stroke:var(--accent); stroke-width:9; stroke-linecap:round; }
.avatar-bob { transform-origin:60px 73px; animation:avatarBob 2.8s ease-in-out infinite; }
.avatar-eyes { transform-origin:60px 51px; animation:avatarBlink 4.4s ease-in-out infinite; }
.avatar-wave { transform-origin:90px 91px; animation:avatarWave 1.8s ease-in-out infinite; }
.avatar-heart { transform-origin:101px 28px; animation:avatarHeart 1.6s ease-in-out infinite; }
.guest-profile { padding:32px 24px 30px; }
.guest-gate { margin-top:4px; min-height:270px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.guest-action { width:100%; min-height:50px; margin-top:20px; border:0; border-radius:16px; color:#fff; background:var(--accent); font-weight:700; cursor:pointer; }
.guest-profile h2 { font-size:21px; }
.guest-profile p { max-width:250px; margin:8px auto 0; line-height:1.55; }
@keyframes avatarBob { 0%,100% { transform:translateY(0) rotate(-1deg); } 50% { transform:translateY(-3px) rotate(1deg); } }
@keyframes avatarBlink { 0%,43%,47%,100% { transform:scaleY(1); } 45% { transform:scaleY(.08); } }
@keyframes avatarWave { 0%,100% { transform:rotate(-7deg); } 50% { transform:rotate(9deg); } }
@keyframes avatarHeart { 0%,100% { transform:scale(1); } 50% { transform:scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .avatar-bob, .avatar-eyes, .avatar-wave, .avatar-heart { animation:none; } }
.profile-hero h2 { margin:0; font-family:var(--display); }
.profile-hero p { margin:6px 0 15px; color:var(--muted); font-size:13px; }
.completion { height:8px; border-radius:99px; background:var(--surface-2); overflow:hidden; }
.completion i { display:block; width:78%; height:100%; border-radius:inherit; background:var(--accent); }
.settings-list { margin-top:14px; display:flex; flex-direction:column; gap:8px; }
.setting { padding:15px 16px; display:flex; align-items:center; gap:12px; border-radius:18px; background:var(--surface); }
.setting .setting-icon { width:36px; height:36px; border-radius:12px; display:grid; place-items:center; background:var(--accent-soft); color:var(--accent); }
.setting b { flex:1; font-size:14px; text-align:left; }
.setting span { width:28px; height:28px; display:grid; place-items:center; color:var(--ink); font-size:28px; font-weight:600; line-height:1; opacity:.58; transform:translateY(-1px); }

.sheet-backdrop, .match-modal, .chat-modal { position:absolute; z-index:80; inset:0; display:none; background:rgba(20,15,20,.5); backdrop-filter:blur(9px); }
.sheet-backdrop.open, .match-modal.open, .chat-modal.open { display:flex; }
.sheet-backdrop { align-items:flex-end; }
.sheet { width:100%; padding:12px 18px calc(26px + env(safe-area-inset-bottom)); border-radius:30px 30px 0 0; background:var(--surface); animation:sheetUp .28s ease; }
@keyframes sheetUp { from { transform:translateY(100%); } }
.handle { width:42px; height:5px; border-radius:99px; background:var(--line); margin:0 auto 18px; }
.sheet h3 { margin:0 0 4px; font-family:var(--display); font-size:22px; }
.sheet p { margin:0 0 16px; color:var(--muted); font-size:12px; }
.market-option { width:100%; padding:12px; margin:7px 0; border:1px solid var(--line); border-radius:18px; display:flex; align-items:center; gap:12px; background:var(--surface); text-align:left; cursor:pointer; }
.market-option.active { border-color:var(--accent); background:var(--accent-soft); }
.flag { width:42px; height:42px; border-radius:13px; display:grid; place-items:center; font-size:23px; background:var(--bg); }
.market-option b { display:block; }
.market-option small { color:var(--muted); }
.check { margin-left:auto; color:var(--accent); }

.match-modal { align-items:center; justify-content:center; padding:24px; text-align:center; color:var(--ink); background:rgba(20,18,20,.72); }
.match-content { width:100%; padding:30px 20px 18px; border-radius:24px; background:var(--surface); animation:pop .4s cubic-bezier(.2,1.2,.3,1); }
@keyframes pop { from { opacity:0; transform:scale(.72); } }
.match-content h2 { margin:18px 0 4px; font-family:var(--display); font-size:40px; }
.match-content p { margin:0 0 24px; opacity:.8; }
.match-faces { display:flex; justify-content:center; }
.match-face { width:104px; height:104px; border:4px solid white; border-radius:50%; background:var(--media) center var(--media-focus-y,20%)/cover no-repeat; box-shadow:0 8px 18px rgba(0,0,0,.16); }
.match-face.me { transform:rotate(-8deg) translateX(10px); }
.match-face.them { transform:rotate(8deg) translateX(-10px); }
.match-btn { width:100%; height:54px; margin:6px 0; border:0; border-radius:18px; font-weight:700; cursor:pointer; }
.match-btn.primary { color:white; background:var(--accent); }
.match-btn.ghost { color:var(--ink); background:var(--surface-2); }

.chat-modal { position:fixed; inset:auto; top:0; bottom:0; left:50%; width:min(100%,480px); height:100dvh; transform:translateX(-50%); flex-direction:column; overflow:hidden; background:var(--bg); backdrop-filter:none; }
.chat-head { height:76px; padding:max(14px,env(safe-area-inset-top)) 16px 8px; display:grid; grid-template-columns:42px 1fr 42px; align-items:center; gap:10px; background:var(--surface); }
.chat-person { text-align:center; }
.chat-person b { display:block; font-size:14px; }
.chat-person span { color:var(--accent-2); font-size:10px; }
.chat-head-spacer { width:42px; height:42px; }
.preview-scroll { flex:1; min-height:0; overflow-y:auto; padding:14px 16px 22px; overscroll-behavior:contain; }
.preview-photo { position:relative; width:100%; aspect-ratio:1; border-radius:22px; overflow:hidden; background:var(--media) center var(--media-focus-y,20%)/cover no-repeat; box-shadow:var(--shadow); }
.preview-photo::after { content:""; position:absolute; inset:0; background:linear-gradient(to top,rgba(20,14,15,.3),transparent 45%); pointer-events:none; }
.preview-badge { position:absolute; z-index:1; left:14px; bottom:14px; min-height:30px; padding:7px 10px; border-radius:99px; color:#fff; background:var(--accent); font-size:10px; font-weight:800; letter-spacing:.05em; }
.preview-card { margin-top:12px; padding:18px; border-radius:20px; background:var(--surface); }
.preview-title { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.preview-title h2 { margin:0; font-family:var(--display); font-size:23px; }
.preview-distance { flex:none; padding:6px 9px; border-radius:99px; color:var(--accent); background:var(--accent-soft); font-size:11px; font-weight:700; }
.preview-meta { margin:6px 0 12px; color:var(--muted); font-size:12px; }
.preview-bio { margin:0; font-size:14px; line-height:1.55; }
.preview-tags { display:flex; flex-wrap:wrap; gap:7px; margin-top:14px; }
.preview-tags span { padding:7px 10px; border-radius:99px; color:var(--ink); background:var(--surface-2); font-size:11px; font-weight:600; }
.preview-message { margin-top:12px; padding:16px; border-radius:20px; background:var(--surface); }
.preview-message small { display:block; margin-bottom:8px; color:var(--accent); font-size:10px; font-weight:700; }
.preview-message .bubble { max-width:100%; box-shadow:none; background:var(--surface-2); }
.preview-action { padding:10px 16px calc(10px + env(safe-area-inset-bottom)); background:var(--surface); box-shadow:0 -8px 24px rgba(30,20,20,.07); }
.preview-action button { width:100%; min-height:54px; border:0; border-radius:17px; color:#fff; background:var(--accent); font-weight:800; cursor:pointer; }
.messages { flex:1; overflow:auto; padding:22px 18px; display:flex; flex-direction:column; gap:10px; }
.bubble { max-width:78%; padding:11px 14px; border-radius:18px 18px 18px 5px; background:var(--surface); font-size:13px; line-height:1.4; box-shadow:0 6px 18px rgba(30,20,20,.05); }
.bubble.mine { align-self:flex-end; border-radius:18px 18px 5px 18px; color:white; background:var(--accent); }
.message-form { padding:10px 12px calc(10px + env(safe-area-inset-bottom)); display:flex; gap:8px; background:var(--surface); }
.message-form input { flex:1; min-width:0; height:46px; padding:0 16px; border:1px solid var(--line); border-radius:99px; outline:none; background:var(--bg); }
.send-btn { width:46px; height:46px; border:0; border-radius:50%; color:white; background:var(--accent); display:grid; place-items:center; }

.auth-modal { position:fixed; z-index:120; inset:0; left:50%; width:min(100%,480px); transform:translateX(-50%); display:none; align-items:flex-end; padding:16px; background:rgba(20,15,20,.56); backdrop-filter:blur(8px); }
.auth-modal.open { display:flex; }
.auth-sheet { position:relative; width:100%; padding:28px 20px calc(20px + env(safe-area-inset-bottom)); border-radius:26px; background:var(--surface); animation:sheetUp .28s ease; text-align:center; }
.auth-close { position:absolute; top:14px; right:14px; width:44px; height:44px; border:0; border-radius:50%; display:grid; place-items:center; background:var(--surface-2); color:var(--ink); cursor:pointer; }
.auth-close svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.auth-mark { width:58px; height:58px; margin:2px auto 14px; border-radius:18px; display:grid; place-items:center; color:var(--accent); background:var(--accent-soft); }
.auth-mark svg { width:28px; height:28px; fill:none; stroke:currentColor; stroke-width:1.8; }
.auth-sheet h2 { margin:0; font-family:var(--display); font-size:24px; }
.auth-sheet p { margin:10px auto 20px; max-width:320px; color:var(--muted); font-size:14px; line-height:1.55; }
.auth-primary { width:100%; min-height:52px; border:0; border-radius:16px; color:#fff; background:var(--accent); font-weight:800; cursor:pointer; }

.toast { position:absolute; z-index:100; left:50%; bottom:98px; max-width:82%; padding:11px 16px; border-radius:99px; color:#fff; background:rgba(25,20,24,.88); font-size:12px; font-weight:600; transform:translate(-50%,18px); opacity:0; transition:.22s; pointer-events:none; white-space:nowrap; }
.toast.show { opacity:1; transform:translate(-50%,0); }
.empty-state { padding:70px 25px; text-align:center; color:var(--muted); }

@media (min-width: 641px) {
  #app { min-height: min(900px,100dvh); }
}
@media (max-height: 720px) {
  .intro-content { padding-top:12px; }
  .intro-content h1 { min-height:64px; font-size:26px; }
  .match-orbit { width:224px; height:224px; margin:4px auto 4px; transform:scale(.84); }
  .intro-cta { margin-top:12px; }
  .card-stage { height:340px; }
  .bio { display:none; }
  .app-shell { padding-top:8px; }
  .actions { margin-top:10px; }
  .action { width:48px; height:48px; }
  .action.primary { width:58px; height:58px; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; } }
@media (prefers-reduced-motion:reduce) {
  .match-intro:not(.is-complete) .intro-avatar-track { animation:introOrbitTrack 7.2s linear infinite!important; }
  .match-intro:not(.is-complete) .intro-avatar { animation:introOrbitFace 7.2s linear infinite!important; }
  .match-intro.is-complete .intro-avatar-track.is-selected { animation:introGridIn .48s calc(var(--intro-order) * 28ms) cubic-bezier(.2,.9,.3,1) both,introFloat 2.8s calc(.55s + var(--intro-order) * 90ms) ease-in-out infinite!important; }
}
