:root {
  --surface: #ffffff;
  --surface-soft: #f3f6ff;
  --text: #172033;
  --muted: #657089;
  --brand: #1f6fdb;
  --brand-2: #0f8a5f;
  --line: rgba(24, 32, 51, 0.08);
  --shadow: 0 14px 34px rgba(17, 24, 39, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  overflow-x: hidden;
  background: #e9eef9;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
button { font: inherit; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }

.page-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(180deg, #fff9f2 0%, #f7f1e8 100%);
}
html.content-loading .page-shell { visibility: hidden; }
.compact-page { padding-bottom: 20px; }
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 4.35;
  overflow: hidden;
  border-radius: 0 0 26px 26px;
  background: #e7dcc8;
}
.language-control {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 24px);
  padding: 5px 7px 5px 9px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  background: rgba(9, 25, 30, .48);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
  color: #fff;
  backdrop-filter: blur(12px);
}
.language-control label { font-size: 10px; font-weight: 800; white-space: nowrap; }
.language-control select {
  min-width: 0;
  max-width: 260px;
  padding: 3px 22px 3px 7px;
  border: 0;
  border-radius: 999px;
  outline: 0;
  color: #172033;
  background: rgba(255, 255, 255, .94);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
}
.hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: opacity 0.22s ease, transform 0.35s ease;
}
.hero.is-changing > img { opacity: 0.3; transform: scale(1.02); }
.hero-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(to top, rgba(8, 46, 34, 0.88), rgba(8, 46, 34, 0.42) 55%, transparent);
}
.hero-copy { position: absolute; left: 16px; right: 16px; bottom: 16px; color: #fff; }
.nearby-badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 10px; padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 999px;
  background: rgba(255,255,255,.14); backdrop-filter: blur(8px);
  font-size: 10px; font-weight: 900;
}
.nearby-badge span { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.hero h1 { max-width: 330px; font-size: clamp(20px, 5.6vw, 24px); line-height: 1.12; letter-spacing: -.03em; font-weight: 950; overflow-wrap: anywhere; }
.hero p { max-width: 310px; margin-top: 8px; color: rgba(255,255,255,.84); font-size: 12px; line-height: 1.45; }
.hero-meta { margin-top: 10px; color: rgba(255,255,255,.86); font-size: 11px; font-weight: 800; }

.thumb-viewport { position: relative; z-index: 3; margin-top: -8px; padding: 0 10px; overflow: hidden; }
.thumb-track {
  display: flex; gap: 6px; width: 100%; padding: 6px 4px 8px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
}
.thumb-track::-webkit-scrollbar { display: none; }
.thumb-card {
  flex: 0 0 calc((100% - 18px) / 4); min-width: 70px; padding: 3px;
  border: 1px solid rgba(255,255,255,.92); border-radius: 14px;
  background: #fff; box-shadow: 0 8px 18px rgba(18,28,56,.10);
  opacity: .9; scroll-snap-align: center; transition: .18s ease;
}
.thumb-card.active { outline: 2px solid var(--brand); transform: translateY(-2px); box-shadow: 0 14px 28px rgba(31,111,219,.18); opacity: 1; }
.thumb-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; }

