:root {
  --bg: #f5f6fb; --surface: #ffffff; --surface-2: #eef0f8; --text: #14152a; --muted: #6b6f8a;
  --border: #e1e4f0; --brand: #5b5bf0; --brand-2: #8a5bf0; --danger: #d93a4a; --ok: #1f9d68;
  --shadow: 0 6px 24px rgba(30, 30, 90, .08);
  --grad: linear-gradient(135deg, #5b5bf0 0%, #8a5bf0 55%, #d05bd8 100%);
  --radius: 18px; --tabbar-h: 66px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0f1020; --surface: #181a31; --surface-2: #20233f; --text: #eceefb; --muted: #9a9fc2;
    --border: #2a2d4d; --shadow: 0 6px 24px rgba(0, 0, 0, .35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1020; --surface: #181a31; --surface-2: #20233f; --text: #eceefb; --muted: #9a9fc2;
  --border: #2a2d4d; --shadow: 0 6px 24px rgba(0, 0, 0, .35); color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: clamp(17px, 0.9vw + 14px, 20px); -webkit-text-size-adjust: 100%; }
html[data-fs="l"] { font-size: clamp(19px, 1vw + 15px, 22px); }
html[data-fs="xl"] { font-size: clamp(21px, 1.1vw + 16px, 24px); }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Noto Naskh Arabic", sans-serif;
  line-height: 1.5; }
body { font-size: 1rem; }
h1, h2, h3 { margin: 0 0 .35em; line-height: 1.25; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .75em; }
a { color: var(--brand); text-decoration: none; }
.muted { color: var(--muted); }
.hint { display: block; color: var(--muted); font-size: .82rem; margin: -4px 0 12px; }

/* Buttons & fields */
.btn { appearance: none; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 12px 18px; border-radius: 14px; font: inherit; font-weight: 600; cursor: pointer;
  transition: transform .12s ease, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--grad); color: #fff; border: 0; box-shadow: 0 6px 18px rgba(91, 91, 240, .35); }
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn.block { width: 100%; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: .88rem; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.field textarea { resize: vertical; min-height: 84px; }
.form-error { color: var(--danger); font-size: .9rem; min-height: 1.3em; margin-bottom: 8px; }
.notice { background: var(--surface-2); border: 1px solid var(--border); padding: 12px 14px;
  border-radius: 14px; margin-bottom: 14px; font-size: .92rem; }

/* Auth */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(1200px 500px at 50% -10%, rgba(138, 91, 240, .25), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 26px; padding: 28px 22px; box-shadow: var(--shadow); animation: rise .35s ease both; }
.auth-card h1 { text-align: center; }
.auth-card > .muted { text-align: center; margin-bottom: 18px; }
.brand-mark { width: 64px; height: 64px; border-radius: 20px; background: var(--grad); display: grid; place-items: center;
  margin: 0 auto 12px; box-shadow: 0 8px 22px rgba(91, 91, 240, .4); }
.brand-mark svg { width: 34px; height: 34px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.switch { text-align: center; margin: 16px 0 6px; color: var(--muted); }
.auth-tools { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.chip { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); padding: 7px 14px;
  border-radius: 999px; font: inherit; font-size: .85rem; cursor: pointer; }

/* Centered states */
.center-state { min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: 24px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--brand);
  animation: spin .8s linear infinite; margin: 0 auto 12px; }

/* Onboarding */
.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 10px 0 18px; }
.progress > i { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width .3s; }
.avatar-pick { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 8px 0 18px; }
.actions { display: flex; gap: 10px; margin-top: 8px; }
.actions .btn { flex: 1; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border);
  border-radius: 16px; background: var(--surface); margin-bottom: 10px; cursor: pointer; }
.radio-card.on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(91, 91, 240, .25); }
.radio-card input { margin-top: 4px; accent-color: var(--brand); }
.radio-card b { display: block; }
.radio-card small { color: var(--muted); }

/* Avatars */
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; display: grid;
  place-items: center; font-weight: 700; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 96px; height: 96px; font-size: 2rem; }

/* Shell */
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.main { flex: 1; padding: 18px 16px calc(var(--tabbar-h) + 28px); max-width: 760px; width: 100%; margin-inline: auto; }
.tabbar { position: fixed; inset-inline: 0; bottom: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px); border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(7, 1fr); z-index: 20; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted);
  font-size: 11px; padding: 6px 1px; min-width: 0; text-align: center; }
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab svg, .side-link svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.active { color: var(--brand); }
.tab.active svg { transform: translateY(-1px) scale(1.08); }
.side { display: none; }

@media (min-width: 900px) {
  .shell { flex-direction: row; }
  .tabbar { display: none; }
  .side { display: flex; flex-direction: column; gap: 6px; width: 260px; padding: 22px 14px; position: sticky; top: 0;
    height: 100dvh; background: var(--surface); border-inline-end: 1px solid var(--border); }
  .side .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; padding: 0 8px 14px; }
  .side .brand .brand-mark { width: 40px; height: 40px; border-radius: 13px; margin: 0; box-shadow: none; }
  .side .brand .brand-mark svg { width: 22px; height: 22px; }
  .side-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; color: var(--text); font-weight: 600; }
  .side-link.active { background: var(--surface-2); color: var(--brand); }
  .side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px; color: var(--muted); font-size: .9rem; }
  .main { padding: 28px 28px 40px; }
}

