/*
 * صفحة البطاقة: 4 قوالب على نفس الهيكل.
 * غلاف ملوّن فيه موجات إشارة ← ورقة فوقه فيها الصورة والاسم ← حفظ جهة الاتصال ← الروابط.
 * كل قالب بيغيّر المتغيرات تحت body.t-*، و--accent / --accent-2 من ألوان الزبون.
 */

/* ============ أساس مشترك ============ */
body {
  --accent: #001f3f;
  --accent-2: #8a98a8;
  --p-font: var(--font);
  --p-display: var(--font);
  --p-bg: #e4e8d8;
  --p-sheet: #f6f7ed;
  --p-surface: #eef0e3;
  --p-text: #0b1033;
  --p-muted: #6a7090;
  --p-line: #e4e8d8;
  --p-radius: 18px;
  font-family: var(--p-font);
  background: var(--p-bg);
  color: var(--p-text);
}

body.is-loading .profile {
  visibility: hidden;
}

.profile {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: var(--ph, 100dvh);
  display: flex;
  flex-direction: column;
}

/* ---- الغلاف ---- */
.p-cover {
  position: relative;
  height: 200px;
  overflow: hidden;
  background:
    radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--accent-2) 45%, transparent), transparent 60%),
    linear-gradient(150deg, var(--accent), color-mix(in srgb, var(--accent) 65%, #000));
}

/* موجات إشارة متحدة المركز */
.p-cover-art {
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle at 88% -18%, rgba(246, 247, 237, 0.16) 0 1.5px, transparent 2px 30px);
  -webkit-mask-image: linear-gradient(200deg, #000 20%, transparent 85%);
  mask-image: linear-gradient(200deg, #000 20%, transparent 85%);
}

/* ---- الورقة ---- */
.p-sheet {
  position: relative;
  flex: 1;
  margin-top: -34px;
  padding: 0 20px calc(26px + var(--sab, env(safe-area-inset-bottom, 0px)));
  border-radius: 30px 30px 0 0;
  background: var(--p-sheet);
  display: flex;
  flex-direction: column;
}

/* ---- الرأس ---- */
.p-head {
  text-align: center;
}

.p-avatar {
  position: relative;
  width: 116px;
  height: 116px;
  margin: -60px auto 16px;
  border-radius: 50%;
  border: 5px solid var(--p-sheet);
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000));
  color: #f6f7ed;
  display: grid;
  place-items: center;
  font-family: var(--p-display);
  font-size: 2.6rem;
  font-weight: 700;
  overflow: hidden;
  box-shadow: 0 18px 34px -16px color-mix(in srgb, var(--accent) 70%, #000);
}

.p-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-avatar.is-logo {
  background: #f6f7ed;
}

.p-avatar.is-logo img {
  object-fit: contain;
  padding: 14%;
}

/* ---- مكان الشعار (p-mark): أساسه شارة بيضاء، وكل قالب بيحطها بمكان مختلف ---- */
.p-mark {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.p-mark-img {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  overflow: hidden;
  background: #f6f7ed;
  box-shadow: 0 8px 20px -10px rgba(11, 16, 51, 0.5);
}

.p-mark-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.p-mark-name {
  display: none;
  font-family: var(--p-display);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* المكان فاضي (بالمعاينة): إطار منقّط ليعرف الزبون وين بينحط */
.p-mark.is-empty .p-mark-img {
  border: 2px dashed color-mix(in srgb, var(--accent) 55%, #f6f7ed);
  background: rgba(246, 247, 237, 0.9);
  color: var(--accent);
  box-shadow: none;
}

.p-avatar.is-empty {
  outline: 2px dashed rgba(246, 247, 237, 0.85);
  outline-offset: -12px;
}

/* كلاسيك: شارة بيضاء فيها الشعار واسم الشركة بزاوية الغلاف */
/* الورقة بتبلش تحت الغلاف بـ 166px (200 - 34)، فمنطلع الشارة لفوق لزاوية الغلاف */
.t-classic .p-mark {
  top: calc(16px + var(--sat, env(safe-area-inset-top, 0px)) - 166px);
  inset-inline-start: 16px;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  background: rgba(246, 247, 237, 0.95);
  color: var(--p-text);
  box-shadow: 0 10px 24px -14px rgba(11, 16, 51, 0.6);
}

.t-classic .p-mark-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: none;
  background: var(--p-surface);
}

.t-classic .p-mark-name {
  display: block;
}

.t-classic .p-mark-name:empty,
.t-midnight .p-mark-name:empty {
  display: none;
}

.t-classic .p-mark:has(.p-mark-name:empty) {
  padding-inline-end: 5px;
}

.p-name {
  font-family: var(--p-display);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 4px;
  text-wrap: balance;
}

.p-title {
  color: var(--p-muted);
  font-weight: 500;
  margin: 0 0 10px;
}

.p-bio {
  color: var(--p-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  max-width: 30em;
  margin: 0 auto;
  text-wrap: pretty;
}

/* ---- الأزرار ---- */
.p-actions {
  margin: 22px 0 6px;
}

.p-save {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 14px;
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  background: var(--accent);
  color: #f6f7ed;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 16px 30px -16px color-mix(in srgb, var(--accent) 85%, #000);
  transition: transform 0.15s ease;
}

.p-save:active {
  transform: scale(0.98);
}

.p-save-ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(246, 247, 237, 0.18);
}

.p-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

/* أصغر الهواتف (320–360): الأزرار الأربعة (اتصال، واتساب، البريد، مشاركة) بسطر واحد بدل ما ينزل واحد لحاله */
@media (max-width: 370px) {
  .p-quick {
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    gap: 8px;
  }
}

.p-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px 10px;
  border-radius: 16px;
  border: 0;
  background: var(--p-surface);
  color: var(--p-text);
  text-decoration: none;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
}

.p-quick-btn .p-quick-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 1.05rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* ---- الروابط ---- */
.p-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 2px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--p-muted);
}

