/*
 * VANTARA ANIME — الهوية والتركيب.
 *
 * نفس نظام المتغيّرات في core.css: القسم يغيّر قيمها فقط، فكل ما في
 * التطبيق (الأزرار، التنقّل، الأوراق، الإعدادات) يلبس لون القسم بلا سطر
 * إضافي. وما يخصّ الأنمي وحده (البطاقات الدائرية، بطاقات الحلقات، Top 10)
 * بأسماء `an-` هنا.
 *
 * المانجا: أسود بنفسجي، أغلفة طولية، ورق.
 * الأنمي: أسود أزرق عميق، إطارات عريضة، ضوء شاشة.
 * السينما: أسود محمرّ، أحمر دموي، وواجهة عريضة بلا ما يغطي الصورة.
 */

/* ───────────── متغيّرات الأقسام ───────────── */

.v35[data-section='anime'] {
  --bg: #05070d;
  --bg-raised: #080b14;
  --surface-1: #0d111b;
  --surface-2: #131826;
  --surface-3: #1b2233;
  --line: rgba(160, 190, 255, 0.07);
  --line-strong: rgba(160, 190, 255, 0.14);
  --text-2: #b4bdd0;
  --text-3: #7d879d;
  --text-4: #4e576b;
  --accent: #3b82f6;
  --accent-press: #2563eb;
  --accent-text: #8fb8ff;
  --accent-soft: rgba(59, 130, 246, 0.16);
  --accent-line: rgba(59, 130, 246, 0.42);
  --accent-glow: transparent; /* لا توهّج ملوّن تحت الأزرار */
  accent-color: #3b82f6;
  caret-color: #8fb8ff;
}
.v35[data-section='cinema'] {
  --bg: #0a0707;
  --bg-raised: #0f0b0b;
  --surface-1: #141010;
  --surface-2: #1b1515;
  --surface-3: #251c1c;
  --line: rgba(255, 200, 200, 0.07);
  --line-strong: rgba(255, 200, 200, 0.13);
  --text-2: #cbbdbd;
  --text-3: #978787;
  --text-4: #5e5252;
  --accent: #c1121f;
  --accent-press: #9a0e18;
  --accent-text: #f26b6b;
  --accent-soft: rgba(193, 18, 31, 0.16);
  --accent-line: rgba(193, 18, 31, 0.45);
  --accent-glow: transparent; /* لا توهّج ملوّن تحت الأزرار */
  accent-color: #c1121f;
  caret-color: #f26b6b;
}
.v35,
.v35 .app,
.v35 .bottom-nav {
  transition: background-color 0.5s ease;
}

/* ما يخصّ قسمًا يختفي في غيره */
.v35:not([data-section='anime']) .anime-only,
.v35:not([data-section='cinema']) .cinema-only,
.v35[data-section='anime'] .manga-only,
.v35[data-section='cinema'] .manga-only {
  display: none !important;
}

/* ───────────── عناصر مشتركة ───────────── */

.v35 .an-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.v35 .an-img.loaded {
  opacity: 1;
}
.v35 .an-img.failed {
  visibility: hidden;
}

