/* PAYALASHIYO_P38_HF4_CONTEXT_ANCHOR - anchored verse actions + smaller mini player */
/* Inherits PAYALASHIYO_P38_HF3_SELECTION_MINIPLAYER. */
/* Inherits PAYALASHIYO_P38_HF2_STABLE_MUSHAF semantics; no DOM rescan. */
:root {
  --pya-p38hf2-reading-max: 1180px;
  --pya-p38hf2-line: rgba(148,163,184,.24);
  --pya-p38hf2-green: #08785b;
  --pya-p38hf2-green-dark: #055b46;
}

body.pya-p38hf2 [data-p38hf2-role="section"] {
  max-width: 1280px !important;
  width: min(100%, calc(100vw - 28px)) !important;
  margin-inline: auto !important;
  padding-bottom: 150px !important;
}

/* Le bandeau marketing ne precede plus le Mushaf. */
body.pya-p38hf2 [data-p38hf2-role="hero"] { display: none !important; }

/* Toolbar minimale : le Coran arrive immediatement dessous. */
body.pya-p38hf2 .pya-p38hf2-toolbar {
  position: sticky;
  top: 72px;
  z-index: 28;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(100%, var(--pya-p38hf2-reading-max));
  min-height: 56px;
  margin: 8px auto 10px;
  padding: 8px 10px 8px 16px;
  border: 1px solid rgba(203,213,225,.8);
  border-radius: 17px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 30px -24px rgba(15,23,42,.35);
  backdrop-filter: blur(12px);
}
body.pya-p38hf2 .pya-p38hf2-heading { display: grid; min-width: 0; grid-template-columns: auto 1fr; column-gap: 9px; align-items: baseline; }
body.pya-p38hf2 .pya-p38hf2-kicker { grid-row: 1 / span 2; align-self: center; padding: 5px 8px; border-radius: 999px; background: #ecfdf5; color: #08785b; font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
body.pya-p38hf2 .pya-p38hf2-heading strong { overflow: hidden; color: #14221d; font-size: 13px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
body.pya-p38hf2 .pya-p38hf2-heading small { color: #718096; font-size: 9px; font-weight: 700; }
body.pya-p38hf2 .pya-p38hf2-toolbar-actions { display: flex; align-items: center; gap: 6px; }
body.pya-p38hf2 .pya-p38hf2-toolbar button {
  min-height: 36px; padding: 7px 10px; border: 1px solid #dbe5e0; border-radius: 11px;
  background: #fff; color: #28453c; font: inherit; font-size: 9px; font-weight: 900; cursor: pointer;
}
body.pya-p38hf2 .pya-p38hf2-toolbar button[aria-expanded="true"],
body.pya-p38hf2 .pya-p38hf2-toolbar button[aria-pressed="true"] { border-color: #79cdb3; background: #eaf9f3; color: #055b46; }

/* Navigation et reglages : fermes tant que l'utilisateur ne les demande pas. */
body.pya-p38hf2 [data-p38hf2-role="navigation"],
body.pya-p38hf2 [data-p38hf2-role="settings"] { display: none !important; }
body.pya-p38hf2 [data-p38hf2-role="navigation"].pya-p38hf2-open,
body.pya-p38hf2 [data-p38hf2-role="settings"].pya-p38hf2-open { display: block !important; width: min(100%, var(--pya-p38hf2-reading-max)) !important; max-width: var(--pya-p38hf2-reading-max) !important; margin: 0 auto 10px !important; }
body.pya-p38hf2 [data-p38hf2-role="navigation"].pya-p38hf2-open { padding: 12px 14px !important; border-radius: 18px !important; }
body.pya-p38hf2 [data-p38hf2-role="settings"].pya-p38hf2-open { padding: 12px 14px !important; border-radius: 18px !important; }

/* Le Mushaf est le bloc dominant. Aucune surface de couleur n'est forcee ici. */
body.pya-p38hf2 .quran-reading-column {
  width: min(100%, var(--pya-p38hf2-reading-max)) !important;
  max-width: var(--pya-p38hf2-reading-max) !important;
  margin: 4px auto 22px !important;
  border-radius: 24px !important;
  box-shadow: 0 20px 58px -46px rgba(15,23,42,.32) !important;
}
body.pya-p38hf2 .quran-reading-column > div:first-child { padding-block: 14px !important; }
body.pya-p38hf2 .quran-reading-column > div:last-child { padding: clamp(26px,4.6vw,60px) clamp(18px,4vw,58px) !important; }
body.pya-p38hf2 .quran-reading-column > div:last-child > .mushaf-font {
  font-size: clamp(40px,4.3vw,64px) !important;
  line-height: 2.32 !important;
  letter-spacing: .003em !important;
}
body.pya-p38hf2 .quran-reading-column [id^="verse-"] { scroll-margin-top: 150px; }

/* Mode cartes/verset : lecture d'abord. */
body.pya-p38hf2 article[id^="verse-"] {
  max-width: 1050px !important;
  margin: 0 auto 14px !important;
  padding: clamp(20px,3vw,34px) !important;
  border-radius: 22px !important;
  box-shadow: 0 12px 36px -34px rgba(15,23,42,.30) !important;
}
body.pya-p38hf2 article[id^="verse-"] > .mushaf-font,
body.pya-p38hf2 article[id^="verse-"] p.mushaf-font { font-size: clamp(38px,4vw,58px) !important; line-height: 2.2 !important; }

/* Les actions P3.7 restent le moteur, mais ne sont plus repetees visuellement sous chaque verset. */
body.pya-p38hf2 .pya-p37-verse-actions { display: none !important; }

/* Selection utilisateur distincte de la lecture audio. */
/* Le verset en cours d'audio ne recoit plus un gros fond vert : simple repere lateral. */
body.pya-p38hf3 .quran-reading-column [id^="verse-"].bg-emerald-200\/80 {
  background-color: transparent !important;
  color: inherit !important;
  --tw-ring-color: transparent !important;
  box-shadow: inset -4px 0 0 rgba(16,185,129,.58) !important;
}
body.pya-p38hf3 .quran-reading-column [id^="verse-"] > .bg-emerald-600 {
  background-color: #10b981 !important;
}
/* Seule la selection de l'utilisateur porte la vraie surbrillance. */
body.pya-p38hf2 [id^="verse-"].pya-p38hf2-selected {
  background: rgba(245,158,11,.10) !important;
  color: inherit !important;
  outline: 2px solid rgba(180,83,9,.68) !important;
  outline-offset: 5px !important;
  border-radius: 10px !important;
  box-shadow: 0 0 0 4px rgba(245,158,11,.06) !important;
}
body.pya-p38hf2 article[id^="verse-"].pya-p38hf2-selected { outline-offset: 0 !important; }
body.pya-p38hf3 .quran-reading-column [id^="verse-"].pya-p38hf2-selected > span {
  border-color: #d97706 !important;
  background: #f59e0b !important;
  color: #fff !important;
}
body.pya-p38hf3 [id^="verse-"].pya-p38hf2-selected.bg-emerald-200\/80 {
  background: rgba(245,158,11,.10) !important;
  box-shadow: inset -4px 0 0 rgba(16,185,129,.58), 0 0 0 4px rgba(245,158,11,.06) !important;
}

/* Une seule barre d'actions, ancree visuellement au verset selectionne. */
body.pya-p38hf2 .pya-p38hf2-actions[hidden] { display: none !important; }
body.pya-p38hf4 .pya-p38hf2-actions {
  position: fixed;
  left: 10px;
  top: 10px;
  right: auto;
  bottom: auto;
  z-index: 125;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: min(680px, calc(100vw - 20px));
  padding: 7px;
  transform: none;
  border: 1px solid rgba(209,250,229,.35);
  border-radius: 15px;
  background: rgba(6,78,59,.97);
  color: #fff;
  box-shadow: 0 15px 38px rgba(2,6,23,.22);
  backdrop-filter: blur(10px);
  transition: opacity .12s ease, transform .12s ease;
}
body.pya-p38hf4 .pya-p38hf2-actions.pya-p38hf4-offscreen {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
body.pya-p38hf4 .pya-p38hf2-actions::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 10px;
  height: 10px;
  background: rgba(6,78,59,.97);
  transform: translateX(-50%) rotate(45deg);
}
body.pya-p38hf4 .pya-p38hf2-actions[data-p38hf4-placement="below"]::after { top: -5px; border-left: 1px solid rgba(209,250,229,.28); border-top: 1px solid rgba(209,250,229,.28); }
body.pya-p38hf4 .pya-p38hf2-actions[data-p38hf4-placement="above"]::after { bottom: -5px; border-right: 1px solid rgba(209,250,229,.28); border-bottom: 1px solid rgba(209,250,229,.28); }
body.pya-p38hf4 .pya-p38hf2-actions strong { padding: 0 8px; font-size: 10px; white-space: nowrap; }
body.pya-p38hf4 .pya-p38hf2-actions button {
  min-height: 34px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.15); border-radius: 9px;
  background: rgba(255,255,255,.10); color: #fff; font: inherit; font-size: 9px; font-weight: 850; cursor: pointer;
}
body.pya-p38hf4 .pya-p38hf2-actions button:hover { background: rgba(255,255,255,.18); }
body.pya-p38hf4 .pya-p38hf2-actions .pya-p38hf2-actions-close { width: 32px; padding-inline: 0; font-size: 17px; }

/* Mini-lecteur : essentiel visible, commandes avancees sur developpement. */
body.pya-p38hf4 .pya-p37-player-compact {
  max-height: 56px !important;
  min-height: 0 !important;
  padding: 6px 10px !important;
  overflow: hidden !important;
  opacity: .96;
  border-radius: 14px !important;
  box-shadow: 0 8px 22px rgba(2,6,23,.13) !important;
}
body.pya-p38hf4 .pya-p37-player-compact.is-expanded {
  max-height: 190px !important;
  overflow: visible !important;
}
body.pya-p38hf4 .pya-p37-player-compact:not(.is-expanded) button[data-p37-hf2-action="previous"],
body.pya-p38hf4 .pya-p37-player-compact:not(.is-expanded) button[data-p37-hf2-action="seek-back"],
body.pya-p38hf4 .pya-p37-player-compact:not(.is-expanded) button[data-p37-hf2-action="seek-forward"],
body.pya-p38hf4 .pya-p37-player-compact:not(.is-expanded) button[data-p37-hf2-action="next"] {
  display: none !important;
}
body.pya-p37-has-player.pya-p38hf4 { padding-bottom: 66px !important; }
body.pya-p37-has-player.pya-p38hf4:has(.pya-p37-player-compact.is-expanded) { padding-bottom: 198px !important; }

/* Mode concentre local et explicite : aucun etat ne change tout seul. */
body.pya-p38hf2-focus [data-p38hf2-role="navigation"],
body.pya-p38hf2-focus [data-p38hf2-role="settings"] { display: none !important; }
body.pya-p38hf2-focus [data-p38hf2-role="section"] { max-width: 1440px !important; }
body.pya-p38hf2-focus .quran-reading-column { --pya-p38hf2-reading-max: 1320px; box-shadow: none !important; }
body.pya-p38hf2-focus .quran-reading-column > div:last-child > .mushaf-font { font-size: clamp(44px,5vw,72px) !important; line-height: 2.38 !important; }

@media (max-width: 760px) {
  body.pya-p38hf4 .pya-p38hf2-actions { width: calc(100vw - 16px); justify-content: center; flex-wrap: wrap; padding: 6px; }
  body.pya-p38hf4 .pya-p38hf2-actions strong { flex: 1 0 100%; padding: 0 4px 2px; text-align: center; }
  body.pya-p38hf4 .pya-p38hf2-actions button { flex: 1 1 auto; min-height: 32px; }
  body.pya-p38hf4 .pya-p37-player-compact { left: 6px !important; right: 6px !important; width: auto !important; max-height: 54px !important; padding: 5px 8px !important; }
  body.pya-p38hf2 [data-p38hf2-role="section"] { width: calc(100vw - 12px) !important; }
  body.pya-p38hf2 .pya-p38hf2-toolbar { top: 66px; margin-top: 5px; padding: 7px 8px 7px 10px; }
  body.pya-p38hf2 .pya-p38hf2-kicker { display: none; }
  body.pya-p38hf2 .pya-p38hf2-heading { display: grid; grid-template-columns: 1fr; }
  body.pya-p38hf2 .pya-p38hf2-heading strong { font-size: 11px; }
  body.pya-p38hf2 .pya-p38hf2-toolbar-actions button span { display: none; }
  body.pya-p38hf2 .pya-p38hf2-toolbar button { width: 36px; padding-inline: 0; font-size: 12px; }
  body.pya-p38hf2 .quran-reading-column { border-radius: 18px !important; }
  body.pya-p38hf2 .quran-reading-column > div:last-child { padding: 22px 12px 34px !important; }
  body.pya-p38hf2 .quran-reading-column > div:last-child > .mushaf-font { font-size: clamp(34px,9.8vw,48px) !important; line-height: 2.18 !important; }
}

@media (prefers-reduced-motion: reduce) {
  body.pya-p38hf2 * { scroll-behavior: auto !important; transition: none !important; }
}

/* === P3.8-HF6 OVERLAY RAIL LAYOUT ======================================== */
/* PAYALASHIYO_P38_HF6_OVERLAY_RAIL
   Sidebar reduite par CSS seulement; rail Kur'ani hors grille; aucun runtime grid mutation. */
:root {
  --pya-p38hf6-admin-w: 88px;
  --pya-p38hf6-rail-w: 48px;
  --pya-p38hf6-gap: 10px;
}
body.pya-p38hf6 .pya-p38hf6-readerhead {
  min-height: 44px;
  margin-top: 6px;
  margin-bottom: 8px;
  padding: 6px 12px;
  border-radius: 14px;
}
body.pya-p38hf6 .pya-p38hf6-readerhead .pya-p38hf2-heading { width: 100%; }
body.pya-p38hf6 .pya-p38hf2-toolbar-actions { display: none !important; }
body.pya-p38hf6 .pya-p38hf6-rail { display: none; }
body.pya-p38hf6:has([data-p38hf2-role="section"]:not([style*="display: none"])) .pya-p38hf6-rail {
  position: fixed;
  z-index: 118;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: var(--pya-p38hf6-rail-w);
  padding: 5px;
  border: 1px solid rgba(203,213,225,.86);
  border-radius: 15px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 14px 34px -24px rgba(15,23,42,.48);
  backdrop-filter: blur(12px);
}
body.pya-p38hf6 .pya-p38hf6-rail button {
  position: relative;
  display: grid;
  min-width: 36px;
  min-height: 38px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #214b3f;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
body.pya-p38hf6 .pya-p38hf6-rail button > span { font-size: 15px; line-height: 1; }
body.pya-p38hf6 .pya-p38hf6-rail button > small {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: none;
  transform: translateY(-50%);
  padding: 6px 8px;
  border-radius: 8px;
  background: #052f25;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(2,6,23,.18);
}
body.pya-p38hf6 .pya-p38hf6-rail button:hover,
body.pya-p38hf6 .pya-p38hf6-rail button[aria-expanded="true"],
body.pya-p38hf6 .pya-p38hf6-rail button[aria-pressed="true"] {
  border-color: #8dd7c0;
  background: #e9faf4;
  color: #055b46;
}

@media (min-width: 900px) {
  body.pya-p38hf6:has([data-p38hf2-role="section"]:not([style*="display: none"])) [data-p38hf6-role="app-sidebar"] {
    width: var(--pya-p38hf6-admin-w) !important;
    min-width: var(--pya-p38hf6-admin-w) !important;
    max-width: var(--pya-p38hf6-admin-w) !important;
    flex-basis: var(--pya-p38hf6-admin-w) !important;
    overflow: hidden !important;
  }
  body.pya-p38hf6 [data-p38hf6-role="app-sidebar"] > div:first-child { padding-inline: 8px !important; overflow: hidden !important; }
  body.pya-p38hf6 [data-p38hf6-role="app-sidebar"] > div:first-child .min-w-0,
  body.pya-p38hf6 [data-p38hf6-role="app-sidebar"] > div:first-child p { display: none !important; }
  body.pya-p38hf6 [data-p38hf6-role="app-sidebar"] > div:first-child .flex { justify-content: center !important; }
  body.pya-p38hf6 [data-p38hf6-role="app-sidebar"] nav { padding-inline: 7px !important; }
  body.pya-p38hf6 [data-p38hf6-role="app-sidebar"] nav > p { display: none !important; }
  body.pya-p38hf6 [data-p38hf6-role="app-sidebar"] nav button,
  body.pya-p38hf6 [data-p38hf6-role="app-sidebar"] nav a {
    width: 56px !important;
    min-width: 56px !important;
    min-height: 46px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
    justify-content: center !important;
    gap: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
  }
  body.pya-p38hf6 [data-p38hf6-role="app-sidebar"] nav button > [aria-hidden="true"],
  body.pya-p38hf6 [data-p38hf6-role="app-sidebar"] nav a > [aria-hidden="true"] { font-size: 16px !important; }
  body.pya-p38hf6 [data-p38hf6-role="app-sidebar"] nav button > span:not([aria-hidden="true"]),
  body.pya-p38hf6 [data-p38hf6-role="app-sidebar"] nav a > span:not([aria-hidden="true"]) { display: none !important; }
  body.pya-p38hf6 [data-p38hf6-role="app-sidebar"] > div:last-child { margin-inline: 7px !important; padding-inline: 7px !important; overflow: hidden !important; }
  body.pya-p38hf6 [data-p38hf6-role="app-sidebar"] > div:last-child p { display: none !important; }

  body.pya-p38hf6:has([data-p38hf2-role="section"]:not([style*="display: none"])) .pya-p38hf6-rail {
    left: calc(var(--pya-p38hf6-admin-w) + var(--pya-p38hf6-gap));
    top: 154px;
  }
  body.pya-p38hf6 .pya-p38hf6-rail button > small { left: calc(100% + 10px); }
  body.pya-p38hf6 .pya-p38hf6-rail button:hover > small,
  body.pya-p38hf6 .pya-p38hf6-rail button:focus-visible > small { display: block; }

  body.pya-p38hf6 [data-p38hf2-role="section"] {
    max-width: 1500px !important;
    width: 100% !important;
    margin-inline: auto !important;
    padding-left: calc(var(--pya-p38hf6-rail-w) + 18px) !important;
    padding-right: 10px !important;
  }
  body.pya-p38hf6 .pya-p38hf2-toolbar,
  body.pya-p38hf6 .quran-reading-column {
    --pya-p38hf2-reading-max: 1360px;
    width: min(100%, var(--pya-p38hf2-reading-max)) !important;
    max-width: var(--pya-p38hf2-reading-max) !important;
  }

  body.pya-p38hf6 [data-p38hf2-role="navigation"].pya-p38hf2-open,
  body.pya-p38hf6 [data-p38hf2-role="settings"].pya-p38hf2-open {
    position: fixed !important;
    left: calc(var(--pya-p38hf6-admin-w) + var(--pya-p38hf6-rail-w) + 26px) !important;
    top: 138px !important;
    z-index: 117 !important;
    width: min(610px, calc(100vw - var(--pya-p38hf6-admin-w) - var(--pya-p38hf6-rail-w) - 56px)) !important;
    max-width: 610px !important;
    max-height: calc(100vh - 158px) !important;
    margin: 0 !important;
    overflow: auto !important;
    box-shadow: 0 24px 60px -28px rgba(2,6,23,.42) !important;
    backdrop-filter: blur(14px);
  }
}

@media (max-width: 899px) {
  body.pya-p38hf6:has([data-p38hf2-role="section"]:not([style*="display: none"])) .pya-p38hf6-rail {
    left: auto;
    right: 8px;
    top: 150px;
    width: 44px;
    padding: 4px;
    border-radius: 14px;
  }
  body.pya-p38hf6 .pya-p38hf6-rail button { min-width: 34px; min-height: 36px; }
  body.pya-p38hf6 .pya-p38hf6-rail button > small { left: auto; right: calc(100% + 9px); }
  body.pya-p38hf6 .pya-p38hf6-rail button:focus-visible > small { display: block; }
  body.pya-p38hf6 [data-p38hf2-role="section"] { width: calc(100vw - 12px) !important; margin-inline: auto !important; padding-inline: 0 !important; }
  body.pya-p38hf6 [data-p38hf2-role="navigation"].pya-p38hf2-open,
  body.pya-p38hf6 [data-p38hf2-role="settings"].pya-p38hf2-open {
    position: fixed !important;
    left: 8px !important;
    right: 60px !important;
    top: 132px !important;
    z-index: 117 !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100vh - 152px) !important;
    margin: 0 !important;
    overflow: auto !important;
    box-shadow: 0 22px 52px -26px rgba(2,6,23,.42) !important;
  }
}


/* === P3.8-HF7 PURE RAIL + MICRO PLAYER =================================== */
/* PAYALASHIYO_P38_HF7_PURE_RAIL
   Plus aucun bandeau horizontal Kur'ani permanent. Le contexte est porte par le rail.
   Mini-player replié = dock court et centre; commandes complètes sur expansion. */
:root {
  --pya-p38hf7-player-h: 44px;
  --pya-p38hf7-player-max: 760px;
}

/* Le readerhead HF6 reste uniquement comme noeud de compatibilite JS, jamais visible. */
body.pya-p38hf7 .pya-p38hf6-readerhead,
body.pya-p38hf7 .pya-p38hf7-readerhead,
body.pya-p38hf7 #pya-p38hf2-toolbar {
  display: none !important;
}

/* Le Mushaf remonte directement sous le header; aucun espace reserve au bandeau. */
body.pya-p38hf7 [data-p38hf2-role="section"] { padding-top: 0 !important; }
body.pya-p38hf7 .quran-reading-column { margin-top: 0 !important; }

/* Rail legerement remonte puisqu'il n'a plus a composer avec le readerhead. */
@media (min-width: 900px) {
  body.pya-p38hf7:has([data-p38hf2-role="section"]:not([style*="display: none"])) .pya-p38hf6-rail {
    top: 118px;
  }
}
@media (max-width: 899px) {
  body.pya-p38hf7:has([data-p38hf2-role="section"]:not([style*="display: none"])) .pya-p38hf6-rail {
    top: 112px;
  }
}

/* Micro-player: beaucoup moins large et moins haut en mode replie. */
body.pya-p38hf7 .pya-p37-player-compact:not(.is-expanded) {
  left: 50% !important;
  right: auto !important;
  bottom: 8px !important;
  width: min(var(--pya-p38hf7-player-max), calc(100vw - 28px)) !important;
  max-width: var(--pya-p38hf7-player-max) !important;
  min-height: var(--pya-p38hf7-player-h) !important;
  max-height: var(--pya-p38hf7-player-h) !important;
  padding: 4px 8px !important;
  transform: translateX(-50%) !important;
  border-radius: 13px !important;
  opacity: .94 !important;
  box-shadow: 0 7px 18px rgba(2,6,23,.12) !important;
}
body.pya-p38hf7 .pya-p37-player-compact:not(.is-expanded) button[data-p37-hf2-action="toggle"] {
  width: 36px !important; min-width: 36px !important; height: 36px !important; min-height: 36px !important;
  padding: 0 !important; border-radius: 10px !important;
}
body.pya-p38hf7 .pya-p37-player-compact:not(.is-expanded) button[data-p37-hf2-action="stop"] {
  width: 30px !important; min-width: 30px !important; height: 30px !important; min-height: 30px !important;
  padding: 0 !important; border-radius: 9px !important;
}
body.pya-p38hf7 .pya-p37-player-compact:not(.is-expanded) .pya-p37-player-toggle {
  top: 7px !important; right: 7px !important; width: 30px !important; height: 30px !important; border-radius: 9px !important;
}
body.pya-p38hf7 .pya-p37-player-compact:not(.is-expanded) input[type="range"] {
  height: 3px !important;
}
body.pya-p37-has-player.pya-p38hf7 { padding-bottom: 54px !important; }
body.pya-p37-has-player.pya-p38hf7:has(.pya-p37-player-compact.is-expanded) { padding-bottom: 198px !important; }

/* En mode etendu on conserve toutes les commandes et une largeur confortable. */
body.pya-p38hf7 .pya-p37-player-compact.is-expanded {
  left: 50% !important;
  right: auto !important;
  width: min(920px, calc(100vw - 28px)) !important;
  max-width: 920px !important;
  transform: translateX(-50%) !important;
}

@media (max-width: 640px) {
  body.pya-p38hf7 .pya-p37-player-compact:not(.is-expanded) {
    left: 8px !important;
    right: 54px !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    bottom: 6px !important;
  }
  body.pya-p38hf7 .pya-p37-player-compact.is-expanded {
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
  }
  body.pya-p37-has-player.pya-p38hf7 { padding-bottom: 52px !important; }
}

/* === P3.8-HF8 MOBILE LEFT RAIL ========================================== */
/* PAYALASHIYO_P38_HF8_MOBILE_LEFT_RAIL
   Harmonise le rail Kur'ani a gauche sur desktop et mobile.
   Aucun changement fonctionnel; adaptation CSS uniquement. */
@media (max-width: 899px) {
  body.pya-p38hf6:has([data-p38hf2-role="section"]:not([style*="display: none"])) .pya-p38hf6-rail {
    left: 8px !important;
    right: auto !important;
  }
  body.pya-p38hf6 .pya-p38hf6-rail button > small {
    left: calc(100% + 9px) !important;
    right: auto !important;
  }
  body.pya-p38hf6 [data-p38hf2-role="navigation"].pya-p38hf2-open,
  body.pya-p38hf6 [data-p38hf2-role="settings"].pya-p38hf2-open {
    left: 60px !important;
    right: 8px !important;
  }
}

@media (max-width: 640px) {
  body.pya-p38hf7 .pya-p37-player-compact:not(.is-expanded) {
    left: 54px !important;
    right: 8px !important;
  }
}
