/* MotoRaf admin. Phone first: one column, grouped lists, a tab bar at the bottom.
   Lime is kept for what you act on (primary buttons, the current tab, links, «للبيع»). */
:root {
  --bg: #0C0E0F;
  --surface: #16191B;     /* lists, groups */
  --surface-2: #1F2427;   /* buttons, fields, pressed rows */
  --surface-3: #2A3034;   /* chosen segment */
  --hair: rgba(255, 255, 255, .08);
  --edge: #3D464B;        /* field and button outlines you can see */
  --text: #F3F5F6;
  --text-2: #B3BABE;
  --text-3: #858E93;
  --lime: #D0FA41;
  --lime-soft: rgba(208, 250, 65, .14);
  --ink: #0C0E0F;         /* text on lime */
  --red: #FF6B5E;
  --tabbar: 64px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 Cairo, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
a { color: var(--lime); }
h1, h2, h3, p { margin: 0; }
.num { font-family: Rajdhani, Cairo, sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.bad { color: var(--red); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- buttons ---- */
button { font: inherit; color: inherit; cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 16px;
  background: var(--surface-2); color: var(--text); border: 1.5px solid var(--edge); border-radius: 12px;
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; }
.btn .i { width: 19px; height: 19px; }
.btn:active { background: var(--surface-3); }
.btn.primary { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.btn.primary:active { filter: brightness(.9); }
.btn.small { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.wide { width: 100%; }
.btn.danger { background: transparent; color: var(--red); border-color: rgba(255, 107, 94, .45); }
.btn:disabled { opacity: .7; }
.quiet { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 0; color: var(--text-2); font-weight: 600; font-size: 14px; text-decoration: none; }
.quiet .i { width: 18px; height: 18px; }
.link { background: none; border: 0; padding: 0; color: var(--lime); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* ---- shell: sidebar on a computer, bottom tab bar on a phone ---- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 24px 14px; border-inline-end: 1px solid var(--hair); }
.nav-logo { margin: 0 10px 22px; }
.nav-logo img { display: block; width: 120px; height: auto; }
.nav a:not(.nav-logo) { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 600; }
.nav a:not(.nav-logo):hover { color: var(--text); background: var(--surface); }
.nav a[aria-current] { color: var(--lime); background: var(--surface); }
.nav a { position: relative; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--lime); color: var(--ink);
  font-size: 13px; font-weight: 700; line-height: 20px; text-align: center; margin-inline-start: auto; }
.main { width: 100%; max-width: 760px; padding: 36px 40px 64px; }

/* ---- page parts ---- */
.back { display: inline-flex; align-items: center; gap: 2px; margin: 0 -6px 6px 0; padding: 6px 0; font-weight: 600; font-size: 15px; text-decoration: none; }
.back .i { width: 22px; height: 22px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.page-head .back { margin-bottom: 0; }
.page-title { font-size: 26px; line-height: 1.3; font-weight: 700; }
h1.page-title:not(.page-head *) { margin-bottom: 14px; }
.count { color: var(--text-3); font-size: .72em; font-weight: 600; margin-inline-start: 4px; }
section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 4px 8px; }
.section-head h2 { font-size: 15px; font-weight: 700; color: var(--text-2); }
.section-head a { font-size: 14px; font-weight: 600; text-decoration: none; }
.empty { color: var(--text-2); padding: 28px 16px; text-align: center; background: var(--surface); border-radius: 16px; }
.hint { font-size: 13.5px; font-weight: 400; color: var(--text-3); }
.notice { margin: 12px 0; padding: 10px 14px; background: var(--surface); border-radius: 12px; border-inline-start: 3px solid var(--text-3); font-size: 14.5px; }
.notice.bad { border-color: var(--red); color: var(--text); }
.footnote { margin-top: 28px; text-align: center; font-size: 12.5px; color: var(--text-3); }

/* ---- grouped lists: one surface, rows split by hairlines ---- */
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 16px; overflow: hidden; }
.list li + li::before { content: ""; display: block; height: 1px; background: var(--hair); margin-inline-start: 82px; }
.row { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 10px 14px; color: var(--text); text-decoration: none; }
.row:active, .row:hover { background: var(--surface-2); }
.row > .i, .row-end > .i { color: var(--text-3); }
.thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); }
.thumb.empty { display: grid; place-items: center; color: var(--text-3); }
.avatar { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--surface-3); color: var(--lime); font-weight: 700; font-size: 22px; line-height: 1; }
.avatar .i { width: 24px; height: 24px; color: var(--text-2); }
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.lg { width: 68px; height: 68px; font-size: 28px; }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-title, .row-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-title { font-weight: 700; font-size: 16px; text-align: right; }  /* the panel is RTL; an English name still sits on the right */
.row-sub { font-size: 13.5px; color: var(--text-2); text-align: right; }
.row-sub .phone, .row-sub.phone { font-size: 15px; letter-spacing: .02em; color: var(--text-2); }
.row-end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.price { font-size: 17px; font-weight: 700; white-space: nowrap; }
.price .num { font-weight: 700; }
.price small { font-size: 12px; color: var(--text-3); font-weight: 600; }
.status { font-size: 12px; font-weight: 700; line-height: 1; padding: 4px 8px 5px; border-radius: 999px; }
.status.for_sale { background: var(--lime-soft); color: var(--lime); }
.status.sold { background: rgba(255, 255, 255, .09); color: var(--text-2); }
.when { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.counts { display: flex; gap: 10px; color: var(--text-2); font-size: 13px; }
.counts > span { display: inline-flex; align-items: center; gap: 3px; }
.counts .i { width: 15px; height: 15px; }

/* ---- home ---- */
.home-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.home-logo { display: none; height: auto; }
.tally { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tally a { display: grid; gap: 0; padding: 12px 14px; background: var(--surface); border-radius: 16px; color: var(--text-2); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.tally a:active { background: var(--surface-2); }
.tally .num { font-size: 30px; line-height: 1.2; font-weight: 700; color: var(--text); }

/* ---- segmented control: list filter, ad status ---- */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; margin-bottom: 14px; background: var(--surface); border-radius: 12px; }
.segmented a, .segmented button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 10px;
  border: 0; border-radius: 9px; background: none; color: var(--text-2); font-weight: 700; font-size: 14.5px; text-decoration: none; }
.segmented .num { color: var(--text-3); font-size: 14px; }
.segmented [aria-current], .segmented [aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.segmented [aria-current] .num { color: var(--text-2); }
.status-switch button[value="for_sale"][aria-pressed="true"] { background: var(--lime); color: var(--ink); }
.status-switch button[value="sold"][aria-pressed="true"] { background: var(--text); color: var(--ink); }

/* ---- search ---- */
.search { position: relative; margin-bottom: 14px; }
.search .i { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search input { width: 100%; padding-inline-start: 44px; border-color: transparent; background: var(--surface); border-radius: 12px; }

/* ---- client page ---- */
.person { display: flex; align-items: center; gap: 16px; margin: 4px 0 16px; }
.person h1 { font-size: 22px; line-height: 1.35; }
.person-phone { font-size: 27px; font-weight: 700; color: var(--lime); letter-spacing: .03em; line-height: 1.2; text-align: end; }
.quick { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 10px; background: var(--surface); border-radius: 14px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.quick a:active { background: var(--surface-2); }
.quick .i { width: 24px; height: 24px; color: var(--lime); }
.section-head .quiet { padding: 0; }
.day { margin-top: 18px; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 4px 8px; }
.day-head h3 { font-size: 14px; color: var(--text-2); text-align: right; }
.day-head .link { font-size: 13.5px; }
.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px; }
.grid a { position: relative; display: block; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--surface); }
.grid img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.play { position: absolute; inset: auto auto 6px 6px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; }
.play .i { width: 16px; height: 16px; }
section > .btn.wide { margin-bottom: 4px; }

/* ---- ad page ---- */
.ad-head { margin-bottom: 14px; }
.ad-no { font-size: 14px; color: var(--text-3); }
.ad-head h1 { font-size: 24px; line-height: 1.35; }
.ad-facts { margin-top: 2px; color: var(--text-2); font-size: 15px; }
.ad-facts strong { color: var(--text); }
.posts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.posts a { display: block; border-radius: 12px; overflow: hidden; background: var(--surface); }
.posts img { width: 100%; height: auto; display: block; }
/* the seller's own photos keep their shape, in the posts' 4:5 frame */
.posts .seller-photo { aspect-ratio: 1080 / 1350; display: grid; place-items: center; }
.posts .seller-photo img { height: 100%; object-fit: contain; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.caption { display: block; width: 100%; padding: 14px 16px; background: var(--surface); color: var(--text-2); border: 0; border-radius: 16px; font: 15px/1.8 Cairo, sans-serif; resize: vertical; }
.danger-zone { margin-top: 36px; }
.danger-zone .btn { width: 100%; }

/* ---- forms ---- */
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.label { font-size: 14px; font-weight: 600; color: var(--text-2); }
input, select, textarea { width: 100%; min-height: 48px; font: 16px Cairo, sans-serif; color: var(--text); background: var(--surface-2);
  border: 1.5px solid var(--edge); border-radius: 12px; padding: 10px 14px; }
input[type=radio], input[type=file] { min-height: 0; }
/* a phone number with its country's flag on the left, where the number starts */
.phone-input { position: relative; display: block; }
.phone-input input { padding-left: 46px; }
.phone-flag { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 20px; line-height: 1;
  pointer-events: none; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
textarea { line-height: 1.7; resize: vertical; }
::placeholder { color: var(--text-3); opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--lime); outline: none; }
select { appearance: none; -webkit-appearance: none; padding-inline-start: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B3BABE' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 18px; background-position: left 14px center; }
.field-error { color: var(--red); font-size: 13.5px; font-weight: 600; }
.ad-form { display: grid; gap: 14px; }
.group { margin: 0; display: grid; gap: 14px; padding: 16px; background: var(--surface); border-radius: 18px; }
.group h2 { font-size: 16px; font-weight: 700; }
.group input, .group select, .group textarea { background-color: var(--bg); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
details.hint summary { cursor: pointer; color: var(--text-2); }
details.hint[open] summary { margin-bottom: 4px; }

/* photo strip: upload tile, then the seller's photos; swipe sideways */
.strip { list-style: none; margin: 0 -16px; padding: 2px 16px 6px; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip li { flex: none; scroll-snap-align: start; }
.strip label, .strip .more { position: relative; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--bg); cursor: pointer; }
.strip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
/* a photo tile takes the photo's own shape at the strip's height: never cropped, no bars, tall or wide */
.strip label:not(.upload):has(img), .strip .tile:has(img) { display: block; width: auto; }
.strip label:not(.upload) img, .strip .tile img { position: static; width: auto; height: 96px; max-width: none; }
.pick input[type=checkbox], .pick input[type=radio] { position: absolute; opacity: 0; }
/* the request page's cover choice: the picked photo framed and marked «الإعلان», like the ad form */
.pick label:has(input[type=radio]:checked) { outline: 4px solid var(--lime); outline-offset: -4px; }
.pick label:has(input[type=radio]:checked)::before { content: "الإعلان"; position: absolute; inset: auto 0 0; z-index: 1; padding: 2px 0 3px;
  background: var(--lime); color: var(--ink); font-size: 12.5px; font-weight: 800; text-align: center; }
.pick label:has(input:focus-visible) { box-shadow: 0 0 0 2px var(--text); }
/* chosen photos: lime frame and their number in the order picked; number 1 is in the post template */
.pick label[data-n] { outline: 3px solid var(--lime); outline-offset: -3px; }
.pick label[data-n]::after { content: attr(data-n); position: absolute; top: 6px; inset-inline-start: 6px; min-width: 24px; height: 24px;
  border-radius: 12px; padding: 0 6px; background: var(--lime); color: var(--ink); font: 700 15px/24px Rajdhani, sans-serif; text-align: center; }
.pick label.is-cover { outline-width: 4px; }
.pick label.is-cover::before { content: "الإعلان"; position: absolute; inset: auto 0 0; z-index: 1; padding: 2px 0 3px; background: var(--lime);
  color: var(--ink); font-size: 12.5px; font-weight: 800; text-align: center; }
/* «المختارة»: the chosen photos in order, small; 1 is «الإعلان» */
.chosen { display: grid; gap: 6px; }
.chosen-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chosen-row button { position: relative; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 10px; overflow: hidden;
  background: var(--bg); outline: 2px solid var(--lime); outline-offset: -2px; }
.chosen-row img { display: block; width: auto; height: 64px; max-width: none; }  /* its own shape, like the strip */
.chosen-row button, .chosen-row button.is-cover { width: auto; }
.chosen-row button::after { content: attr(data-n); position: absolute; top: 3px; inset-inline-start: 3px; min-width: 18px; height: 18px;
  border-radius: 9px; padding: 0 4px; background: var(--lime); color: var(--ink); font: 700 12px/18px Rajdhani, sans-serif; }
.chosen-row button.is-cover { width: 88px; outline-width: 3px; }
.chosen-row button.is-cover::before { content: "الإعلان"; position: absolute; inset: auto 0 0; z-index: 1; padding: 1px 0 2px;
  background: var(--lime); color: var(--ink); font-size: 11.5px; font-weight: 800; text-align: center; }
.pick label:has(input:focus-visible) { outline: 2px dashed var(--lime); outline-offset: -2px; }
.upload { align-content: center; gap: 2px; border: 1.5px dashed var(--edge); color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.upload .i { width: 26px; height: 26px; color: var(--lime); }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload.has-file { border: 0; outline: 3px solid var(--lime); outline-offset: -3px; }
.upload.has-file img { position: absolute; inset: 0; }
.strip .more { border: 1.5px solid var(--edge); color: var(--lime); font-weight: 700; font-size: 14px; }

.submit-bar { position: sticky; bottom: 0; z-index: 5; margin: 0 -40px; padding: 12px 40px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, transparent); }
.submit-bar .btn { width: 100%; min-height: 52px; font-size: 16px; }

/* searchable seller-number dropdown */
.combo { position: relative; display: grid; gap: 6px; }
.combo > label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.combo-list { position: absolute; top: 100%; inset-inline: 0; z-index: 30; margin: 4px 0 0; padding: 4px; list-style: none;
  background: var(--surface-2); border: 1.5px solid var(--edge); border-radius: 12px; max-height: 320px; overflow-y: auto; box-shadow: 0 16px 32px rgba(0, 0, 0, .55); }
.combo-list button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: none; border: 0; color: var(--text); padding: 10px; border-radius: 8px; text-align: start; }
.combo-list li + li button { border-top: 1px solid var(--hair); border-radius: 0; }
.combo-list button:hover, .combo-list button:active, .combo-list button:focus-visible { background: var(--bg); color: var(--lime); }
.combo-list .num { font-size: 16px; }
.combo-empty { padding: 10px; color: var(--text-2); font-size: 14px; }

/* pager */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.pager .btn { min-height: 40px; }

/* sign-in */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 360px; display: grid; gap: 14px; }
.login-card img { height: auto; margin-bottom: 8px; }
.login-card h1 { font-size: 18px; color: var(--text-2); font-weight: 600; margin-bottom: 4px; }
.login-card .btn { margin-top: 6px; min-height: 52px; }

/* sessions (reached by URL only) */
table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 14px; }
th { text-align: start; color: var(--text-2); font-weight: 600; font-size: 13px; }
th, td { padding: .7rem .6rem; border-bottom: 1px solid var(--hair); }
.tag { font-size: 12px; color: var(--ink); background: var(--lime); border-radius: 4px; padding: 0 .4rem; }

/* ---- الطلبات (requests from the public form) ---- */
.page-lead { color: var(--text-2); font-size: 15px; margin: -6px 0 16px; }
.specs-list { margin: 0; padding: 14px 16px; padding-inline-start: 34px; background: var(--surface); border-radius: 16px; display: grid; gap: 4px; }
.specs-list li::marker { color: var(--lime); }
.review { margin-top: 0; }
.review .actions { margin-top: 18px; }
.review-note { margin-top: 8px; }

/* ---- the public form (motoraf.sa/sell): no tabs, one centred column ---- */
.public { max-width: 560px; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom)); }
.public-logo { display: inline-block; margin-bottom: 18px; }
.public-logo img { display: block; width: 132px; height: auto; }
.public .submit-bar { bottom: 0; margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.public .footnote { margin-top: 4px; }
.upload-wide { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 64px; padding: 12px;
  border: 1.5px dashed var(--edge); border-radius: 14px; color: var(--text-2); font-weight: 600; font-size: 15px; cursor: pointer; }
.upload-wide .i { width: 26px; height: 26px; color: var(--lime); }
.upload-wide input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-wide:has(input:focus-visible) { outline: 2px solid var(--lime); outline-offset: 2px; }
.strip .tile { position: relative; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 12px; overflow: hidden;
  background: var(--bg); color: var(--text-2); font-size: 12px; }
.strip .tile .i { width: 28px; height: 28px; color: var(--lime); }
.strip li:has(.tile-x) { position: relative; }
.strip .tile:is(.is-wait, .is-work) img { opacity: .35; }
/* each file's own state: بالانتظار, نجهزها… (a photo shrinking), نرفعه 37% (a video going up), ✓ جاهزة */
.tile-state { position: absolute; bottom: 4px; inset-inline-start: 4px; display: flex; align-items: center; gap: 4px;
  padding: 0 8px; border-radius: 999px; background: rgba(12, 14, 15, .82); color: var(--text-2); font-size: 11px; line-height: 20px; white-space: nowrap; }
:is(.is-work, .is-up) .tile-state { color: var(--text); }
:is(.is-work, .is-up) .tile-state::before { content: ""; width: 9px; height: 9px; border: 2px solid var(--lime); border-inline-end-color: transparent; border-radius: 50%; }
.is-ready .tile-state { color: var(--lime); }
.tile:is(.is-big, .is-fail) .tile-state { color: #fff; background: var(--red); }
.tile-x { position: absolute; top: 4px; inset-inline-end: 4px; width: 28px; height: 28px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: rgba(12, 14, 15, .82); color: var(--text); font-size: 13px; line-height: 1; }
.tile-x::before { content: ""; position: absolute; inset: -8px; }  /* a 44px tap target */
.tile-x:active { background: var(--red); }
/* «وصلنا إعلانك»: confirmation, then the accounts the ad goes up on (follow, share) */
.public:has(.done) { text-align: center; }
.public:has(.done) .public-logo { margin-inline: auto; margin-bottom: 0; }
.done { display: grid; justify-items: center; gap: 10px; margin-top: 4vh; }
.done-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--lime-soft);
  color: var(--lime); margin-bottom: 2px; }