.p-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--p-line);
}

.p-links {
  display: grid;
  gap: 10px;
}

.p-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px 11px 12px;
  border-radius: var(--p-radius);
  background: var(--p-surface);
  color: var(--p-text);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.p-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -16px rgba(11, 16, 51, 0.4);
}

.p-link-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--brand-color);
  color: #f6f7ed;
  font-size: 1.2rem;
}

.p-link-text {
  flex: 1;
  min-width: 0;
  display: grid;
}

.p-link-label {
  font-weight: 600;
}

.p-link-sub {
  font-size: 0.8rem;
  color: var(--p-muted);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[dir="ltr"] .p-link-sub {
  text-align: left;
}

.p-link-arrow {
  font-size: 0.75rem;
  color: var(--p-muted);
}

[dir="ltr"] .p-link-arrow {
  transform: scaleX(-1);
}

/* ---- التذييل ---- */
.p-footer {
  margin-top: auto;
  padding-top: 34px;
  text-align: center;
  font-size: 0.8rem;
}

.p-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 14px;
  border-radius: 999px;
  color: var(--p-muted);
  text-decoration: none;
  background: var(--p-surface);
}

.p-footer strong {
  font-family: "Manrope", var(--font);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--p-text);
}

.p-footer-mark {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #001f3f;
}

.p-footer-mark img {
  width: 14px;
  height: 14px;
}

/* ============ كلاسيك: ورقة بيضاء فوق غلاف ملوّن ============ */
.t-classic {
  --p-bg: #f6f7ed;
}

/* ============ ميدنايت: صورة كبيرة بعرض الصفحة والاسم فوقها (متل غلاف مجلة) ============ */
.t-midnight {
  --p-bg: #07080e;
  --p-sheet: transparent;
  --p-surface: rgba(246, 247, 237, 0.055);
  --p-text: #eef0e3;
  --p-muted: #969cb5;
  --p-line: rgba(246, 247, 237, 0.1);
  background:
    radial-gradient(60% 35% at 100% 100%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 75%),
    #07080e;
  background-attachment: fixed;
}

.t-midnight .p-cover {
  display: none;
}

.t-midnight .p-sheet {
  margin-top: 0;
  border-radius: 0;
}

.t-midnight .p-head {
  position: relative;
  text-align: start;
}

.t-midnight .p-avatar {
  width: auto;
  height: 430px;
  margin: 0 -20px;
  border: 0;
  border-radius: 0;
  font-size: 9rem;
  box-shadow: none;
  background:
    radial-gradient(80% 60% at 70% 20%, color-mix(in srgb, var(--accent-2) 70%, transparent), transparent 70%),
    linear-gradient(160deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #000));
  /* الصورة الحقيقية (مش مفرّغة) بتذوب بالخلفية من فوق ومن تحت: ما في حد حاد ولا صندوق بزوايا */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 50%, rgba(0, 0, 0, 0.55) 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 50%, rgba(0, 0, 0, 0.55) 78%, transparent 100%);
}

/* الوجه عادةً بالثلث الأعلى من الصورة: منخليه هو اللي يبيّن لما تنقص */
.t-midnight .p-avatar img {
  object-position: 50% 22%;
}

/* تعتيم خفيف أسفل الصورة ليقرأ الاسم فوقها (فوق الذوبان) */
.t-midnight .p-avatar::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(7, 8, 14, 0.82));
}

.t-midnight .p-avatar.is-logo {
  background:
    radial-gradient(60% 50% at 50% 40%, color-mix(in srgb, var(--accent) 60%, transparent), transparent 75%),
    #10121c;
}

.t-midnight .p-avatar.is-logo img {
  padding: 24% 26% 34%;
}

.t-midnight .p-avatar .fa-user {
  font-size: 6rem;
}

/* الشعار: شارة زجاجية بزاوية الصورة الكبيرة */
.t-midnight .p-mark {
  top: calc(18px + var(--sat, env(safe-area-inset-top, 0px)));
  inset-inline-start: 0;
  padding: 5px 14px 5px 5px;
  border-radius: 16px;
  background: rgba(7, 8, 14, 0.55);
  border: 1px solid rgba(246, 247, 237, 0.18);
  color: #f6f7ed;
}