.v35 .an-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 750;
  color: var(--text-1);
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.16s ease,
    background-color 0.2s ease;
}
.v35 .an-btn:active {
  transform: scale(0.96);
}
.v35 .an-btn .icon {
  width: 18px;
  height: 18px;
}
.v35 .an-btn--primary {
  background: var(--accent);
  color: #fff;
}
.v35 .an-btn--glass {
  background: rgba(255, 255, 255, 0.09);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.v35 .an-btn--glass[aria-pressed='true'] {
  color: var(--accent-text);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  background: var(--accent-soft);
}
.v35 .an-btn--icon {
  flex: none;
  width: 50px;
  height: 50px;
  padding: 0;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.v35 .an-btn--icon .icon {
  width: 21px;
  height: 21px;
}
.v35 .an-btn--wide {
  flex: 1;
  min-width: 0;
  height: 50px;
  font-size: 15px;
}

.v35 .an-score {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #ffd166;
  font-size: 12px;
  font-weight: 800;
  direction: ltr;
}
.v35 .an-score .icon {
  width: 12px;
  height: 12px;
}
.v35 .an-bar {
  display: block;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.v35 .an-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

/* ───────────── جدول البث: توقيع الأنمي ─────────────
 * أيام بألسنة القسم (لغة السينما الموحّدة)، وأعمال اليوم صورًا عريضة والوقت
 * والحلقة تحتها. لا نص فوق الصورة، لا زجاج، لا صناديق. */

.v35 .an-days {
  display: flex;
  gap: 22px;
  padding: 0 var(--gutter);
  margin: -2px 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.v35 .an-days::-webkit-scrollbar {
  display: none;
}
.v35 .an-day {
  position: relative;
  flex: none;
  padding: 6px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.2s ease;
}
.v35 .an-day::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.v35 .an-day.active {
  color: var(--text-1);
}
.v35 .an-day.active::after {
  transform: scaleX(1);
}
.v35 .an-slot {
  --art: var(--surface-2);
  width: min(74vw, 290px);
  display: grid;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.v35 .an-slot-art {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-bottom: 6px;
  border-radius: 12px;
  overflow: hidden;
  background: color-mix(in srgb, var(--art) 30%, var(--surface-1));
  transition: transform 0.18s ease;
}
.v35 .an-slot:active .an-slot-art {
  transform: scale(0.97);
}
.v35 .an-slot-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
}
.v35 .an-slot-time {
  font-size: 17px;
  font-weight: 850;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.v35 .an-slot.aired .an-slot-time {
  color: var(--text-2);
}
.v35 .an-slot-title {
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v35 .an-slot-when {
  font-size: 11.5px;
  color: var(--text-3);
}
.v35 .an-slot:not(.aired) .an-slot-when {
  color: var(--accent-text);
}

/* ───────────── الشرائط ───────────── */

.v35 .an-rail {
  padding-top: 30px;
}
.v35 .an-rail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 var(--gutter);
  margin-bottom: 14px;
}
.v35 .an-rail-head--flat {
  padding: 0;
}
.v35 .an-rail-titles {
  display: grid;
  gap: 2px;
}
.v35 .an-rail-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}
.v35 .an-rail-sub {
  font-size: 12px;
  color: var(--text-3);
}
.v35 .an-more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 32px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--accent-text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.v35 .an-more .icon {
  width: 16px;
  height: 16px;
}
.v35 .an-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 var(--gutter) 6px;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}
.v35 .an-strip::-webkit-scrollbar {
  display: none;
}
.v35 .an-strip > * {
  scroll-snap-align: start;
  flex: none;
}

/* بطاقة العمل: بوستر نظيف (لا شارات فوق الفن)، الاسم ثم سطر هادئ: ★ · الحلقة/النوع · السنة */
.v35 .an-card {
  --art: var(--surface-2);
  width: 116px;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.v35 .an-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: color-mix(in srgb, var(--art) 26%, var(--surface-1));
  transition: transform 0.18s ease;
}
.v35 .an-card:active .an-poster {
  transform: scale(0.96);
}
.v35 .an-card-title {
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1.35;
  text-align: right;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.v35 .an-card-meta {
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
  white-space: nowrap;
  align-items: center;
  margin-top: -2px;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.v35 .an-card-meta .aw-sep {
  margin-inline: 5px;
  color: var(--text-4);
  opacity: 1;
}
.v35 .an-card-score {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  direction: ltr;
  color: var(--text-2);
}
.v35 .an-card-score .icon {
  width: 10px;
  height: 10px;
  color: #ffd166;
}
.v35 .an-card-score b {
  font-weight: 600;
}
/* ترتيب صغير في صفحة «Top 10» الكاملة */
.v35 .an-rank-chip {
  position: absolute;
  top: 6px;
  inset-inline-start: 6px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Top 10: الرقم الكبير المفرّغ يتكئ عليه البوستر من أسفله، والاسم سطرًا تحت البوستر وحده */
.v35 .an-rail--top .an-strip {
  padding-top: 6px;
  gap: 6px;
}
.v35 .an-card--ranked {
  width: 160px;
  gap: 7px;
}
.v35 .an-ranked-row {
  display: flex;
  align-items: flex-end;
  height: 159px;
}
.v35 .an-card--ranked .an-poster {
  flex: none;
  width: 106px;
  height: 159px;
  aspect-ratio: auto;
}
.v35 .an-rank {
  flex: none;
  width: 54px;
  margin-inline-end: -4px;
  font-family: Inter, 'Vantara Sans', system-ui, sans-serif;
  font-size: 92px;
  line-height: 0.74;
  font-weight: 800;
  letter-spacing: -6px;
  color: var(--bg);
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--text-2) 55%, transparent);
  text-align: center;
  direction: ltr;
}
.v35 .an-card--ranked .an-card-title {
  margin-inline-start: 54px;
  -webkit-line-clamp: 1;
  white-space: nowrap;
  display: block;
  text-overflow: ellipsis;
}

/* بطاقة الحلقة: عريضة */
.v35 .an-ep-card {
  --art: var(--surface-2);
  width: 264px;
  display: grid;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.v35 .an-ep-art {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: color-mix(in srgb, var(--art) 30%, var(--surface-1));
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.18s ease;
}
.v35 .an-ep-card:active .an-ep-art {
  transform: scale(0.97);
}
.v35 .an-ep-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3, 5, 10, 0.85), transparent 55%);
}
.v35 .an-play {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  color: #fff;
}
.v35 .an-play .icon {
  width: 16px;
  height: 16px;
  margin-inline-end: -2px;
}
.v35 .an-ep-num {
  position: absolute;
  bottom: 10px;
  inset-inline-start: 12px;
  display: grid;
  justify-items: start;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7);
}
.v35 .an-ep-num small {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
}
.v35 .an-ep-num b {
  margin-top: 2px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.v35 .an-ep-fresh {
  font-weight: 750;
  color: var(--accent-text);
}
.v35 .an-ep-copy {
  display: grid;
  gap: 1px;
  padding-inline: 2px;
}
.v35 .an-ep-title {
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v35 .an-ep-when {
  font-size: 11.5px;
  color: var(--text-3);
}

/* الأنواع: بطاقة بلون النوع الخافت، ووجه أشهر شخصية فيه يذوب نحو الاسم */
.v35 .ag-strip {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, 76px);
  grid-auto-columns: 168px;
  gap: 10px;
  overflow-x: auto;
  padding: 0 var(--gutter) 4px;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.v35 .ag-strip::-webkit-scrollbar {
  display: none;
}
.v35 .ag-strip > * {
  scroll-snap-align: start;
}
.v35 .ag-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 72px;
  gap: 10px;
}
.v35 .ag-card {
  --hue: 215;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: hsl(var(--hue) 26% 15%);
  color: hsl(var(--hue) 30% 92%);
  font: inherit;
  text-align: start;
  cursor: pointer;
  isolation: isolate;
  transition: transform 0.16s ease;
}
.v35 .ag-card:active {
  transform: scale(0.97);
}
.v35 .ag-face {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 62%;
  z-index: -1;
  -webkit-mask-image: linear-gradient(to right, #000 30%, transparent 92%);
  mask-image: linear-gradient(to right, #000 30%, transparent 92%);
}
.v35 .ag-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  opacity: 0;
  filter: saturate(0.85);
  transition: opacity 0.5s ease;
}
.v35 .ag-face img.loaded {
  opacity: 0.9;
}
.v35 .ag-name {
  position: relative;
  font-size: 15px;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.v35 .an-credit {
  margin: 34px var(--gutter) 8px;
  text-align: center;
  font-size: 11px;
  color: var(--text-4);
}

/* ───────────── الهياكل والفراغ ───────────── */

.v35 .an-skel {
  position: relative;
  overflow: hidden;
  background: var(--surface-1);
  border-radius: 14px;
}
.v35 .an-skel {
  animation: an-pulse 1.6s ease-in-out infinite;
}
@keyframes an-pulse {
  50% {
    opacity: 0.55;
  }
}
@keyframes an-shimmer {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}
.v35 .an-skel-line {
  width: 140px;
  height: 18px;
  border-radius: 6px;
}
.v35 .an-skel-wide {
  width: 248px;
  aspect-ratio: 16 / 9;
}
.v35 .an-skel-poster {
  width: 116px;
  aspect-ratio: 2 / 3;
}
.v35 .an-skel-grid {
  height: 180px;
}
.v35 .an-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 60px 32px 40px;
  text-align: center;
}
.v35 .an-empty h3 {
  margin: 6px 0 0;
  font-size: 17px;
}
.v35 .an-empty p {
  margin: 0 0 8px;
  color: var(--text-3);
  font-size: 13px;
}
.v35 .an-empty-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.v35 .an-note {
  margin: 12px 0;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
  grid-column: 1 / -1;
}

/* ───────────── صفحة الأنمي ─────────────
 * بطل كامل العرض يذوب في الخلفية، الشعار كبيرًا فوقه وسطر هادئ تحته. لا بوستر
 * بتوهّج، لا صناديق أرقام، لا شرائح بإطارات. الطبقات: الخلفية أبطأ من الصفحة،
 * والشعار بسرعته، ثم يدخل الترويسة صغيرًا وهي تصير صلبة. */

.v35 .anime-page {
  --art: var(--accent);
  padding-bottom: 40px;
}
.v35 .aw {
  position: relative;
}
.v35 .aw-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 520px);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--safe-top) 6px 0;
  min-height: calc(var(--top-h) + var(--safe-top));
}
/* صلبة تمامًا متى انطوى البطل: لا محتوى يظهر من خلفها */
.v35 .aw-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.v35 .aw-bar.collapsed::before {
  opacity: 1;
}
.v35 .aw-bar .icon-btn {
  position: relative;
  color: #fff;
}
.v35 .aw-bar.collapsed .icon-btn {
  color: var(--text-1);
}
.v35 .aw-bar-title {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 40px;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transform-origin: right center;
  transition:
    opacity 0.24s ease,
    transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.v35 .aw-bar.collapsed .aw-bar-title {
  opacity: 1;
  transform: none;
}
.v35 .aw-bar-logo {
  display: block;
  max-height: 30px;
  max-width: 170px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: right center;
}
.v35 .aw-bar-title.has-logo .aw-bar-text {
  display: none;
}
.v35 .aw-bar-text {
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.v35 .aw-hero {
  position: relative;
  height: clamp(380px, 112vw, 560px);
  overflow: hidden;
  isolation: isolate;
  background: color-mix(in srgb, var(--art) 16%, var(--bg));
}
.v35 .aw-bg {
  position: absolute;
  inset: 0;
  transform-origin: 50% 0;
  will-change: transform;
}
.v35 .aw-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.v35 .aw-bg-img.in {
  opacity: 1;
}
.v35 .aw-bg-img--poster {
  object-position: center 18%;
}
.v35 .aw-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.42) 0,
    transparent 20%,
    transparent 38%,
    color-mix(in srgb, var(--bg) 62%, transparent) 66%,
    color-mix(in srgb, var(--bg) 94%, transparent) 88%,
    var(--bg) 100%
  );
}
.v35 .aw-head {
  position: absolute;
  inset-inline: var(--gutter);
  bottom: 12px;
  display: grid;
  gap: 8px;
  transform-origin: right bottom;
  will-change: transform, opacity;
}
/* صندوق الشعار محجوز بارتفاعه: الاسم نصًا ثم الشعار مكانه بلا قفزة */
.v35 .an-mark {
  position: relative;
  height: 88px;
  display: flex;
  align-items: flex-end;
  -webkit-touch-callout: none;
}
.v35 .an-mark-text {
  margin: 0;
  max-width: 100%;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
  text-align: right;
  text-wrap: balance;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: opacity 0.16s ease;
}
.v35 .an-mark-logo {
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  display: block;
  max-width: min(80%, 300px);
  max-height: 88px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: right bottom;
  opacity: 0;
  /* الاسم يخفت أولًا ثم يظهر الشعار: لا يتراكبان لحظة التبديل */
  transition: opacity 0.4s ease 0.14s;
}
.v35 .an-mark-logo.loaded {
  opacity: 1;
}
.v35 .an-mark.has-logo .an-mark-text {
  opacity: 0;
}
.v35 .aw-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 19px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  font-variant-numeric: tabular-nums;
}
.v35 .aw-sep {
  font-style: normal;
  margin-inline: 7px;
  opacity: 0.5;
}
.v35 .aw-score {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  direction: ltr;
}
.v35 .aw-score .icon {
  width: 12px;
  height: 12px;
  color: #ffd166;
}
.v35 .aw-score b {
  font-weight: 650;
  color: #fff;
}
.v35 .aw-status--releasing {
  color: #86e3b6;
}
.v35 .aw-genres {
  display: flex;
  flex-wrap: wrap;
  min-height: 18px;
  margin-top: -3px;
}
.v35 .aw-genre {
  padding: 2px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.58);
  cursor: pointer;
}
.v35 .aw-genres .aw-sep {
  align-self: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
}

