/*
 * الملف الشخصي. بانرٌ حريري بلون الصورة، والصورة على حافته بحلقة من نفس
 * اللون (--pf-tint). ألوان الخلفية والبطاقات اختيارية ومحصورة في الملف.
 */

.v35 #profile {
  position: relative;
  padding-bottom: 40px;
}
.v35 #profileBody {
  --pf-tint: var(--accent);
  --pf-tint-deep: #3d2c8d;
}
.v35 #profile.pf-page-themed { padding-bottom: 0; }
.v35 #profileBody.pf-themed {
  min-height: calc(100dvh - 64px);
  padding-bottom: 40px;
  --pf-gradient-height: 840px;
  background-attachment: local;
  background-color: var(--pf-background-end, var(--bg));
  background-image: var(--pf-gradient-image, none);
  background-size: 100% var(--pf-gradient-height);
  background-repeat: no-repeat;
  color: var(--text-1);
}

/* Cards get their own foreground: a light card on a dark profile stays readable. */
.v35 .pf-themed :is(.pf-stats, .pf-now, .pf-first, .pf-log, .pf-empty, .rv-list, .pf-slot--empty .pf-card-frame),
.v35 .pf-themed .pe-preview-card {
  --text-1: var(--pf-card-text);
  --text-2: var(--pf-card-muted);
  --text-3: var(--pf-card-muted);
  --text-4: var(--pf-card-muted);
  --success: var(--pf-card-success);
  --accent-text: var(--pf-card-accent);
  --line: var(--pf-card-line);
  --line-strong: var(--pf-card-line);
  --surface-1: var(--pf-card);
  --surface-2: var(--pf-card-hover);
  background: var(--pf-card);
  color: var(--pf-card-text);
}
.v35 .pf-themed .pf-edit {
  background: var(--pf-card);
  color: var(--pf-card-text);
}
.v35 .pf-themed .rv-list { padding: 10px; border-radius: var(--r-lg); }
.v35 .pf-themed :is(.pf-initial, .pf-slot-remove, .pf-slot--empty .pf-slot-plus),
.v35 .pf-themed .pe-face-img .pe-initial {
  background: var(--pf-card);
  color: var(--pf-card-text);
}
.v35 .pf-top {
  position: absolute;
  z-index: 6;
  inset-inline: 0;
  top: 0;
  display: flex;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 6px) 8px 0;
  pointer-events: none;
}
.v35 .pf-top > * {
  pointer-events: auto;
}
.v35 .pf-glass {
  background: rgba(8, 7, 12, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
}

/* ── البانر ── */
.v35 .pf-banner {
  position: relative;
  height: calc(168px + var(--safe-top));
  overflow: hidden;
  background: transparent;
}
.v35 .pf-silk,
.v35 .pf-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.v35 .pf-banner-img {
  animation: v35-fade var(--dur-slow) var(--ease);
}
.v35 .pf-shade { display: none; }
/* The image fades away; the actual personal background shows through. */
.v35 :is(.pf-banner-img,.pf-silk,.pe-banner-img,.pe-preview-banner) {
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.88) 30%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.2) 78%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.88) 30%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.2) 78%, transparent 100%);
}
.v35 .pf-copy-guard { background: rgba(0,0,0,.6); border-radius: 6px; box-shadow: none; }