.t-midnight .p-mark-img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}

.t-midnight .p-mark-name {
  display: block;
}

.t-midnight .p-avatar.is-empty {
  outline-offset: -28px;
}

.t-midnight .p-name {
  position: relative;
  z-index: 1;
  margin-top: -118px;
  font-size: 2.4rem;
}

.t-midnight .p-title,
.t-midnight .p-bio {
  position: relative;
  z-index: 1;
}

.t-midnight .p-title {
  color: color-mix(in srgb, var(--accent-2) 70%, #f6f7ed);
}

.t-midnight .p-bio {
  margin: 0;
}

/* أزرار التواصل: دواير أيقونات بس، وفوق زر الحفظ */
.t-midnight .p-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 16px;
}

.t-midnight .p-quick {
  display: flex;
  gap: 10px;
  margin: 0;
}

.t-midnight .p-quick-btn {
  width: 54px;
  height: 54px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}

.t-midnight .p-quick-btn .p-quick-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.t-midnight .p-quick-btn .p-quick-ico {
  width: auto;
  height: auto;
  background: none;
  color: #f6f7ed;
}

.t-midnight .p-save {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 44px -16px var(--accent);
}

.t-midnight .p-quick-btn,
.t-midnight .p-link,
.t-midnight .p-footer a {
  border: 1px solid var(--p-line);
}

.t-midnight .p-link-icon {
  box-shadow: 0 8px 22px -8px var(--brand-color);
}

