/* People: a profile beside its photos (PersonView and Gallery), the Marriage deck around it, and the pieces they share
   (biodata, Khala's take, what you share, Premium-marked buttons). Desktop first: two columns from 900px, stacked below. */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.t-kicker { font-size: 11px; letter-spacing: calc(.1em * var(--track)); text-transform: uppercase; line-height: 1.3; }
:root[lang="ar"] .t-kicker { font-size: 12.5px; text-transform: none; }
.t-h { font-weight: 500; line-height: 1.25; letter-spacing: calc(-.015em * var(--track)); }

/* ── Gallery ─────────────────────────────────────────────────────────────── */
.gallery { display: flex; flex-direction: column; min-width: 0; background: var(--photo-top); }
.gallery-main { position: relative; flex: 1; min-height: 0; aspect-ratio: 4 / 5; overflow: hidden; }
.gallery-main > .photo.fill { border-radius: 0; }
.gallery-arrow {
  position: absolute; top: 50%; z-index: 4; display: grid; place-items: center; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 86%, transparent); color: var(--text); box-shadow: 0 2px 10px var(--shadow);
  transition: opacity .15s, background-color .12s; backdrop-filter: blur(6px);
}
.gallery-arrow.prev { inset-inline-start: 12px; }
.gallery-arrow.next { inset-inline-end: 12px; }
.gallery-arrow:disabled { opacity: 0 !important; pointer-events: none; }
.gallery-arrow:hover { background: var(--surface); }
/* With a mouse they show on hover (and whenever focused); on touch screens they're always there. */
@media (hover: hover) and (pointer: fine) {
  .gallery-arrow { opacity: 0; }
  .gallery-main:hover .gallery-arrow, .gallery-arrow:focus-visible { opacity: 1; }
}
.gallery-count {
  position: absolute; bottom: 12px; inset-inline-end: 12px; z-index: 3; padding: 3px 9px; border-radius: 999px; font-size: 12px; line-height: 1.3;
  background: color-mix(in srgb, var(--bg) 72%, transparent); color: var(--n200); font-variant-numeric: tabular-nums;
}
.gallery-thumbs { display: flex; gap: 8px; padding: 10px 12px; overflow-x: auto; scrollbar-width: none; background: var(--surface); flex: none; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  position: relative; flex: none; width: 48px; height: 60px; border-radius: 8px; overflow: hidden; opacity: .62;
  outline: 2px solid transparent; outline-offset: 1px; transition: opacity .12s, outline-color .12s;
}
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.on { opacity: 1; outline-color: var(--accent); }
.gallery-thumb .photo.fill { border-radius: 0; }

/* ── A person ────────────────────────────────────────────────────────────── */
.person {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-tile); overflow: hidden;
  box-shadow: var(--shadow-sm), 0 12px 32px -14px var(--shadow);
}
.person-badges { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.person-badges .lock-pill.static { position: static; }
.khala-pick {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500; line-height: 1.3;
  background: color-mix(in srgb, var(--bg) 78%, transparent); color: var(--accent); box-shadow: 0 0 18px -4px var(--glow); backdrop-filter: blur(6px);
}
.person-details { display: flex; flex-direction: column; gap: 22px; padding: 20px 20px 26px; min-width: 0; }
.person-details > section { display: flex; flex-direction: column; gap: 10px; }
.person-head { display: flex; align-items: flex-start; gap: 8px; }
.person-head h2 { font-size: 24px; font-weight: 500; line-height: 1.2; letter-spacing: calc(-.015em * var(--track)); overflow-wrap: anywhere; }
.person-job { margin-top: 4px; font-size: 15px; color: var(--n300); line-height: 1.4; }
.person-distance { margin-top: 6px; display: flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--n400); }
.sparkle-line.big { font-size: 15px; color: var(--n200); }
.shared { display: flex; flex-wrap: wrap; gap: 8px; }
.shared-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 5px 12px; border-radius: 999px; font-size: 13.5px; line-height: 1.3;
  border: 1px solid var(--n900); background: rgb(var(--glow-rgb) / .05); color: var(--n200);
}
.shared-chip .ph { color: var(--a400); }

