/* The home page: light palette, with a working preview of the app in a phone. The phone carries the app's own two
   palettes (Palette.dark / Palette.light in the app), so its Light/Dark switch looks exactly like the app's. */

.landing { max-width: 1120px; margin: 0 auto; padding: 0 16px 24px; } /* the header's width */
.landing h2 { font-size: 38px; letter-spacing: -.025em; line-height: 1.1; margin: 14px 0 14px; max-width: 640px; }
[dir="rtl"] .landing h2 { letter-spacing: 0; line-height: 1.35; }
.landing h3 { font-size: 18px; margin: 14px 0 6px; }
.landing p { color: var(--n400); }
.i { width: 1em; height: 1em; fill: currentColor; flex: none; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; align-items: center; padding: 28px 0 72px; }
.hero h1 { font-size: 60px; line-height: 1.03; letter-spacing: -.035em; margin: 18px 0 20px; }
[dir="rtl"] .hero h1 { font-size: 54px; line-height: 1.3; letter-spacing: 0; }
.hero h1 .soft { color: var(--n500); }
.lead { font-size: 18.5px; line-height: 1.6; max-width: 540px; margin-bottom: 30px; }
.fine { font-size: 13.5px; margin-top: 18px; color: var(--n500) !important; }
/* The browser, Google Play and iOS: one size, side by side (they wrap where the column is too narrow). */
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.stores.center { justify-content: center; }
.store {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-width: 176px; min-height: 58px; padding: 0 16px; border-radius: 16px;
  background: var(--accent); color: var(--bg); text-decoration: none; font-weight: 500; font-size: 18px; line-height: 1.15;
  box-shadow: 0 12px 28px -14px rgba(26, 29, 48, .55); transition: transform .15s ease, box-shadow .15s ease;
}
.store small { display: block; font-size: 11.5px; font-weight: 400; opacity: .78; letter-spacing: .02em; }
.store .i { width: 26px; height: 26px; }
a.store:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -14px rgba(26, 29, 48, .6); }
a.store:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* The web app, and iOS beside it in the same light style: iOS isn't out yet, so only its words are quieter. */
.store.web, .store.soon { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--n800), 0 12px 28px -18px rgba(26, 29, 48, .4); }
.store.web .i { color: var(--accent); }
.store.soon { color: var(--n500); cursor: default; }
a.store.web:hover { box-shadow: inset 0 0 0 1px var(--n700), 0 16px 32px -16px rgba(26, 29, 48, .45); }

/* The phone */
.demo { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.phone-shell {
  position: relative; width: 372px; max-width: 100%; padding: 11px; border-radius: 56px; background: #0e0f17;
  box-shadow: 0 0 0 1px #2a2c3a, 0 40px 80px -30px rgba(26, 29, 48, .55), 0 18px 36px -18px rgba(26, 29, 48, .35);
}
.phone-shell::before { /* side button */
  content: ""; position: absolute; inset-inline-end: -3px; top: 168px; width: 3px; height: 74px; border-radius: 0 3px 3px 0; background: #1d1f2b;
}
.demo-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--n900); }
.seg button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent;
  color: var(--n500); font: 500 13.5px var(--font); cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--bg); }
.seg .i { width: 15px; height: 15px; }
button.link { border: 0; background: none; color: var(--n400); font: 500 13.5px var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 36px; }
.demo-caption { max-width: 372px; text-align: center; font-size: 13.5px; line-height: 1.5; margin: 0; }
.demo-caption strong { color: var(--text); font-weight: 500; }

/* Features */
.features, .how, .cta { padding: 64px 0; }
.features { border-top: 1px solid var(--n900); }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 34px; }
.feature { position: relative; background: var(--surface); border-radius: 22px; padding: 24px 24px 22px; box-shadow: 0 0 0 1px var(--n900), 0 14px 30px -24px rgba(26, 29, 48, .4); }
.feature p { margin: 0; font-size: 15px; line-height: 1.55; }
.badge { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--a900); color: var(--accent); }
.badge .i { width: 22px; height: 22px; }
.tag-new {
  position: absolute; top: 24px; inset-inline-end: 22px; padding: 3px 10px; border-radius: 999px;
  background: var(--a900); color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .02em; line-height: 1.5;
}

/* How it works */
.steps { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.steps li { position: relative; padding: 0 4px; }
.steps .num { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--accent); font-weight: 500; color: var(--accent); }
.steps p { margin: 0; }