/* ============ سوفت: بلاطات «بينتو» بأحجام مختلفة ============ */
.t-soft {
  --p-bg: color-mix(in srgb, var(--accent) 8%, #f6f7ed);
  --p-sheet: var(--p-bg);
  --p-surface: #f6f7ed;
  --p-line: color-mix(in srgb, var(--accent) 16%, #f6f7ed);
  --p-radius: 24px;
}

.t-soft .p-cover {
  height: 230px;
  margin: 12px 12px 0;
  border-radius: 34px;
  background:
    radial-gradient(55% 70% at 15% 15%, color-mix(in srgb, var(--accent-2) 90%, #f6f7ed), transparent 70%),
    radial-gradient(60% 80% at 90% 95%, color-mix(in srgb, var(--accent) 70%, #000), transparent 70%),
    var(--accent);
}

.t-soft .p-cover-art {
  background: repeating-radial-gradient(circle at 50% 120%, rgba(246, 247, 237, 0.18) 0 1.5px, transparent 2px 32px);
}

.t-soft .p-sheet {
  margin-top: -70px;
  background: transparent;
}

.t-soft .p-head {
  position: relative;
}

.t-soft .p-avatar {
  border-radius: 34px;
  border-color: #f6f7ed;
}

/* الشعار: شارة على زاوية الصورة */
.t-soft .p-mark {
  top: 16px;
  inset-inline-start: calc(50% + 30px);
}

.t-soft .p-mark-img {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 3px solid #f6f7ed;
}

.t-soft .p-save {
  border-radius: 999px;
}

/* أزرار سريعة على شكل حبوب صغيرة */
.t-soft .p-quick {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.t-soft .p-quick-btn {
  flex-direction: row;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  font-size: 0.85rem;
  box-shadow: 0 8px 18px -14px color-mix(in srgb, var(--accent) 60%, #000);
}

.t-soft .p-quick-btn .p-quick-ico {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.9rem;
}

/* البلاطات: الأولى عريضة، والباقي مربعات */
.t-soft .p-links {
  grid-template-columns: 1fr 1fr;
}

.t-soft .p-link {
  flex-direction: column;
  text-align: center;
  gap: 10px;
  padding: 20px 10px 16px;
  box-shadow: 0 10px 24px -18px color-mix(in srgb, var(--accent) 70%, #000);
}

.t-soft .p-link-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  font-size: 1.45rem;
}

.t-soft .p-link-sub {
  text-align: center;
}

.t-soft .p-link-arrow {
  display: none;
}

.t-soft .p-link:first-child {
  grid-column: 1 / -1;
  flex-direction: row;
  text-align: start;
  padding: 20px;
  background:
    radial-gradient(80% 120% at 0% 0%, color-mix(in srgb, var(--brand-color) 14%, transparent), transparent 70%),
    #f6f7ed;
}

.t-soft .p-link:first-child .p-link-icon {
  width: 62px;
  height: 62px;
  font-size: 1.7rem;
}

.t-soft .p-link:first-child .p-link-label {
  font-size: 1.15rem;
}

.t-soft .p-link:first-child .p-link-sub {
  text-align: right;
}

.t-soft .p-link:first-child .p-link-arrow {
  display: block;
}

.t-soft .p-footer a {
  background: #f6f7ed;
}

/* ============ هويتك: بطاقة أعمال حقيقية + ورقة تواصل + أيقونات ============ */
.t-brand {
  --p-display: var(--p-font);
  --p-bg: #eef0e3;
  --p-sheet: var(--p-bg);
  --p-surface: #f6f7ed;
  --p-line: #e4e8d8;
}

.t-brand .p-cover {
  display: none;
}

.t-brand .p-sheet {
  margin-top: 0;
  padding-top: calc(20px + var(--sat, env(safe-area-inset-top, 0px)));
  border-radius: 0;
}

/* الرأس على شكل بطاقة أعمال أفقية */
.t-brand .p-head {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 86px 1fr;
  column-gap: 16px;
  align-items: center;
  min-height: 200px;
  padding: 24px 22px;
  border-radius: 24px;
  text-align: start;
  color: #f6f7ed;
  background:
    linear-gradient(150deg, transparent 84%, var(--accent-2) 84.3%),
    linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000));
  box-shadow: 0 26px 44px -26px color-mix(in srgb, var(--accent) 80%, #000);
}

.t-brand .p-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle at 100% 0%, rgba(246, 247, 237, 0.08) 0 1px, transparent 1.5px 22px);
  pointer-events: none;
}

.t-brand .p-avatar {
  grid-row: span 2;
  width: 86px;
  height: 86px;
  margin: 0;
  border: 0;
  border-radius: 22px;
  background: #f6f7ed;
  color: var(--accent);
  font-size: 2.2rem;
  box-shadow: 0 12px 24px -14px rgba(0, 0, 0, 0.5);
}

/* بهويتك: المربع الكبير للشعار، والصورة الشخصية دائرة صغيرة على زاويته */
.t-brand .p-mark {
  top: 84px;
  inset-inline-start: 82px;
}

.t-brand .p-mark-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #f6f7ed;
}

.t-brand .p-mark-img img {
  object-fit: cover;
  padding: 0;
}

.t-brand .p-avatar.is-empty {
  outline-color: color-mix(in srgb, var(--accent) 50%, #f6f7ed);
  outline-offset: -8px;
}

.t-brand .p-name {
  align-self: end;
  margin: 0;
  font-size: 1.45rem;
  color: #f6f7ed;
}

.t-brand .p-title {
  align-self: start;
  margin: 2px 0 0;
  color: rgba(246, 247, 237, 0.8);
}

.t-brand .p-bio {
  grid-column: 1 / -1;
  position: relative;
  z-index: 1;
  margin: 16px 0 0;
  color: rgba(246, 247, 237, 0.88);
}

.t-brand .p-actions {
  margin-top: 16px;
}

.t-brand .p-quick {
  display: none;
}

/* ورقة التواصل: صفوف فيها الرقم والبريد والموقع والعنوان */
.t-brand .p-contact {
  display: block;
  margin-top: 14px;
  padding: 2px 16px;
  border-radius: 20px;
  background: #f6f7ed;
}

.t-brand .p-crow-ico {
  background: color-mix(in srgb, var(--accent) 10%, #f6f7ed);
  color: var(--accent);
}

/* الحسابات: صف أيقونات */
.t-brand .p-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.t-brand .p-link {
  width: 60px;
  height: 60px;
  padding: 0;
  justify-content: center;
  border-radius: 18px;
  background: #f6f7ed;
}

.t-brand .p-link-text,
.t-brand .p-link-arrow {
  display: none;
}

.t-brand .p-link-icon {
  width: auto;
  height: auto;
  background: none;
  color: var(--accent);
  font-size: 1.5rem;
}

.t-brand .p-section-title {
  justify-content: center;
}

.t-brand .p-section-title::after {
  display: none;
}

/* ورقة التواصل (مخفية إلا بقالب هويتك) */
.p-contact {
  display: none;
}

.p-crow {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--p-line);
  color: var(--p-text);
  text-decoration: none;
}

.p-crow:last-child {
  border-bottom: 0;
}

.p-crow-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.p-crow-text {
  min-width: 0;
  display: grid;
}

.p-crow-text small {
  color: var(--p-muted);
  font-size: 0.75rem;
}

.p-crow-text b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

[dir="ltr"] .p-crow-text b {
  text-align: left;
}

/* ============ حالات ============ */
/* روابط المثال بالمعاينة الفاضية */
.p-link.is-sample {
  opacity: 0.45;
  pointer-events: none;
}

.p-avatar .fa-user {
  font-size: 2.4rem;
  opacity: 0.85;
}

.is-embed .p-link:hover {
  transform: none;
  box-shadow: none;
}

.p-error {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  padding: 24px;
  text-align: center;
  background: #f6f7ed;
  color: #001f3f;
}

.p-error-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: #001f3f;
}

.p-error-mark img {
  width: 40px;
  height: 40px;
}

.p-error h1 {
  font-family: var(--font);
  font-size: 1.5rem;
  margin: 0;
}

.p-error p {
  color: #5e6488;
}

.p-error-btn {
  margin-top: 8px;
  padding: 0.8em 1.6em;
  border-radius: 999px;
  background: #1933d6;
  color: #f6f7ed;
  font-weight: 600;
  text-decoration: none;
}

.p-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--sab, env(safe-area-inset-bottom, 0px)));
  transform: translate(-50%, 30px);
  background: #0b1033;
  color: #f6f7ed;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.p-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============ بدائل للأجهزة القديمة (Safari قبل iOS 16.2) اللي ما بتدعم color-mix ============ */
@supports not (color: color-mix(in srgb, red, blue)) {
  .p-cover {
    background: linear-gradient(150deg, var(--accent), var(--accent-2));
  }
  .p-avatar {
    background: var(--accent);
    box-shadow: 0 18px 34px -16px rgba(0, 0, 0, 0.4);
  }
  .p-save {
    box-shadow: 0 16px 30px -16px rgba(0, 0, 0, 0.45);
  }
  .p-quick-btn .p-quick-ico {
    background: rgba(0, 0, 0, 0.05);
  }
  .t-midnight {
    background: #07080e;
  }
  .t-soft {
    --p-bg: #eef0e3;
    --p-line: #e4e8d8;
  }
  .t-soft .p-cover {
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
  }
  .t-soft .p-quick-btn,
  .t-soft .p-link {
    box-shadow: 0 10px 24px -18px rgba(0, 0, 0, 0.35);
  }
  .t-brand {
    --p-line: #e4e8d8;
  }
  .t-brand .p-head {
    background: linear-gradient(150deg, var(--accent) 84%, var(--accent-2) 84.3%);
  }
  .t-brand .p-crow-ico {
    background: #eef0e3;
  }
  .t-midnight .p-avatar {
    background: linear-gradient(160deg, var(--accent), #07080e);
  }
}

/* ============ إطلالة: شعار فوق، عنوان ترحيب كبير، أزرار واضحة، ومشهد بالآخر ============ */
.t-spotlight {
  --p-bg: #eef0e3;
  --p-text: #0b1033;
  --p-muted: #5e6488;
  --p-line: #e4e8d8;
}

.spot {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: var(--ph, 100dvh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.spot-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + var(--sat, env(safe-area-inset-top, 0px))) 20px 12px;
  background: #eef0e3;
  border-bottom: 1px solid var(--p-line);
}

.spot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.spot-logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  overflow: hidden;
  background: #f6f7ed;
  box-shadow: 0 0 0 1px var(--p-line);
}

.spot-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.spot-logo.is-mono {
  background: var(--accent);
  color: #f6f7ed;
  font-family: var(--p-display);
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: none;
}

.spot-logo.is-empty {
  border: 2px dashed color-mix(in srgb, var(--accent) 50%, #f6f7ed);
  color: var(--accent);
  box-shadow: none;
}

.spot-brand-name {
  font-family: var(--p-display);
  font-weight: 700;
  font-size: 1.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spot-share {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid var(--p-line);
  background: #f6f7ed;
  color: var(--p-text);
  font-size: 1rem;
  cursor: pointer;
}

.spot-hero {
  padding: 34px 22px 0;
  text-align: center;
}

.spot-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--p-muted);
  font-size: 1.05rem;
}

.spot-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}

.spot-headline {
  margin: 0;
  font-family: var(--p-display);
  font-size: clamp(2.3rem, 11vw, 3.1rem);
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
  /* اللون مقصوص على النص: لازم مسافة تحت وفوق لحتى ذيول الحروف والحركات ما تنقص */
  padding: 0.08em 0 0.18em;
  background: linear-gradient(120deg, var(--p-text) 35%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.spot-id {
  margin: 30px 22px 22px;
  text-align: center;
}

.spot-avatar {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #f6f7ed;
  background: color-mix(in srgb, var(--accent) 14%, #f6f7ed);
  color: var(--accent);
  font-size: 2rem;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 35%, transparent), 0 16px 30px -18px rgba(11, 16, 51, 0.5);
}

.spot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spot-avatar.is-empty {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--accent) 45%, #f6f7ed);
}

.spot-name {
  margin: 0 0 4px;
  font-family: var(--p-display);
  font-size: 1.55rem;
  font-weight: 700;
}

.spot-title {
  margin: 0;
  color: var(--p-muted);
  font-size: 1.05rem;
}

.spot-bio {
  margin: 10px auto 0;
  max-width: 30em;
  color: var(--p-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---- الأزرار ---- */
.spot-pills {
  display: grid;
  gap: 12px;
  padding: 0 22px;
}

.spot-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 60px;
  padding: 8px 22px;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--p-text) 80%, transparent);
  background: #f6f7ed;
  color: var(--p-text);
  font: inherit;
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.spot-pill:active {
  transform: scale(0.98);
}

.spot-pill > i {
  font-size: 1.25rem;
}

.spot-pill-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.25;
}

.spot-pill-text b {
  font-weight: 600;
}

.spot-pill-text small {
  font-size: 0.75rem;
  opacity: 0.72;
  direction: ltr;
}

.spot-pill.is-fill {
  background: var(--accent);
  border-color: var(--accent);
  color: #f6f7ed;
  box-shadow: 0 14px 28px -16px color-mix(in srgb, var(--accent) 85%, #000);
}

.spot-pill.is-wa {
  background: #25d366;
  border-color: #25d366;
  color: #062a14;
  box-shadow: 0 14px 28px -16px rgba(37, 211, 102, 0.9);
}

.spot-pill.is-wa b {
  font-weight: 700;
}

.spot-pill.is-sample {
  opacity: 0.45;
  pointer-events: none;
}

/* ---- المشهد ---- */
.spot-foot {
  margin-top: auto;
  padding: 44px 0 calc(28px + var(--sab, env(safe-area-inset-bottom, 0px)));
  text-align: center;
  font-size: 0.8rem;
}

.spot-foot a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 14px;
  border-radius: 999px;
  background: #f6f7ed;
  color: var(--p-muted);
  text-decoration: none;
}

.spot-foot strong {
  font-family: var(--p-display);
  color: var(--p-text);
}

/* دخول العناصر وحدة ورا التانية */
.spot-in {
  animation: spot-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

@keyframes spot-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.is-embed .spot-in {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .spot-in {
    animation: none;
  }
}

@supports not (color: color-mix(in srgb, red, blue)) {
  .spot-pill {
    border-color: rgba(11, 16, 51, 0.8);
  }
}

/* ============ الشعار بيملا مكانه متل ما قصّه الزبون: بدون خلفية بيضاء ولا هامش ============ */
.p-mark-img.has-img,
.spot-logo.has-img,
.t-brand .p-avatar.is-logo {
  background: transparent;
  box-shadow: none;
}

.p-mark-img.has-img img,
.spot-logo.has-img img,
.p-avatar.is-logo img {
  object-fit: cover;
  padding: 0;
}

/* الشعار دايماً دائري، فالظل على الدائرة نفسها (box-shadow بيلحق الاستدارة بكل المتصفحات).
   drop-shadow على الصورة كان يطلع مربع وراها بسفاري، لأنو بيرسم الظل على شكل الصورة الأصلي */
.p-mark-img.has-img,
.t-brand .p-avatar.is-logo {
  box-shadow: 0 6px 14px -6px rgba(0, 31, 63, 0.35);
}

.t-soft .p-mark-img.has-img {
  border: 0;
}

/* معاينة صفحة لسا ما انتشرت (ما انقبل الدفع): علامة مائية مايلة على الصفحة كلها.
   رمادي شفاف، فبيبيّن على القوالب الفاتحة والغامقة، وما بيمنع الكبس على الأزرار */
.p-watermark {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  pointer-events: none;
}

.p-watermark-grid {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 54px 70px;
  width: 220vmax;
  height: 220vmax;
  transform: translate(-50%, -50%) rotate(-28deg);
}

.p-watermark span {
  font-family: var(--p-display, "IBM Plex Sans Arabic"), sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: rgba(128, 138, 152, 0.22);
  user-select: none;
}

/* ============ الشعار دايماً دائري بكل القوالب ============ */
.p-mark-img,
.t-classic .p-mark-img,
.t-midnight .p-mark-img,
.t-soft .p-mark-img,
.spot-logo,
.t-brand .p-avatar {
  border-radius: 50%;
}

.p-mark-img img,
.spot-logo img,
.t-brand .p-avatar img {
  border-radius: 50%;
}

.t-classic .p-mark,
.t-midnight .p-mark {
  border-radius: 999px;
}

/* ================= لوحة الرمز: لسان بيتسحب، وستارة بتنزل فيها بطاقة بوجهين ================= */
.qr-lock,
.qr-lock body {
  overflow: hidden;
  overscroll-behavior: none;
}

/* اللسان: معلّق من حافة الشاشة فوق متل مقبض ستارة، صغير، وبيروح مع التمرير */
.qr-handle {
  position: absolute;
  top: var(--sat, env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px 6px;
  border: 1px solid rgba(246, 247, 237, 0.3);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: rgba(0, 31, 63, 0.72);
  color: #f6f7ed;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateX(-50%);
  cursor: grab;
  touch-action: none; /* السحب للّسان بس، فما بيضرب مع تحديث الصفحة */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease;
}

/* منطقة لمس أكبر من اللسان نفسه */
.qr-handle::after {
  content: "";
  position: absolute;
  inset: -6px -14px -14px;
}

.qr-handle:active {
  cursor: grabbing;
}

.qr-handle-arrow {
  font-size: 0.7em;
  animation: qr-nudge 2.4s ease-in-out infinite;
}

@keyframes qr-nudge {
  0%, 60%, 100% { translate: 0 0; }
  75% { translate: 0 3px; }
}

.is-embed .qr-handle,
/* بوضع «تعديل»: السحب من اللسان بيمرّر الصفحة عادي (الفتح بالضغط بس) */
body.is-editing .qr-handle {
  touch-action: auto;
  cursor: pointer;
}

.is-loading .qr-handle {
  display: none;
}

.qr-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #050c18;
  opacity: 0;
}

/* الستارة: بلون صفحة الزبون (أغمق)، مخبّاية فوق الشاشة */
.qr-stage {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 41;
  max-height: 100vh;
  max-height: var(--ph, 100svh);
  overflow: hidden;
  padding: calc(20px + var(--sat, env(safe-area-inset-top, 0px))) 20px 34px;
  border-radius: 0 0 28px 28px;
  background: color-mix(in srgb, var(--accent) 38%, #001f3f);
  color: #f6f7ed;
  transform: translateY(-100%);
  touch-action: none;
  will-change: transform;
}

.qr-stage.is-animating {
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.qr-stage-inner {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 380px;
  margin: 0 auto;
}

.qr-title {
  margin: 0;
  font-family: var(--p-display);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

/* البطاقة: وجه رابط الصفحة، وضهر معلومات التواصل */
.qr-card-wrap {
  width: min(280px, 72vw, calc(var(--ph, 100svh) - 360px));
  min-width: 190px;
  aspect-ratio: 1 / 1.14;
  perspective: 1000px;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.qr-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.12s ease-out; /* الميلان بيلحق الإصبع فوراً */
}

.qr-card.is-flipped {
  transform: rotateY(180deg);
}

.qr-card.is-animating {
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.qr-face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  gap: 10px;
  padding: 16px 16px 14px;
  border-radius: 20px;
  background: #f6f7ed;
  color: #001f3f;
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.7);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.qr-back {
  transform: rotateY(180deg);
}

.qr-code {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1;
  /* ما يتمدّد مع ارتفاع الصف (المتصفح بيكبّر العرض معه وبيطلع الرمز مزاح عن النص) */
  align-self: center;
}

.qr-code canvas,
.qr-code img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  image-rendering: pixelated;
}

.qr-cap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #33475f;
}

/* مفتاح: رابط صفحتي / بدون إنترنت */
.qr-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(320px, 100%);
  padding: 4px;
  border-radius: 12px;
  background: rgba(246, 247, 237, 0.12);
}

.qr-switch button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border: 0;
  background: transparent;
  color: rgba(246, 247, 237, 0.8);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.25s ease;
}

.qr-switch button[aria-checked="true"] {
  color: #001f3f;
}

.qr-switch-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  inset-inline-start: 4px;
  width: calc(50% - 4px);
  border-radius: 9px;
  background: #f6f7ed;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[dir="rtl"] .qr-switch[data-on="offline"] .qr-switch-pill {
  transform: translateX(-100%);
}