/* Two columns from tablet width: the photos keep their place, the details scroll beside them. */
@media (min-width: 768px) {
  .person { display: grid; grid-template-columns: minmax(280px, 44%) minmax(0, 1fr); }
  .person > .gallery { min-height: 0; }
  .person-details { padding: 26px 28px 32px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--n800) transparent; }
  .person-head h2 { font-size: 26px; }
}
@media (min-width: 1100px) {
  .person-details { padding: 28px 32px 34px; }
  .person-head h2 { font-size: 28px; }
}

/* ── Biodata ─────────────────────────────────────────────────────────────── */
.bio-section { display: flex; flex-direction: column; gap: 6px; }
.bio-rows { display: flex; flex-direction: column; }
.bio-row { display: grid; grid-template-columns: minmax(110px, 36%) minmax(0, 1fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--n900); }
.bio-row:last-child { border-bottom: 0; }
.bio-row dt { font-size: 13.5px; color: var(--n400); line-height: 1.45; }
.bio-row dd { font-size: 14.5px; color: var(--text); line-height: 1.45; overflow-wrap: anywhere; }

/* ── Khala's take ────────────────────────────────────────────────────────── */
.take { padding: 16px 18px; border-radius: var(--r-card); background: rgb(var(--glow-rgb) / .05); border: 1px solid var(--n900); }
.take-quote { display: flex; flex-direction: column; gap: 6px; }
.take-quote p { font-size: 15px; line-height: 1.55; color: var(--n200); }
.take-questions { padding-inline-start: 20px; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.5; color: var(--n300); }

/* A Premium feature's button: as it looks with Premium, marked. */
.premium-button {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-base);
  border: 1px solid var(--divider); color: var(--text); font-size: 14px; font-weight: 500; transition: background-color .12s;
}
.premium-button .ph { color: var(--accent); }
.premium-button .lbl { flex: 1; text-align: start; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.premium-badge { flex: none; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; line-height: 1.4; background: var(--a900); color: var(--accent); }
@media (hover: hover) { .premium-button:hover { background: rgb(var(--glow-rgb) / .07); } }

/* ── Out of likes ────────────────────────────────────────────────────────── */
.likes-out-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--a900); color: var(--accent); box-shadow: 0 0 24px -6px var(--glow); }
.likes-out-premium { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-card); background: rgb(var(--glow-rgb) / .06); }

/* ── The Marriage deck ───────────────────────────────────────────────────── */
.marriage { min-height: 0; }
.deck { flex: 1; min-height: 0; display: flex; flex-direction: column; width: 100%; max-width: 1120px; margin-inline: auto; padding: 0 16px; }
.deck-stage { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 0 8px; }
.deck-card { position: relative; touch-action: pan-y; will-change: transform; }
.deck-card > .person { min-height: 100%; }
.deck-stamp {
  position: absolute; top: 28px; z-index: 6; padding: 6px 14px; border: 2px solid currentColor; border-radius: 10px; font-size: 20px; font-weight: 500;
  background: color-mix(in srgb, var(--bg) 70%, transparent); pointer-events: none; opacity: 0;
}
.deck-stamp.like { inset-inline-start: 24px; color: var(--accent); transform: rotate(-10deg); opacity: var(--like, 0); }
.deck-stamp.pass { inset-inline-end: 24px; color: var(--n300); transform: rotate(10deg); opacity: var(--pass, 0); }
:root[dir="rtl"] .deck-stamp.like { transform: rotate(10deg); }
:root[dir="rtl"] .deck-stamp.pass { transform: rotate(-10deg); }

.deck-hint {
  display: flex; align-items: center; gap: 10px; margin: 10px auto 0; width: 100%; max-width: 680px; padding: 8px 8px 8px 14px;
  border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 13.5px; color: var(--n300); line-height: 1.4;
}
:root[dir="rtl"] .deck-hint { padding: 8px 14px 8px 8px; }
.deck-hint > .ph { color: var(--accent); }