/* Questions */
.faq { padding: 64px 0; border-top: 1px solid var(--n900); }
.faq-list { margin-top: 26px; display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border-radius: 18px; box-shadow: 0 0 0 1px var(--n900); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: 17px; flex: 1; }
.faq summary::after { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--n800); color: var(--n400); font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 18px; }
.faq details p { margin: 0; padding: 0 20px 18px; font-size: 15.5px; line-height: 1.6; max-width: 720px; }

/* Closing */
.cta { text-align: center; display: flex; flex-direction: column; align-items: center; border-top: 1px solid var(--n900); }
.cta h2 { margin-inline: auto; }
.cta p { max-width: 560px; margin-bottom: 26px; }
.cta-mark { margin-bottom: 4px; }

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 8px; }
  .hero-copy { max-width: 640px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .landing { padding: 0 16px 16px; }
  .hero h1 { font-size: 42px; } [dir="rtl"] .hero h1 { font-size: 38px; }
  .lead { font-size: 17px; }
  .landing h2 { font-size: 30px; }
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .features, .how, .cta { padding: 48px 0; }
  .phone-shell { width: min(372px, calc(100vw - 32px)); border-radius: 50px; padding: 9px; }
  /* Two equal columns: the browser and Google Play, then iOS the same size below. */
  .stores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .store { min-width: 0; padding: 0 12px; gap: 10px; font-size: 17px; }
  .store > span { white-space: nowrap; }
}

@media (max-width: 350px) { .stores { grid-template-columns: minmax(0, 1fr); } .status .sys svg:first-child { display: none; } .status { padding-inline: 24px; } }

/* ===== The app inside the phone ===== */
.phone {
  --font-app: "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif;
  position: relative; height: clamp(600px, calc(100vh - 150px), 752px); border-radius: 45px; overflow: hidden; isolation: isolate; container-type: inline-size;
  background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--font-app); text-align: start;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
[dir="rtl"] .phone { font-family: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif; line-height: 1.6; }
@media (max-width: 640px) { .phone { height: min(752px, calc((100vw - 50px) * 2.02)); border-radius: 41px; } }
.phone[data-theme="light"] {
  --bg: #f3f4f9; --surface: #ffffff; --text: #161826; --divider: rgba(22, 24, 38, .16);
  --n100: #16181e; --n200: #21232d; --n300: #2e313e; --n400: #414455; --n500: #585b6e; --n600: #727689; --n700: #9196a6; --n800: #b6bac7; --n900: #dadce5;
  --accent: #1a1d30; --a100: #101223; --a200: #1a1d2f; --a300: #26293c; --a400: #33364a; --a500: #45485d; --a600: #62657b; --a700: #8a8da3; --a800: #bcbfd3; --a900: #e1e3f0;
  --section: #d1d5eb; --section-glow: #b3baDE; --photo-top: #d4d9f4; --glow: rgba(59, 66, 144, .34); --halo: rgba(255, 255, 255, .78); --initial-glow: #ffffff;
  --khala: url("/img/khala-day.png"); --shadow: rgba(26, 29, 48, .14); --status: #161826;
}
.phone[data-theme="dark"] {
  --bg: #161826; --surface: #232532; --text: #e9e9ed; --divider: rgba(233, 233, 237, .16);
  --n100: #f3f5fe; --n200: #e4e7f5; --n300: #cfd3e5; --n400: #b2b6ca; --n500: #9397ab; --n600: #75798c; --n700: #595d6c; --n800: #3f424d; --n900: #292b31;
  --accent: #eceef7; --a100: #f9fafe; --a200: #eceef5; --a300: #dbdde8; --a400: #c6cad8; --a500: #adb0bf; --a600: #888b9a; --a700: #60636f; --a800: #3d3f49; --a900: #24262e;
  --section: #262a60; --section-glow: #353b80; --photo-top: #272a4d; --glow: rgba(236, 238, 247, 1); --halo: rgba(96, 99, 111, .5); --initial-glow: #888b9a;
  --khala: url("/img/khala.png"); --shadow: rgba(0, 0, 0, .55); --status: #e9e9ed;
}
.phone, .phone * { transition: background-color .25s ease, color .25s ease, box-shadow .25s ease; }
.phone .noscript { padding: 120px 24px; text-align: center; color: var(--n500); }
.phone svg.i { width: 1em; height: 1em; fill: currentColor; }