.v35 .aw-body {
  position: relative;
  padding: 4px var(--gutter) 0;
}
.v35 .aw-cta {
  display: grid;
  gap: 10px;
}
.v35 .aw-play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.14s ease,
    background-color 0.2s ease;
}
.v35 .aw-play:active {
  transform: scale(0.98);
  background: var(--accent-press);
}
.v35 .aw-play--soon {
  background: var(--surface-2);
  color: var(--text-1);
}
.v35 .aw-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-3);
}
.v35 .aw-progress:empty {
  display: none;
}
.v35 .aw-progress .an-bar {
  flex: 1;
  height: 3px;
}
.v35 .aw-actions {
  display: flex;
  gap: 4px;
  margin-top: 14px;
}
.v35 .aw-act {
  flex: 1;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px 0 4px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition:
    transform 0.14s ease,
    color 0.2s ease;
}
.v35 .aw-act:active {
  transform: scale(0.94);
}
.v35 .aw-act .icon {
  width: 22px;
  height: 22px;
}
.v35 .aw-act[aria-pressed='true'] {
  color: var(--text-1);
}
.v35 .aw-act[aria-pressed='true'] .icon {
  color: var(--accent-text);
}

/* المصادر: سطر واحد هادئ بين خطين شعريين، نقطة حالة وأسماء */
.v35 .an-sources {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  margin-top: 14px;
  border-block: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-3);
}
.v35 .aw-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-4);
}
.v35 .an-sources[data-state='found'] .aw-dot {
  background: #34d399;
}
.v35 .an-sources[data-state='loading'] .aw-dot {
  animation: aw-blink 1.1s ease-in-out infinite;
}
@keyframes aw-blink {
  50% {
    opacity: 0.25;
  }
}
.v35 .aw-sources-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v35 .aw-sources-text bdi {
  color: var(--text-2);
}
.v35 .aw-link {
  flex: none;
  padding: 4px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-text);
  cursor: pointer;
}