.done-mark .i { width: 32px; height: 32px; stroke-width: 2.4; }
.done h1 { font-size: 28px; line-height: 1.3; }
.done .page-lead { margin: 0; max-width: 34ch; }
.follow { width: 100%; margin-top: 18px; padding: 18px 16px 16px; border-radius: 20px; background: var(--surface);
  border: 1.5px solid rgba(208, 250, 65, .35); display: grid; gap: 12px; text-align: start; }
.follow h2 { font-size: 20px; line-height: 1.35; }
.follow > p { font-size: 14.5px; color: var(--text-2); line-height: 1.6; }
.follow .list { background: var(--bg); }
.follow .row { min-height: 64px; }
.follow .row-sub { font-size: 15px; letter-spacing: .02em; }
.social { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--lime); }
.social .i { width: 24px; height: 24px; }
.done-actions { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; margin-top: 6px; }
.done-actions .quiet { color: var(--text-2); }
.done-wish { margin-top: 6px; font-size: 14.5px; color: var(--text-3); }
/* ---- phone ---- */
@media (max-width: 760px) {
  .shell { display: block; }
  .nav { position: fixed; inset: auto 0 0 0; z-index: 20; height: auto; flex-direction: row; gap: 0; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--hair);
    background: rgba(12, 14, 15, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
  .nav-logo { display: none; }
  .nav a:not(.nav-logo) { flex-direction: column; gap: 2px; padding: 4px 2px; font-size: 11.5px; color: var(--text-3); background: none !important; }
  .nav a[aria-current] { color: var(--lime); }
  .nav .i { width: 24px; height: 24px; }
  .nav .badge { position: absolute; top: 0; inset-inline-start: calc(50% + 4px); margin: 0; min-width: 18px; height: 18px; line-height: 18px; font-size: 12px; padding: 0 5px; }
  .main { padding: calc(14px + env(safe-area-inset-top)) 16px calc(var(--tabbar) + 28px + env(safe-area-inset-bottom)); }
  .home-logo { display: block; }
  .page-title { font-size: 24px; }
  .row-sub .phone { font-size: 14.5px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 0 -16px; }
  .grid a { border-radius: 0; }
  /* posts: swipe between them, the next one peeking in */
  .posts { display: flex; gap: 10px; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .posts::-webkit-scrollbar { display: none; }
  .posts a { flex: 0 0 86%; scroll-snap-align: center; }
  .submit-bar { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); margin: 0 -16px; padding: 12px 16px; }
}
@keyframes tile-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: no-preference) {
  .posts, .strip { scroll-behavior: smooth; }
  :is(.is-work, .is-up) .tile-state::before { animation: tile-spin .8s linear infinite; }
}