.app { position: absolute; inset: 0; display: flex; flex-direction: column; }
.status { flex: none; height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0; font: 500 15px var(--font-app); color: var(--status); position: relative; z-index: 25; direction: ltr; }
.status .island { position: absolute; left: 50%; top: 11px; width: min(104px, 31%); height: 30px; transform: translateX(-50%); border-radius: 20px; background: #05060a; }
.status .sys { display: flex; gap: 6px; align-items: center; }
.status .sys span { display: block; background: currentColor; border-radius: 2px; }
.screens { position: relative; flex: 1; min-height: 0; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
.screen.on { opacity: 1; visibility: visible; transition: opacity .2s ease; }

/* Headers */
.hdr { flex: none; display: flex; align-items: center; gap: 10px; padding: 4px 14px 10px 16px; border-bottom: 1px solid var(--n900); }
.hdr .t { font-weight: 500; font-size: 16px; line-height: 1.25; }
.hdr .s { font-size: 12.5px; color: var(--n400); line-height: 1.3; }
.hdr .t, .hdr .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr .grow { flex: 1; min-width: 0; }
.title-hdr { flex: none; padding: 6px 16px 10px; display: flex; align-items: flex-start; gap: 10px; }
.title-hdr h4 { font-size: 24px; font-weight: 500; margin: 0; letter-spacing: -.015em; }
.title-hdr .s { font-size: 13px; color: var(--n400); }
.title-hdr .grow { flex: 1; min-width: 0; }
.kh { width: 36px; height: 36px; flex: none; background: var(--khala) center / contain no-repeat; border-radius: 50%; }
.kh.sm { width: 20px; height: 20px; }
.phone[data-theme="light"] .kh.think { filter: brightness(.55) contrast(1.15); transition: filter .45s ease-out; }
.phone[data-theme="dark"] .kh.think { filter: brightness(1.35); transition: filter .45s ease-out; }
.cbtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--divider); background: transparent; color: var(--text); font-size: 18px; cursor: pointer; flex: none; }

/* Chat thread */
.thread { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: none; }
.thread::-webkit-scrollbar { display: none; }
.thread > * { flex-shrink: 0; } /* scroll, never squash */
.b { max-width: 84%; padding: 10px 14px; font-size: 14.5px; line-height: 1.45; border-radius: 18px 18px 18px 5px; background: var(--surface); box-shadow: 0 0 0 1px var(--n900); align-self: flex-start; animation: rise .28s ease-out both; }
.b.me { align-self: flex-end; background: var(--a900); color: var(--a100); box-shadow: inset 0 0 0 1px var(--a800); border-radius: 18px 18px 5px 18px; }
[dir="rtl"] .b { border-radius: 18px 18px 5px 18px; }
[dir="rtl"] .b.me { border-radius: 18px 18px 18px 5px; }
.b .act { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font: 500 13.5px var(--font-app); cursor: pointer; }
.sys-note { align-self: center; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--n500); padding: 6px 0; }
[dir="rtl"] .sys-note { letter-spacing: 0; text-transform: none; font-size: 12px; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--n500); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.chips { flex: none; display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--n800); background: var(--surface); color: var(--text); font: 400 14px var(--font-app); cursor: pointer; animation: rise .25s ease-out both; }
.chip:hover { border-color: var(--n700); }
.chip.hint { border-color: var(--accent); box-shadow: 0 0 18px -8px var(--glow); }
.composer { flex: none; display: flex; align-items: center; gap: 10px; padding: 4px 14px 12px; }
.composer .field { flex: 1; min-width: 0; height: 46px; border-radius: 23px; border: 1px solid var(--n800); background: var(--surface); color: var(--n500); display: flex; align-items: center; padding: 0 16px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer .send { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); display: grid; place-items: center; font-size: 18px; flex: none; }
.composer .attach { color: var(--n400); font-size: 20px; display: grid; place-items: center; width: 28px; }

