/* Pray4me Audio Player — v1.0.0 */
.p4p {
  --p-bg: #123A2B; --p-bg2: #0D2C21; --p-ink: #F1F6F2; --p-muted: #A9C2B8; --p-gold: #D7B680; --p-line: rgba(232, 239, 233, .14);
  position: relative; color: var(--p-ink); border-radius: 24px; padding: 22px 24px 18px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(215, 182, 128, .16), transparent 55%), linear-gradient(160deg, #1A4A37 0%, var(--p-bg) 45%, var(--p-bg2) 100%);
  box-shadow: 0 28px 60px -34px rgba(13, 44, 33, .9), inset 0 1px 0 rgba(255, 255, 255, .06);
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-user-select: none; user-select: none;
}
.p4p button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.p4p button:focus-visible, .p4p .p4p-wave:focus-visible, .p4p input:focus-visible + .p4p-switch, .p4p .p4p-range:focus-visible { outline: 2px solid var(--p-gold); outline-offset: 3px; border-radius: 8px; }
.p4p svg { width: 22px; height: 22px; display: block; }
.p4p-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.p4p-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.p4p-title { font-family: "Newsreader", Georgia, serif; font-weight: 500; font-size: 20px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p4p-artist { font-size: 13px; color: var(--p-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p4p-viz { width: 110px; height: 30px; flex: none; }
.p4p-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--p-line) !important; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; min-height: 36px; transition: background .15s, border-color .15s; }
.p4p-chip svg { width: 18px; height: 18px; }
.p4p-chip:hover { background: rgba(255, 255, 255, .06); }
.p4p-sound.tuned { border-color: rgba(215, 182, 128, .6) !important; color: var(--p-gold); }
.p4p.panel-open .p4p-sound { background: var(--p-gold); color: var(--p-bg); border-color: var(--p-gold) !important; }
.p4p-mid { display: flex; align-items: center; gap: 18px; }
.p4p-play { flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--p-gold) !important; color: var(--p-bg) !important; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px -10px rgba(215, 182, 128, .8); transition: transform .12s; position: relative; }
.p4p-play svg { width: 28px; height: 28px; }
.p4p-play:active { transform: scale(.95); }
.p4p.buffering .p4p-play::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--p-gold); animation: p4p-spin .9s linear infinite; }
@keyframes p4p-spin { to { transform: rotate(360deg); } }
.p4p-wavewrap { position: relative; flex: 1; min-width: 0; }
.p4p-wave { display: block; width: 100%; height: 56px; cursor: pointer; touch-action: none; }
.p4p-tip { position: absolute; top: -26px; transform: translateX(-50%); background: var(--p-ink); color: var(--p-bg); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .12s; font-variant-numeric: tabular-nums; }
.p4p-tip.show { opacity: 1; }
.p4p-times { display: flex; justify-content: space-between; font-size: 12px; color: var(--p-muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.p4p-bar { display: flex; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--p-line); }
.p4p-ico { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--p-muted) !important; transition: color .15s, background .15s; }
.p4p-ico:hover { color: var(--p-ink) !important; background: rgba(255, 255, 255, .06); }
.p4p-loop.on { color: var(--p-gold) !important; }
.p4p-speed { min-width: 52px; justify-content: center; font-variant-numeric: tabular-nums; }
.p4p-spacer { flex: 1; }
.p4p-vol { display: flex; align-items: center; gap: 4px; }
.p4p-vol .p4p-range { width: 110px; }

/* Range sliders */
.p4p-range { -webkit-appearance: none; appearance: none; height: 28px; background: transparent; cursor: pointer; --fill: 50%; }
.p4p-range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--p-gold) var(--fill), rgba(232, 239, 233, .2) var(--fill)); }
.p4p-range::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(232, 239, 233, .2); }
.p4p-range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--p-gold); }
.p4p-range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--p-ink); margin-top: -6px; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.p4p-range::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--p-ink); }
.p4p-eqr { --fill: 50%; }
.p4p-eqr::-webkit-slider-runnable-track { background: linear-gradient(to right, rgba(232, 239, 233, .2) 0, rgba(232, 239, 233, .2) 100%); }

/* Sound panel */
.p4p-panel { margin-top: 16px; padding: 18px; border-radius: 18px; background: rgba(0, 0, 0, .22); border: 1px solid var(--p-line); animation: p4p-in .18s ease-out; }
@keyframes p4p-in { from { opacity: 0; transform: translateY(-4px); } }
.p4p-panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.p4p-panel-head strong { flex: 1; font-size: 15px; }
.p4p-link { color: var(--p-gold) !important; font-weight: 600; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.p4p-close { width: 34px; height: 34px; }
.p4p-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.p4p-preset { border: 1px solid var(--p-line) !important; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--p-muted) !important; min-height: 36px; }
.p4p-preset:hover { color: var(--p-ink) !important; }
.p4p-preset.on { background: var(--p-gold) !important; color: var(--p-bg) !important; border-color: var(--p-gold) !important; }
.p4p-eq { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.p4p-band { display: flex; flex-direction: column; gap: 2px; }
.p4p-band-top { display: flex; justify-content: space-between; font-size: 13px; }
.p4p-band-name { font-weight: 700; }
.p4p-band-val { color: var(--p-gold); font-variant-numeric: tabular-nums; font-weight: 600; }
.p4p-band-hint { font-size: 11px; color: var(--p-muted); }
.p4p-band .p4p-range { width: 100%; }
.p4p-fx { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--p-line); align-items: center; }
.p4p-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.p4p-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.p4p-switch { flex: none; width: 42px; height: 24px; border-radius: 999px; background: rgba(232, 239, 233, .22); position: relative; transition: background .15s; }
.p4p-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--p-ink); transition: transform .15s; }
.p4p-toggle input:checked + .p4p-switch { background: var(--p-gold); }
.p4p-toggle input:checked + .p4p-switch::after { transform: translateX(18px); }
.p4p-toggle strong { display: block; font-size: 13px; }
.p4p-toggle small { display: block; font-size: 11px; color: var(--p-muted); }
.p4p-nofx { margin: 12px 0 0; font-size: 13px; color: var(--p-muted); }

/* Phones */
@media (max-width: 640px) {
  .p4p { padding: 18px 16px 14px; border-radius: 20px; }
  .p4p-viz { display: none; }
  .p4p-mid { gap: 12px; }
  .p4p-play { width: 54px; height: 54px; }
  .p4p-vol .p4p-range { display: none; }
  .p4p-eq, .p4p-fx { grid-template-columns: 1fr; gap: 12px; }
  .p4p-range { height: 36px; }
  .p4p-range::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -9px; }
}
@media (prefers-reduced-motion: reduce) { .p4p-panel { animation: none; } .p4p.buffering .p4p-play::after { animation-duration: 3s; } }