.v35 .aw-about {
  margin-top: 16px;
}
.v35 .an-synopsis {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre-line;
  text-align: start;
}
.v35 .an-synopsis.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.v35 .aw-about .aw-link {
  margin-top: 2px;
}
.v35 .an-skel-text {
  display: block;
  height: 4.9em;
  font-size: 13.5px;
  background: repeating-linear-gradient(to bottom, var(--surface-1) 0 0.95em, transparent 0.95em 1.7em);
}

/* الحلقات */
.v35 .aw-episodes {
  margin-top: 30px;
}
.v35 .aw-eps-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.v35 .aw-eps-titles {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.v35 .aw-eps-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}
.v35 .aw-eps-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  font-size: 12.5px;
  color: var(--text-3);
}
.v35 .aw-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-text);
}
.v35 .aw-next::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
}
.v35 .aw-eps-tools {
  flex: none;
  display: flex;
  margin-inline-end: -10px;
}
.v35 .aw-eps-tools .icon-btn {
  color: var(--text-2);
}
.v35 .aw-eps-tools .icon-btn .icon {
  width: 21px;
  height: 21px;
}
.v35 .aw-find {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  margin-bottom: 8px;
  padding-inline: 12px 0;
  border-radius: 12px;
  background: var(--surface-1);
  color: var(--text-3);
}
.v35 .aw-find[hidden] {
  display: none;
}
.v35 .aw-find input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--text-1);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.v35 .aw-find input::-webkit-search-cancel-button {
  display: none;
}
.v35 .aw-find .icon-btn {
  color: var(--text-3);
}
/* المواسم والمدى: ألسنة نصية بخط تحت المختار، لا صناديق */
.v35 .an-seasons,
.v35 .aw-ranges {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.v35 .an-seasons::-webkit-scrollbar,
.v35 .aw-ranges::-webkit-scrollbar {
  display: none;
}
.v35 .aw-ranges[hidden] {
  display: none;
}
.v35 .an-season,
.v35 .aw-range {
  position: relative;
  flex: none;
  display: grid;
  justify-items: start;
  gap: 1px;
  padding: 6px 0 8px;
  border: 0;
  background: none;
  color: var(--text-3);
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: color 0.2s ease;
}
.v35 .an-season b {
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}
.v35 .an-season span {
  font-size: 11px;
  color: var(--text-4);
  white-space: nowrap;
}
.v35 .aw-range {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.v35 .an-season::after,
.v35 .aw-range::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.v35 .an-season.active,
.v35 .aw-range.active {
  color: var(--text-1);
  cursor: default;
}
.v35 .an-season.active::after,
.v35 .aw-range.active::after {
  transform: scaleX(1);
}

.v35 .an-er-list {
  display: grid;
  gap: 2px;
}
.v35 .an-er {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: -8px;
  padding: 7px 8px;
  border-radius: 12px;
  transition:
    background-color 0.4s ease,
    opacity 0.3s ease,
    transform 0.3s ease;
}
.v35 .an-er.flash {
  background: var(--accent-soft);
}
.v35 .an-er.leaving {
  opacity: 0;
  transform: translateY(-6px);
}
.v35 .an-er-main {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.v35 .an-er-art {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: color-mix(in srgb, var(--art) 16%, var(--surface-1));
  transition: transform 0.16s ease;
}
.v35 .an-er-main:active .an-er-art {
  transform: scale(0.97);
}
.v35 .an-er-art .an-img {
  position: absolute;
  inset: 0;
}
.v35 .an-er-chip {
  position: absolute;
  bottom: 6px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 19px;
  padding: 0 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  direction: ltr;
}
.v35 .an-er-chip .icon {
  width: 8px;
  height: 8px;
}
.v35 .an-er-bar {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.22);
}
.v35 .an-er-bar i {
  border-radius: 0;
}
.v35 .an-er-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.v35 .an-er-title {
  min-width: 0;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.35;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}
.v35 .an-er-sub {
  font-size: 12px;
  color: var(--text-3);
}
.v35 .an-er.watching .an-er-sub {
  color: var(--accent-text);
}
.v35 .an-er.seen .an-er-title {
  color: var(--text-2);
}
.v35 .an-er-icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text-4);
  cursor: pointer;
  transition: color 0.2s ease;
}
.v35 .an-er-icon[aria-pressed='true'] {
  color: var(--accent-text);
}
.v35 .an-er-ring {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.25px var(--text-4);
}
.v35 .an-skel-ep {
  height: 76px;
  margin-bottom: 8px;
  border-radius: 8px;
}