.deck-bar { flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0 calc(14px + var(--safe-bottom)); }
.deck-buttons { display: flex; align-items: center; justify-content: center; gap: 14px; }
.deck-undo { width: 44px; display: grid; place-items: center; }
.deck-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; min-width: 56px; padding: 0 24px;
  border-radius: 999px; border: 1px solid var(--divider); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 500;
  box-shadow: 0 2px 10px var(--shadow); transition: background-color .12s, box-shadow .2s, transform .12s;
}
.deck-btn:active { transform: scale(.97); }
.deck-btn.like { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 30px -8px var(--glow), 0 2px 10px var(--shadow); }
.deck-btn.like.spent { opacity: .55; }
.deck-btn kbd {
  font: inherit; font-size: 11.5px; line-height: 1; padding: 3px 6px; border-radius: 5px; border: 1px solid var(--n800); color: var(--n500);
  font-family: "Inter", system-ui, sans-serif;
}
@media (hover: hover) {
  .deck-btn:hover { background: color-mix(in srgb, rgb(var(--glow-rgb) / .08), var(--surface)); }
  .deck-btn.like:hover { background: color-mix(in srgb, rgb(var(--glow-rgb) / .14), var(--surface)); }
}
/* The keys only mean something with a keyboard. */
@media (pointer: coarse) { .deck-btn kbd { display: none; } }

.likes-line { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12.5px; color: var(--n400); line-height: 1.3; }
.likes-line:disabled { cursor: default; }
.likes-line.out { color: var(--text); }
.likes-line.out:hover { background: rgb(var(--glow-rgb) / .07); }
.likes-line .ph { color: var(--accent); }

.deck-message {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 460px;
  margin-inline: auto; padding: 32px 24px; text-align: center;
}
.deck-message h2 { font-size: 20px; font-weight: 500; line-height: 1.25; margin-top: 4px; }
.deck-message p { color: var(--n300); font-size: 14.5px; line-height: 1.5; }
.deck-message .row { justify-content: center; margin-top: 8px; }

/* Phones: the photo and details stack and scroll together; the answers stay at the bottom as circles. */
@media (max-width: 599px) {
  .deck { padding: 0 10px; }
  .deck-btn { padding: 0; width: 60px; height: 60px; }
  .deck-btn kbd { display: none; }
  .deck-btn .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .deck-btn.like { width: 64px; height: 64px; }
  .deck-buttons { gap: 22px; }
}
/* Tablet and desktop: the card fills the space between the header and the answers, the details scroll inside it. */
@media (min-width: 768px) {
  .deck { padding: 0 28px; }
  /* Up to a comfortable height; on taller screens the room left over goes below the answers. */
  .deck-stage { flex: 0 1 820px; overflow: visible; display: flex; flex-direction: column; padding-bottom: 4px; }
  .deck-card { flex: 1; min-height: 0; }
  .deck-card > .person { height: 100%; min-height: 0; }
  .deck-card .gallery-main { aspect-ratio: auto; }
  .deck-bar { padding-top: 16px; }
}

/* ── Profile ─────────────────────────────────────────────────────────────── */
.profile > .header { width: 100%; max-width: 1120px; margin-inline: auto; }
.profile-main-btn { min-width: min(100%, 360px); }