.content-stack { display: grid; gap: 8px; padding: 8px 12px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.story-card { padding: 14px; }
.eyebrow { color: #8b95ab; font-size: 10px; font-weight: 900; letter-spacing: .08em; overflow-wrap: anywhere; }
.story-card h2 { margin-top: 6px; font-size: 16px; line-height: 1.2; font-weight: 950; }
.story-card p { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.stats-card { display: grid; grid-template-columns: repeat(3, 1fr); padding: 10px 6px; }
.stats-card article { padding: 4px 2px; text-align: center; }
.stats-card strong { display: block; color: #1f3563; font-size: 18px; font-weight: 950; }
.stats-card span { display: block; margin-top: 3px; color: #8590a9; font-size: 10px; line-height: 1.35; font-weight: 800; overflow-wrap: anywhere; }
.trust-card { padding: 12px; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.trust-grid > div { padding: 10px 8px; border: 1px solid rgba(31,111,219,.08); border-radius: 12px; background: var(--surface-soft); text-align: center; }
.trust-grid strong { display: block; color: #1c2a4f; font-size: 12px; font-weight: 900; }
.trust-grid span { display: block; margin-top: 3px; color: #7a86a1; font-size: 10px; line-height: 1.35; font-weight: 700; overflow-wrap: anywhere; }

.cta-wrap { position: relative; margin-top: 10px; padding: 0 12px; }
#ctaButton {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px;
  border-radius: 16px; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 26px rgba(31,111,219,.28); color: #fff; font-size: 16px; font-weight: 900;
}
#ctaButton:active { transform: translateY(1px); }
.cta-finger {
  position: absolute; right: 18px; top: 22px; z-index: 4; width: 40px; height: 44px;
  pointer-events: none; filter: drop-shadow(0 4px 10px rgba(12,27,58,.18)); animation: finger 1s ease-in-out infinite;
}
.cta-note { margin-top: 7px; color: #8591aa; font-size: 11px; line-height: 1.4; font-weight: 700; text-align: center; }
.network-error {
  position: fixed; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); z-index: 50;
  width: max-content; max-width: calc(100% - 32px); padding: 11px 16px;
  border-radius: 8px; background: #20242c; color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 14px; line-height: 1.4;
  text-align: center; transform: translateX(-50%); opacity: 0; pointer-events: none;
  transition: opacity .18s ease;
}
.network-error.visible { opacity: 1; }
.privacy { padding: 10px 16px 0; color: #a8afbf; font-size: 10px; line-height: 1.6; text-align: center; }
@keyframes finger { 50% { transform: translateY(6px); } }

.safari-guide-overlay { position: fixed; inset: 0; z-index: 40; display: none; align-items: flex-end; justify-content: center; background: rgba(17,20,26,.7); }
.safari-guide-overlay.open { display: flex; }
.safari-guide-sheet { width: min(100%, 500px); max-height: 84vh; overflow-y: auto; padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: #fff; box-shadow: 0 -25px 70px rgba(0,0,0,.3); animation: rise .24s ease; }
.safari-guide-sheet h2 { font-size: 21px; font-weight: 950; }
.safari-guide-sheet > img { width: 100%; margin-top: 10px; border-radius: 18px; background: #eef1ff; }
.safari-guide-sheet > p { margin-top: 10px; color: #71809a; font-size: 12px; line-height: 1.55; }
.safari-steps { display: grid; gap: 8px; margin-top: 12px; }
.safari-steps div { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 11px; border: 1px solid #e4e9f1; border-radius: 14px; background: #f9fbff; }
.safari-steps span { display: grid; flex: 0 0 28px; height: 28px; place-items: center; border-radius: 10px; color: #2878d5; background: #edf4ff; font-size: 12px; }
.safari-steps b { color: #67758d; font-size: 11px; line-height: 1.4; }
.safari-primary, .safari-secondary { width: 100%; min-height: 50px; margin-top: 12px; border-radius: 15px; font-weight: 900; }
.safari-primary { color: #fff; background: linear-gradient(135deg, #2878d5, #0f9670); }
.safari-secondary { margin-top: 9px; color: #263d70; background: #edf3ff; }
.safari-guide-status { min-height: 18px; text-align: center; }
.safari-guide-status.error { color: #c2414e; }
.safari-guide-status.ok { color: #13805a; }

.match-loader { position: fixed; inset: 0; z-index: 25; display: none; align-items: center; justify-content: center; width: min(100%, 430px); margin: auto; padding: 22px; color: #fff; background: radial-gradient(circle at 70% 0, #3e2434 0, #111421 42%, #070a12 100%); }
.match-loader.open { display: flex; }
.match-loader-card { width: 100%; padding: 26px 22px 20px; border: 1px solid rgba(255,255,255,.14); border-radius: 26px; background: linear-gradient(135deg, rgba(76,85,105,.6), rgba(28,31,42,.86)); box-shadow: 0 24px 70px rgba(0,0,0,.35); text-align: center; backdrop-filter: blur(12px); }
.radar { position: relative; width: 160px; height: 160px; margin: 0 auto 18px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.04) 0 18%, transparent 19%); }
.radar::before, .radar::after { content: ""; position: absolute; inset: 27px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; }
.radar::after { inset: 57px; background: #29313b; box-shadow: 0 0 16px rgba(51,211,139,.35); }
.radar span { position: absolute; left: 50%; top: 50%; z-index: 2; width: 55px; height: 2px; transform-origin: left center; background: linear-gradient(90deg, #2ed58b, transparent); animation: radarSweep 1.8s linear infinite; }
.radar i { position: absolute; z-index: 3; width: 40px; height: 40px; border: 3px solid #fff; border-radius: 50%; background-position: center; background-size: cover; box-shadow: 0 5px 15px rgba(0,0,0,.35); }
.radar i:nth-child(1) { left: 20px; top: 27px; } .radar i:nth-child(2) { right: 15px; top: 45px; } .radar i:nth-child(3) { left: 65px; bottom: 9px; }
.match-loader-card h2 { font-size: 20px; line-height: 1.25; font-weight: 950; }
.match-loader-card > p { margin-top: 8px; color: rgba(255,255,255,.65); font-size: 12px; line-height: 1.5; }
.loader-progress { height: 7px; margin-top: 18px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.13); }
.loader-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3ee39c, #ff4c95); transition: width .25s ease; }
.loader-meta { display: flex; justify-content: space-between; margin-top: 10px; color: rgba(255,255,255,.62); font-size: 10px; }
@keyframes radarSweep { to { transform: rotate(360deg); } }

.profile-experience {
  position: fixed; inset: 0; z-index: 20; display: none; width: min(100%, 430px); margin: auto;
  overflow-y: auto; padding: 18px 14px 26px; background: radial-gradient(circle at 70% -10%, #432134 0, #160d17 34%, #080b16 78%); color: #fff;
}
.profile-experience.open { display: block; }
.experience-topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 10px; }
.experience-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 999px; background: rgba(255,255,255,.05); font-size: 11px; }
.experience-badge span, .live-pill i { width: 7px; height: 7px; border-radius: 50%; background: #20d17d; box-shadow: 0 0 10px #20d17d; }
.experience-topbar > strong { color: rgba(255,255,255,.58); font-size: 12px; letter-spacing: .12em; }
.experience-progress { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-bottom: 10px; }
.experience-progress i { height: 3px; border-radius: 10px; background: rgba(255,255,255,.12); }
.experience-progress i.active { background: rgba(255,255,255,.72); }
.experience-card { position: relative; min-height: 600px; overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 26px; background: #1b1620; box-shadow: 0 24px 60px rgba(0,0,0,.36); }
.experience-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.experience-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.3), transparent 38%, rgba(0,0,0,.12) 55%, rgba(5,8,15,.94) 100%); }
.experience-card-top { position: absolute; left: 14px; right: 14px; top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.live-pill, .contact-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 999px; background: rgba(13,20,23,.62); backdrop-filter: blur(10px); font-size: 11px; }
.contact-pill { background: rgba(29,100,67,.56); color: #d8f7e9; }
.experience-copy { position: absolute; left: 17px; right: 17px; bottom: 17px; }
.experience-name-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.experience-name-row h2 { font-size: 32px; line-height: 1; font-weight: 950; text-shadow: 0 3px 12px rgba(0,0,0,.5); }
.experience-name-row span { padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.13); font-size: 11px; font-weight: 900; }
.experience-copy p { margin-top: 8px; color: rgba(255,255,255,.9); font-size: 13px; line-height: 1.55; font-weight: 700; }
.experience-interests { margin-top: 13px; color: rgba(255,255,255,.88); font-size: 12px; line-height: 1.55; }
.swipe-hint { margin-top: 14px; color: rgba(255,255,255,.58); font-size: 11px; font-weight: 700; }
.experience-actions { display: grid; grid-template-columns: 1fr 1.1fr; gap: 10px; margin-top: 11px; }
.experience-actions button { min-height: 54px; border-radius: 17px; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-weight: 900; }
.experience-actions button:last-child { background: linear-gradient(135deg, #ff347f, #ff9c45); border: 0; }
.experience-actions span { margin-right: 6px; font-size: 18px; }
.experience-instruction { margin-top: 9px; color: rgba(255,255,255,.48); font-size: 10px; text-align: center; }
.contact-lockbar { margin-top: 11px; padding: 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 22px; background: rgba(12,15,28,.92); box-shadow: 0 15px 35px rgba(0,0,0,.25); }
.contact-lockbar > div { display: flex; justify-content: space-between; gap: 10px; color: rgba(255,255,255,.88); font-size: 12px; }
.contact-lockbar > div span { color: rgba(255,255,255,.56); }
.lock-progress { height: 6px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.12); }
.lock-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#3ee39c,#ffb34c); transition: width .25s linear; }
.contact-lockbar button { width: 100%; min-height: 50px; margin-top: 12px; border-radius: 15px; color: #fff; background: #2c303c; font-weight: 900; }
.contact-lockbar button.locked { color: rgba(255,255,255,.75); cursor: not-allowed; }
.contact-lockbar button span { margin-right: 7px; }
.contact-lockbar p { margin-top: 9px; color: rgba(255,255,255,.48); font-size: 10px; text-align: center; }
.locked-feedback { min-height: 0; color: #ffcf80 !important; }
body.experience-open { overflow: hidden; }
.opener-overlay, .contact-overlay { position: fixed; inset: 0; z-index: 30; display: none; align-items: flex-end; justify-content: center; background: rgba(8,10,14,.66); backdrop-filter: blur(2px); }
.opener-overlay.open, .contact-overlay.open { display: flex; }
.opener-sheet { width: min(100%, 500px); max-height: 75vh; overflow-y: auto; padding: 14px 16px 18px; border-radius: 26px 26px 0 0; background: #fbfbfc; color: #172033; box-shadow: 0 -20px 60px rgba(0,0,0,.28); animation: rise .24s ease; }
.modal-handle { width: 42px; height: 4px; margin: 0 auto 16px; border-radius: 99px; background: #dfe3ec; }
.opener-sheet h3 { font-size: 21px; font-weight: 950; }
.opener-sheet > p { margin-top: 6px; color: #71809a; font-size: 13px; line-height: 1.5; }
.modal-profile { display: flex; align-items: center; gap: 11px; margin-top: 14px; padding: 10px; border: 1px solid #e2e7ef; border-radius: 17px; background: #f7f9fd; }
.modal-profile img { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; }
.modal-title { font-size: 15px; font-weight: 950; }
.modal-status { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: #78849b; font-size: 11px; font-weight: 800; }
.opener-options { display: grid; gap: 10px; margin-top: 11px; }
.opener-option { width: 100%; min-height: 65px; padding: 12px 14px; border: 1px solid #e1e6ed; border-radius: 17px; background: #fff; text-align: left; box-shadow: 0 7px 18px rgba(19,31,52,.06); }
.opener-option { position: relative; }
.opener-option.selected { border-color: #2785e7; background: #eef6ff; box-shadow: 0 0 0 3px rgba(39,133,231,.12); }
.opener-option em { position: absolute; right: 12px; top: 12px; display: none; color: #1875cf; font-size: 10px; font-style: normal; font-weight: 900; }
.opener-option.selected em { display: block; }
.opener-option strong, .opener-option span { display: block; }
.opener-option strong { color: #26334c; font-size: 12px; }
.opener-option span { margin-top: 5px; color: #748198; font-size: 11px; }
.opener-selected-text { min-height: 18px; margin-top: 10px; color: #1875cf; font-size: 11px; text-align: center; font-weight: 800; }
.contact-sheet { width: min(100%, 500px); max-height: 82vh; overflow-y: auto; padding: 14px 16px 18px; border-radius: 26px 26px 0 0; background: #fbfbfc; color: #172033; box-shadow: 0 -20px 60px rgba(0,0,0,.28); animation: rise .24s ease; }
.contact-sheet h3 { font-size: 21px; font-weight: 950; }
.contact-sheet > p { margin-top: 6px; color: #71809a; font-size: 13px; line-height: 1.5; }
.contact-sheet form { display: grid; gap: 10px; margin-top: 15px; }
.contact-phone-row { display: grid; grid-template-columns: minmax(145px, 44%) minmax(0,1fr); gap: 9px; }
.contact-country, .contact-sheet input { min-height: 50px; border: 1px solid #dfe4ec; border-radius: 15px; background: #fff; color: #26334c; font-size: 14px; }
.contact-country { width: 100%; min-width: 0; padding: 0 30px 0 11px; outline: 0; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.contact-country:focus { border-color: #2785e7; box-shadow: 0 0 0 3px rgba(39,133,231,.1); }
.contact-sheet input { width: 100%; padding: 0 14px; outline: 0; }
.contact-sheet input:focus { border-color: #2785e7; box-shadow: 0 0 0 3px rgba(39,133,231,.1); }
.contact-sheet button { min-height: 52px; margin-top: 2px; border-radius: 15px; color: #fff; background: linear-gradient(100deg,#2676df,#119b72); font-size: 16px; font-weight: 900; }
.contact-terms { margin: 1px 0 0 !important; color: #99a3b5 !important; font-size: 10px !important; text-align: center; }
.contact-form-status { min-height: 18px; margin: 0 !important; color: #1979d3 !important; font-size: 11px !important; text-align: center; font-weight: 800; }
@keyframes rise { from { transform: translateY(28px); opacity: 0; } }

html[dir="rtl"] .language-control { right: auto; left: 12px; padding: 5px 9px 5px 7px; }
html[dir="rtl"] .hero-copy,
html[dir="rtl"] .story-card,
html[dir="rtl"] .trust-card,
html[dir="rtl"] .opener-sheet,
html[dir="rtl"] .contact-sheet { text-align: right; }
html[dir="rtl"] .cta-finger { right: auto; left: 18px; transform: scaleX(-1); }
html[dir="rtl"] .modal-profile,
html[dir="rtl"] .modal-status { flex-direction: row; }
html[dir="rtl"] .opener-option { text-align: right; }
html[dir="rtl"] .thumb-track { direction: rtl; }

@media (max-width: 350px) {
  .language-control label { display: none; }
  .language-control select { max-width: 260px; }
  .hero h1 { font-size: 20px; }
}
@media (max-height: 760px) { .experience-card { min-height: 510px; } }

@media (min-width: 600px) { .page-shell { box-shadow: 0 0 60px rgba(33,48,84,.12); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; } }