/* Cards & views */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.hero { background: var(--grad); color: #fff; border: 0; }
.hero .muted { color: rgba(255, 255, 255, .85); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 10px; text-align: center; }
.stat b { display: block; font-size: 1.7rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .76rem; }
.skeleton { display: inline-block; width: 28px; height: 1.4rem; border-radius: 8px; background: var(--surface-2); animation: pulse 1.2s infinite; }
.shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
button.shortcut { font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; appearance: none; }
.qr-box { width: min(280px, 100%); margin: 8px auto 4px; padding: 10px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); }
.qr-box svg { display: block; width: 100%; height: auto; }
.ltr-text { direction: ltr; word-break: break-all; font-size: .8rem; }
.scan-box { width: 100%; aspect-ratio: 1 / 1; max-height: 56dvh; background: #000; border-radius: 18px; overflow: hidden; margin: 6px 0 10px; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.shortcut { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: .88rem; }
.shortcut svg { width: 26px; height: 26px; stroke: var(--brand); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.soon { text-align: center; padding: 38px 18px; }
.soon .ico { width: 72px; height: 72px; border-radius: 24px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 14px; }
.soon .ico svg { width: 34px; height: 34px; stroke: var(--brand); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.profile-head { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 16px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--text); padding: 8px 14px; border-radius: 10px; font: inherit; font-size: .88rem; cursor: pointer; }
.seg button.on { background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); font-weight: 700; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; }
.toast { position: fixed; inset-inline: 16px; bottom: calc(var(--tabbar-h) + 18px); margin-inline: auto; max-width: 420px; padding: 12px 16px;
  border-radius: 14px; background: var(--text); color: var(--bg); text-align: center; font-weight: 600; opacity: 0;
  transform: translateY(8px); transition: .25s; z-index: 50; }
.toast.show { opacity: 1; transform: none; }
.toast.err { background: var(--danger); color: #fff; }
.hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Phase 2: chats, groups, modals ---------- */
.hidden { display: none !important; }
.center { text-align: center; }
.grow { flex: 1; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.field select { width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.btn.sm { padding: 7px 12px; border-radius: 11px; font-size: .85rem; }
.badge { background: var(--brand); color: #fff; border-radius: 999px; min-width: 22px; padding: 1px 7px; font-size: .75rem; font-weight: 700; text-align: center; }
.badge.sm { font-size: .68rem; padding: 0 7px; min-width: 0; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mini-actions { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.seg.wide { display: flex; width: 100%; margin-bottom: 12px; }
.seg.wide button { flex: 1; }

.conv { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--border); margin-bottom: 8px; color: var(--text); }
.conv.static { cursor: default; }
.conv-main { flex: 1; min-width: 0; }
.conv-top, .conv-bot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.conv-bot { margin-top: 2px; font-size: .9rem; }
.center-inline { display: grid; place-items: center; height: 60vh; }

.code-big { font-size: 2.4rem; font-weight: 800; letter-spacing: .35em; text-align: center; padding: 16px 0 6px; font-variant-numeric: tabular-nums; }

.modal-back { position: fixed; inset: 0; background: rgba(8, 8, 24, .55); display: flex; align-items: flex-end; justify-content: center; z-index: 60; padding: 12px; }
.modal { width: 100%; max-width: 460px; max-height: 88dvh; overflow: auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px; padding: 20px; box-shadow: var(--shadow); animation: rise .2s ease both; }
@media (min-width: 600px) { .modal-back { align-items: center; } }
.menu-list { display: grid; gap: 8px; margin-top: 12px; }
.results .result { padding: 10px 0; border-bottom: 1px solid var(--border); }

/* chat screen */
.shell.chat-mode .tabbar { display: none; }
.shell.chat-mode .main { padding-bottom: 12px; }
.chat-wrap { display: flex; flex-direction: column; height: calc(100dvh - 30px); min-height: 360px; }
.chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.chat-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.icon-btn { appearance: none; border: 0; background: transparent; color: var(--text); width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:active { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .flip svg { transform: scaleX(-1); }
.icon-btn.send { background: var(--grad); color: #fff; }
.chat-search { padding: 8px 0; }
.chat-search input { width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.msgs { flex: 1; overflow-y: auto; padding: 12px 2px; display: flex; flex-direction: column; gap: 6px; }
.msgs .empty { margin: auto; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg-name { font-size: .75rem; color: var(--muted); margin: 0 8px 2px; cursor: pointer; text-decoration: underline dotted; }
.bubble { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 8px 12px; word-break: break-word; overflow-wrap: anywhere; }
.msg.mine .bubble { background: var(--grad); color: #fff; border: 0; }
.bubble .meta { display: block; font-size: .68rem; opacity: .75; margin-top: 3px; text-align: end; }
.tick.read { color: #9ff0ff; opacity: 1; font-weight: 700; }
.att-img { cursor: zoom-in; max-width: 100%; max-height: 260px; border-radius: 12px; display: block; background: var(--surface-2); min-height: 40px; min-width: 80px; }
.att-file { color: inherit; text-decoration: underline; }
.bubble audio { max-width: 100%; height: 40px; }
.typing { min-height: 1.3em; font-size: .8rem; padding: 0 6px; }
.composer { border-top: 1px solid var(--border); padding-top: 8px; }
.comp-row { display: flex; align-items: flex-end; gap: 4px; }
.comp-row textarea { flex: 1; resize: none; max-height: 120px; padding: 10px 12px; border-radius: 18px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; line-height: 1.4; }
.comp-row textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.emoji-panel { display: flex; flex-wrap: wrap; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 6px; max-height: 150px; overflow: auto; }
.emoji-panel button { border: 0; background: transparent; font-size: 1.4rem; padding: 4px 6px; cursor: pointer; border-radius: 8px; }
.off-banner { position: fixed; top: 0; inset-inline: 0; z-index: 80; background: var(--danger); color: #fff; text-align: center;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px; font-size: .88rem; font-weight: 600; }

/* ---------- Phase 3: nearby ---------- */
.status-grid { display: grid; gap: 12px; }
@media (min-width: 600px) { .status-grid { grid-template-columns: repeat(3, 1fr); } }
.status { display: flex; align-items: flex-start; gap: 10px; }
.status b { display: block; }
.status small { display: block; line-height: 1.35; }
.dot { width: 11px; height: 11px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--border); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 4px rgba(31, 157, 104, .18); }
.dot.warn { background: #e0a526; box-shadow: 0 0 0 4px rgba(224, 165, 38, .18); }
.discovery { text-align: center; }
.radar { position: relative; width: 120px; height: 120px; margin: 4px auto 10px; display: grid; place-items: center; }
.radar span { width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; z-index: 1; }
.radar span svg { width: 26px; height: 26px; stroke: var(--muted); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.discovery.on .radar span { background: var(--grad); }
.discovery.on .radar span svg { stroke: #fff; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; }
.discovery.on .radar i { animation: ping 2.4s ease-out infinite; }
.discovery.on .radar i:nth-child(2) { animation-delay: .8s; }
.discovery.on .radar i:nth-child(3) { animation-delay: 1.6s; }
@keyframes ping { 0% { transform: scale(.45); opacity: .7; } 100% { transform: scale(1); opacity: 0; } }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger); animation: pulse 1s infinite; margin: 14px 6px; }
#recRow { align-items: center; }

/* ---------- Phase 7: services ---------- */
.small { font-size: .82rem; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.svc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.svc-head h1 { margin: 0; }
.svc-filters { display: grid; gap: 8px; margin-bottom: 14px; }
.svc-filters input, .svc-filters select { width: 100%; padding: 11px 12px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; min-width: 0; }
.svc-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.svc-row select { flex: 1; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.svc-list { display: grid; gap: 10px; margin-bottom: 12px; }
.svc-card { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.svc-card.plain { border: 0; padding: 0; background: transparent; }
.svc-thumb { width: 72px; height: 72px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex: none; font-size: 1.8rem; }
.svc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.svc-info { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.svc-peek { margin-top: 10px; }
.svc-gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin-bottom: 12px; border-radius: 16px; }
.svc-gallery img { height: 220px; max-width: 86%; border-radius: 16px; object-fit: cover; scroll-snap-align: start; flex: none; background: var(--surface-2); }
.status-pill { display: inline-block; align-self: flex-start; font-size: .75rem; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); margin-top: 3px; }
.status-pill.active { background: rgba(31, 157, 104, .15); color: var(--ok); }
.status-pill.flagged { background: rgba(217, 58, 74, .15); color: var(--danger); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph > button:not(.add) { position: absolute; top: 4px; inset-inline-end: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.ph.add { border: 2px dashed var(--border); background: transparent; color: var(--muted); font-size: 1.6rem; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; font-family: inherit; }
.ph.add small { font-size: .7rem; }

/* map */
.map-box { height: min(58dvh, 460px); margin-bottom: 8px; }
.map-box.small { height: 240px; }
.nmap { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 16px; background: #cfd8dc; touch-action: none; user-select: none; -webkit-user-select: none; border: 1px solid var(--border); }
.nmap-tiles, .nmap-marks { position: absolute; inset: 0; }
.nmap-tiles img { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; user-select: none; -webkit-user-drag: none; }
.nmap-pin { position: absolute; left: 0; top: 0; width: 30px; height: 40px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.nmap-pin svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.nmap-ctl { position: absolute; top: 8px; inset-inline-end: 8px; display: flex; flex-direction: column; gap: 6px; }
.nmap-ctl button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid #b8c0c8; background: #fff; color: #222; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.nmap-attr { position: absolute; bottom: 0; inset-inline-end: 0; background: rgba(255, 255, 255, .8); color: #333; font-size: .68rem; padding: 2px 6px; border-top-left-radius: 8px; }

/* ---------- Phase 8: reviews ---------- */
.rate { color: #e0a100; font-weight: 600; white-space: nowrap; }
.rate .muted { font-weight: 400; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rev { padding: 12px 0; border-top: 1px solid var(--border); }
.rev:first-of-type { border-top: 0; }
.rev .who { display: flex; align-items: center; gap: 8px; }
.rev-meta { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.stars { color: #e0a100; letter-spacing: 1px; }
.rev-reply { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; margin: 6px 0; }
.rev-reply p { margin: 2px 0 0; }
.star-pick { display: flex; gap: 6px; justify-content: center; margin: 8px 0 12px; }
.star-pick button { font-size: 2rem; line-height: 1; background: transparent; border: 0; color: var(--border); cursor: pointer; padding: 4px; }
.star-pick button.on { color: #e0a100; }

.legal h2 { margin: 0 0 4px; }
.legal h3 { margin: 14px 0 4px; font-size: 1em; }
.legal p { margin: 0 0 6px; line-height: 1.7; }

/* longer languages (ru/de): let rows and chips wrap instead of forcing horizontal scroll */
.auth-tools { flex-wrap: wrap; }
.row { flex-wrap: wrap; row-gap: 8px; }
.seg { flex-wrap: wrap; max-width: 100%; }
.svc-card, .svc-info { min-width: 0; }

/* ---- voice calls ---- */
.call-ov { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg, #0b0d12) 92%, #000); color: var(--text, #fff); padding: 24px; }
.call-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 36px; text-align: center; }
.call-who { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.call-who .avatar.lg { width: 112px; height: 112px; font-size: 44px; }
.call-who h2 { margin: 8px 0 0; font-size: 1.5rem; overflow-wrap: anywhere; }
.call-who p { margin: 0; font-size: 1.05rem; min-height: 1.5em; }
.call-actions { display: flex; gap: 40px; justify-content: center; }
.call-act { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .85rem; }
.call-btn { width: 68px; height: 68px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: #fff; background: #4b5563; }
.call-btn.red { background: #dc2626; } .call-btn.red svg { transform: rotate(135deg); }
.call-btn.green { background: #16a34a; } .call-btn.on { background: #f59e0b; }
.call-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* Local (hotspot) mode */
.lo-ov { position: fixed; inset: 0; z-index: 190; background: var(--bg); color: var(--text); overflow-y: auto; padding: 16px; display: flex; justify-content: center; }
.lo-card { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lo-card h2, .lo-card h3 { margin: 0; overflow-wrap: anywhere; }
.lo-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lo-exp { border: 1px dashed var(--border); border-radius: 12px; padding: 8px 12px; margin: 0; }
.lo-lab { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.lo-lab input, .lo-card textarea { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.lo-card textarea { resize: vertical; direction: ltr; }
.lo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lo-qr { display: flex; justify-content: center; }
.lo-qr canvas { width: 100%; max-width: 320px; height: auto; background: #fff; border-radius: 12px; padding: 4px; image-rendering: pixelated; }
.lo-video { width: 100%; max-width: 320px; border-radius: 12px; background: #000; display: block; margin: 0 auto; }
.lo-err { color: var(--danger); margin: 0; overflow-wrap: anywhere; }
.lo-chat { display: flex; flex-direction: column; gap: 8px; min-height: 70dvh; }
.lo-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.lo-headbtn { display: flex; gap: 8px; }
.lo-note { margin: 0; font-size: .8rem; }
.lo-msgs { min-height: 200px; max-height: 50dvh; border: 1px solid var(--border); border-radius: 12px; padding: 8px; }
.lo-callbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 8px 12px; }
.lo-callbtns { display: flex; gap: 12px; }
.lo-callbtns .call-btn { width: 52px; height: 52px; }
.lo-callmsg { margin: 0; }

/* Collapsible home sections */
.fold { margin-top: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.fold > summary { list-style: none; cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ''; width: 9px; height: 9px; border-inline-end: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; margin-inline-end: 4px; }
.fold[open] > summary::after { transform: rotate(-135deg); }
.fold > div { padding: 0 12px 12px; }
.fold > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 16px; }

/* ad banner slot */
#adSlot:empty { display: none; }
.ad-banner { display: flex; align-items: center; gap: 12px; position: relative; margin-bottom: 14px; padding: 10px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px dashed var(--border); color: var(--text); text-decoration: none; min-height: 56px; }
.ad-banner img { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; flex: none; }
.ad-text { display: flex; flex-direction: column; min-width: 0; }
.ad-text span { color: var(--muted); font-size: .85rem; }
.ad-tag { position: absolute; top: 4px; inset-inline-end: 8px; font-size: .65rem; color: var(--muted); }

/* photo viewer */
.lb { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center; touch-action: none; user-select: none; -webkit-user-drag: none; }
.lb-bar { position: absolute; top: max(12px, env(safe-area-inset-top)); inset-inline: 12px; display: flex; justify-content: space-between; z-index: 1; }
.lb-x, .lb-dl { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }

/* unread badge on the Chats tab */
a.tab, a.side-link { position: relative; }
.tab-badge { position: absolute; top: 2px; inset-inline-start: 55%; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger, #e5484d); color: #fff;
  font-style: normal; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; }
a.side-link .tab-badge { top: 50%; transform: translateY(-50%); inset-inline-start: auto; inset-inline-end: 10px; }

/* call device picker */
.call-dev { margin-top: 14px; text-align: start; background: rgba(255,255,255,.08); border-radius: 14px; padding: 10px; max-height: 40vh; overflow: auto; }
.call-dev h4 { margin: 8px 4px 4px; font-size: .85rem; opacity: .8; }
.dev-row { display: block; width: 100%; text-align: start; padding: 10px 12px; margin: 3px 0; border: 0; border-radius: 10px; background: rgba(255,255,255,.1); color: inherit; font: inherit; cursor: pointer; }
.dev-row.on { background: rgba(91,91,240,.6); }

/* ---- opening hours ---- */
.open-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text); max-width: 100%; }
.open-badge i { width: 8px; height: 8px; border-radius: 50%; background: #9aa0a6; flex: none; }
.open-badge.open { background: #e3f6e8; color: #11632b; } .open-badge.open i { background: #1db954; }
.open-badge.soon { background: #fff3d6; color: #8a5a00; } .open-badge.soon i { background: #f5a300; }
.open-badge.closed { background: #fde7e7; color: #9b1c1c; } .open-badge.closed i { background: #e04848; }
.open-badge.on-cover { box-shadow: 0 2px 8px rgba(0,0,0,.25); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .open-badge.open { background: #12351d; color: #8fe2a8; } :root:not([data-theme="light"]) .open-badge.soon { background: #3a2c08; color: #f4cd7a; } :root:not([data-theme="light"]) .open-badge.closed { background: #3d1515; color: #f2a1a1; } }
:root[data-theme="dark"] .open-badge.open { background: #12351d; color: #8fe2a8; } :root[data-theme="dark"] .open-badge.soon { background: #3a2c08; color: #f4cd7a; } :root[data-theme="dark"] .open-badge.closed { background: #3d1515; color: #f2a1a1; }
.hrs-table { width: 100%; border-collapse: collapse; margin: 6px 0; } .hrs-table th { text-align: start; font-weight: 600; padding: 6px 0; } .hrs-table td { text-align: end; padding: 6px 0; } .hrs-table tr + tr { border-top: 1px solid var(--border); } .hrs-table tr.today { color: var(--primary, #0a7d5a); font-weight: 700; } .hrs-table td.muted { color: var(--muted, #888); }
.hrs-edit { display: grid; gap: 8px; margin-top: 6px; } .hrs-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .hrs-on { display: flex; align-items: center; gap: 6px; min-width: 110px; } .hrs-row input[type=time] { padding: 6px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); } .hrs-row input[type=time]:disabled { opacity: .4; }

/* ---- storefront ---- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.shop-card { display: block; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.shop-cover { position: relative; height: 140px; background: linear-gradient(135deg, var(--surface-2), var(--border)); display: grid; place-items: center; font-size: 3rem; overflow: hidden; }
.shop-cover::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 10px; background: repeating-linear-gradient(90deg, #d9534f 0 18px, #fff 18px 36px); z-index: 1; opacity: .9; }
.shop-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-sign { position: absolute; inset-inline-start: 10px; bottom: 10px; z-index: 2; }
.shop-body { display: flex; gap: 10px; align-items: center; padding: 10px 12px 12px; }
.shop-logo { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; border: 3px solid var(--surface); box-shadow: 0 1px 6px rgba(0,0,0,.2); flex: none; margin-top: -26px; background: var(--surface); display: grid; place-items: center; }
.shop-logo.lg { width: 68px; height: 68px; margin-top: -40px; }
.shop-logo img, .shop-logo .avatar { width: 100%; height: 100%; object-fit: cover; }
.shop-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; } .shop-txt h1 { margin: 0; font-size: 1.25rem; }
.shop-hero { border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); margin-bottom: 12px; }
.shop-hero-img { position: relative; height: 200px; background: linear-gradient(135deg, var(--surface-2), var(--border)); display: grid; place-items: center; font-size: 4rem; }
.shop-hero-img::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 14px; background: repeating-linear-gradient(90deg, #d9534f 0 22px, #fff 22px 44px); z-index: 1; }
.shop-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-hero-bar { display: flex; gap: 12px; align-items: center; padding: 12px 14px 14px; }
.ad-banner.poster { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; gap: 0; }
.ad-banner.poster img { width: 100%; height: auto; max-height: 240px; border-radius: 0; object-fit: cover; }
.ad-banner.poster .ad-text { padding: 10px 14px 12px; }
.ad-banner.poster .ad-tag { background: rgba(0,0,0,.45); color: #fff; padding: 1px 6px; border-radius: 6px; }
.ad-live { margin: 6px 0 12px; } #adSlotBottom { margin-top: 14px; }

/* ---- verified badge + catalogue ---- */
.v-badge { display: inline-flex; align-items: center; justify-content: center; width: 1.15em; height: 1.15em; border-radius: 50%; background: #1d9bf0; color: #fff; font-size: .72em; font-weight: 700; vertical-align: middle; flex: none; }
.v-line { display: flex; gap: 8px; align-items: center; margin: 0; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cat-item { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.cat-item.out .cat-img img { filter: grayscale(1); opacity: .6; }
.cat-img { position: relative; aspect-ratio: 1 / 1; background: var(--surface-2); display: grid; place-items: center; font-size: 2.2rem; overflow: hidden; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.cat-img em { position: absolute; inset-inline-start: 6px; top: 6px; background: rgba(0,0,0,.65); color: #fff; font-style: normal; font-size: .72rem; padding: 2px 8px; border-radius: 999px; }
.cat-info { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px 10px; }
.cat-price { font-weight: 700; color: var(--primary, #0a7d5a); }
.cat-item .mini-actions { padding: 0 10px 10px; display: flex; gap: 6px; }
.cat-prev { max-width: 120px; max-height: 120px; border-radius: 10px; margin-top: 6px; object-fit: cover; }
.ellip2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Phase 19: favourites, share, top rated */
.svc-card, .shop-card { position: relative; }
.fav-btn { position: absolute; top: 6px; inset-inline-end: 8px; z-index: 3; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.92); color: #888; font-size: 19px; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.25); user-select: none; }
.fav-btn.on { color: #e0245e; }
.fav-btn.big { position: static; display: inline-grid; width: 44px; height: 44px; font-size: 24px; vertical-align: middle; border: 1px solid var(--line, #ddd); box-shadow: none; }
.home-top h3 { margin-top: 18px; }
.top-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.top-card { flex: 0 0 132px; display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: inherit; scroll-snap-align: start; }
.top-img { height: 84px; border-radius: 12px; background: var(--card, #f2f2f2); display: grid; place-items: center; overflow: hidden; font-size: 28px; }
.top-img img { width: 100%; height: 100%; object-fit: cover; }

/* Phase 20: providers, documents, shop ads, connect fold */
.connect-fold { margin-top: 12px; }
.connect-fold .fold-body { padding: 0 16px 14px; }
.doc-row { border-top: 1px solid var(--border); padding: 10px 0; }
.doc-st { font-size: .8rem; padding: 2px 10px; border-radius: 999px; background: var(--surface-2, #eee); white-space: nowrap; }
.doc-approved { background: #d9f2e3; color: #14683a; }
.doc-pending { background: #fff0c9; color: #8a5a00; }
.doc-rejected, .doc-stopped { background: #fadbd8; color: #922b21; }
.doc-row .btn.disabled { opacity: .5; pointer-events: none; }
.shop-ad { position: relative; overflow: hidden; border-radius: 0 0 14px 14px; margin-top: 2px; }
.shop-ad.txt { height: 30px; display: flex; align-items: center; font-weight: 700; font-size: .9rem; }
.shop-ad .marq { display: inline-block; white-space: nowrap; padding-inline-start: 100%; animation: shopMarq 12s linear infinite; }
html[dir="rtl"] .shop-ad .marq { animation-name: shopMarqRtl; }
@keyframes shopMarq { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes shopMarqRtl { from { transform: translateX(0); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .shop-ad .marq { animation: none; padding-inline-start: 8px; } }
.shop-ad.gif img { display: block; width: 100%; max-height: 120px; object-fit: cover; }
.ad-tag { position: absolute; inset-block-start: 2px; inset-inline-end: 6px; font-style: normal; font-size: .62rem; background: rgba(0,0,0,.45); color: #fff; padding: 0 6px; border-radius: 6px; }

/* phase 21: "Ahali + area" name bar (phones; the side menu shows it on big screens) */
.area-bar { display: flex; align-items: center; gap: 10px; padding: 8px 4px 2px; font-weight: 800; font-size: 1.05rem; }
.area-bar .brand-mark { width: 30px; height: 30px; border-radius: 10px; margin: 0; box-shadow: none; }
.area-bar .brand-mark svg { width: 100%; height: 100%; }
.chat-mode .area-bar { display: none; }
@media (min-width: 900px) { .area-bar { display: none; } }
a.btn[href="#/settings"], #admOpenBtn, .adm-tabs button { position: relative; }
.btn .tab-badge, .adm-tabs .tab-badge { top: -7px; inset-inline-start: auto; inset-inline-end: -4px; transform: none; }

/* phase 22: statistics */
.st-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.st-table th { font-weight: 600; color: var(--muted); text-align: start; padding: 4px 6px; font-size: .8rem; }
.st-table td { padding: 6px; border-top: 1px solid var(--line, rgba(128,128,128,.2)); vertical-align: top; }
.st-up { color: #1a9d5a; } .st-down { color: #d64545; }
.st-ad { padding: 8px 0 4px; border-top: 1px solid var(--line, rgba(128,128,128,.2)); }
.st-ad:first-of-type { border-top: 0; }
.st-bars { display: flex; gap: 6px; align-items: flex-end; height: 70px; margin: 8px 0; }
.st-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: .68rem; color: var(--muted); }
.st-bar i { display: block; width: 100%; min-height: 3px; background: var(--brand); border-radius: 4px 4px 0 0; }

/* phase 23: friends */
.fr-row { align-items: center; gap: 8px; }
.fr-row .who { min-width: 0; flex: 1; }
.fr-row .mini-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.shortcut { position: relative; }

/* phase 24 */
.btn.wa { background: #0b7d4b; color: #fff; border-color: #0b7d4b; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

/* phase 24: simpler home */
.home-search { display: flex; gap: 8px; margin-top: 12px; }
.home-search input { flex: 1; min-width: 0; font-size: 1.05rem; padding: 12px 14px; }
.home-big { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.big-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 22px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 1.1rem; }
.big-tile svg { width: 34px; height: 34px; }
.home-cats { justify-content: flex-start; margin-top: 14px; }
.home-add { margin-top: 14px; text-align: center; }
#moreFold > summary { position: relative; }
#moreFold > summary .tab-badge { position: static; transform: none; margin-inline-start: auto; }
.card .actions { flex-wrap: wrap; }
.card .actions .btn { flex: 1 1 auto; }

/* phase 25: quick add + sheet */
.qa-steps { display: flex; gap: 6px; margin-bottom: 10px; }
.qa-steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--border); }
.qa-steps i.on { background: var(--brand); }
.qa-types .big-tile { cursor: pointer; font: inherit; }
.qa-emoji { font-size: 2.2rem; line-height: 1; }
.qa-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.cat-tile { display: flex; align-items: center; gap: 10px; padding: 14px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-align: start; cursor: pointer; }
.cat-tile span { font-size: 1.5rem; }
.group-hint { margin: 2px 0 10px; }
}
.home-big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.big-tile { min-width: 0; text-align: center; overflow-wrap: anywhere; }

/* phase 26: modern home */
.home-hero { position: relative; overflow: hidden; border-radius: 28px; padding: 22px 18px 18px; color: #fff;
  background: radial-gradient(120% 90% at 100% 0%, #6a5cf5 0%, #4b3fd1 45%, #2f2796 100%); box-shadow: 0 14px 34px rgba(60, 50, 180, .32); }
.hh-rings { position: absolute; inset-block-start: -90px; inset-inline-end: -90px; width: 300px; height: 300px; color: rgba(255, 255, 255, .17); pointer-events: none; }
.home-hero > * { position: relative; }
.home-hero .hh-rings { position: absolute; }
.hh-greet { margin: 0 0 4px; font-size: .92rem; opacity: .85; }
.home-hero h1 { font-size: 1.65rem; line-height: 1.3; margin: 0 0 16px; max-width: 16em; }
.hh-search { display: flex; align-items: center; gap: 8px; background: #fff; color: #14152a; border-radius: 18px; padding: 6px 6px 6px 14px; padding-inline: 14px 6px; box-shadow: 0 8px 22px rgba(10, 8, 60, .28); }
.hh-search svg { flex: none; color: #6b6f8a; }
.hh-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; padding: 10px 2px; }
.hh-search input::placeholder { color: #8a8ea8; }
.hh-search button { border: 0; border-radius: 13px; padding: 11px 18px; font: inherit; font-weight: 700; color: #fff; background: #4b3fd1; cursor: pointer; }
.hh-search:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, .55), 0 8px 22px rgba(10, 8, 60, .28); }
.hh-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: .88rem; }
.hh-try span { opacity: .8; }
.hh-try button { border: 1px solid rgba(255, 255, 255, .38); background: rgba(255, 255, 255, .12); color: #fff; border-radius: 999px; padding: 5px 13px; font: inherit; cursor: pointer; }
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; margin: 22px 0 6px; }
.cat-pill { display: flex; flex-direction: column; align-items: center; gap: 7px; background: none; border: 0; padding: 0; font: inherit; color: var(--text); cursor: pointer; }
.cp-ic { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 22px; font-size: 1.7rem; background: color-mix(in srgb, var(--hc) 100%, transparent); transition: transform .15s; }
.cat-pill:active .cp-ic { transform: scale(.93); }
.cp-t { font-size: .76rem; line-height: 1.25; text-align: center; font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cp-ic { background: color-mix(in srgb, var(--hc) 24%, var(--surface)); } }
:root[data-theme="dark"] .cp-ic { background: color-mix(in srgb, var(--hc) 24%, var(--surface)); }
.group-cards { display: grid; gap: 10px; margin-top: 18px; }
.group-card { flex-direction: row; justify-content: flex-start; text-align: start; gap: 14px; padding: 14px 16px; border-radius: 20px; }
.gc-ic { display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 18px; font-size: 1.7rem; }
.g-services .gc-ic { background: #dde4ff; } .g-shops .gc-ic { background: #ffe3cc; }
.gc-tx { display: flex; flex-direction: column; min-width: 0; } .gc-tx b { font-size: 1.1rem; } .gc-tx small { color: var(--muted); font-size: .82rem; }
.home-cta { display: flex; gap: 14px; align-items: center; margin-top: 22px; padding: 18px; border-radius: 22px; background: color-mix(in srgb, #f5b942 18%, var(--surface)); border: 1px solid color-mix(in srgb, #f5b942 40%, var(--border)); }
.home-cta .hc-ic { font-size: 2.4rem; }
.home-cta b { font-size: 1.1rem; } .home-cta p { margin: 2px 0 10px; font-size: .9rem; }
.home-cta .home-add { margin: 0; display: inline-block; }
.home-hero { margin-top: 8px; }

/* Phase 27: provider ad takes the cover spot (instead of the emoji) + shows on service cards */
.shop-cover.has-ad { position: relative; }
.shop-cover .cover-ad { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px; text-align: center; font-size: 1.35rem; line-height: 1.4; }
.shop-cover .ad-tag { position: absolute; bottom: 6px; inset-inline-end: 8px; font-size: .68rem; font-style: normal; background: rgba(0,0,0,.45); color: #fff; padding: 1px 6px; border-radius: 8px; }
.shop-cover.has-ad > img { width: 100%; height: 100%; object-fit: cover; }
.svc-card { flex-wrap: wrap; }
.svc-card .shop-ad { flex: 0 0 100%; border-radius: 10px; }

/* Phase 28: eye-catching ads on shop cards (shine sweep + glow pulse + blinking tag) */
.shop-ad.txt, .shop-ad.gif, .shop-cover .cover-ad { isolation: isolate; }
.shop-ad.txt::after, .shop-ad.gif::after, .shop-cover .cover-ad::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%);
  transform: translateX(-120%); animation: adShine 2.8s ease-in-out infinite;
}
.shop-ad.txt .marq { position: relative; z-index: 2; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.shop-ad.txt, .shop-ad.gif { animation: adGlow 1.6s ease-in-out infinite; }
.shop-cover .cover-ad b { animation: adPop 1.4s ease-in-out infinite; text-shadow: 0 2px 6px rgba(0,0,0,.4); font-size: 1.5rem; }
.ad-tag { z-index: 3; animation: adBlink 1.2s steps(2, jump-none) infinite; }
@keyframes adShine { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(120%); } }
@keyframes adGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,214,10,0); filter: saturate(1); } 50% { box-shadow: 0 0 12px 2px rgba(255,214,10,.75); filter: saturate(1.25); } }
@keyframes adPop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.09); } }
@keyframes adBlink { 0% { opacity: 1; } 100% { opacity: .35; } }
html[dir="rtl"] .shop-ad.txt::after, html[dir="rtl"] .shop-ad.gif::after, html[dir="rtl"] .shop-cover .cover-ad::after { animation-name: adShineRtl; }
@keyframes adShineRtl { 0% { transform: translateX(120%); } 55%, 100% { transform: translateX(-120%); } }
@media (prefers-reduced-motion: reduce) {
  .shop-ad.txt::after, .shop-ad.gif::after, .shop-cover .cover-ad::after { animation: none; display: none; }
  .shop-ad.txt, .shop-ad.gif, .shop-cover .cover-ad b, .ad-tag { animation: none; }
}

/* Phase 29: Menu tab */
.mn-list { display: grid; gap: 10px; margin-top: 10px; }
.mn-item { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text); min-width: 0; }
a.mn-item:active { transform: scale(.99); }
.mn-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; background: rgba(91,91,240,.14); flex: none; }
.mn-tx { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mn-tx small { margin-top: 2px; }
.mn-btns { display: flex; gap: 6px; flex: none; }
.mn-item.soon { opacity: .55; }
.mn-soon { font-style: normal; font-size: .7rem; padding: 2px 8px; border-radius: 10px; background: rgba(128,128,128,.25); flex: none; }
.mn-item.qr { flex-wrap: wrap; }
.mn-item.qr .mn-btns { flex: 1 0 100%; padding-inline-start: 54px; }

.mn-item.support { background: #0b7d4b; border-color: #0b7d4b; color: #fff; }
.mn-item.support .muted { color: rgba(255,255,255,.85); }
.mn-item.support .mn-ic { background: rgba(255,255,255,.2); }

/* Phase 33: guest mode */

.area-bar .area-login { margin-inline-start: auto; }

/* Phase 34: the price sits on its own line under the name of a sale listing */
.sale-price { font-weight: 800; color: #0b9d63; margin: 2px 0; font-size: 1rem; }
.sale-price.big { font-size: 1.35rem; margin: 4px 0 8px; }