/* تحت الحلقات: الشخصيات وما يشبهه والمعلومات (الشرائط بحاشيتها) */
.v35 .aw-below {
  margin-inline: calc(var(--gutter) * -1);
}
.v35 .aw-cast {
  padding-top: 32px;
}
.v35 .aw-cast-strip {
  gap: 14px;
}
.v35 .aw-person {
  width: 74px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  text-align: center;
}
.v35 .aw-face {
  position: relative;
  width: 66px;
  height: 66px;
  margin-bottom: 4px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
}
.v35 .aw-person-name {
  max-width: 100%;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.3;
  color: var(--text-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.v35 .aw-person-va {
  max-width: 100%;
  font-size: 10.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v35 .aw-info {
  padding: 32px var(--gutter) 0;
}
.v35 .aw-info h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 800;
}
.v35 .aw-info dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 18px;
  margin: 0;
  font-size: 13px;
}
.v35 .aw-info dt {
  color: var(--text-3);
}
.v35 .aw-info dd {
  margin: 0;
  color: var(--text-2);
  line-height: 1.55;
  text-align: right;
}
.v35 .anime-page .an-rail {
  padding-top: 32px;
}

/*
 * العمق مع التمرير مربوط بالتمرير نفسه على خيط الرسم (scroll-driven): كان JavaScript يحرّك
 * الخلفية بعد حدث scroll، والـWebView يمرّر الصفحة على خيط مستقل ويجمّع الأحداث، فتتأخر الخلفية
 * إطارًا عن الصفحة وتبدو تطلع وتنزل. نفس القيم في collapse-hero.js (heroFrame)، وهو البديل حيث
 * لا يدعم المحرك الخطّ الزمني للتمرير.
 */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .v35 .aw-hero {
      --aw-span: var(--hero-span, calc(clamp(380px, 112vw, 560px) - var(--top-h) - var(--safe-top)));
    }
    .v35 .aw-bg {
      animation: aw-bg-depth linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 var(--aw-span);
    }
    .v35 .aw-head {
      animation: aw-head-depth linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 var(--aw-span);
    }
  }
}
@keyframes aw-bg-depth {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(0, calc(var(--aw-span) * 0.5), 0) scale(1.12); }
}
@keyframes aw-head-depth {
  0% { transform: perspective(800px) translate3d(0, 0, 0) rotateX(0deg) scale(1); opacity: 1; }
  20% { opacity: 1; }
  70% { opacity: 0; }
  100% { transform: perspective(800px) translate3d(0, calc(var(--aw-span) * -0.18), 0) rotateX(14deg) scale(0.86); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .v35 .aw-bg-img,
  .v35 .an-mark-logo,
  .v35 .aw-bar-title,
  .v35 .an-er {
    transition: none;
  }
  .v35 .aw-bg,
  .v35 .aw-head {
    will-change: auto;
  }
}

/* ورقة الحلقة */
.v35 .an-sheet-head {
  padding: 4px 4px 14px;
}
.v35 .an-sheet-kicker {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-text);
}
.v35 .an-sheet-title {
  font-size: 17px;
  font-weight: 800;
}
.v35 .an-sheet-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--accent-text);
  margin-bottom: 8px;
}
.v35 .an-sheet-note div {
  display: grid;
  gap: 4px;
}
.v35 .an-sheet-note b {
  color: var(--text-1);
  font-size: 14px;
}
.v35 .an-sheet-note span {
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.6;
}