[dir="ltr"] .qr-switch[data-on="offline"] .qr-switch-pill {
  transform: translateX(100%);
}

.qr-hint:empty {
  display: none;
}

.qr-hint {
  min-height: 2.8em;
  margin: -4px 0 0;
  max-width: 320px;
  font-size: 0.84rem;
  line-height: 1.6;
  text-align: center;
  color: rgba(246, 247, 237, 0.75);
}

.qr-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: min(320px, 100%);
}

.qr-actions button {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 4px;
  border: 0;
  border-radius: 12px;
  background: rgba(246, 247, 237, 0.1);
  color: #f6f7ed;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.qr-actions button:hover {
  background: rgba(246, 247, 237, 0.18);
}

.qr-actions i {
  font-size: 1.05rem;
}

/* المقبض تحت: بتسحبه لفوق ليسكّر */
.qr-grip {
  position: absolute;
  left: 50%;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 80px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translateX(-50%);
  cursor: grab;
  touch-action: none;
}

.qr-grip span {
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: rgba(246, 247, 237, 0.45);
}

@media (min-width: 700px) {
  .qr-stage {
    left: 50%;
    right: auto;
    width: 440px;
    margin-left: -220px;
  }
}

/* شاشات قصيرة: البطاقة أصغر ليبيّن كل شي */
@media (max-height: 640px) {
  .qr-stage-inner {
    gap: 10px;
  }

  .qr-hint {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qr-handle-arrow {
    animation: none;
  }

  .qr-stage.is-animating,
  .qr-card,
  .qr-card.is-animating,
  .qr-switch-pill {
    transition: none;
  }
}

/* ================= شكل الشعار حسب اختيار الزبون: دائرة (الافتراضي)، مربع، أو مستطيل ================= */
[data-logo="square"] .p-mark-img,
[data-logo="square"] .p-mark-img img,
[data-logo="square"] .spot-logo,
[data-logo="square"] .spot-logo img,
[data-logo="square"].t-brand .p-avatar.is-logo,
[data-logo="square"].t-brand .p-avatar.is-logo img {
  border-radius: 24%;
}

/* المستطيل: نفس الطول، والعرض ضعفه */
[data-logo="rect"] .p-mark-img,
[data-logo="rect"] .spot-logo {
  width: auto;
  aspect-ratio: 2 / 1;
  border-radius: 10px;
}

[data-logo="rect"] .p-mark-img img,
[data-logo="rect"] .spot-logo img {
  border-radius: 10px;
  object-fit: contain; /* شعار قديم مقصوص مربع ما بينقص */
}

[data-logo="rect"].t-brand .p-avatar.is-logo {
  width: auto;
  aspect-ratio: 2 / 1;
  border-radius: 16px;
}

[data-logo="rect"].t-brand .p-avatar.is-logo img {
  border-radius: 16px;
}

/* الحبة بكلاسيك وميدنايت: الشعار المربع والمستطيل بزوايا الحبة الدائرية */
[data-logo="square"].t-classic .p-mark,
[data-logo="square"].t-midnight .p-mark,
[data-logo="rect"].t-classic .p-mark,
[data-logo="rect"].t-midnight .p-mark {
  border-radius: 14px;
}

/* ============ اللون الثانوي (--accent-2): لون اللمسات بكل القوالب ============
 * الأساسي للأزرار الكبيرة والنصوص المهمة، والثانوي للمسات اللي بتعطي الصفحة شخصيتها:
 * خطوط الغلاف، خلفية أيقونات الأزرار السريعة، أيقونة «احفظ جهة الاتصال»، حلقة الصورة، وعنوان «روابطي».
 * ألوان الثانوي بالقائمة (config.js → accents2) فاتحة، فما منكتب فيها نص على أبيض. */

/* أيقونة «احفظ جهة الاتصال»: مربع بالثانوي والأيقونة بالأساسي */
.p-save-ico {
  background: var(--accent-2);
  color: var(--accent);
}

/* الأزرار السريعة (اتصال، واتساب…): خلفية الأيقونة من الثانوي */
.p-quick-btn .p-quick-ico {
  background: color-mix(in srgb, var(--accent-2) 38%, #f6f7ed);
  color: var(--accent);
}

/* عنوان «روابطي»: شرطة صغيرة بالثانوي قبل الخط */
.p-section-title::before {
  content: "";
  width: 18px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent-2);
}

/* ---- كلاسيك: خطوط الغلاف والوهج بالثانوي، وحلقة حول الصورة ---- */
.t-classic .p-cover {
  background:
    radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--accent-2) 70%, transparent), transparent 62%),
    linear-gradient(150deg, var(--accent), color-mix(in srgb, var(--accent) 65%, #000));
}

.t-classic .p-cover-art {
  background: repeating-radial-gradient(circle at 88% -18%, color-mix(in srgb, var(--accent-2) 60%, transparent) 0 1.5px, transparent 2px 30px);
}

.t-classic .p-avatar {
  box-shadow: 0 0 0 3px var(--accent-2), 0 14px 30px -14px rgba(11, 16, 51, 0.45);
}

/* ---- ميدنايت (داكن): الأيقونات والمسمّى بالثانوي ---- */
.t-midnight .p-quick-btn .p-quick-ico {
  background: none;
  color: var(--accent-2);
}

.t-midnight .p-quick-btn {
  border-color: color-mix(in srgb, var(--accent-2) 45%, transparent);
}

.t-midnight .p-save-ico {
  background: rgba(246, 247, 237, 0.18);
  color: #f6f7ed;
}

.t-midnight .p-section-title {
  color: color-mix(in srgb, var(--accent-2) 75%, #f6f7ed);
}

/* ---- سوفت: حلقة الصورة وحدود البلاطات ---- */
.t-soft .p-avatar {
  box-shadow: 0 0 0 4px var(--accent-2), 0 14px 30px -14px rgba(11, 16, 51, 0.4);
}

.t-soft .p-link {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent-2) 55%, transparent);
}