/* Photo placeholders */
.ph { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--photo-top), var(--a900)); }
.ph::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 42%, var(--halo), transparent 62%); }
.ph::after {
  content: ""; position: absolute; inset: 0; background: var(--a300); opacity: .13;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' fill='none' stroke='%23000' stroke-width='1.4'%3E%3Cpath d='M28 12 44 28 28 44 12 28Z'/%3E%3Crect x='16.7' y='16.7' width='22.6' height='22.6'/%3E%3Cpath d='M0 0 12 12M56 0 44 12M0 56 12 44M56 56 44 44'/%3E%3C/svg%3E") 0 0 / 34px 34px repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' fill='none' stroke='%23000' stroke-width='1.4'%3E%3Cpath d='M28 12 44 28 28 44 12 28Z'/%3E%3Crect x='16.7' y='16.7' width='22.6' height='22.6'/%3E%3Cpath d='M0 0 12 12M56 0 44 12M0 56 12 44M56 56 44 44'/%3E%3C/svg%3E") 0 0 / 34px 34px repeat;
}
.ph .ini { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; font: 400 var(--ini, 84px)/1 "Inter", sans-serif; color: var(--a200); letter-spacing: -.04em; text-shadow: 0 0 34px var(--initial-glow); }
.pill { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--a100); background: color-mix(in srgb, var(--bg) 62%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px var(--n800); }
.pill.pick { background: color-mix(in srgb, var(--a800) 85%, transparent); box-shadow: inset 0 0 0 1px var(--a600), 0 0 18px -8px var(--glow); }