/* ورقة السيرفرات: رموز قصيرة لا أسماء، مجمّعة بالجودة، بحالتها الحيّة */
/* صفحة اختيار السيرفر: كاملة الشاشة، مسطّحة بلا لمعان */
.v35 .sheet-backdrop--full {
  place-items: stretch;
  background: var(--bg);
}
.v35 .sheet-backdrop--full > .sheet {
  width: 100%;
  max-height: none;
  height: 100%;
  overflow: hidden;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--bg);
  transform: translateY(12px);
}
.v35 .sheet-backdrop--full.show > .sheet {
  transform: none;
}
/* ورقة السيرفرات (أنمي وسينما): server-sheet.css */

/* ───────────── اكتشف: البحث والفلاتر ─────────────
 * خانة بحث مملوءة بهدوء (بلا إطار)، والقمع في طرفها بنقطة لما تُفعَّل فلاتر.
 * قبل الكتابة: آخر ما بحثت عنه سطورًا، الأنواع بوجوهها، والرائج مرقّمًا. */

.v35 .ad {
  display: grid;
  gap: 4px;
}
.v35 .ad-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding-inline: 14px 2px;
  border-radius: 14px;
  background: var(--surface-1);
  color: var(--text-3);
}
.v35 .ad-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--text-1);
  font: inherit;
  font-size: 15px;
  outline: none;
}
.v35 .ad-search input::-webkit-search-cancel-button {
  display: none;
}
.v35 .ad-search .icon-btn {
  color: var(--text-2);
}
.v35 .ad-clear[hidden] {
  display: none;
}
.v35 .an-filter-btn.on {
  color: var(--accent-text);
}
.v35 .an-filter-btn[data-count]:not([data-count=''])::after {
  content: attr(data-count);
  position: absolute;
  top: 6px;
  inset-inline-start: 6px;
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
}
.v35 .ad-active {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 10px calc(var(--gutter) * -1) 0;
  padding: 0 var(--gutter);
  scrollbar-width: none;
}
.v35 .ad-active[hidden] {
  display: none;
}
.v35 .ad-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.v35 .ad-chip .icon {
  width: 12px;
  height: 12px;
  opacity: 0.8;
}
.v35 .ad-chip--out {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}
.v35 .ad-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 10px;
}
.v35 .ad-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}
.v35 .ad-link {
  padding: 4px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-text);
  cursor: pointer;
}
.v35 .ad-recent {
  display: grid;
}
.v35 .ad-recent-row {
  display: flex;
  align-items: center;
  margin-inline: -6px;
}
.v35 .ad-recent-go {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 6px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text-1);
  font: inherit;
  font-size: 14.5px;
  text-align: start;
  cursor: pointer;
}
.v35 .ad-recent-go .icon {
  flex: none;
  color: var(--text-4);
}
.v35 .ad-recent-go bdi {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v35 .ad-recent-go:active {
  background: var(--surface-1);
}
.v35 .ad-recent-rm {
  color: var(--text-4);
}
.v35 .ad-trend {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.v35 .ad-trend li + li {
  border-top: 1px solid var(--line);
}
.v35 .ad-trend-row {
  width: 100%;
  display: grid;
  grid-template-columns: 26px 46px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.v35 .ad-trend-rank {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-3);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.v35 .ad-trend li:first-child .ad-trend-rank {
  color: var(--text-1);
}
.v35 .ad-trend-cover {
  width: 46px;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-1);
}
.v35 .ad-trend-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.v35 .ad-trend-title {
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}
.v35 .ad-trend-meta {
  font-size: 12px;
  color: var(--text-3);
}
.v35 .ad-results[hidden],
.v35 .ad-idle[hidden] {
  display: none;
}
.v35 .ad-count {
  margin: 16px 0 12px;
  font-size: 12.5px;
  color: var(--text-3);
}
.v35 .ad-count:empty {
  margin: 8px 0;
}
.v35 .ad-more {
  height: 1px;
}
.v35 .an-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 10px;
}
.v35 .an-grid .an-card,
.v35 .an-grid .an-skel-poster {
  width: auto;
}
.v35 .an-count {
  margin: 14px 0 12px;
  font-size: 12.5px;
  color: var(--text-3);
}

/* ورقة الفلاتر: مجموعات بعناوين، خيارات ممتلئة بهدوء (لا إطارات)، وزر واحد أسفلها */
.v35 .af-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 2px 2px 6px;
}
.v35 .af-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.v35 .af-body {
  display: grid;
  gap: 20px;
  padding: 8px 2px 16px;
}
.v35 .af-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.v35 .af-title b {
  font-size: 14px;
  font-weight: 700;
}
.v35 .af-title span {
  font-size: 11.5px;
  color: var(--text-3);
}
.v35 .af-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.v35 .af-opt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.v35 .af-opt.on {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.v35 .af-opt.out {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}
.v35 .af-opt.out span {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.v35 .af-opt .icon {
  width: 14px;
  height: 14px;
}
.v35 .af-select {
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-1);
  font: inherit;
  font-size: 13px;
}
.v35 .af-range-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.v35 .af-range {
  flex: 1;
  accent-color: var(--accent);
}
.v35 .af-range-value {
  min-width: 64px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  text-align: end;
}
.v35 .af-foot {
  position: sticky;
  bottom: 0;
  padding: 10px 0 2px;
  background: var(--bg-raised);
}
.v35 .af-apply {
  width: 100%;
  min-height: 48px;
}

/* ───────────── «الكل»: صفحة قائمة واحدة ───────────── */
.v35 .anime-collection-page {
  padding: 0 var(--gutter) 40px;
}
.v35 .ac-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-inline: calc(var(--gutter) * -1);
  padding: var(--safe-top) 6px 4px;
  min-height: calc(var(--top-h) + var(--safe-top));
  background: var(--bg);
}
.v35 .ac-titles {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.v35 .ac-titles h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v35 .ac-sub {
  font-size: 12px;
  color: var(--text-3);
}
.v35 .ac-quick {
  display: grid;
  gap: 2px;
  margin-bottom: 14px;
}
.v35 .ac-tabs {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.v35 .ac-tab {
  position: relative;
  flex: none;
  padding: 8px 0 10px;
  border: 0;
  background: none;
  color: var(--text-3);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.v35 .ac-tab::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.v35 .ac-tab.active {
  color: var(--text-1);
}
.v35 .ac-tab.active::after {
  transform: scaleX(1);
}

/* ───────────── مكتبتي: سجل المشاهدة وقائمتي ───────────── */

.v35 .an-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--line);
}
.v35 .an-seg-btn {
  height: 40px;
  border: 0;
  border-radius: 11px;
  background: none;
  color: var(--text-3);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
.v35 .an-seg-btn.active {
  background: var(--accent-soft);
  color: var(--accent-text);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.v35 .an-clear {
  display: block;
  margin: 12px 0 8px;
  margin-inline-start: auto;
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--text-3);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
/* «آخر المشاهدات» في مكتبتي والرئيسية: بطاقة سينمائية بهوية الأنمي */
.v35 .an-hc-list {
  display: grid;
  gap: 26px;
  padding-top: 6px;
}
/* في شريط الرئيسية: نفس البطاقة بعرض ثابت ومقاسات أصغر */
.v35 .an-rail--history .an-hc {
  flex: none;
  width: 264px;
  scroll-snap-align: start;
}
.v35 .an-rail--history .an-hc-stage {
  border-radius: 14px;
}
.v35 .an-rail--history .an-hc-chip {
  top: 8px;
  inset-inline-start: 8px;
  padding: 4px 9px 5px;
}
.v35 .an-rail--history .an-hc-when {
  display: none;
}
.v35 .an-rail--history .an-hc-play {
  bottom: 10px;
  inset-inline-start: 10px;
  height: 32px;
  padding: 0 12px 0 10px;
  font-size: 12.5px;
}
.v35 .an-rail--history .an-hc-foot {
  gap: 8px;
  padding-inline: 2px 8px;
}
.v35 .an-rail--history .an-hc-poster {
  width: 44px;
  margin-top: -32px;
  border-radius: 8px;
}
.v35 .an-rail--history .an-hc-title {
  font-size: 13.5px;
  -webkit-line-clamp: 1;
}
.v35 .an-hc {
  --art: var(--accent);
  position: relative;
  display: grid;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.v35 .an-hc:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 4px;
  border-radius: 20px;
}
.v35 .an-hc-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  background: color-mix(in srgb, var(--art) 18%, var(--surface-1));
  transition: transform 0.18s ease;
}
.v35 .an-hc:active .an-hc-stage {
  transform: scale(0.985);
}
.v35 .an-hc-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}
.v35 .an-hc:not(.has-still) .an-hc-still {
  filter: saturate(1.1);
}
.v35 .an-hc-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(5, 7, 13, 0.92) 0%, rgba(5, 7, 13, 0.35) 38%, transparent 62%),
    linear-gradient(to bottom, rgba(5, 7, 13, 0.55), transparent 32%);
}
.v35 .an-hc-chip {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 5px 11px 6px;
  border-radius: 99px;
  background: rgba(5, 7, 13, 0.6);
  color: #fff;
  line-height: 1;
}
.v35 .an-hc-chip small {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
}
.v35 .an-hc-chip b {
  font-family: Inter, 'Vantara Sans', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.v35 .an-hc-when {
  position: absolute;
  top: 14px;
  inset-inline-end: 12px;
  padding: 4px 9px;
  border-radius: 99px;
  background: rgba(5, 7, 13, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
}
.v35 .an-hc-play {
  position: absolute;
  bottom: 18px;
  inset-inline-start: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px 0 14px;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.v35 .an-hc-bar {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.16);
}
.v35 .an-hc-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
}
.v35 .an-hc.done .an-hc-bar i {
  background: var(--accent-text);
}
.v35 .an-hc-foot {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-inline: 4px 14px;
}
.v35 .an-hc-poster {
  position: relative;
  z-index: 1;
  flex: none;
  width: 62px;
  aspect-ratio: 2 / 3;
  margin-top: -46px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--bg);
}
.v35 .an-hc-poster .an-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.v35 .an-hc-info {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
  padding-top: 10px;
}
.v35 .an-hc .cw-name {
  display: flex;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.v35 .an-hc-title {
  flex: 1;
  min-width: 0;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.v35 .an-hc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 12.5px;
  color: var(--text-3);
}
.v35 .an-hc-left {
  font-weight: 700;
  color: var(--accent-text);
}
.v35 .an-hc-left.done {
  color: var(--text-2);
}
.v35 .an-hc-watched:empty {
  display: none;
}
.v35 .an-hc-watched::before {
  content: '·';
  margin-inline-end: 10px;
  color: var(--text-4);
}
.v35 .an-foot {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-1);
  font-size: 12.5px;
  color: var(--text-3);
}