/* ---- إطلالة: النقطة، حلقة الصورة، وإطار الأزرار ---- */
.t-spotlight .spot-kicker::before {
  background: var(--accent-2);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 35%, transparent);
}

.t-spotlight .spot-avatar {
  box-shadow: 0 0 0 3px var(--accent-2), 0 16px 30px -18px rgba(11, 16, 51, 0.5);
}

.t-spotlight .spot-pill:not(.is-fill):not(.is-wa) {
  border-color: var(--accent-2);
  border-width: 2px;
}

.t-spotlight .spot-pill:not(.is-fill):not(.is-wa) > i {
  color: var(--accent);
}

.t-spotlight .spot-bar {
  border-bottom: 2px solid var(--accent-2);
}

/* زر الرجوع بوضع التطبيق (بلا شريط متصفح): دائرة صغيرة بزاوية الشاشة السفلية */
.p-back {
  position: fixed;
  bottom: calc(16px + var(--sab, env(safe-area-inset-bottom, 0px)));
  inset-inline-start: 16px;
  z-index: 60;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 31, 63, 0.84);
  color: #f6f7ed;
  box-shadow: 0 10px 24px -10px rgba(0, 31, 63, 0.7);
  cursor: pointer;
}

.p-back svg {
  width: 20px;
  height: 20px;
}

html[dir="ltr"] .p-back svg {
  transform: scaleX(-1);
}

/* المحرّر على الموبايل: العنصر اللي عم يتعدّل بيتعلّم، وبوضع «تعديل» الأزرار بتكون مجرد عرض */
.kt-focus {
  outline: 2.5px dashed #dbe64c;
  outline-offset: 5px;
  border-radius: 10px;
  box-shadow: 0 0 0 7px rgba(0, 31, 63, 0.28);
}

/* رمز الصفحة (My QR) بيشتغل بوضع التعديل كمان: لسانه ولوحته مستثناة */
body.is-editing a:not(#qr-stage *),
body.is-editing button:not(#qr-stage *):not(.qr-handle) {
  pointer-events: none;
}