/* ── The match moment ────────────────────────────────────────────────────── */
.match-moment {
  overflow-y: auto; align-items: center; justify-content: center; padding: calc(var(--safe-top) + 32px) 24px calc(var(--safe-bottom) + 24px);
  background:
    radial-gradient(90% 60% at 30% 30%, color-mix(in srgb, var(--a800) 55%, transparent), transparent 70%),
    linear-gradient(to bottom, color-mix(in srgb, var(--section) 50%, var(--bg)), var(--bg) 60%);
}
.match-panel { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 28px; margin-block: auto; }
.match-text { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.match-title { font-size: 46px; font-weight: 500; line-height: 1.05; letter-spacing: calc(-.03em * var(--track)); outline: none; }
.match-body { font-size: 16px; line-height: 1.55; color: var(--n300); }
.match-tiles { position: relative; height: 172px; }
.match-tile {
  position: absolute; width: 140px; height: 140px; border-radius: var(--r-tile); overflow: hidden;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--a700);
}
.match-tile.me { inset-inline-start: 4px; top: 0; }
.match-tile.other { inset-inline-start: 122px; top: 28px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--accent), 0 0 48px -6px var(--glow); }
/* The reveal: from a deep blur to clear over 1.4s (a photo a wali still has to approve stays as the API sends it). */
.match-tile .photo img { filter: blur(24px); transform: scale(1.12); transition: filter 1.4s var(--ease), transform 1.4s var(--ease), opacity .25s; }
.match-tiles.revealed .match-tile .photo:not(.locked) img { filter: none; transform: none; }
.match-khala { display: flex; gap: 10px; align-items: flex-start; }
.match-khala p { font-size: 15px; line-height: 1.5; color: var(--n200); }
.match-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.match-actions > .btn.ghost { align-self: center; }
@media (prefers-reduced-motion: reduce) { .match-tile .photo img { transition: none; } }
/* Desktop: the words beside the photos, the ways on under both. */
@media (min-width: 900px) {
  .match-panel { max-width: 860px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 56px; row-gap: 28px; align-items: center; }
  .match-text { grid-column: 1; grid-row: 1; }
  .match-tiles { grid-column: 2; grid-row: 1 / span 2; height: 230px; }
  .match-tile { width: 180px; height: 180px; }
  .match-tile.other { inset-inline-start: 116px; top: 48px; }
  .match-khala { grid-column: 1; grid-row: 2; }
  .match-actions { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .match-actions > .btn { width: auto; flex: 1; }
  .match-actions > .btn.ghost { flex: none; }
  .match-title { font-size: 56px; }
}

/* ── Likes ───────────────────────────────────────────────────────────────── */
.likes-tabs, .likes-body { width: 100%; max-width: 1120px; margin-inline: auto; }
.likes-tabs { padding: 14px 16px 16px; }
.likes-tabs .pill-tabs { max-width: 480px; }
.likes-body { padding: 0 16px 32px; }
@media (min-width: 768px) { .likes-tabs, .likes-body { padding-inline: 28px; } }
.likes-hint { font-size: 13.5px; color: var(--n400); margin-bottom: 12px; }
.likes-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 520px; padding: 16px 0 40px; }
.likes-empty h2 { font-size: 22px; font-weight: 500; line-height: 1.25; }
.likes-empty p { color: var(--n400); font-size: 15px; line-height: 1.5; }
.likes-empty .btn { margin-top: 8px; }
.likes-locked {
  display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; margin-bottom: 14px; border-radius: var(--r-card);
  background: rgb(var(--glow-rgb) / .07); box-shadow: var(--shadow-sm); max-width: 720px;
}
.likes-locked h2 { font-size: 16px; font-weight: 500; line-height: 1.35; }
.likes-locked p { margin-top: 4px; font-size: 14px; color: var(--n300); line-height: 1.45; }
.likes-locked .accent-icon { color: var(--accent); margin-top: 2px; }
.likes-locked .btn { align-self: flex-start; }
@media (min-width: 768px) {
  .likes-locked { flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; }
  .likes-locked .btn { align-self: center; flex: none; }
}