/* دوّارة الحالة (ورقة السيرفرات) */
.v35 .an-sources-spin {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: an-spin 0.8s linear infinite;
}
@keyframes an-spin {
  to {
    transform: rotate(360deg);
  }
}

/* «تحقّق»: شريحة صغيرة فوق الشريط السفلي، عشر ثوانٍ ثم تختفي */
.v35 .an-verify {
  position: fixed;
  inset-inline: 16px;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 420px;
  margin-inline: auto;
  padding: 8px 8px 8px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.35), inset 0 0 0 1px var(--line);
  color: var(--text-2);
  font-size: 13px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.v35 .an-verify.in {
  opacity: 1;
  transform: none;
}
.v35 .an-verify-go,
.v35 .an-src-btn--verify {
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent, #fff);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* ───────────── صحة المصادر (قائمتي ← المصادر) ───────────── */

.v35 .an-health {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.v35 .an-src {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--line);
}
.v35 .an-src.off {
  opacity: 0.6;
}
.v35 .an-src-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.v35 .an-src-top b {
  flex: 1;
  font-size: 14.5px;
}
.v35 .an-src-rate {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-2);
  direction: ltr;
}
.v35 .an-dot-state {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-4);
}
.v35 .an-dot-state--good {
  background: #34d399;
}
.v35 .an-dot-state--weak {
  background: #fbbf24;
}
.v35 .an-dot-state--down,
.v35 .an-dot-state--blocked {
  background: #f87171;
}
.v35 .an-dot-state--new {
  background: var(--accent);
}
.v35 .an-src-meta {
  font-size: 11.5px;
  color: var(--text-3);
  text-align: end;
}
.v35 .an-src-why {
  font-size: 12px;
  color: #fca5a5;
}
.v35 .an-src-cat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
}
.v35 .an-src-cat > span {
  flex: 1;
}
.v35 .an-src-btn {
  padding: 6px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.v35 .an-diag {
  display: grid;
  gap: 6px;
}
.v35 .an-diag:empty {
  display: none;
}
.v35 .an-diag-wait {
  margin: 0;
  font-size: 12px;
  color: var(--text-3);
}
.v35 .an-diag-row {
  display: grid;
  grid-template-columns: 16px auto 1fr;
  align-items: baseline;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--surface-2, var(--surface-1));
  font-size: 12px;
}
.v35 .an-diag-row i {
  font-style: normal;
  font-weight: 900;
  text-align: center;
}
.v35 .an-diag-row--ok i {
  color: #34d399;
}
.v35 .an-diag-row--warn i {
  color: #fbbf24;
}
.v35 .an-diag-row--fail i {
  color: #f87171;
}
.v35 .an-diag-detail {
  color: var(--text-3);
  overflow-wrap: anywhere;
}