/* ── الهوية ── */
.v35 .pf-id {
  position: relative;
  z-index: 2;
  display: grid;
  padding: 0 var(--gutter);
}
.v35 .pf-idrow {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: -40px;
}
.v35 .pf-face {
  position: relative;
  flex: none;
  width: 84px;
  height: 84px;
  padding: 2.5px;
  border-radius: 99px;
  background: var(--pf-tint);
  box-shadow: 0 0 0 3.5px var(--bg);
  transition: background 0.4s var(--ease);
}
.v35 .pf-face-img {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 99px;
  object-fit: cover;
  background: var(--surface-2);
  box-shadow: 0 0 0 2px var(--bg);
}
.v35 .pf-initial {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-2);
}
.v35 .pf-dot {
  position: absolute;
  bottom: 3px;
  inset-inline-end: 3px;
  width: 15px;
  height: 15px;
  border-radius: 99px;
  box-shadow: 0 0 0 3px var(--bg);
  background: var(--text-4);
}
.v35 .pf-dot--online {
  background: var(--success);
}
.v35 .pf-dot--reading {
  background: var(--success);
}
.v35 .pf-dot--idle {
  background: var(--warning);
}
.v35 .pf-dot--offline {
  display: none;
}
.v35 .pf-edit {
  min-height: 38px;
  margin-bottom: 4px;
  padding: 0 16px;
  gap: 8px;
  font-size: var(--fs-meta);
}
.v35 .pf-name {
  margin: 12px 0 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  text-align: right;
  unicode-bidi: plaintext;
  overflow-wrap: anywhere;
}
.v35 .pf-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 4px;
  font-size: var(--fs-meta);
  color: var(--text-3);
}
.v35 .pf-handle {
  direction: ltr;
  unicode-bidi: isolate;
}
.v35 .pf-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.v35 .pf-live:empty {
  display: none;
}
.v35 .pf-live--on,
.v35 .pf-live--reading {
  color: var(--success);
}
.v35 .pf-live--idle {
  color: var(--warning);
}
.v35 .pf-live--on::before,
.v35 .pf-live--reading::before,
.v35 .pf-live--idle::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: currentColor;
}
.v35 .pf-bio {
  margin: 12px 0 0;
  font-size: var(--fs-body);
  line-height: 1.8;
  color: var(--text-1);
  text-align: right;
  unicode-bidi: plaintext;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.v35 .pf-bio-add {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-3);
  font: inherit;
  font-size: var(--fs-meta);
}
.v35 .pf-bio-add:active {
  color: var(--text-1);
}

/* ── يقرأ الآن ── */
.v35 .pf-now-host:empty {
  display: none;
}
.v35 .pf-now {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 16px;
  padding: 10px 12px 10px 10px;
  border: 0;
  border-radius: var(--r-lg);
  background: linear-gradient(90deg, color-mix(in srgb, var(--pf-tint) 14%, var(--surface-1)), var(--surface-1) 70%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pf-tint) 22%, transparent);
  color: var(--text-1);
  text-align: start;
  animation: v35-fade var(--dur) var(--ease);
}
.v35 .pf-now:active {
  transform: scale(0.99);
}
.v35 .pf-now-cover {
  position: relative;
  flex: none;
  width: 44px;
  aspect-ratio: 0.7;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.v35 .pf-now-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.v35 .pf-now-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.v35 .pf-now-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-caption);
  font-weight: 650;
  color: var(--success);
}
.v35 .pf-pulse {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: currentColor;
}
.v35 .pf-now-title {
  font-size: var(--fs-body);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}
.v35 .pf-now-chapter {
  font-size: var(--fs-caption);
  color: var(--text-3);
}
.v35 .pf-chev {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--text-4);
}

/* ── الأرقام: بطاقة واحدة بثلاث خانات متساوية ── */
.v35 .pf-stats {
  display: grid;
  /* ثلاث خانات، ورابعة للحلقات متى شاهد أنمي */
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin-top: 16px;
  padding: 14px 0;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--line);
  color: inherit;
  font: inherit;
}
.v35 .pf-stats:active {
  background: var(--surface-2);
}
.v35 .pf-stat {
  display: grid;
  justify-items: center;
  gap: 2px;
}
.v35 .pf-stat + .pf-stat {
  border-inline-start: 1px solid var(--line);
}
.v35 .pf-stat strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.v35 .pf-stat span {
  font-size: 11.5px;
  color: var(--text-3);
}
.v35 .pf-stats--loading strong {
  color: var(--text-4);
}
.v35 .pf-stat-value {
  font-size: var(--fs-body) !important;
  font-weight: 700;
  color: var(--text-1) !important;
}

/* ── الأقسام ── */
.v35 .pf-body {
  padding-top: 4px;
}
.v35 .pf-section {
  padding-top: 28px;
}
.v35 .pf-meta {
  font-size: var(--fs-meta);
  color: var(--text-3);
}

