/* صفحات الستيكرات والوسوم (src/pages.js). فوق site.css (الألوان والخط والشريط والفوتر). */
.pg-main { width: min(1180px, 100% - 40px); margin-inline: auto; padding: 18px 0 8px; }
.pg-links a { white-space: nowrap; }
.pg-search { flex: 1; min-width: 200px; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.pg-search svg { width: 18px; height: 18px; flex: none; }
.pg-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15px; outline: none; color: var(--ink); }
.pg-search:focus-within { border-color: var(--brand); }
/* الموبايل: البحث في سطر لوحده تحت (شريط الموقع ما بيلفّش لوحده، فكان البحث بيطلع بره الشاشة) */
@media (max-width: 760px) { .pg .nav .wrap { flex-wrap: wrap; row-gap: 10px; } .pg-links { display: none; } .pg-search { order: 3; flex-basis: 100%; min-width: 0; max-width: none; } }

.pg-crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; }
.pg-crumbs a { color: var(--muted); }
.pg-crumbs span[aria-current] { color: var(--ink); }

/* ---------- صفحة ستيكر ---------- */
.pg-sticker { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.pg-card { flex: 0 1 440px; min-width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 20px; box-shadow: 0 18px 50px rgba(16, 32, 27, .08); }
.pg-big { position: relative; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden; background: repeating-conic-gradient(#8881 0% 25%, transparent 0% 50%) 0 0 / 22px 22px; }
.pg-big img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pg-badge { position: absolute; top: 12px; right: 12px; background: rgba(16, 32, 27, .75); color: #fff; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.pg-player { margin-top: 16px; display: flex; align-items: center; gap: 14px; }
.pg-play { flex: none; width: 56px; height: 56px; border-radius: 28px; border: 0; background: var(--coral); color: #2b0f05; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 24px rgba(255, 122, 89, .35); }
.pg-play svg { width: 26px; height: 26px; }
.pg-play.playing svg path { d: path("M7 5h4v14H7zM13 5h4v14h-4z"); }
.pg-play[aria-busy="true"] { opacity: .7; }
.pg-wave { position: relative; flex: 1; height: 40px; display: flex; align-items: center; gap: 3px; }
.pg-wave i { flex: 1; border-radius: 2px; background: color-mix(in srgb, var(--brand) 35%, transparent); }
.pg-wave i.on { background: var(--brand); }
/* ارتفاع كل خط بكلاس (الـ CSP بيمنع style جوه الصفحة) */
.pg-wave i.h2 { height: 20%; } .pg-wave i.h3 { height: 30%; } .pg-wave i.h4 { height: 40%; } .pg-wave i.h5 { height: 50%; }
.pg-wave i.h6 { height: 60%; } .pg-wave i.h7 { height: 70%; } .pg-wave i.h8 { height: 80%; } .pg-wave i.h9 { height: 90%; } .pg-wave i.h10 { height: 100%; }
/* زرار المتجر البرتقالي (زي الرئيسية) */
.btn.coral { background: var(--coral); color: #2b0f05; border-color: var(--coral); font-weight: 700; box-shadow: 0 12px 28px rgba(255, 122, 89, .3); }
.btn.coral:hover { filter: brightness(1.05); color: #2b0f05; }
.pg-dur { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pg-info { flex: 1 1 460px; min-width: 280px; padding-top: 6px; }
.pg-info h1, .pg-hero h1 { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.2; }
.pg-lead { margin: 12px 0 0; font-size: 18px; line-height: 1.75; color: var(--muted); }
.pg-lead a { color: var(--brand); }
.pg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pg-chips a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 16px; border-radius: 19px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; }
.pg-chips a:hover { border-color: var(--brand); color: var(--brand); }
.pg-chips small { color: var(--muted); font-size: 12.5px; }
.pg-chips.pg-own a { background: var(--brand-tint); border-color: transparent; color: var(--brand-deep); font-weight: 600; }
.pg-cloud a { font-size: 16px; }
.pg-stats { margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.pg-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.pg-stats dt { font-size: 13px; color: var(--muted); }
.pg-stats dd { margin: 4px 0 0; font-size: 21px; font-weight: 700; }
.pg-actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
.pg-actions .btn { min-height: 54px; }
.pg-actions .btn svg { width: 20px; height: 20px; }
.btn.pg-ghost { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.btn.pg-ghost:hover { border-color: var(--brand); }
.pg-self { display: none !important; }
.pg-note { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
/* الموبايل: الإضافة على الكمبيوتر بس، فالأول «ابعت الرابط»، و«ابعتلي رابط الإضافة» بدل زرار المتجر */
@media (max-width: 760px) {
  .pg-sticker { gap: 18px; }
  .pg-actions { display: grid; }
  .pg-share { order: -1; background: var(--brand) !important; color: #fff !important; border-color: var(--brand) !important; }
  .pg-send { display: none !important; }
  .pg-self { display: inline-flex !important; justify-content: center; }
}

.pg-box { margin-top: 44px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 26px 30px; }
.pg-box h2 { margin: 0; font-size: 22px; }
.pg-said blockquote { margin: 12px 0 0; font-size: 20px; line-height: 1.8; }
.pg-how ol { margin: 16px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; counter-reset: s; }
.pg-how li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; }
.pg-how li::before { content: counter(s); grid-row: span 2; width: 34px; height: 34px; border-radius: 17px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
.pg-how li span { color: var(--muted); }
.pg-how a { color: var(--brand); }

.pg-sec { margin-top: 44px; }
.pg-sec h2, .pg-two h2 { margin: 0; font-size: 24px; }
.pg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pg-head a, .pg-more { color: var(--brand); font-weight: 600; }
.pg-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.pg-tw { position: relative; container-type: inline-size; transition: transform .15s; }
.pg-tw:hover { transform: translateY(-2px); }
.pg-tile { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px; transition: border-color .15s, transform .15s; }
.pg-tile:hover { border-color: var(--brand); }
.pg-thumb { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--bg); }
.pg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-chip { position: absolute; top: calc(100cqw - 51px); left: 17px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 17px; background: #fff; color: #10201b; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); cursor: pointer; transition: transform .12s, background .12s; }
.pg-chip:hover { transform: scale(1.08); }
.pg-chip svg { width: 15px; height: 15px; }
.pg-chip.playing { background: var(--coral); color: #2b0f05; }
.pg-chip.playing svg path { d: path("M7 5h4v14H7zM13 5h4v14h-4z"); }
.pg-chip[aria-busy="true"] { opacity: .7; }
.pg-name { display: block; margin-top: 8px; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-meta { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 520px) { .pg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

.pg-hero { margin-top: 22px; display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.pg-hero > div:last-child { flex: 1; min-width: 280px; }
.pg-stack { display: flex; flex: none; }
.pg-stack img { width: 92px; height: 92px; border-radius: 22px; object-fit: cover; border: 4px solid var(--bg); box-shadow: 0 6px 18px rgba(16, 32, 27, .15); }
.pg-stack img + img { margin-inline-start: -26px; }
.pg-kicker { display: inline-flex; min-height: 28px; align-items: center; padding: 0 12px; border-radius: 14px; background: var(--brand-tint); color: var(--brand-deep); font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.pg-filters { margin-top: 26px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-block: 1px solid var(--line); }
.pg-seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); gap: 2px; }
.pg-seg a { min-height: 36px; padding: 0 14px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); text-decoration: none; font-size: 15px; }
.pg-seg a[aria-current] { background: var(--ink); color: var(--bg); font-weight: 600; }
.pg-empty { margin: 28px 0; color: var(--muted); text-align: center; }
.pg-empty a { color: var(--brand); }
.pg-pager { margin-top: 26px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pg-pager a, .pg-pager span { min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; display: grid; place-items: center; text-decoration: none; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.pg-pager span[aria-current] { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pg-cta { margin-top: 48px; border-radius: 28px; background: #0b3d2f; color: #fff; padding: 34px 38px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.pg-cta > div { flex: 1; min-width: 260px; }
.pg-cta h2 { margin: 0; font-size: 26px; }
.pg-cta p { margin: 8px 0 0; color: #cfe9df; }
.pg-cta .btn svg { width: 20px; height: 20px; }
.pg-two { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.pg-two p { margin: 12px 0 0; color: var(--muted); line-height: 1.85; }

/* «انسخ الرابط» زرار مش لينك */
button.btn.pg-share { font: inherit; cursor: pointer; }
.btn.pg-share.done { border-color: var(--brand); color: var(--brand); }
.pg-offscreen { position: fixed; top: -1000px; opacity: 0; }
/* عرض ثابت: «انسخ الرابط» ⇄ «اتنسخ ✓» ما يحرّكوش الزرار */
.btn.pg-share { min-width: 190px; justify-content: center; }
