/* PepFan home: the creators you follow and what is new on their pages */
.homepage { max-width: 760px; margin: 0 auto; padding: 18px 16px 40px; display: grid; gap: 18px; }
.hwrap, .hfeed { display: grid; gap: 14px; }
.hcard { background: #0f0a12; border: 1px solid #2a1a24; border-radius: 16px; padding: 18px 20px; min-width: 0; }
.hcard h1 { margin: 0 0 6px; font-size: 24px; }
.hcard h2 { margin: 0 0 6px; font-size: 18px; }
.hcard p { margin: 0; line-height: 1.7; }
.hhero { text-align: center; padding: 34px 22px; display: grid; gap: 12px; justify-items: center; }
.hrow { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hbtn { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: #fff; text-decoration: none; background: linear-gradient(90deg, #ff3d6e, #ff7a1a); border: 1px solid #ff7a1a; border-radius: 999px; padding: 10px 22px; }
.hbtn:hover { background: linear-gradient(90deg, #ff5683, #ff8d3a); }
.hbtn.ghost { background: transparent; color: #efe4e8; border-color: var(--line2); }
.hempty { display: grid; gap: 10px; justify-items: start; }
/* the row of followed creators */
.hcreators { display: grid; gap: 10px; }
.hstrip { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px; scrollbar-width: thin; }
.hcre { flex: 0 0 auto; display: grid; justify-items: center; gap: 6px; width: 74px; text-decoration: none; color: #cbbcc3; }
.hcre .small { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hcre:hover { color: #fff; }
/* portrait pictures, like the pages (gold ring for legendary / verified) */
.hav { position: relative; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, #ff3d6e, #ff7a1a); color: #fff; font-weight: 800; flex: 0 0 auto; }
.hav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #120c10; }
.hav.sm { width: 30px; height: 40px; border-radius: 8px; font-size: 14px; }
.hav.md { width: 54px; height: 72px; border-radius: 12px; font-size: 22px; }
.hav.gold { background: #1a1206; color: #ffd56b; box-shadow: 0 0 0 2px #ffd56b, 0 0 12px rgba(255, 213, 107, .3); }
.hwho { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: #f7f1f3; min-width: 0; }
.hwho b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hvok { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #ffc857; color: #1a1205; font-size: 10px; font-weight: 900; flex: 0 0 auto; }
.hvok.id { background: #3d9bff; color: #fff; }
/* feed items */
.hitem { display: grid; gap: 10px; }
.hmeta { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hkind { color: #ffad42; font-weight: 600; font-size: 13px; }
.htext { color: #f0e8eb; font-size: 15px; overflow-wrap: anywhere; }
html[dir="rtl"] .htext[dir="auto"] { text-align: right; }
.hmedia { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0a070c; text-decoration: none; }
.hmedia .hbg { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); object-fit: cover; filter: blur(22px) brightness(.45); }
.hmedia .hpic { position: relative; max-width: 100%; max-height: 100%; object-fit: contain; }
.hplay { position: absolute; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: rgba(7, 5, 10, .6); color: #fff; font-size: 20px; }
.hplay.sm { position: static; width: 34px; height: 34px; font-size: 13px; flex: 0 0 auto; background: linear-gradient(135deg, #3a1a22, #3a2012); }
.hlink { display: flex; align-items: center; gap: 12px; color: #f7f1f3; text-decoration: none; border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; }
.hlink:hover { border-color: rgba(255, 122, 26, .6); }
.hopen { justify-self: start; font-size: 13.5px; color: var(--sky); text-decoration: none; }
.hopen:hover { text-decoration: underline; }
.top nav button.acct { font: inherit; font-size: 13.5px; color: var(--muted); background: none; border: 1px solid var(--line2); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
/* footer badge (same as the pages) */
.cfoot { margin: 0; text-align: center; }
.cfoot .pbadge { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; text-decoration: none; border: 1px solid var(--line2); border-radius: 999px; padding: 7px 16px; color: var(--muted); font-size: 13px; }
.cfoot .pbadge b { color: #efe4e8; font-weight: 700; }
.cfoot .pbadge span { color: var(--sky); }
@media (max-width: 520px) { .hcard { padding: 16px; } .hcard h1 { font-size: 21px; } }
/* two parts: following / discover */
.homepage { max-width: 980px; }
.hsec { margin: 6px 0 0; font-size: 18px; text-align: center; }
.hdhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.hdhead h1 { flex-basis: 100%; margin: 0; }
.hdhead p { flex: 1 1 260px; }
.hbtn.sm { font-size: 13.5px; padding: 7px 16px; }
.hbtn:disabled { opacity: .6; }
/* discover cards (2026-10-09): picture on the start side; beside it the name + ✓, the .madar handle, a thin line, two
   lines of bio and a footer with the followers and the category. The whole card is the link to the page.
   One card alone is not stranded in a column: it keeps a comfortable width at the start of the row. */
.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.hgrid.one { grid-template-columns: minmax(0, 460px); }
.hdisc { display: flex; gap: 14px; align-items: stretch; min-height: 138px; padding: 16px; text-decoration: none; color: inherit; transition: border-color .2s, background-color .2s; }
.hdisc:hover { border-color: rgba(255, 122, 26, .55); background: #130d15; }
.hdisc:focus-visible { outline: 2px solid #ffad42; outline-offset: 2px; }
.hdisc.gold { border-color: rgba(255, 213, 107, .35); background: linear-gradient(160deg, rgba(255, 213, 107, .06), transparent 55%), #0f0a12; }
.hdisc.gold:hover { border-color: rgba(255, 213, 107, .7); }
.hav.lg { width: 66px; height: 88px; border-radius: 12px; font-size: 26px; align-self: flex-start; }
.hdbody { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.hdname { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hdname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f7f1f3; font-size: 16px; line-height: 1.4; }
.hdisc.gold .hdname b { color: #ffd56b; }
/* the .madar handle stays on one line (a hyphenated name must not break at the hyphen) */
.hdhandle { display: block; margin-top: 1px; color: var(--muted); font-size: 12.5px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[dir="rtl"] .hdhandle { text-align: right; }
.hdisc .hdbio { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid #241720; color: #cbbcc3; font-size: 13.5px; line-height: 1.6; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.hdisc.gold .hdbio { border-top-color: rgba(255, 213, 107, .16); }
.hdfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: auto; padding-top: 10px; font-size: 12.5px; color: var(--muted); }
.hdfoot .hdfol { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.hdfoot .hdfol svg { width: 14px; height: 14px; fill: none; stroke: #ff7a1a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hdcat { color: #ffc98f; background: rgba(255, 122, 26, .1); border: 1px solid rgba(255, 122, 26, .25); border-radius: 999px; padding: 1px 9px; line-height: 1.6; white-space: nowrap; }
.hdisc.gold .hdcat { color: #ffd56b; background: rgba(255, 213, 107, .08); border-color: rgba(255, 213, 107, .3); }
/* phones: one column of wide cards */
@media (max-width: 560px) {
  .hgrid, .hgrid.one { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .hdisc { padding: 14px; gap: 12px; min-height: 0; }
  .hav.lg { width: 60px; height: 80px; font-size: 24px; }
}

/* a hidden element stays hidden whatever its own display rule */
#langBtn[hidden] { display: none !important; }

/* last line: rights and links, centred */
footer p.flinks { text-align: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; }
footer p.flinks a { color: var(--muted); text-decoration: none; }
footer p.flinks a:hover { color: var(--sky); }
/* discover by field (2026-10-09): one row of chips; on phones it scrolls sideways inside itself, never the page */
.hcats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 1px 4px; min-width: 0; }
.hcats::-webkit-scrollbar { display: none; }
.hcat { flex: 0 0 auto; font: inherit; font-size: 13.5px; color: #ffc98f; background: rgba(255, 122, 26, .08); border: 1px solid rgba(255, 122, 26, .25); border-radius: 999px; padding: 6px 14px; cursor: pointer; white-space: nowrap; }
.hcat:hover { background: rgba(255, 122, 26, .16); }
.hcat.on { color: #fff; background: linear-gradient(90deg, #ff3d6e, #ff7a1a); border-color: transparent; }
.hcat:disabled { opacity: .6; cursor: default; }
/* ranks (2026-10-09): the gold ✓ (and a blue ✓ for a verified identity) side by side */
.hvoks { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; }
/* ranks v2 (owner 2026-10-09): a clear blue ✓ «موثق» by the name; 👑 أسطوري / 💎 VIP on the picture's top corner; a small
   gold ✓ «مميز» by the name.madar handle */
.hvok.id { background: #1d9bf0; color: #fff; width: 17px; height: 17px; font-size: 11px; box-shadow: 0 0 0 1.5px rgba(29, 155, 240, .25); }
.hvok.own { width: 13px; height: 13px; font-size: 8.5px; vertical-align: -1px; }
.hdhandle .hvok.own { display: inline-grid; }
.hrankb { position: absolute; top: 3px; right: 3px; z-index: 2; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(14, 9, 4, .82); box-shadow: 0 0 0 1.5px #ffd56b; font-size: 12px; line-height: 1; }
.hav.sm .hrankb { top: -1px; right: -1px; width: 15px; height: 15px; font-size: 8.5px; box-shadow: 0 0 0 1px #ffd56b; }
.hav.md .hrankb { width: 19px; height: 19px; font-size: 10.5px; }
.hav .hrankb img { position: static; inset: auto; width: 100%; height: 100%; object-fit: contain; background: none; }
.hrankb.legendary { background: none; box-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.hav .hrankb.vip img { width: 76%; height: 76%; }
.hav.lg .hrankb { width: 24px; height: 24px; }
/* 2026-10-10: the rank emblem at the bottom of the picture, half outside it, no plate (like the creator page) */
.havwrap { position: relative; display: inline-flex; flex: 0 0 auto; align-self: flex-start; padding-bottom: 8px; }
.havwrap.sm { padding-bottom: 5px; align-self: center; }
.havwrap .hrankb { position: absolute; top: auto; right: auto; left: 50%; bottom: -6px; transform: translateX(-50%); width: 30px; height: 30px; background: none; box-shadow: none; z-index: 2; }
.havwrap .hrankb img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .9)) drop-shadow(0 0 5px rgba(255, 190, 70, .35)); }
.havwrap .hrankb.vip { width: 22px; height: 22px; bottom: -4px; }
.havwrap.sm .hrankb { width: 18px; height: 18px; bottom: -4px; }
.havwrap.md .hrankb { width: 24px; height: 24px; }

/* phones (2026-10-10): no live blur behind media (heavy on iPhone Safari), a dark tint instead */
@media (max-width: 760px) {
  .hmedia .hbg { filter: brightness(.3); }
}

/* ===== discover, redesigned (owner 2026-10-10) ===== */
/* the head: centred words on a picture of sound waves and sparks in the site's colours */
.hdhead { position: relative; overflow: hidden; text-align: center; display: grid; justify-items: center; gap: 10px; padding: 26px 18px 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 260' preserveAspectRatio='xMidYMax slice'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23ff3d6e'/%3E%3Cstop offset='.5' stop-color='%23ff7a1a'/%3E%3Cstop offset='1' stop-color='%23ffc857'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(0 45)' fill='none' stroke='url(%23g)' stroke-linecap='round'%3E%3Cpath d='M0 170 C150 110 300 230 450 160 S750 90 900 150 S1100 210 1200 140' stroke-width='2' opacity='.4'/%3E%3Cpath d='M0 190 C170 140 320 250 470 185 S770 120 920 175 S1110 230 1200 170' stroke-width='1.4' opacity='.25'/%3E%3Cpath d='M0 150 C140 90 310 200 460 135 S760 60 910 125 S1090 185 1200 115' stroke-width='1' opacity='.28'/%3E%3Cpath d='M0 210 C180 175 330 260 480 210 S780 160 930 200 S1120 250 1200 205' stroke-width='.8' opacity='.2'/%3E%3C/g%3E%3Cg fill='%23ffc857'%3E%3Ccircle cx='120' cy='60' r='1.6' opacity='.7'/%3E%3Ccircle cx='260' cy='35' r='1.1' opacity='.5'/%3E%3Ccircle cx='980' cy='55' r='1.8' opacity='.7'/%3E%3Ccircle cx='1100' cy='90' r='1.2' opacity='.5'/%3E%3Ccircle cx='840' cy='30' r='1' opacity='.45'/%3E%3Ccircle cx='380' cy='80' r='1' opacity='.4'/%3E%3C/g%3E%3Cg fill='%23ff7a1a' opacity='.5'%3E%3Cpath d='M1040 40 l3 8 8 3 -8 3 -3 8 -3 -8 -8 -3 8 -3z'/%3E%3Cpath d='M180 110 l2 5 5 2 -5 2 -2 5 -2 -5 -5 -2 5 -2z'/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat, radial-gradient(600px 220px at 50% 120%, rgba(255, 61, 110, .16), transparent 70%), linear-gradient(180deg, #140b12, #0d080f); border-color: rgba(255, 122, 26, .28); }
.hdhead h1 { margin: 0; font-size: 26px; background: linear-gradient(90deg, #ff5c8a, #ff9b3d, #ffd56b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hdhead p { margin: 0; max-width: 520px; text-wrap: pretty; }
.hdtools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 4px; }
.hviews { display: inline-flex; border: 1px solid var(--line2, #3a2a33); border-radius: 10px; overflow: hidden; background: rgba(10, 7, 12, .6); }
.hview { display: grid; place-items: center; width: 38px; height: 34px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hview + .hview { border-inline-start: 1px solid var(--line2, #3a2a33); }
.hview svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.hview.on { color: #1a1205; background: linear-gradient(135deg, #ffc857, #ff9b3d); }
@media (hover: hover) { .hview:not(.on):hover { color: var(--text, #f4ecef); } }
/* cards: sharp corners */
.hdisc { border-radius: 6px; }
.hdisc .hav.lg { border-radius: 4px; }
.hdfoot { justify-content: space-between; }
/* grid: the picture on top, the words centred, followers and field at the foot */
.hgrid.vgrid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.hgrid.vgrid.one { grid-template-columns: minmax(0, 240px); }
.vgrid .hdisc { flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 18px 14px 12px; min-height: 0; }
.vgrid .hdisc > .hav.lg, .vgrid .hdisc > .havwrap { align-self: center; }
.vgrid .hav.lg { width: 84px; height: 112px; font-size: 30px; }
.vgrid .hdbody { width: 100%; align-items: center; }
.vgrid .hdname { justify-content: center; max-width: 100%; }
html[dir="rtl"] .vgrid .hdhandle { text-align: center; }
.vgrid .hdhandle { text-align: center; }
.vgrid .hdisc .hdbio { width: 100%; text-align: center; }
.vgrid .hdfoot { width: 100%; border-top: 1px solid #241720; margin-top: 10px; }
.vgrid .hdisc.gold .hdfoot { border-top-color: rgba(255, 213, 107, .16); }
/* list: one wide row each */
.hgrid.vlist { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.vlist .hdisc { min-height: 0; align-items: center; }
.vlist .hdisc .hdbio { -webkit-line-clamp: 1; }
@media (max-width: 560px) {
  .hgrid.vgrid, .hgrid.vgrid.one { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vgrid .hdisc { padding: 14px 10px 10px; }
  .vgrid .hav.lg { width: 70px; height: 94px; }
  .vgrid .hdname b { font-size: 14.5px; }
  .vgrid .hdfoot { justify-content: center; }
  .hdhead h1 { font-size: 22px; }
}
.vgrid .hdfoot { margin-top: auto; }
.vgrid .hdisc .hdbio { margin-bottom: 4px; }
.hdhead h1, .hdhead p { position: relative; text-shadow: 0 1px 8px rgba(7, 5, 10, .9); }
.hdhead h1 { text-shadow: none; }
.hdhead { justify-content: stretch; grid-template-columns: minmax(0, 1fr); }
/* the bar over the cards (owner 2026-10-10): the fields on the start side, refresh + grid / list on the end side */
.hbar { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hbar .hcats { flex: 1 1 auto; }
.hbar .hdtools { flex: 0 0 auto; margin: 0 0 0 auto; gap: 8px; flex-wrap: nowrap; }
html[dir="rtl"] .hbar .hdtools { margin: 0 auto 0 0; }
.hrefresh { width: 38px; height: 36px; border: 1px solid var(--line2, #3a2a33); border-radius: 10px; background: rgba(10, 7, 12, .6); }
.hrefresh svg { stroke-linecap: round; stroke-linejoin: round; }
.hrefresh:disabled svg { animation: hspin .8s linear infinite; }
@keyframes hspin { to { transform: rotate(360deg); } }
.hviews .hview { height: 36px; }