/* ── أفضل 5: الأول وحده، والأربعة صفٌّ واحد بلا تمرير ── */
.v35 .pf-top5 {
  display: grid;
  gap: 14px;
  padding: 0 var(--gutter);
}
.v35 .pf-first {
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--line);
  color: inherit;
  text-align: start;
}
.v35 .pf-first:active {
  background: var(--surface-2);
}
.v35 .pf-first-frame {
  position: relative;
  flex: none;
  display: block;
  width: 84px;
  aspect-ratio: 0.7;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
}
.v35 .pf-first-frame .poster {
  display: block;
  width: 100%;
  height: 100%;
}
.v35 .pf-first-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.v35 .pf-first-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.v35 .pf-first-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
  text-align: right;
  unicode-bidi: plaintext;
}
.v35 .pf-first-meta {
  font-size: var(--fs-caption);
  color: var(--text-3);
}
.v35 .pf-rest {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.v35 .pf-card {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: start;
}
.v35 .pf-card-frame {
  position: relative;
  display: block;
  aspect-ratio: 0.7;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
}
.v35 .pf-card-frame .poster {
  display: block;
  width: 100%;
  height: 100%;
}
.v35 .pf-card-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.v35 .pf-card:active .pf-card-frame {
  transform: scale(0.97);
}
.v35 .pf-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-2);
  text-align: center;
  min-height: 2.8em;
  unicode-bidi: plaintext;
}
.v35 .pf-rank {
  position: absolute;
  z-index: 2;
  top: 6px;
  inset-inline-start: 6px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  background: rgba(8, 7, 12, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.v35 .pf-rank--gold {
  background: var(--gold);
  color: #2a1a00;
  box-shadow: none;
}
.v35 .pf-skel {
  background: var(--surface-2);
  animation: pf-skel 1.4s ease-in-out infinite;
}
@keyframes pf-skel {
  50% {
    opacity: 0.55;
  }
}
.v35 .pf-strip {
  grid-auto-columns: calc((100% - var(--gutter) * 2 - 20px) / 3.2);
}
.v35 .pf-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 var(--gutter);
  padding: 16px;
  border-radius: var(--r-lg);
  border: 1.5px dashed var(--line-strong);
  color: var(--text-3);
  font-size: var(--fs-meta);
  line-height: 1.7;
}
.v35 .pf-empty .icon {
  flex: none;
  color: var(--gold);
}

/* ── السجل ── */
.v35 .pf-log {
  margin: 0 var(--gutter);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--line);
}
.v35 .pf-log-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 8px 12px;
  border: 0;
  background: none;
  color: inherit;
  text-align: start;
}
.v35 .pf-log-row:active {
  background: var(--surface-2);
}
.v35 .pf-log-row + .pf-log-row::before,
.v35 .pf-log-more::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 66px 0;
  height: 1px;
  background: var(--line);
}
.v35 .pf-log-cover {
  position: relative;
  flex: none;
  width: 42px;
  aspect-ratio: 0.7;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.v35 .pf-log-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.v35 .pf-log-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}
.v35 .pf-log-title {
  font-size: var(--fs-body);
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}
.v35 .pf-log-meta {
  font-size: var(--fs-caption);
  color: var(--text-3);
}
.v35 .pf-log-when {
  flex: none;
  font-size: var(--fs-caption);
  color: var(--text-4);
}
.v35 .pf-log-more {
  position: relative;
  width: 100%;
  min-height: 48px;
  border: 0;
  background: none;
  color: var(--accent-text);
  font: inherit;
  font-size: var(--fs-meta);
  font-weight: 650;
}
.v35 .pf-log-more::before {
  inset-inline: 0;
}

/* ───────────────────────── تعديل الملف ─────────────────────────
 * نفس هيكل الملف: البانر ثم الصورة فوقه ثم الاسم والنبذة مكانهما. كل صورة
 * عليها شارة كاميرا صغيرة واضحة، والحقول بلا صناديق ثقيلة — خطّ سفلي يضيء
 * عند الكتابة.
 */