/* A grid of photo cards: two across on phones, as many as fit from there. */
.photo-cards { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 600px) { .photo-cards { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 16px; } }
.photo-card {
  position: relative; display: block; aspect-ratio: .74; border-radius: var(--r-tile); overflow: hidden; color: var(--text); text-decoration: none;
  background: var(--surface); box-shadow: 0 0 0 1px var(--divider); transition: transform .18s var(--ease), box-shadow .18s;
}
.photo-card > .photo.fill { border-radius: 0; }
.photo-card-fade { position: absolute; inset: 0; z-index: 3; background: linear-gradient(to bottom, transparent 45%, color-mix(in srgb, var(--bg) 88%, transparent)); }
.photo-card-text { position: absolute; inset-inline: 12px; bottom: 10px; z-index: 4; display: flex; flex-direction: column; min-width: 0; }
.photo-card-title { display: flex; align-items: center; gap: 6px; font-size: 15.5px; font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-card-sub { font-size: 12.5px; color: var(--n200); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-card-tags { position: absolute; top: 10px; inset-inline: 10px; z-index: 4; display: flex; flex-wrap: wrap; gap: 6px; }
.photo-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 500; line-height: 1.25;
  background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid var(--n700); color: var(--a100); backdrop-filter: blur(8px);
}
.photo-tag.fresh { border-color: var(--a600); }
.photo-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--glow); }
.photo-tag .ph { color: var(--a200); }
.photo-card.hidden { display: grid; place-items: center; color: var(--a300); background: linear-gradient(to bottom, var(--photo-top), var(--bg)); box-shadow: none; }
@media (hover: hover) {
  a.photo-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--a700), 0 10px 26px -12px var(--shadow); }
}
a.photo-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── Me ──────────────────────────────────────────────────────────────────── */
.me-grid { width: 100%; max-width: 1120px; margin-inline: auto; }
.me-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 28px; padding: 20px 16px 40px; align-items: start; }
@media (min-width: 768px) { .me-grid { padding-inline: 28px; } }
@media (min-width: 1100px) { .me-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.me-col { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.me-col + .me-col { margin-top: 28px; }
@media (min-width: 1100px) { .me-col + .me-col { margin-top: 0; } }
.me-card { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 4px 16px; }
.me-note { padding: 12px 14px; border-radius: var(--r-card); background: rgb(var(--glow-rgb) / .07); font-size: 14px; line-height: 1.45; color: var(--n200); }
.me-section { display: flex; flex-direction: column; gap: 10px; }
.me-section > .section-label { display: flex; align-items: center; }
.me-sub { font-size: 13.5px; color: var(--n400); line-height: 1.45; }
.me .pad-v { padding: 14px 0; }
.memories ul { display: flex; flex-direction: column; }
.memory { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--n900); }
.memory:last-child { border-bottom: 0; }
.memory-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px; background: rgb(var(--glow-rgb) / .1); box-shadow: inset 0 0 0 1px var(--a900); color: var(--accent); }
.memory .grow { display: flex; flex-direction: column; min-width: 0; }
.memory-label { font-size: 10.5px; color: var(--n500); letter-spacing: calc(.1em * var(--track)); text-transform: uppercase; line-height: 1.4; }
:root[lang="ar"] .memory-label { font-size: 12px; text-transform: none; }
.memory-value { font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.photo-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photo-level {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 8px 12px; border-radius: 16px; text-align: start;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--n800); transition: box-shadow .25s, background-color .25s;
}
.photo-level.on { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); box-shadow: inset 0 0 0 1px var(--accent), 0 0 28px -10px var(--glow); }
.photo-level.on::before { content: ""; position: absolute; top: -1px; left: 50%; width: 22px; height: 2px; margin-left: -11px; border-radius: 1px; background: var(--accent); box-shadow: 0 0 10px var(--glow); }
@media (hover: hover) { .photo-level:not(.on):hover { box-shadow: inset 0 0 0 1px var(--a700); } }
.photo-level-img { position: relative; width: 100%; aspect-ratio: 1; border-radius: 11px; overflow: hidden; margin-bottom: 8px; }
.photo-level-blur { position: absolute; inset: 0; }
.photo-level-icon { position: absolute; bottom: 6px; inset-inline-end: 6px; z-index: 4; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--bg) 65%, transparent); box-shadow: inset 0 0 0 1px var(--n800); color: var(--n400); }
.photo-level.on .photo-level-icon { color: var(--accent); box-shadow: inset 0 0 0 1px var(--a700); }
.photo-level .t-kicker { font-size: 10px; color: var(--n500); }
.photo-level.on .t-kicker { color: var(--accent); }
.photo-level-name { font-size: 13.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.photo-slider { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.photo-slider .t-kicker { font-size: 10px; color: var(--n500); }
.photo-slider-track { position: relative; flex: 1; height: 2px; border-radius: 1px; background: var(--n800); }
.photo-slider-track > span { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 1px; background: var(--accent); box-shadow: 0 0 10px var(--glow); transition: width .35s var(--ease); }
.photo-slider-track > span::after { content: ""; position: absolute; inset-inline-end: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--a100); box-shadow: 0 0 0 3px var(--glow-25), 0 0 12px var(--glow); }
.me-card.links { padding: 0 16px; }
.me-card .link-row + .link-row { border-top: 1px solid var(--n900); }
.me-card .toggle-row + .toggle-row { border-top: 1px solid var(--n900); }
.me-status { display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* ── Forms (preferences, account, edit profile, wali) ────────────────────── */
.prefs > .header, .account > .header, .edit > .header, .wali > .header, .premium > .header { width: 100%; max-width: 760px; margin-inline: auto; }
.form-col { width: 100%; max-width: 760px; margin-inline: auto; padding: 4px 16px 28px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 768px) { .form-col { padding-inline: 28px; } }
.form-card { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.form-card.links { gap: 0; padding-block: 0; }
.form-card.links .link-row + .link-row { border-top: 1px solid var(--n900); }
.form-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-row-head > span { font-size: 15px; font-variant-numeric: tabular-nums; }
.form-bar { flex: none; padding: 10px 0 calc(14px + var(--safe-bottom)); background: var(--bg); box-shadow: 0 -1px 0 var(--n900); }
.form-bar .form-col { padding-block: 0; flex-direction: row; justify-content: flex-end; }
@media (max-width: 599px) { .form-bar .btn { width: 100%; } }
.blocked { display: flex; flex-direction: column; }
.blocked li { display: flex; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--n900); }
.blocked li:last-child { border-bottom: 0; }

/* A slider: the browser's range inputs over a track of the app's. */
.slider { position: relative; height: 36px; display: flex; align-items: center; }
.slider-track { position: absolute; inset-inline: 10px; height: 2px; border-radius: 1px; background: var(--n800); }
.slider-fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--lo); border-radius: 1px; background: var(--accent); box-shadow: 0 0 10px var(--glow); }
.slider.range .slider-fill { inset-inline-start: var(--lo); width: calc(var(--hi) - var(--lo)); }
.slider input[type=range] {
  position: absolute; inset: 0; width: 100%; margin: 0; background: none; -webkit-appearance: none; appearance: none; pointer-events: none;
}
.slider input[type=range]::-webkit-slider-runnable-track { height: 36px; background: none; }
.slider input[type=range]::-moz-range-track { height: 36px; background: none; }
.slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; margin-top: 8px; border-radius: 50%; cursor: grab;
  background: var(--a100); box-shadow: 0 0 0 3px var(--glow-25), 0 0 12px var(--glow); border: 0;
}
.slider input[type=range]::-moz-range-thumb {
  pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; cursor: grab; background: var(--a100); box-shadow: 0 0 0 3px var(--glow-25), 0 0 12px var(--glow); border: 0;
}
:root[data-theme="light"] .slider input[type=range]::-webkit-slider-thumb { background: var(--surface); box-shadow: 0 0 0 2px var(--accent), 0 2px 8px var(--shadow); }
:root[data-theme="light"] .slider input[type=range]::-moz-range-thumb { background: var(--surface); box-shadow: 0 0 0 2px var(--accent), 0 2px 8px var(--shadow); }
.slider input[type=range]:focus-visible { outline: none; }
.slider input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 3px; }
.slider input[type=range]:focus-visible::-moz-range-thumb { outline: 2px solid var(--accent); outline-offset: 3px; }
:root[dir="rtl"] .slider input[type=range] { direction: rtl; }