/* ───────────── عين الحلقات: من ← إلى ───────────── */
.v35 .an-mark-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 10px;
}
.v35 .an-mark-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.v35 .an-mark-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-1);
  color: var(--text-2);
  font-size: 13.5px;
}
.v35 .an-mark-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

/* عنوان لاتيني مقصوص بسطرين ومحاذى يمينًا في واجهة عربية: نقاط الحذف «…» تتجاوز
   حافة السطر بنحو 3px فيقصّها Chrome إلى «..». حاشية صغيرة جهة اليمين تتسع لها
   (للاتيني وحده؛ العربي يبقى على حافته). */
.v35 :is(.an-card-title, .an-hc-title, .aw-person-name, .an-mark-text, .up-title, .an-slot-title, .an-ep-title):dir(ltr) {
  padding-right: 4px;
}

/* الشاشة العريضة (ويندوز والكمبيوتر): شبكات الجوال (عمود أو 2–3 بنسبة من العرض) كانت تتمدد
   فتصير «آخر المشاهدات» بطاقة واحدة بعرض الشاشة وأغلفة «الكل» عملاقة. هنا عرض البطاقة ثابت
   تقريبًا ويزيد عددها مع عرض الشاشة */
@media (min-width: 700px) {
  .v35 .an-hc-list {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 22px 18px;
  }
  .v35 .an-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 22px 14px;
  }
  .v35 .ag-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }
}