.v35.pe {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font, 'Vantara Sans', system-ui, sans-serif);
  animation: pe-in var(--dur) var(--ease);
}
.v35.pe--out {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}
@keyframes pe-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .v35.pe,
  .v35.pe--out {
    animation: none;
    transition: none;
    transform: none;
  }
}
.v35 .pe-top,
.v35 .pe-crop-top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: calc(var(--safe-top) + 4px) 8px 4px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.v35 .pe-top strong,
.v35 .pe-crop-top strong {
  flex: 1;
  font-size: 17px;
  font-weight: 750;
}
.v35 .pe-save,
.v35 .pe-crop-use {
  min-height: 40px;
  padding: 0 18px;
}
.v35 .pe-save:disabled {
  background: var(--surface-3);
  color: var(--text-4);
  box-shadow: none;
}
.v35.pe.pf-themed .pe-save:disabled {
  background: var(--pf-card);
  color: var(--pf-card-muted);
}
.v35.pe.pf-themed .pe-top .icon-btn:active {
  background: var(--pf-card);
  color: var(--pf-card-text);
}
@media (hover: hover) {
  .v35.pe.pf-themed .pe-top .icon-btn:hover {
    background: var(--pf-card);
    color: var(--pf-card-text);
  }
}
.v35 .pe-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: calc(var(--safe-bottom) + 56px + var(--pe-keyboard-gap, 0px));
  --pf-gradient-height: 840px;
  background-attachment: local;
  background-color: var(--pf-background-end, var(--bg));
  background-image: var(--pf-gradient-image, none);
  background-size: 100% var(--pf-gradient-height);
  background-repeat: no-repeat;
  color: var(--text-1);
}

.v35 .pe-banner {
  position: relative;
  height: 168px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}
.v35 .pe-banner-img {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
}
.v35 .pe-banner-img--empty {
  background: var(--surface-1);
}
.v35 .pe-banner::after { display: none; }
.v35 .pe-cam {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 99px;
  background: rgba(8, 7, 12, 0.66);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.v35 .pe-cam--banner {
  position: absolute;
  z-index: 2;
  top: 12px;
  inset-inline-end: 12px;
  height: 36px;
  padding: 0 12px;
  font-size: var(--fs-meta);
  font-weight: 650;
}
.v35 .pe-banner:active .pe-cam--banner,
.v35 .pe-face:active .pe-cam--face {
  background: var(--accent);
}

.v35 .pe-id {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 18px;
  margin-top: -48px;
  padding: 0 var(--gutter);
}
.v35 .pe-face {
  position: relative;
  justify-self: start;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: var(--surface-2);
  box-shadow: 0 0 0 4px var(--bg), 0 6px 16px rgba(0, 0, 0, 0.16);
  cursor: pointer;
}
.v35 .pe-face-img,
.v35 .pe-face-img img {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 99px;
  overflow: hidden;
  object-fit: cover;
}
.v35 .pe-initial {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-2);
}
.v35 .pe-cam--face {
  position: absolute;
  bottom: 0;
  inset-inline-end: -2px;
  width: 34px;
  height: 34px;
  justify-content: center;
  box-shadow: 0 0 0 3px var(--bg);
  background: var(--surface-3);
}
.v35 .pe-field {
  display: grid;
  gap: 6px;
}
.v35 .pe-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-meta);
  font-weight: 650;
  color: var(--text-3);
}
.v35 .pe-label em {
  font-style: normal;
  font-weight: 500;
  color: var(--text-4);
  font-variant-numeric: tabular-nums;
}
.v35 .pe-label em.pe-near {
  color: var(--warning);
}
.v35 .pe-name,
.v35 .pe-bio {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1.5px solid var(--line-strong);
  border-radius: 0;
  background: none;
  color: var(--text-1);
  font: inherit;
  text-align: right;
  unicode-bidi: plaintext;
  outline: none;
  transition: border-color var(--dur) var(--ease);
}
.v35 .pe-name {
  font-size: 24px;
  font-weight: 800;
}
.v35 .pe-bio {
  font-size: var(--fs-body);
  line-height: 1.8;
  resize: none;
}
.v35 .pe-bio::placeholder {
  color: var(--text-4);
}
.v35 .pe-name:focus,
.v35 .pe-bio:focus {
  border-bottom-color: var(--accent);
}
.v35 .pe-name[aria-invalid='true'] {
  border-bottom-color: var(--danger);
}
.v35 .pe-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: var(--fs-meta);
  line-height: 1.7;
}