.stretch-card {
  display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 14px 16px; border-radius: var(--r-card); text-align: start;
  background: rgb(var(--glow-rgb) / .07); box-shadow: inset 0 0 0 1px var(--a800), 0 0 32px -16px var(--glow); font-size: 15px;
}
.stretch-sub { padding-inline-start: 32px; font-size: 13.5px; color: var(--n300); line-height: 1.45; }

/* Edit profile: rows of a card, a label and its value (or the field itself) side by side on wide screens. */
.form-card.rows { gap: 0; padding: 0 16px; }
.form-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; min-height: 56px; padding: 8px 0; width: 100%; text-align: start; color: var(--text); }
.form-row + .form-row { border-top: 1px solid var(--n900); }
.form-row-icon { color: var(--n400); }
.form-row-label { font-size: 14.5px; }
.form-row.pick { grid-template-columns: 20px minmax(0, 1fr) minmax(0, auto) 14px; }
.form-row-value { font-size: 14px; color: var(--n300); text-align: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.form-row-value.empty { color: var(--accent); }
.form-row .chev { color: var(--n500); }
@media (hover: hover) { .form-row.pick:hover .form-row-label { color: var(--accent); } }
.form-row.text { grid-template-columns: 20px minmax(120px, 200px) minmax(0, 1fr); }
.form-row.text.multi { align-items: start; }
.form-row.text.multi .form-row-icon, .form-row.text.multi .form-row-label { margin-top: 10px; }
.form-input {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: var(--r-base); border: 1px solid transparent; background: rgb(var(--glow-rgb) / .05);
  font-size: 15px; line-height: 1.45; color: var(--text); resize: vertical; transition: border-color .12s, background-color .12s;
}
.form-input::placeholder { color: var(--n500); }
.form-input:hover { border-color: var(--n800); }
.form-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
@media (max-width: 599px) {
  .form-row.text { grid-template-columns: 20px minmax(0, 1fr); }
  .form-row.text .form-input { grid-column: 1 / -1; }
}
.edit-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 420px; margin-top: 10px; }
.edit-photo { position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; }
.edit-photo-add { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--divider); color: var(--accent); }
@media (hover: hover) { .edit-photos:hover .edit-photo-add { box-shadow: inset 0 0 0 1px var(--accent); } }
.edit-photo .photo-status.rejected { color: var(--danger); }
.edit-hint { margin-top: 8px; font-size: 12.5px; color: var(--n400); line-height: 1.4; }
.edit-hint.danger { color: var(--danger); }
.form-col > section > .section-label { margin-bottom: 10px; }