/* Introduction card in the thread */
.card { align-self: stretch; background: var(--surface); border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--n800); animation: rise .35s ease-out both; }
.card .ph { height: 196px; --ini: 80px; }
.card .ph .fade { position: absolute; inset: auto 0 0; height: 70px; z-index: 1; background: linear-gradient(to top, var(--surface), color-mix(in srgb, var(--surface) 0%, transparent)); }
.card .ph .pill { top: 12px; inset-inline-start: 12px; }
.card .body { padding: 2px 16px 16px; }
.card .nm { font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.card .sub { font-size: 13.5px; color: var(--n400); margin-top: -2px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tag { font-size: 12px; padding: 3px 9px; border-radius: 7px; background: var(--n900); color: var(--n300); }
.why { display: flex; gap: 8px; font-size: 13.5px; color: var(--n300); line-height: 1.45; }
.why .i { color: var(--accent); width: 14px; height: 14px; margin-top: 3px; }
.btns { display: flex; gap: 8px; margin-top: 14px; }
.btn2 { height: 44px; border-radius: 10px; border: 1px solid var(--divider); background: transparent; color: var(--text); font: 500 14px var(--font-app); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.btn2.grow { flex: 1; }
.btns .btn2 { min-width: 0; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn2.primary { border-color: var(--accent); color: var(--accent); flex: 1.3; }
.btn2.round { width: 44px; flex: none; border-radius: 50%; font-size: 16px; }
.btn2[disabled] { opacity: .45; cursor: default; }
.state { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13.5px; color: var(--a500); }

/* Match moment */
.moment { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; overflow: hidden; padding: 64px 24px 36px; background: linear-gradient(180deg, color-mix(in srgb, var(--section) 50%, var(--bg)), var(--bg) 60%); animation: fadein .35s ease-out both; }
.moment[hidden] { display: none; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.moment .tagline { align-self: flex-start; font-size: 12px; padding: 3px 9px; border-radius: 7px; box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.moment h5 { font-size: clamp(30px, 11.5cqw, 40px); font-weight: 500; letter-spacing: -.03em; line-height: 1.05; margin: 14px 0 10px; }
[dir="rtl"] .moment h5 { letter-spacing: 0; line-height: 1.3; }
.moment p { font-size: 15px; color: var(--n300); margin: 0; }
.tiles { position: relative; flex: 0 1 210px; min-height: 120px; margin: 24px 0 16px; }
.tile { position: absolute; width: 43%; max-width: 150px; height: 86%; border-radius: 24px; overflow: hidden; --ini: clamp(40px, 16cqw, 64px); }
.tile .ph { position: absolute; inset: 0; }
.tile.me { inset-inline-start: 3%; top: 2%; transform: rotate(-5deg); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--a700); }
.tile.them { inset-inline-start: 38%; top: 12%; transform: rotate(5deg); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--accent), 0 0 48px -6px var(--glow); animation: pop .5s .15s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pop { from { transform: rotate(5deg) scale(.6); opacity: 0; } to { transform: rotate(5deg) scale(1); opacity: 1; } }
.moment .kline { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--n300); margin-bottom: auto; }
.moment .stack { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.bigbtn { height: 52px; border-radius: 12px; border: 1px solid var(--accent); background: var(--bg); color: var(--accent); font: 500 16px var(--font-app); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; box-shadow: 0 0 32px -10px var(--glow); }
.bigbtn.second { border-color: var(--divider); color: var(--text); box-shadow: none; background: transparent; }

/* Marriage deck */
.deck { position: relative; flex: 1; min-height: 0; margin: 0 16px; }
.dcard { position: absolute; inset: 0; border-radius: 22px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--n700), 0 6px 18px var(--shadow); display: flex; flex-direction: column; touch-action: pan-y; cursor: grab; will-change: transform; }
.dcard:active { cursor: grabbing; }
.dcard.back { transform: scale(.95) translateY(10px); filter: saturate(.8); pointer-events: none; }
.dcard .ph { flex: 1; --ini: 110px; }
.dcard .ph .pill.lock { top: 52px; inset-inline-start: 14px; }
.dcard .ph .pill.pick { top: 14px; inset-inline-start: 14px; }
.dcard .info { position: relative; padding: 0 18px 16px; margin-top: -76px; z-index: 2; background: linear-gradient(to top, var(--surface) 70%, color-mix(in srgb, var(--surface) 0%, transparent)); padding-top: 34px; }
.dcard .nm { font-size: 28px; font-weight: 500; letter-spacing: -.02em; line-height: 1.15; }
.dcard .sub { font-size: 14px; color: var(--n300); }
.dcard .why { margin-top: 10px; }
.stamp { position: absolute; top: 34px; z-index: 5; padding: 6px 14px; border-radius: 12px; border: 2.5px solid currentColor; font: 600 20px var(--font-app); letter-spacing: .06em; text-transform: uppercase; opacity: 0; background: color-mix(in srgb, var(--bg) 45%, transparent); }
[dir="rtl"] .stamp { letter-spacing: 0; text-transform: none; }
.stamp.yes { inset-inline-start: 22px; color: var(--accent); transform: rotate(-10deg); box-shadow: 0 0 22px -8px var(--glow); }
.stamp.no { inset-inline-end: 22px; color: var(--n400); transform: rotate(10deg); }
.deck-btns { flex: none; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 14px 0 10px; }
.cb { border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--divider); background: transparent; color: var(--text); cursor: pointer; }
.cb.big { width: 62px; height: 62px; font-size: 24px; }
.cb.mid { width: 48px; height: 48px; font-size: 19px; color: var(--accent); }
.cb.like { border-color: var(--accent); color: var(--accent); background: var(--bg); box-shadow: 0 0 26px -6px var(--glow); }
.deck-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; padding: 0 8px; }
.deck-empty p { color: var(--n400); margin: 0; font-size: 15px; }
.toast { position: absolute; inset-inline: 16px; bottom: 96px; z-index: 30; display: flex; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--n800), 0 12px 28px var(--shadow); font-size: 13.5px; line-height: 1.45; animation: rise .25s ease-out both; }
.toast .kh { width: 26px; height: 26px; }
.toast b { display: block; font-weight: 500; font-size: 12px; color: var(--n400); }

/* Likes */
.ptabs { position: relative; display: flex; margin: 0 16px 12px; padding: 4px; border-radius: 999px; background: var(--a900); box-shadow: inset 0 0 0 1px var(--n900); }
.ptab { flex: 1; min-width: 0; white-space: nowrap; height: 38px; border: 0; background: transparent; border-radius: 999px; color: var(--n400); font: 500 13px var(--font-app); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; position: relative; }
.ptab.on { color: var(--text); background: linear-gradient(180deg, var(--section-glow), var(--section)); box-shadow: inset 0 0 0 1px var(--a700), 0 0 18px -8px var(--glow); }
.count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 11px; background: var(--accent); color: var(--bg); }
.count.dim { background: transparent; box-shadow: inset 0 0 0 1px var(--n700); color: var(--n400); }
.scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 16px; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.hint { font-size: 13px; color: var(--n400); margin: 0 0 12px; }
.locked { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border-radius: 16px; padding: 14px 16px; box-shadow: inset 0 0 0 1px var(--n900); margin-bottom: 14px; }
.locked .h { display: flex; gap: 10px; font-size: 16px; font-weight: 500; }
.locked p { margin: 6px 0 12px; font-size: 13.5px; color: var(--n300); }
.locked .btn2 { width: 100%; border-color: var(--accent); color: var(--accent); box-shadow: 0 0 26px -10px var(--glow); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hidden-card { aspect-ratio: 3 / 4; border-radius: 22px; box-shadow: 0 0 0 1px var(--divider); }
.hidden-card .ph { position: absolute; inset: -12px; filter: blur(6px); }
.hidden-card { position: relative; overflow: hidden; }

.match-card { position: relative; overflow: hidden; aspect-ratio: 3 / 4; border-radius: 22px; border: 0; padding: 0; cursor: pointer; box-shadow: 0 0 0 1px var(--divider); font-family: var(--font-app); }
.match-card .ph { position: absolute; inset: 0; --ini: 64px; }
.match-card .mname { position: absolute; inset: auto 0 0; z-index: 2; padding: 26px 12px 10px; text-align: start; color: var(--text); font-weight: 500; font-size: 15px; background: linear-gradient(to top, color-mix(in srgb, var(--bg) 88%, transparent), transparent); }
.hav .ph { width: 34px; height: 34px; border-radius: 50%; --ini: 15px; }

/* Community */
.topics { flex: none; display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 12px; scrollbar-width: none; }
.topics::-webkit-scrollbar { display: none; }
.topic { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--n800); background: transparent; color: var(--n300); font: 500 13px var(--font-app); cursor: pointer; }
.topic.on { color: var(--text); border-color: var(--a700); background: linear-gradient(180deg, var(--section-glow), var(--section)); box-shadow: 0 0 18px -8px var(--glow); }
.kq { border-radius: 18px; padding: 14px 16px; margin-bottom: 6px; background: linear-gradient(160deg, color-mix(in srgb, var(--section) 55%, var(--surface)), var(--surface)); box-shadow: inset 0 0 0 1px var(--a800); }
.kq-h { display: flex; align-items: center; gap: 8px; }
.kq-k { font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--a400); }
[dir="rtl"] .kq-k { letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.kq .kq-t { margin: 8px 0 12px; font-size: 16.5px; line-height: 1.4; font-weight: 500; color: var(--text); }
.kq-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.btn2.sm { height: 34px; padding: 0 12px; border-radius: 999px; border-color: var(--a700); font-size: 12.5px; gap: 6px; min-width: 0; white-space: nowrap; }
.btn2.sm .i { color: var(--accent); flex: none; }
.said { margin: 0 0 12px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 70%, transparent); box-shadow: inset 0 0 0 1px var(--n900); animation: rise .25s ease-out both; }
.said-h { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.said-h .i { color: var(--accent); }
.said p { margin: 6px 0 4px; font-size: 13.5px; line-height: 1.5; color: var(--n300); }
.said small { font-size: 11.5px; color: var(--n500); }
.post { padding: 12px 0 14px; border-bottom: 1px solid var(--n900); }
.post:last-child { border-bottom: 0; }
.au { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; color: var(--n400); }
.glyph { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--n900); color: var(--n300); font-size: 12.5px; font-weight: 500; }
.glyph .i { font-size: 15px; }
.au .who { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au .when { flex: none; font-size: 12px; color: var(--n500); }
.post p { margin: 8px 0 10px; font-size: 14.5px; line-height: 1.5; color: var(--text); }
.pf { display: flex; align-items: center; gap: 12px; }
.pf .tag { margin-inline-start: auto; white-space: nowrap; }
.rc { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--n400); white-space: nowrap; }
.rc .i { font-size: 15px; }
.votes { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--n900); }
.vote { width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: var(--n400); display: grid; place-items: center; font-size: 16px; cursor: pointer; }
.vote.on { color: var(--accent); }
.vote:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.score { min-width: 20px; text-align: center; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.score.mine { color: var(--accent); }

/* Chats */
.kick { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--n400); margin: 6px 0 10px; }
[dir="rtl"] .kick { letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.avatars { display: flex; gap: 14px; margin-bottom: 18px; }
.av { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; color: var(--n300); background: none; border: 0; cursor: pointer; font-family: var(--font-app); }
.av .ph { width: 64px; height: 64px; border-radius: 50%; --ini: 26px; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent); }
.convo { display: flex; gap: 12px; align-items: center; padding: 10px 0; width: 100%; background: none; border: 0; color: var(--text); text-align: start; cursor: pointer; font-family: var(--font-app); }
.convo .ph { width: 52px; height: 52px; border-radius: 50%; --ini: 22px; flex: none; }
.convo .t { font-weight: 500; font-size: 15px; }
.convo .p { font-size: 13.5px; color: var(--n400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo .grow { flex: 1; min-width: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 8px var(--glow); }
.empty { color: var(--n400); font-size: 14px; line-height: 1.5; padding: 8px 0; }

/* Me */
.mehead { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; }
.mehead .ph { width: 64px; height: 64px; border-radius: 50%; --ini: 28px; flex: none; }
.mehead .t { font-size: 19px; font-weight: 500; }
.mehead .s { font-size: 13px; color: var(--n400); }
.mehead .grow { flex: 1; min-width: 0; }
.mehead .t, .mehead .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.level { border-radius: 14px; padding: 8px 8px 10px; background: var(--surface); box-shadow: 0 0 0 1px var(--n900); border: 0; color: var(--text); text-align: start; cursor: pointer; font-family: var(--font-app); }
.level.on { box-shadow: 0 0 0 1.5px var(--accent), 0 0 28px -10px var(--glow); }
.level .ph { height: 62px; border-radius: 10px; --ini: 26px; }
.level .ph.blur .ini, .level .ph.soft .ini { filter: blur(7px); }
.level .ph.soft .ini { filter: blur(3px); }
.level small { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--n500); margin-top: 7px; }
[dir="rtl"] .level small { letter-spacing: 0; text-transform: none; font-size: 11px; }
.level span { font-size: 12.5px; }
.row2 { display: flex; align-items: center; gap: 12px; padding: 11px 0; width: 100%; background: none; border: 0; color: var(--text); font: 400 15px var(--font-app); text-align: start; cursor: pointer; }
.row2 .i { font-size: 20px; color: var(--n300); }
.row2 .grow { flex: 1; min-width: 0; }
.row2 .v { color: var(--n400); font-size: 14px; }
.row2 .car { color: var(--n500); font-size: 14px; }
/* caret-left is "back" in English and "forward" in Arabic: flip it where it means the other. */
[dir="ltr"] .row2 .car, [dir="rtl"] .back-car, [dir="rtl"] .i.dir { transform: scaleX(-1); }
.row2 small { display: block; font-size: 12.5px; color: var(--n400); }
.sw { width: 50px; height: 30px; border-radius: 15px; background: var(--n900); box-shadow: inset 0 0 0 1px var(--n800); position: relative; flex: none; }
.sw::after { content: ""; position: absolute; top: 4px; inset-inline-start: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--n600); transition: inset-inline-start .2s ease, background-color .2s; }
.sw.on { background: var(--a800); }
.sw.on::after { inset-inline-start: 24px; background: var(--accent); }