/* القصّ: الصورة تتحرك تحت إطارٍ ثابت، وما خارجه معتم */
.v35.pe-crop {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  flex-direction: column;
  background: #000;
  color: var(--text-1);
  font-family: var(--font, 'Vantara Sans', system-ui, sans-serif);
}
.v35 .pe-crop-top {
  background: #000;
  border-bottom: 0;
}
.v35 .pe-stage {
  position: relative;
  flex: 1;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}
.v35 .pe-stage img {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  transform-origin: center;
  user-select: none;
  -webkit-user-drag: none;
}
.v35 .pe-mask {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--frame-w, 0);
  height: var(--frame-h, 0);
  transform: translate(-50%, -50%);
  border-radius: var(--r-md);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.62), inset 0 0 0 1.5px rgba(255, 255, 255, 0.85);
  pointer-events: none;
}
.v35 .pe-mask--round {
  border-radius: 50%;
}
.v35 .pe-zoom {
  /* التكبير مقدار لا اتجاه قراءة: الصغير يسار والكبير يمين كما في كل منزلق */
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px 4px;
  color: var(--text-3);
}
.v35 .pe-zoom input {
  flex: 1;
  accent-color: var(--accent);
  height: 28px;
}
.v35 .pe-hint {
  margin: 0;
  padding: 4px 24px calc(var(--safe-bottom) + 20px);
  font-size: var(--fs-caption);
  color: var(--text-3);
  text-align: center;
}
.v35 .pe-zoom > svg:first-child {
  width: 16px;
  height: 16px;
}
.v35 .pe-zoom > svg:last-child {
  width: 26px;
  height: 26px;
}
.v35 .pe-error.pe-note {
  background: var(--surface-2);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.v35 .pf-card-meta {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-caption);
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* أفضل 5 في ملفك: خمس خانات، وزرّ إزالة على كل عمل */
.v35 .pf-slots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.v35 .pf-slot {
  position: relative;
  min-width: 0;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.v35 .pf-slot--gone {
  opacity: 0.25;
  transform: scale(0.94);
}
.v35 .pf-slot-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: center;
}
.v35 .pf-slot-remove {
  display: none;
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface-1);
  color: var(--text-1);
  font: inherit;
  font-size: 12px;
}
.v35 .pf-top5[data-arranging='true'] .pf-slot-remove { display: block; }
.v35 .pf-arrange {
  justify-self: end;
  min-height: 40px;
  margin-top: -8px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 12px;
}
.v35 .pf-top5[data-arranging='true'] .pf-arrange { background: var(--surface-1); }
.v35 .pf-first-slot { min-width: 0; }
.v35 .pf-slot-open .pf-card-title { margin-top: 6px; }
.v35 .pf-slot--empty .pf-first-frame {
  display: grid; place-items: center;
  outline: 1.5px dashed var(--line-strong); outline-offset: -1.5px;
}
.v35 .pf-slot-open:disabled { opacity: 1; }
.v35 .pf-slot--empty .pf-card-frame {
  display: grid;
  place-items: center;
  background: var(--surface-1);
  box-shadow: inset 0 0 0 1px dashed var(--line-strong);
  outline: 1.5px dashed var(--line-strong);
  outline-offset: -1.5px;
}
.v35 .pf-slot-plus {
  font-size: 22px;
  color: var(--text-4);
}
.v35 .pf-slot-hint {
  color: var(--text-3);
}

/* آخر المشاهدات داخل الملف: بنفس هامش بقية أقسامه */
.v35 .pf-section .rv-list {
  margin: 0 var(--gutter);
}

