/* ============================================================================
   Mashhor Hub — Prompt Marketplace (v583). Dark brand theme, RTL-aware.
   ============================================================================ */
:root{ --pm-line:var(--border,rgba(255,255,255,.09)); --pm-surf:rgba(255,255,255,.03); --pm-surf2:rgba(255,255,255,.05); --pm-accent:var(--lime,#c4ff47); }
[data-color=light]{ --pm-line:rgba(0,30,80,.12); --pm-surf:rgba(0,30,80,.04); --pm-surf2:rgba(0,30,80,.06); }
.pm-wrap{ max-width:1180px; margin:0 auto; padding:0 5%; }
.pm-wrap *{ box-sizing:border-box; }

/* hero */
.pm-hero{ max-width:1240px; margin:0 auto 26px; padding:0 5%; }
.pm-hero-inner{ position:relative; overflow:hidden; border-radius:24px; padding:48px 42px; background:linear-gradient(120deg,#3b2a6b 0%,#5a3f8f 30%,#3f6fbf 62%,#1f9fb5 100%); }
.pm-hero-inner::after{ content:""; position:absolute; inset:0; background:radial-gradient(circle at 80% 20%, rgba(255,255,255,.18), transparent 45%); pointer-events:none; }
.pm-hero h1{ font-family:var(--fh,sans-serif); font-size:clamp(2rem,5vw,3.4rem); margin:0 0 12px; color:#fff; letter-spacing:-.02em; position:relative; }
.pm-hero p{ max-width:620px; color:rgba(255,255,255,.9); font-size:1.02rem; line-height:1.6; margin:0 0 22px; position:relative; }
.pm-hero-cta{ display:inline-flex; align-items:center; gap:8px; padding:13px 26px; border-radius:100px; background:linear-gradient(90deg,#ffb37e,#ff8f6b); color:#3a1d10; font-weight:800; font-family:inherit; border:0; cursor:pointer; text-decoration:none; position:relative; transition:.25s; }
.pm-hero-cta:hover{ transform:translateY(-2px); box-shadow:0 12px 30px rgba(255,140,90,.35); }
.pm-hero-stats{ display:flex; gap:22px; flex-wrap:wrap; margin-top:20px; position:relative; }
.pm-hero-stat{ color:#fff; font-family:var(--fm,monospace); font-size:.82rem; opacity:.92; display:flex; align-items:center; gap:6px; }
.pm-hero-stat b{ font-size:1rem; }

/* filter bar (sticky) */
.pm-filter{ --text:#f6f2e8; --muted:#9aa4b2; --pm-line:rgba(255,255,255,.09); --pm-surf:rgba(255,255,255,.03); position:sticky; top:60px; z-index:40; background:rgba(9,14,26,.9); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); border:1px solid var(--pm-line); border-radius:16px; padding:14px; margin-bottom:26px; display:flex; flex-direction:column; gap:11px; box-shadow:0 10px 30px rgba(0,0,0,.28); }
.pm-filter-top{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.pm-search{ position:relative; flex:1; min-width:210px; }
.pm-search input{ width:100%; padding:12px 44px; border-radius:11px; background:var(--pm-surf); border:1px solid var(--pm-line); color:var(--text,#f6f2e8); font-family:inherit; font-size:.92rem; outline:none; }
.pm-search input:focus{ border-color:var(--pm-accent); }
.pm-search svg{ position:absolute; inset-inline-start:15px; top:50%; transform:translateY(-50%); width:17px; height:17px; color:var(--muted,#9aa4b2); }
.pm-seg{ display:flex; gap:6px; flex:0 0 auto; background:var(--pm-surf); border:1px solid var(--pm-line); border-radius:12px; padding:4px; }
.pm-seg .pm-chip{ border:0; background:transparent; padding:8px 15px; }
.pm-fgroup{ display:flex; align-items:center; gap:12px; min-width:0; }
.pm-flabel{ flex:0 0 auto; width:74px; font-family:var(--fm,monospace); font-size:.64rem; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--muted,#9aa4b2); }
.pm-chiprow{ display:flex; gap:7px; overflow-x:auto; padding:2px 0; flex:1; min-width:0; scrollbar-width:none; -ms-overflow-style:none; -webkit-mask-image:linear-gradient(90deg,transparent,#000 2%,#000 96%,transparent); mask-image:linear-gradient(90deg,transparent,#000 2%,#000 96%,transparent); }
.pm-chiprow::-webkit-scrollbar{ display:none; }
.pm-chip{ flex:0 0 auto; display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border-radius:100px; background:var(--pm-surf); border:1px solid var(--pm-line); color:var(--muted,#9aa4b2); font-family:inherit; font-size:.82rem; cursor:pointer; transition:.2s; white-space:nowrap; }
.pm-chip span{ font-size:.95rem; line-height:1; }
.pm-chip:hover{ color:var(--text,#f6f2e8); border-color:rgba(255,255,255,.25); }
.pm-chip.active{ background:var(--mc,var(--pm-accent)); border-color:transparent; color:#08101a; font-weight:700; }

/* sections + rows */
.pm-section{ margin-bottom:30px; }
.pm-sec-h{ display:flex; align-items:center; gap:11px; margin:0 0 14px; }
.pm-sec-ic{ font-size:1.2rem; width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center; background:var(--pm-surf); border:1px solid var(--pm-line); border-radius:10px; flex:0 0 auto; }
.pm-sec-h h3{ font-family:var(--fh,sans-serif); font-size:1.2rem; margin:0; color:var(--text,#f6f2e8); }
.pm-sec-h .pm-bar{ flex:1; height:1px; background:linear-gradient(90deg,var(--pm-line),transparent); }
[dir="rtl"] .pm-sec-h .pm-bar{ background:linear-gradient(270deg,var(--pm-line),transparent); }
.pm-seeall{ background:none; border:0; color:var(--pm-accent); font-family:var(--fm,monospace); font-size:.78rem; cursor:pointer; white-space:nowrap; }
.pm-rowscroll{ display:flex; gap:18px; overflow-x:auto; padding:4px 2px 14px; scroll-snap-type:x mandatory; scrollbar-width:thin; }
.pm-rowscroll::-webkit-scrollbar{ height:7px; } .pm-rowscroll::-webkit-scrollbar-thumb{ background:var(--pm-line); border-radius:10px; }
.pm-rowscroll .pm-card{ flex:0 0 auto; width:260px; scroll-snap-align:start; }

/* grid */
.pm-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:20px; }
.pm-results .pm-res-h h3{ font-family:var(--fh,sans-serif); color:var(--text,#f6f2e8); margin:0 0 16px; font-size:1.15rem; }

/* card */
.pm-card{ background:var(--pm-surf); border:1px solid var(--pm-line); border-radius:16px; overflow:hidden; cursor:pointer; transition:transform .3s cubic-bezier(.4,0,.2,1),border-color .3s,box-shadow .3s; display:flex; flex-direction:column; }
.pm-card:hover,.pm-card:focus{ transform:translateY(-5px); border-color:var(--mc,rgba(196,255,71,.4)); box-shadow:0 22px 44px rgba(0,0,0,.5); outline:none; }
.pm-cover{ position:relative; aspect-ratio:16/11; background:#0b1220; overflow:hidden; }
.pm-cover img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .5s; }
.pm-cover video{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
.pm-card:hover .pm-cover img{ transform:scale(1.06); }
.pm-cover .pm-ph{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:2.6rem; }
/* model badge at the reading-END (right for EN, left for AR) so it never clashes with the title/tag below */
.pm-badge{ position:absolute; inset-block-start:9px; inset-inline-start:9px; display:inline-flex; align-items:center; gap:5px; font-size:.66rem; font-weight:700; color:#fff; background:color-mix(in srgb, var(--mc,#8b5cf6) 78%, #05070d); padding:4px 9px; border-radius:100px; box-shadow:0 2px 8px rgba(0,0,0,.3); }
.pm-badge-ic{ font-size:.8rem; line-height:1; }
.pm-rate{ position:absolute; inset-block-start:9px; inset-inline-end:9px; display:inline-flex; align-items:center; gap:3px; font-size:.68rem; font-weight:700; color:#fff; background:rgba(6,12,20,.72); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); padding:3px 8px; border-radius:100px; }
.pm-rate svg{ width:11px; height:11px; color:#facc15; }
.pm-cbody{ padding:12px 14px 14px; display:flex; flex-direction:column; gap:8px; flex:1; }
.pm-title{ font-family:var(--fh,sans-serif); font-size:.94rem; line-height:1.35; margin:0; color:var(--text,#f6f2e8); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.pm-cmeta{ display:flex; align-items:center; justify-content:space-between; margin-top:auto; }
.pm-price{ font-family:var(--fm,monospace); font-weight:800; font-size:.82rem; }
.pm-price.free{ color:var(--pm-accent); }
.pm-price.paid{ color:#ffb37e; }
.pm-stat{ display:inline-flex; align-items:center; gap:4px; font-family:var(--fm,monospace); font-size:.72rem; color:var(--muted,#9aa4b2); }
.pm-stat svg{ width:12px; height:12px; }

/* brand logo inside badge/chip */
.pm-badge-ic{ display:inline-flex; }
.pm-badge-ic svg{ width:14px; height:14px; display:block; }
.pm-chip-ic{ display:inline-flex; align-items:center; }
.pm-chip-ic svg{ width:16px; height:16px; }
/* real brand-logo SVG files (color) — white chip so they read on any bg */
.pm-logo-img{ width:14px; height:14px; object-fit:contain; display:block; }
.pm-badge-ic.isimg,.pm-chip-ic.isimg{ background:#fff; border-radius:4px; padding:1.5px; }
.pm-badge-ic.isimg .pm-logo-img{ width:12px; height:12px; }
.pm-chip.active .pm-chip-ic.isimg{ background:#fff; }
.pm-cover .pm-ph .pm-logo-img,.pm-modal-media .pm-ph .pm-logo-img{ width:46px; height:46px; }
.pm-chip-model .pm-chip-ic{ color:var(--mc,#8b5cf6); }
.pm-chip-model.active .pm-chip-ic{ color:#08101a; }
.pm-sec-ic svg{ width:18px; height:18px; }
.pm-cover .pm-ph svg{ width:46px; height:46px; opacity:.5; }
/* owner media in the hero showcase */
.ps-show-card video{ width:100%; height:100%; object-fit:cover; display:block; border-radius:inherit; }

/* card description + rating-under-description */
.pm-cdesc{ font-size:.76rem; line-height:1.5; color:var(--muted,#9aa4b2); margin:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.pm-cardrate{ display:flex; align-items:center; gap:5px; }
.pm-stars{ display:inline-flex; gap:1px; }
.pm-star{ color:rgba(255,255,255,.16); line-height:0; }
.pm-star.on{ color:#facc15; }
.pm-star svg{ width:12px; height:12px; }
.pm-cardrate b{ font-size:.74rem; color:#e2e8f0; font-family:var(--fm,monospace); }
.pm-rev{ font-size:.7rem; color:var(--muted,#9aa4b2); }

/* video prompt: play badge on the cover + video player in the modal */
.pm-play{ position:absolute; inset:0; margin:auto; width:52px; height:52px; display:flex; align-items:center; justify-content:center; background:rgba(6,12,20,.55); border:1px solid rgba(255,255,255,.4); border-radius:50%; color:#fff; pointer-events:none; -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px); transition:.25s; }
.pm-play svg{ width:22px; height:22px; margin-inline-start:2px; }
.pm-card:hover .pm-play{ transform:scale(1.08); background:var(--mc,#8b5cf6); border-color:transparent; }
.pm-modal-media.is-video{ aspect-ratio:auto; background:#0b1220; max-height:72vh; display:flex; align-items:center; justify-content:center; }
.pm-modal-media.is-video video{ max-width:100%; max-height:72vh; width:auto; height:auto; display:block; border-radius:14px; }

.pm-empty{ grid-column:1/-1; text-align:center; padding:60px 20px; color:var(--muted,#9aa4b2); }
.pm-loading{ text-align:center; padding:80px; color:var(--muted,#9aa4b2); }
.pm-exploreall{ text-align:center; margin:24px 0 10px; }
.pm-explore-btn{ padding:13px 30px; border-radius:100px; background:var(--pm-accent); color:#08101a; font-weight:800; font-family:inherit; border:0; cursor:pointer; transition:.25s; }
.pm-explore-btn:hover{ filter:brightness(1.08); transform:translateY(-2px); }

/* pager */
.pm-pager{ display:flex; align-items:center; justify-content:center; gap:6px; margin-top:28px; }
.pm-pg{ min-width:38px; height:38px; padding:0 10px; display:inline-flex; align-items:center; justify-content:center; border-radius:11px; background:var(--pm-surf); border:1px solid var(--pm-line); color:var(--muted,#9aa4b2); font-family:var(--fm,monospace); font-size:.85rem; cursor:pointer; transition:.2s; }
.pm-pg:hover:not(:disabled):not(.active){ color:var(--text,#f6f2e8); border-color:rgba(196,255,71,.3); }
.pm-pg.active{ background:var(--pm-accent); color:#08101a; border-color:var(--pm-accent); font-weight:800; }
.pm-pg:disabled{ opacity:.35; cursor:not-allowed; } .pm-pg.nav{ font-size:1.2rem; } .pm-gap{ color:var(--muted,#9aa4b2); padding:0 3px; }

/* ── modal ── */
.pm-modal{ position:fixed; inset:0; z-index:9999; display:none; --text:#f6f2e8; --muted:#9aa4b2; --pm-line:rgba(255,255,255,.09); --pm-surf:rgba(255,255,255,.03); --pm-surf2:rgba(255,255,255,.05); }
.pm-modal.open{ display:block; }
.pm-modal-bg{ position:absolute; inset:0; background:rgba(4,9,18,.82); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); }
.pm-modal-card{ position:absolute; inset:0; margin:auto; width:min(1040px,94vw); max-height:92vh; overflow-y:auto; background:var(--surf,#0b1120); border:1px solid var(--pm-line); border-radius:22px; padding:26px; box-shadow:0 40px 90px rgba(0,0,0,.6); }
/* top toolbar: logo — connecting line — favorite (logged-in) — close.
   flex follows the page dir, so the logo sits at the start (right in AR, left in EN). */
.pm-modal-toolbar{ display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.pm-modal-logo{ flex:0 0 auto; display:inline-flex; align-items:center; }
.pm-modal-logo img{ width:30px; height:30px; object-fit:contain; display:block; }
.pm-modal-line{ flex:1 1 auto; height:2px; border-radius:2px; background:linear-gradient(90deg,rgba(196,255,71,.55),rgba(196,255,71,.12) 60%,transparent); }
[dir="rtl"] .pm-modal-line{ background:linear-gradient(270deg,rgba(196,255,71,.55),rgba(196,255,71,.12) 60%,transparent); }
.pm-close{ flex:0 0 auto; width:38px; height:38px; border-radius:10px; background:var(--pm-surf); border:1px solid var(--pm-line); color:#fff; cursor:pointer; font-size:1rem; z-index:2; }
.pm-close:hover{ border-color:rgba(255,255,255,.3); }
.pm-fav{ display:inline-flex; align-items:center; gap:7px; height:38px; padding:0 15px; border-radius:100px; cursor:pointer;
  background:var(--pm-surf); border:1px solid var(--pm-line); color:var(--muted,#9aa4b2); font-weight:700; font-size:.85rem; font-family:inherit; transition:.18s; }
/* logged-out visitors: keep it truly hidden (the class's display would otherwise beat [hidden]) */
.pm-fav[hidden]{ display:none !important; }
.pm-fav svg{ transition:transform .18s ease; }
.pm-fav:hover{ color:#fff; border-color:rgba(255,255,255,.28); }
.pm-fav.on{ color:#ff4d6d; border-color:rgba(255,77,109,.5); background:rgba(255,77,109,.12); }
.pm-fav.on svg{ transform:scale(1.08); }
/* heart on each card (logged-in) */
.pm-cardfav{ position:absolute; inset-block-start:9px; inset-inline-end:9px; z-index:3; width:32px; height:32px; border-radius:50%; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; background:rgba(6,11,20,.6); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  border:1px solid rgba(255,255,255,.16); color:#fff; padding:0; transition:transform .15s ease, color .15s ease, background .15s ease; }
.pm-cardfav:hover{ transform:scale(1.1); background:rgba(6,11,20,.8); }
.pm-cardfav.on{ color:#ff4d6d; border-color:rgba(255,77,109,.5); }
/* "My Favorites" filter chip active state */
.pm-chip-fav{ display:inline-flex; align-items:center; gap:6px; }
.pm-chip-fav.active{ color:#ff4d6d; border-color:rgba(255,77,109,.5); background:rgba(255,77,109,.12); }
.pm-modal-grid{ display:grid; grid-template-columns:1fr 1.1fr; gap:26px; }
.pm-modal-media{ border-radius:16px; overflow:hidden; background:#0b1220; border:1px solid var(--pm-line); aspect-ratio:16/11; position:relative; }
.pm-modal-media img{ width:100%; height:100%; object-fit:cover; }
.pm-modal-media .pm-ph{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:3.4rem; }
.pm-modal-info{ min-width:0; }
.pm-modal-title{ font-family:var(--fh,sans-serif); font-size:1.55rem; color:#fff; margin:10px 0 12px; line-height:1.25; }
.pm-modal-stats{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:14px; }
.pm-modal-stats .pm-price{ font-size:1.1rem; }
.pm-modal-desc{ color:var(--muted,#9aa4b2); line-height:1.6; margin:0 0 10px; }
.pm-benefit{ color:#cbd5e1; background:var(--pm-surf); border:1px solid var(--pm-line); border-radius:10px; padding:10px 12px; font-size:.86rem; margin:0 0 12px; }
.pm-tags{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px; }
.pm-tag{ font-size:.7rem; color:var(--muted,#9aa4b2); background:var(--pm-surf); border:1px solid var(--pm-line); padding:3px 10px; border-radius:100px; }
.pm-prompt{ border:1px solid var(--pm-line); border-radius:12px; overflow:hidden; margin-bottom:14px; }
.pm-prompt-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 12px; background:var(--pm-surf); font-family:var(--fm,monospace); font-size:.74rem; color:var(--muted,#9aa4b2); }
.pm-prompt-head svg{ width:13px; height:13px; vertical-align:-2px; }
.pm-copy{ background:var(--pm-accent); color:#08101a; border:0; border-radius:8px; padding:5px 12px; font-weight:700; font-size:.74rem; cursor:pointer; font-family:inherit; }
.pm-prompt-text{ margin:0; padding:14px; font-family:'Space Grotesk',var(--fm,monospace); font-size:.82rem; line-height:1.6; color:#e2e8f0; white-space:pre-wrap; word-break:break-word; max-height:260px; overflow:auto; }
.pm-prompt-text.blur{ filter:blur(4px); -webkit-user-select:none; user-select:none; max-height:120px; }
.pm-get{ display:flex; align-items:center; justify-content:center; gap:8px; padding:13px; background:linear-gradient(90deg,#ffb37e,#ff8f6b); color:#3a1d10; font-weight:800; text-decoration:none; }
.pm-get svg{ width:15px; height:15px; }
.pm-modal-foot{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; border-top:1px solid var(--pm-line); padding-top:12px; }
.pm-words{ font-family:var(--fm,monospace); font-size:.74rem; color:var(--muted,#9aa4b2); }
.pm-share{ display:flex; gap:7px; }
.pm-sh{ width:32px; height:32px; min-width:0; box-sizing:border-box; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; border-radius:9px; background:var(--pm-surf); border:1px solid var(--pm-line); color:var(--muted,#9aa4b2); text-decoration:none; transition:.2s; }
.pm-sh svg{ width:15px; height:15px; }
.pm-sh:hover{ color:#fff; transform:translateY(-2px); }
.pm-sh-x:hover{ background:#000; border-color:#000; }
.pm-sh-whatsapp:hover{ background:#25D366; border-color:#25D366; }
.pm-sh-facebook:hover{ background:#1877F2; border-color:#1877F2; }
.pm-sh-linkedin:hover{ background:#0A66C2; border-color:#0A66C2; }
.pm-sh-telegram:hover{ background:#229ED9; border-color:#229ED9; }
.pm-benefit{ display:flex; align-items:flex-start; gap:8px; }
.pm-benefit svg{ width:16px; height:16px; flex:0 0 auto; margin-top:2px; color:var(--pm-accent); }
.pm-similar{ margin-top:26px; border-top:1px solid var(--pm-line); padding-top:18px; }
.pm-similar h3{ display:flex; align-items:center; gap:8px; font-family:var(--fh,sans-serif); font-size:1.05rem; color:#fff; margin:0 0 12px; }
.pm-h-ic{ display:inline-flex; color:var(--pm-accent); }
.pm-h-ic svg{ width:17px; height:17px; }
.pm-similar .pm-card{ width:220px; flex:0 0 auto; }

/* responsive */
/* let flex/grid children shrink so nothing forces horizontal overflow */
.pm-wrap, .pm-section, .pm-rowscroll, .pm-grid, .pm-card, .pm-filter, .pm-chiprow{ min-width:0; max-width:100%; }
@media (max-width:820px){
  .pm-modal-grid{ grid-template-columns:1fr; gap:16px; }
  .pm-modal-card{ padding:18px; }
  .pm-hero-inner{ padding:34px 26px; }
  .pm-filter{ top:64px; }
}
@media (max-width:560px){
  .pm-hero{ margin-bottom:18px; }
  .pm-hero-inner{ padding:28px 20px; border-radius:18px; }
  .pm-hero h1{ font-size:1.7rem; }
  .pm-hero p{ font-size:.92rem; }
  .pm-hero-stats{ gap:14px; margin-top:16px; }
  .pm-filter{ position:static; padding:12px; gap:10px; }
  /* search + All/Free/Paid on ONE line (smaller), models/categories below */
  .pm-filter-top{ flex-wrap:nowrap; gap:8px; }
  .pm-search{ min-width:0; flex:1 1 auto; }
  .pm-search input{ padding:10px 38px; font-size:.85rem; }
  .pm-search svg{ width:15px; height:15px; inset-inline-start:12px; }
  .pm-seg{ flex:0 0 auto; padding:3px; gap:3px; }
  .pm-seg .pm-chip{ padding:7px 10px; font-size:.72rem; }
  .pm-grid{ grid-template-columns:repeat(2,1fr); gap:12px; }
  .pm-rowscroll{ gap:12px; }
  .pm-rowscroll .pm-card{ width:170px; }
  .pm-sec-h h3{ font-size:1.05rem; }
  .pm-sec-ic{ width:32px; height:32px; font-size:1.05rem; }
  .pm-title{ font-size:.82rem; }
  .pm-cbody{ padding:10px 11px 12px; gap:6px; }
  .pm-badge{ font-size:.6rem; padding:3px 7px; }
  .pm-rate{ font-size:.62rem; }
  /* full-screen, comfortable modal on phones */
  .pm-modal-card{ inset:0; margin:0; width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; border-radius:0; border:0; padding:16px 14px 30px; }
  .pm-close{ inset-block-start:10px; inset-inline-end:10px; }
  .pm-modal-title{ font-size:1.25rem; }
  .pm-modal-stats{ gap:10px; }
  .pm-modal-foot{ gap:10px; }
  .pm-similar .pm-card{ width:150px; }
  .pm-prompt-text{ font-size:.8rem; }
}
@media (max-width:380px){
  .pm-grid{ grid-template-columns:1fr; }
}
/* Permalink → standalone SEO prompt page */
.pm-permalink{ display:inline-flex; align-items:center; gap:6px; margin:14px 0 4px; font-size:.82rem; font-weight:700;
  color:var(--pm-accent,#7c5cff); text-decoration:none; }
.pm-permalink:hover{ text-decoration:underline; }
html[dir="rtl"] .pm-permalink svg{ transform:scaleX(-1); }

/* modal header: model badge + prompt name grouped as one header.
   .pm-badge is normally absolutely-positioned to overlay a card cover — reset it
   to static here so it sits inline above the title instead of floating top-right. */
.pm-modal-head{ display:flex; flex-direction:column; align-items:flex-start; gap:9px; padding-bottom:12px; margin-bottom:6px; border-bottom:1px solid var(--pm-line); }
.pm-modal-head .pm-badge{ position:static; inset:auto; margin:0; }
.pm-modal-head .pm-modal-title{ margin:0; }
/* keep the modal share icons perfectly even (whatsapp's glyph otherwise inflates it) */
.pm-modal-foot .pm-share .pm-sh{ flex:0 0 32px; width:32px; height:32px; }
/* popup sidebar: media + "about this tool" + Instagram follow (fills the space under the media) */
.pm-modal-aside{ display:flex; flex-direction:column; gap:12px; min-width:0; align-self:start; }
.pm-toolinfo{ border:1px solid var(--pm-line); border-radius:12px; padding:12px 14px; background:var(--pm-surf); }
.pm-toolinfo-h{ display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.pm-toolinfo-h .pm-ti-ic{ width:34px; height:34px; flex:0 0 auto; border-radius:9px; }
.pm-toolinfo-h .pm-ti-ic .pm-logo-img{ width:20px; height:20px; }
.pm-toolinfo-h > div{ display:flex; flex-direction:column; line-height:1.2; min-width:0; }
.pm-toolinfo-h b{ font-size:.9rem; color:#fff; }
.pm-toolinfo-h span{ font-size:.64rem; color:var(--muted,#9aa4b2); font-family:var(--fm,monospace); text-transform:uppercase; letter-spacing:.06em; }
.pm-toolinfo p{ margin:0; font-size:.82rem; line-height:1.6; color:var(--muted,#9aa4b2); }
.pm-ig{ display:flex; align-items:center; gap:11px; padding:11px 14px; border:1px solid var(--pm-line); border-radius:12px; text-decoration:none;
  background:linear-gradient(120deg, rgba(225,48,108,.14), rgba(131,58,180,.10)); transition:transform .2s ease, border-color .2s ease; }
.pm-ig:hover{ border-color:#E1306C; transform:translateY(-2px); }
.pm-ig img{ border-radius:8px; flex:0 0 auto; }
.pm-ig span{ display:flex; flex-direction:column; line-height:1.25; min-width:0; }
.pm-ig b{ font-size:.84rem; color:#fff; }
.pm-ig i{ font-style:normal; font-size:.72rem; color:var(--muted,#9aa4b2); }

/* Two promo cards under the Instagram card — DESKTOP ONLY */
.pm-promocards{ display:none; }
@media (min-width:993px){
  .pm-promocards{ display:flex; flex-direction:column; gap:10px; margin-top:12px; }
}
.pm-promocard{ display:flex; align-items:center; gap:11px; padding:11px 13px; border:1px solid var(--pm-line); border-radius:12px;
  text-decoration:none; transition:transform .2s ease, border-color .2s ease, background .2s ease; }
.pm-promocard:hover{ transform:translateY(-2px); }
.pm-pc-ic{ flex:0 0 auto; width:36px; height:36px; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; }
.pm-pc-tx{ display:flex; flex-direction:column; line-height:1.25; min-width:0; }
.pm-pc-tx b{ font-size:.84rem; color:#fff; }
.pm-pc-tx i{ font-style:normal; font-size:.72rem; color:var(--muted,#9aa4b2); white-space:normal; }
.pm-pc-arr{ flex:0 0 auto; margin-inline-start:auto; color:var(--muted,#9aa4b2); transition:transform .2s ease, color .2s ease; }
[dir="rtl"] .pm-pc-arr{ transform:scaleX(-1); }
.pm-promocard:hover .pm-pc-arr{ color:#fff; }
.pm-pc-svc{ background:linear-gradient(120deg, rgba(196,255,71,.13), rgba(196,255,71,.04)); }
.pm-pc-svc:hover{ border-color:var(--lime,#c4ff47); }
.pm-pc-svc .pm-pc-ic{ background:rgba(196,255,71,.16); color:var(--lime,#c4ff47); }
.pm-pc-lib{ background:linear-gradient(120deg, rgba(88,140,255,.14), rgba(88,140,255,.04)); }
.pm-pc-lib:hover{ border-color:#588cff; }
.pm-pc-lib .pm-pc-ic{ background:rgba(88,140,255,.16); color:#7ba6ff; }

/* educational info card at the bottom of the aside — DESKTOP ONLY, bottom-aligned so
   the aside column balances against the (taller) info column */
.pm-infonote{ display:none; }
@media (min-width:993px){
  .pm-modal-aside{ align-self:stretch; }
  .pm-infonote{ display:block; margin-top:auto; padding:14px; border:1px solid var(--pm-line); border-radius:12px;
    background:linear-gradient(135deg, rgba(196,255,71,.07), rgba(255,255,255,0)); }
}
.pm-in-formula{ margin:0 0 8px; font-size:.82rem; line-height:1.6; color:var(--muted,#9aa4b2); }
.pm-in-formula b{ color:#fff; }
.pm-in-eq{ color:var(--lime,#c4ff47); font-weight:700; }
.pm-in-tip{ margin:0; padding-top:8px; border-top:1px dashed var(--pm-line); font-size:.8rem; line-height:1.55; color:#cdd8e6; font-style:italic; }

/* Editors' Best — day / month / year spotlight before the footer */
.pm-best{ margin:38px 0 8px; }
.pm-best-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.pm-best-card{ position:relative; }
.pm-best-tag{ display:flex; align-items:center; gap:9px; padding:9px 12px; margin-bottom:10px; border:1px solid var(--pm-line); border-radius:12px;
  background:linear-gradient(135deg, color-mix(in srgb, var(--pm-accent,#7c5cff) 16%, transparent), rgba(255,255,255,.02)); }
.pm-best-ic{ display:inline-flex; width:26px; height:26px; align-items:center; justify-content:center; border-radius:8px; background:var(--pm-accent,#7c5cff); color:#0a0f1a; flex:0 0 auto; }
.pm-best-ic svg{ width:15px; height:15px; }
.pm-best-lbl{ display:flex; flex-direction:column; line-height:1.15; min-width:0; }
.pm-best-lbl b{ font-size:.86rem; color:var(--text,#f6f2e8); }
.pm-best-lbl i{ font-style:normal; font-size:.68rem; color:var(--muted,#9aa4b2); }
@media (max-width:820px){ .pm-best-grid{ grid-template-columns:1fr; max-width:420px; margin-inline:auto; } }
@media (max-width:560px){ .pm-best{ margin-top:26px; } .pm-best-lbl b{ font-size:.8rem; } }