/* Tab bar */
.tabs { flex: none; display: flex; padding: 6px 4px 26px; border-top: 1px solid var(--n900); background: var(--bg); position: relative; z-index: 10; }
.tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 1px 0; border: 0; background: none; color: var(--n500); font: 500 10.5px var(--font-app); cursor: pointer; position: relative; }
.tab .tl { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab .i { font-size: 23px; }
.tab .fill { display: none; }
.tab.on { color: var(--text); }
.tab.on .fill { display: block; } .tab.on .line { display: none; }
.tab.on::before { content: ""; position: absolute; top: -7px; width: 18px; height: 2px; border-radius: 1px; background: var(--accent); box-shadow: 0 0 8px var(--glow); }
.tab .badge-dot { position: absolute; top: 4px; inset-inline-start: calc(50% + 8px); width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--glow); }
.home-ind { position: absolute; bottom: 8px; left: 50%; width: 120px; height: 4px; margin-left: -60px; border-radius: 2px; background: var(--text); opacity: .8; z-index: 11; }

/* The smallest phones (the phone shrinks with the screen): the match moment keeps both buttons in view. */
@container (max-width: 300px) {
  .moment { padding-top: 52px; padding-bottom: 30px; }
  .moment .kline { display: none; }
  .moment .stack { margin-top: auto; }
  .dcard .tags { display: none; }
  .dcard .nm { font-size: 24px; }
  .dcard .info { margin-top: -64px; padding-top: 28px; }
  .deck-btns { padding: 10px 0 8px; gap: 12px; }
  .cb.big { width: 54px; height: 54px; font-size: 21px; }
  .ptab { font-size: 11.5px; gap: 4px; }
  .ptab .count { min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px; }
  .tab { font-size: 9.5px; }
  .tab .i { font-size: 21px; }
  .btn2.sm { font-size: 11.5px; padding: 0 10px; }
}

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