/* الأرقام كاملة: قسم تحت قسم، بلا صناديق — عنوان صغير وصفوف بشعرة */
.v35 .pf-stats-sheet h3 {
  margin: 0 0 6px;
}
.v35 .pf-sblock {
  padding: 14px 0 6px;
}
.v35 .pf-sblock + .pf-sblock {
  border-top: 1px solid var(--line);
}
.v35 .pf-sblock h4 {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-3);
  direction: ltr;
  text-align: right;
}
.v35 .pf-srow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
}
.v35 .pf-srow-label {
  display: grid;
  font-size: 14px;
  color: var(--text-2);
}
.v35 .pf-srow-label small {
  font-size: 11.5px;
  color: var(--text-4);
}
.v35 .pf-srow b {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.v35 .pf-snote {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-4);
}

/* Two compact appearance settings, with the picker inside the app. */
.v35 .pe-appearance {
  --text-1: var(--pf-card-text, #f3f4f8); --text-2: var(--pf-card-muted, #bab6c6);
  --text-3: var(--pf-card-muted, #a49eb3); --text-4: var(--pf-card-muted, #85809a);
  --accent-text: var(--pf-card-accent, #bba2ff);
  --line: var(--pf-card-line, rgba(255,255,255,.12)); --line-strong: var(--pf-card-line, rgba(255,255,255,.22));
  --surface-1: var(--pf-card, #121019); --surface-2: var(--pf-card-hover, #18161f);
  display: grid; gap: 12px; margin-top: 8px; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--pf-card, #121019); color: var(--text-1);
}
.v35 .pe-appearance-heading { display: grid; grid-template-columns: 1fr auto; gap: 4px; align-items: center; }
.v35 .pe-appearance-heading h2 { margin: 0; font-size: 17px; }
.v35 .pe-appearance-heading > span { grid-column: 1/-1; font-size: 11px; color: var(--text-3); }
.v35 .pe-theme-reset { min-height: 40px; padding: 4px 6px; border: 0; border-radius: 8px; background: none; color: var(--accent-text); font: inherit; font-size: 11px; }
.v35 .pe-preview { --pf-gradient-height: 420px; position: relative; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 12px; background-color: var(--pf-background-end, #08070c); background-image: var(--pf-gradient-image, none); background-size: 100% var(--pf-gradient-height); background-repeat: no-repeat; color: var(--text-1); }
.v35 .pe-preview-banner { height: 52px; background: linear-gradient(125deg,#3d285f,#17294d); background-size: cover; background-position: center; }
.v35 .pe-preview-content { display: grid; gap: 6px; padding: 0 12px 12px; }
.v35 .pe-preview-avatar { display: grid; place-items: center; width: 34px; height: 34px; margin-top: -18px; border: 2px solid var(--bg); border-radius: 50%; background: var(--surface-2) center/cover no-repeat; color: var(--text-1); font-weight: 800; }
.v35 .pe-preview-name { font-size: 14px; overflow-wrap: anywhere; }
.v35 .pe-preview-bio { max-height: 18px; margin: 0; overflow: hidden; color: var(--text-2); font-size: 10px; line-height: 1.7; white-space: pre-line; }
.v35 .pe-preview-label { position: absolute; top: 6px; inset-inline-end: 6px; padding: 3px 6px; border-radius: 20px; background: rgba(0,0,0,.6); color: #fff; font-size: 9px; }
.v35 .pe-preview-card { padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-1); font-size: 11px; }
.v35 .pe-preview-stats { display: grid; grid-template-columns: repeat(3,1fr); text-align: center; }
.v35 .pe-preview-stats > span { display: grid; gap: 2px; }
.v35 .pe-preview-stats > span + span { border-inline-start: 1px solid var(--line); }
.v35 .pe-preview-card small { display: block; color: var(--text-3); font-size: 9px; }
.v35 .pe-preview-shelf { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; justify-self: start; width: 138px; }
.v35 .pe-preview-work { display: grid; gap: 3px; min-width: 0; text-align: center; font-size: 9px; }
.v35 .pe-preview-work-cover { display: block; width: 100%; aspect-ratio: .7; border-radius: 6px; background: var(--surface-2) center/cover no-repeat; }
.v35 .pe-preview-work bdi { min-height: 2.8em; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.v35 .pe-preview-history { display: flex; align-items: center; gap: 8px; }
.v35 .pe-preview-history-cover { flex: none; width: 26px; aspect-ratio: .7; border-radius: 4px; background: var(--surface-2) center/cover no-repeat; }
.v35 .pe-preview-history > span:last-child { min-width: 0; }
.v35 .pe-preview-history-title { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.v35 .pe-match-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.v35 .pe-match-options button { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; min-height: 72px; min-width: 0; padding: 8px 3px; border: 1px solid var(--line-strong); border-radius: 10px; background: transparent; color: var(--text-2); font: inherit; font-size: 10px; font-weight: 650; }
.v35 .pe-match-options button[aria-pressed='true'] { border-color: #8050ec; box-shadow: inset 0 0 0 1px #8050ec; }
.v35 .pe-match-art { width: 32px; height: 22px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2) center/cover no-repeat; }
.v35 .pe-match-art--avatar { width: 24px; height: 24px; border-radius: 50%; }
.v35 .pe-match-art--both { background-size: 16px 22px,16px 22px; background-position: left center,right center; }
.v35 .pe-match-status { margin: 0; color: var(--text-2); font-size: 11px; line-height: 1.7; }
.v35 .pe-gradient-reverse { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: transparent; color: var(--text-1); font: inherit; font-size: 12px; }
.v35 .pe-gradient-reverse > span:first-child { font-size: 22px; line-height: 1; }
.v35 .pe-settings { border-top: 1px solid var(--line); }
.v35 .pe-settings summary { display: grid; grid-template-columns: 1fr 22px auto; align-items: center; gap: 8px; min-height: 50px; list-style: none; cursor: pointer; font-size: 13px; font-weight: 650; }
.v35 .pe-settings summary::after { content: '⌄'; font-size: 16px; grid-column: 3; grid-row: 1; justify-self: end; margin-inline-start: 6px; }
.v35 .pe-settings[open] summary::after { content: '⌃'; }
.v35 .pe-settings summary small { grid-column: 1; grid-row: 2; margin-top: -12px; color: var(--text-3); font-size: 10px; font-weight: 500; }
.v35 .pe-settings summary i { grid-column: 2; grid-row: 1 / 3; width: 22px; height: 22px; border: 1px solid var(--line-strong); border-radius: 7px; }
.v35 .pe-settings-body { padding: 4px 0 12px; }
.v35 .pe-theme-modes,.v35 .pe-directions { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; }
.v35 .pe-theme-modes button,.v35 .pe-directions button { flex: 1; min-width: 0; min-height: 40px; padding: 4px; border: 0; border-radius: 7px; background: none; color: var(--text-2); font: inherit; font-size: 11px; font-weight: 650; }
.v35 .pe-theme-modes button[aria-pressed='true'],.v35 .pe-directions button[aria-pressed='true'] { background: #7442df; color: #fff; }
.v35 .pe-directions { margin-top: 14px; }
.v35 .pe-theme-hint { margin: 0 0 10px; color: var(--text-3); font-size: 11px; line-height: 1.7; }
.v35 .pe-appearance [hidden] { display: none !important; }
.v35 .pe-appearance :is(button,input,summary,[tabindex]):focus-visible { outline: 2px solid #8050ec; outline-offset: 3px; }
.v35 .pc-picker { margin-top: 14px; min-width: 0; }
.v35 .pc-sv { position: relative; height: 150px; margin: 4px; border-radius: 10px; background: linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,transparent),var(--pc-hue); touch-action: none; direction: ltr; cursor: crosshair; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.v35 .pc-thumb { position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #000,0 1px 5px rgba(0,0,0,.4); transform: translate(-50%,-50%); pointer-events: none; }
.v35 .pc-hue-label { display: grid; gap: 8px; margin-top: 14px; color: var(--text-2); font-size: 11px; }
.v35 .pc-hue { appearance: none; -webkit-appearance: none; direction: ltr; width: 100%; height: 14px; border-radius: 99px; margin: 8px 0; background: linear-gradient(to right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00); }
.v35 .pc-hue::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border: 3px solid #fff; border-radius: 50%; background: var(--pc-hue); box-shadow: 0 0 0 1px #000; }
.v35 .pc-hue::-moz-range-thumb { width: 20px; height: 20px; border: 3px solid #fff; border-radius: 50%; background: var(--pc-hue); box-shadow: 0 0 0 1px #000; }
.v35 .pc-chosen { display: flex; align-items: center; gap: 8px; margin: 12px 0 8px; color: var(--text-3); font-size: 11px; }
.v35 .pc-chip { width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--pc-color); }
.v35 .pc-value { font-family: ui-monospace,monospace; color: var(--text-1); font-size: 12px; }
.v35 .pc-chosen > span:last-child { margin-inline-start: auto; }
.v35 .pc-swatches { display: flex; flex-wrap: wrap; gap: 2px; }
.v35 .pc-swatch { width: 36px; height: 36px; padding: 6px; border: 1px solid transparent; border-radius: 50%; background: var(--swatch); background-clip: content-box; box-shadow: inset 0 0 0 1px var(--line-strong); }
.v35 .pc-swatch[aria-pressed='true'] { border-color: #8050ec; }
.v35 .pc-code { margin-top: 8px; color: var(--text-3); }
.v35 .pc-code summary { display: flex; justify-content: space-between; min-height: 40px; font-size: 11px; }
.v35 .pc-code summary::after { content: none; }
.v35 .pc-hex { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: transparent; color: var(--text-1); font-family: ui-monospace,monospace; }
.v35 .pc-hex[aria-invalid='true'] { border-color: #ff6b7d; }
.v35 .pc-error { margin: 6px 0; color: var(--text-1); font-size: 11px; }
.v35 .pc-picker .sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
@media (max-width: 360px) { .v35 .pe-appearance { padding: 10px; } .v35 .pc-swatch { width: 34px; height: 34px; } }

/* Administration lives below the cover, outside its rank badge. */
.v35 .pf-top-picker .pf-top-search {
  width: 100%; min-height: 44px; padding: 10px 12px; margin: 8px 0;
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--surface-1); color: var(--text-1); font: inherit;
}
.v35 .pf-top-choices { max-height: 55dvh; overflow-y: auto; display: grid; gap: 4px; }
.v35 .pf-top-choice { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 6px; border: 0; background: none; color: var(--text-1); font: inherit; text-align: start; }
.v35 .pf-top-choice-cover { flex: none; width: 36px; aspect-ratio: .7; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.v35 .pf-top-choice-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.v35 .pf-section .rv-meta { align-items: baseline; gap: 4px 12px; }
.v35 .pf-section .rv-time { align-self: flex-start; font-size: 11px; }
.v35 .pf-card:focus-visible, .v35 .pf-slot-open:focus-visible, .v35 .pf-first:focus-visible, .v35 .pf-arrange:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .v35 .pf-skel { animation: none; }
  .v35 .pf-slot, .v35 .rv-row { transition: none; }
}

.v35 :is(.pf-name,.section-head h2,.pe-top,.pe-preview-name) { color: var(--text-1); }
.v35 .pf-handle { color: var(--text-3); }

.v35 .pe-label > span { color: var(--text-3); }
.v35 .pf-top5 { position: relative; }
.v35 .pf-arrange { position: absolute; top: -44px; inset-inline-end: var(--gutter); min-height: 32px; margin: 0; }

/* Keep local text protection above field background resets. */
.v35 .pf-copy-guard { background: rgba(0,0,0,.6); border-radius: 6px; box-shadow: none; }

/* Give desktop banners room below the top edge and keep favorites cover-sized. */
@media (min-width: 1024px) {
  .v35 .pf-banner { height: calc(clamp(280px, 24vw, 400px) + var(--safe-top)); }
  .v35 .pf-banner-img { object-position: center top; }
  .v35 .pf-top5 { width: 100%; max-width: 600px; }
}
