/* Lenci · Nawaa — publishing to all six platforms (v3/nawaa-publish.js): capability chips, the awaiting_manual badge, the
   "Post to <platform>" dialog (share sheet / QR code / I posted it). Logical properties only (RTL); phone first. */
.nwp-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); font-family: var(--display); font-weight: 600; font-size: 10px; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; color: var(--muted); background: rgba(255,255,255,.04); }
.nwp-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.nwp-chip.auto { color: #b8f5df; border-color: rgba(52,211,153,.5); background: rgba(52,211,153,.1); }
.nwp-chip.assisted { color: #c9e9ff; border-color: rgba(34,211,238,.45); background: rgba(34,211,238,.08); }
.nwp-chip.reconnect { color: #fde6b8; border-color: rgba(245,176,65,.55); background: rgba(245,176,65,.1); }
.nwp-caps { display: flex; flex-wrap: wrap; gap: 6px 12px; flex-basis: 100%; }
.nwp-cap { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.nwp-cap b { font-family: var(--display); font-weight: 600; color: var(--ink); }
.nw-ai-channels li .nwp-chip { margin-inline-start: auto; }
.nw-ai.awaiting_manual { background: rgba(34,211,238,.16); border-color: rgba(34,211,238,.7); color: #d4f6ff; box-shadow: 0 0 10px rgba(34,211,238,.25); }
.nw-ai-count.awaiting_manual b { color: #8be9fd; }
.nw-post-pub.assist { border-color: rgba(34,211,238,.6); color: #d4f6ff; }
.nw-dr-publish .nwp-assist.ghost { border-radius: 999px; padding: 7px 14px; }

/* the dialog */
.nwp-back { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(5,5,10,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: nwpIn .18s ease-out; }
@keyframes nwpIn { from { opacity: 0; } to { opacity: 1; } }
.nwp-card { position: relative; width: min(860px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; padding: 22px; border-radius: 22px; border: 1px solid var(--line-2); background: linear-gradient(180deg, #161622, #0f0f17); box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05); }
.nwp-x { position: absolute; top: 12px; inset-inline-end: 12px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.nwp-x:hover { color: var(--ink); }
.nwp-head { display: flex; align-items: center; gap: 10px; padding-inline-end: 40px; }
.nwp-head h2 { margin: 0; font-family: var(--display); font-size: 19px; color: var(--ink); }
.nwp-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pc, #8b5cf6); box-shadow: 0 0 12px var(--pc, #8b5cf6); flex: none; }
.nwp-back[data-platform="instagram"] { --pc: #e1306c; } .nwp-back[data-platform="tiktok"] { --pc: #5ee7ef; } .nwp-back[data-platform="snapchat"] { --pc: #fffc00; }
.nwp-back[data-platform="x"] { --pc: #e7e9ea; } .nwp-back[data-platform="linkedin"] { --pc: #0a66c2; } .nwp-back[data-platform="youtube"] { --pc: #ff3b30; }
.nwp-why { margin: 8px 0 16px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.nwp-body { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 18px; align-items: start; }
.nwp-media { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #0a0a0f; aspect-ratio: 4 / 5; display: grid; place-items: center; }
.nwp-media img, .nwp-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.nwp-nomedia { margin: 0; padding: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.nwp-side { display: grid; gap: 14px; min-width: 0; }
.nwp-caption { border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); padding: 10px 12px; }
.nwp-caption-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.nwp-caption-head strong { font-family: var(--display); font-size: 12px; color: var(--ink); }
.nwp-caption-text { margin: 0; max-height: 150px; overflow: auto; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; color: var(--ink); }
.nwp-caption-line { text-align: start; white-space: pre-wrap; }
.nwp-caption-line bdi { unicode-bidi: isolate; }
.nwp-step { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.nwp-share { width: 100%; padding: 14px 18px; font-size: 13px; border-radius: 14px; }
.nwp-qr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; border-radius: 16px; border: 1px solid rgba(34,211,238,.35); background: rgba(34,211,238,.05); }
.nwp-qr-code { width: 156px; height: 156px; border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.nwp-qr-code svg { width: 100%; height: 100%; display: block; }
.nwp-qr-text { display: grid; gap: 6px; min-width: 0; }
.nwp-qr-text strong { font-family: var(--display); font-size: 14px; color: var(--ink); }
.nwp-qr-text p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.nwp-qr-meta { font-size: 11px !important; color: var(--dim) !important; }
.nwp-qr-url { font-family: var(--mono); font-size: 11px; color: #8be9fd; overflow-wrap: anywhere; }
.nwp-qr-err { margin: 0; padding: 10px; font-size: 12px; color: #b91c1c; text-align: center; }
.nwp-copylink { justify-self: start; }
.nwp-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(0,0,0,.12); border-top-color: #6366f1; animation: nwpSpin .8s linear infinite; }
@keyframes nwpSpin { to { transform: rotate(360deg); } }
.nwp-more { display: flex; flex-wrap: wrap; gap: 8px; }
.nwp-more a.ghost { text-decoration: none; display: inline-flex; align-items: center; }
.nwp-posted { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.nwp-posted.ask { border-top-color: rgba(52,211,153,.5); }
.nwp-ask { margin: 0; font-family: var(--display); font-weight: 600; font-size: 13px; color: #b8f5df; }
.nwp-link { display: grid; gap: 4px; font-size: 11.5px; color: var(--muted); }
.nwp-link input { width: 100%; min-width: 0; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(0,0,0,.3); color: var(--ink); font: 13px var(--mono, monospace); text-align: start; }
.nwp-posted-btn { justify-self: start; border-radius: 999px; }
@media (max-width: 720px) {
  .nwp-back { place-items: end center; padding: 0; }
  .nwp-card { border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 92vh; max-height: 92dvh; }
  .nwp-body { grid-template-columns: minmax(0, 1fr); }
  .nwp-media { aspect-ratio: auto; max-height: 34vh; }
  .nwp-media img, .nwp-media video { object-fit: contain; max-height: 34vh; }
  .nwp-qr { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .nwp-copylink { justify-self: center; }
  .nwp-posted-btn { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) { .nwp-back, .nwp-spin { animation: none; } }

/* the one-time page /p/<token> (v3/nawaa-handoff.html): one column, thumb-sized buttons, the platform colour as an accent */
body.nwh { margin: 0; min-height: 100vh; min-height: 100dvh; background: radial-gradient(120% 60% at 50% -10%, rgba(99,102,241,.22), transparent 60%), var(--canvas); color: var(--ink); font-family: var(--sans, Inter, system-ui, sans-serif); overflow-x: hidden; }
html[lang="ar"] body.nwh { font-family: Cairo, "Segoe UI", Tahoma, sans-serif; }
.nwh-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); }
.nwh-brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--ink); }
.nwh-mark { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #22d3ee, #8b5cf6); box-shadow: 0 0 14px rgba(34,211,238,.45); }
.nwh-main { width: min(520px, 100%); margin: 0 auto; padding: 4px 16px calc(96px + env(safe-area-inset-bottom)); box-sizing: border-box; } /* room for the support bubble */
.nwh-loading { display: grid; place-items: center; min-height: 50vh; }
.nwh-card { display: grid; gap: 14px; padding: 18px; border-radius: 22px; border: 1px solid var(--line-2); background: linear-gradient(180deg, #161622, #0f0f17); box-shadow: 0 24px 60px rgba(0,0,0,.5); min-width: 0; }
.nwh-card[data-platform="instagram"] { --pc: #e1306c; } .nwh-card[data-platform="tiktok"] { --pc: #5ee7ef; } .nwh-card[data-platform="snapchat"] { --pc: #fffc00; }
.nwh-card[data-platform="x"] { --pc: #e7e9ea; } .nwh-card[data-platform="linkedin"] { --pc: #0a66c2; } .nwh-card[data-platform="youtube"] { --pc: #ff3b30; }
.nwh-head { display: flex; align-items: flex-start; gap: 10px; }
.nwh-head .nwp-dot { margin-top: 7px; }
.nwh-head h1 { margin: 0; font-family: var(--display); font-size: 20px; line-height: 1.3; }
.nwh-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.nwh-media { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #0a0a0f; display: grid; place-items: center; max-height: 46vh; }
.nwh-media img, .nwh-media video { display: block; width: 100%; max-height: 46vh; object-fit: contain; }
.nwh-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nwh-steps li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.nwh-steps li.done { color: var(--muted); }
.nwh-num { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono, monospace); font-size: 11px; color: #0a0a0f; background: var(--pc, #22d3ee); }
.nwh-steps li.done .nwh-num { background: #34d399; }
.nwh-share { width: 100%; padding: 16px 18px; font-size: 14px; border-radius: 16px; }
.nwh-more { justify-content: center; }
.nwh-posted-btn { width: 100%; justify-self: stretch; padding: 13px 16px; border-radius: 14px; }
.nwh-foot { margin: 0; font-size: 11.5px; color: var(--dim); text-align: center; line-height: 1.5; }
.nwh-done, .nwh-state { text-align: center; justify-items: center; }
.nwh-done { display: grid; gap: 8px; padding: 18px 6px; }
.nwh-done h2, .nwh-state h1 { margin: 0; font-family: var(--display); font-size: 20px; }
.nwh-done p, .nwh-state p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.nwh-done-mark, .nwh-state-mark { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; color: #0a0a0f; background: #34d399; box-shadow: 0 0 30px rgba(52,211,153,.45); }
.nwh-state-mark { background: rgba(255,255,255,.08); color: var(--muted); box-shadow: none; }
.nwh-state a.ghost { text-decoration: none; }
.nwh-toast { position: fixed; inset-inline: 16px; top: calc(12px + env(safe-area-inset-top)); margin: 0 auto; max-width: 420px; padding: 11px 14px; border-radius: 12px; background: rgba(20,20,30,.96); border: 1px solid var(--line-2); color: var(--ink); font-size: 13px; text-align: center; opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90; }
.nwh-toast.on { opacity: 1; transform: none; }