/* ── Wali ────────────────────────────────────────────────────────────────── */
.invite-text { font-size: 14.5px; line-height: 1.55; color: var(--n200); white-space: pre-line; }
.wali-sent { padding-top: 20px; }
.wali-sent h1 { font-size: 25px; outline: none; }
.sent-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1px var(--accent), 0 0 36px -6px var(--glow); color: var(--accent); }
.t-center { text-align: center; }

/* ── Premium ─────────────────────────────────────────────────────────────── */
.premium { background: linear-gradient(to bottom, color-mix(in srgb, var(--section) 55%, var(--bg)), var(--bg) 55%); }
.premium-col { width: 100%; max-width: 1000px; margin-inline: auto; padding: 0 16px 40px; }
@media (min-width: 768px) { .premium-col { padding-inline: 28px; } }
.premium-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 4px 0 28px; }
.premium-hero h1 { font-size: 32px; margin-top: 16px; }
.premium-hero p { font-size: 16px; color: var(--n300); max-width: 520px; line-height: 1.5; }
.premium-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
@media (min-width: 900px) { .premium-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 40px; } }
.benefits { display: flex; flex-direction: column; gap: 16px; }
.benefit { display: flex; gap: 14px; align-items: flex-start; }
.benefit-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 11px; background: rgb(var(--glow-rgb) / .1); box-shadow: inset 0 0 0 1px var(--a900); color: var(--accent); }
.benefit .grow { display: flex; flex-direction: column; gap: 2px; }
.benefit-title { font-size: 15.5px; font-weight: 500; }
.benefit-body { font-size: 13.5px; color: var(--n400); line-height: 1.45; }
.premium-side { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 900px) { .premium-side { position: sticky; top: 8px; } }
.premium-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.premium-card.tinted { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); box-shadow: inset 0 0 0 1px var(--a800); }
.premium-card h2 { font-size: 17px; font-weight: 500; line-height: 1.3; }
.premium-card p { font-size: 14px; color: var(--n300); line-height: 1.5; }
.premium-card .accent-icon { color: var(--accent); }
.premium-card .btn { margin-top: 4px; }
.plans { display: flex; flex-direction: column; gap: 10px; }
.plan { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border-radius: 16px; text-align: start; background: var(--surface); box-shadow: inset 0 0 0 1px var(--divider); transition: box-shadow .16s, background-color .16s; }
.plan.on { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 16px var(--glow-25); }
.plan .grow { display: flex; flex-direction: column; gap: 3px; }
.plan-name { font-size: 16px; font-weight: 500; }
.plan-price { font-size: 13.5px; color: var(--n300); }
.plan-tick { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--n700); color: var(--bg); }
.plan.on .plan-tick { background: var(--accent); box-shadow: none; }
.premium-fine { font-size: 12.5px; color: var(--n400); text-align: center; line-height: 1.45; }
.premium-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; }
