/* پنجره‌های اشتراک‌گذاری و سازندهٔ پوستر — مشترک میان صفحه‌های تازه و موتور جست‌وجو/صفحهٔ ملک
   (در صفحه‌های موتور قدیمی متغیرهای رنگ با مقدار جایگزین تعریف می‌شوند) */
.psheet { --panel: var(--panel-v51, #10201a); --gold: #d5a626; --ink-faint: #a9b0aa; --line: rgba(246,243,234,.16); color-scheme: dark; color: #f1eee6; font-family: Vazirmatn, Tahoma, sans-serif; }
:root[data-theme="light"] .psheet { --panel-v51: #fffdf8; --ink-faint: #69716a; --line: rgba(28,36,30,.16); color: #1c241e; color-scheme: light; }
.psheet .psheet__box { --ink: currentColor; }
.psheet .btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 800; cursor: pointer; text-decoration: none; border: 1px solid transparent; }
.psheet .btn--gold { background: linear-gradient(135deg, #f4d788, #E3B94E 45%, #d5a626 80%); color: #191307; }
.psheet .btn--ghost { background: transparent; color: inherit; border-color: var(--line); }
.psheet__url { font-size: .78rem; padding: .5rem .7rem; border-radius: 10px; border: 1px dashed var(--line); word-break: break-all; opacity: .85; user-select: all; }
a.psheet__opt { color: inherit; text-decoration: none; }
/* پنجرهٔ اشتراک و پوستر */
.psheet { position: fixed; inset: 0; z-index: 1200; background: rgba(4, 8, 6, .62); display: grid; place-items: end center; padding: 0; }
@media (min-width: 700px) { .psheet { place-items: center; padding: 1rem; } }
.psheet__box { width: min(440px, 100%); max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; background: var(--panel, #0f1c15); color: var(--ink); border: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 1.1rem 1.1rem 1rem; display: grid; gap: .8rem; text-align: right; }
@media (min-width: 700px) { .psheet__box { border-radius: 22px; } }
.psheet__t { font-size: 1.05rem; font-weight: 900; }
.psheet__wait { color: var(--ink-faint); padding: 2rem 0; text-align: center; }
.psheet__opts { display: grid; gap: .6rem; }
.psheet__opt { display: flex; gap: .8rem; align-items: center; text-align: right; padding: .8rem .9rem; border-radius: 16px; border: 1px solid var(--line); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.psheet__opt:hover { border-color: var(--gold); }
.psheet__opt i { font-style: normal; font-size: 1.5rem; }
.psheet__opt b { display: block; font-weight: 800; }
.psheet__opt small { color: var(--ink-faint); font-size: .78rem; }
.psheet__img { width: 100%; max-height: 58vh; object-fit: contain; border-radius: 14px; background: #08110c; }
.psheet__row { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.psheet__x { background: none; border: 0; color: var(--ink-faint); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; justify-self: center; }

/* سازندهٔ پوستر */
.psheet__box:has(.pe) { width: min(900px, 100%); }
.pe { display: grid; gap: 1rem; }
@media (min-width: 760px) { .pe { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; } }
.pe__view { position: relative; display: grid; place-items: center; background: #08110c; border-radius: 16px; padding: .6rem; min-height: 240px; }
.pe__cv { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 10px; }
@media (max-width: 759px) { .pe__cv { max-height: 46vh; } }
.pe__wait { position: absolute; color: #c9c4b4; font-size: .85rem; }
.pe__ctl { display: grid; gap: .45rem; }
.pe__l { font-size: .76rem; color: var(--ink-faint); margin-top: .2rem; }
.pe__seg { display: flex; gap: .35rem; flex-wrap: wrap; }
.pe__seg button { flex: 1; min-width: 0; padding: .45rem .6rem; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: inherit; font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; }
.pe__seg button.is-on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, transparent); }
.pe__seg button.is-lock { opacity: .6; }
.pe__chk { display: flex; align-items: center; gap: .5rem; font-size: .86rem; font-weight: 700; margin-top: .4rem; }
.pe__brand { display: grid; gap: .4rem; }
.pe__in { width: 100%; padding: .55rem .8rem; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: .88rem; }
.pe__file { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .82rem; color: var(--ink-faint); padding: .45rem .8rem; border: 1px dashed var(--line); border-radius: 12px; }
.pe__file input { max-width: 60%; font-size: .74rem; }
.pe__up { display: grid; gap: .45rem; font-size: .8rem; line-height: 1.9; padding: .7rem .8rem; border-radius: 14px; background: color-mix(in srgb, var(--gold) 10%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.pe__up .btn { justify-self: start; padding: .45rem 1.1rem; font-size: .82rem; }
.pe__acts { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; }
.pe__acts .btn { flex: 1; min-width: 150px; font-size: .86rem; padding: .65rem 1rem; }

/* پوستر: حالت فوری (آماده با یک لمس) */
.pe__quick { display: grid; gap: .55rem; }
.pe__quick b { font-size: 1rem; font-weight: 900; }
.pe__quick small { color: var(--ink-faint); font-size: .8rem; line-height: 1.9; }
.pe__edit { justify-self: start; background: none; border: 0; color: var(--gold); font: inherit; font-weight: 800; cursor: pointer; padding: .3rem 0; }
.pe__more { display: grid; gap: .45rem; }

/* در صفحه‌های موتور قدیمی: [hidden] و رنگ دکمه‌ها با سبک‌های قدیمی بازنویسی نشوند */
.psheet [hidden] { display: none !important; }
.psheet .btn.btn--gold { background: linear-gradient(135deg, #f4d788, #E3B94E 45%, #d5a626 80%) !important; color: #191307 !important; border-color: transparent !important; }
.psheet .btn.btn--ghost { background: transparent !important; color: inherit !important; border: 1px solid var(--line) !important; }
.psheet .btn { min-height: 44px; padding: .6rem 1.1rem; font-size: .9rem; box-shadow: none; }
/* اینستاگرام: استوری و پست */
.pe__ig { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.pe__igb { flex: 1; min-width: 140px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem .8rem; border-radius: 999px; border: 0; cursor: pointer; font: inherit; font-size: .84rem; font-weight: 800; color: #fff;
  background: linear-gradient(45deg, #f9a43a, #e1306c 45%, #8a3ab9); }
.pe__igb i { font-style: normal; font-size: 1.05em; }
.psheet__hint { font-size: .8rem; line-height: 1.9; margin: .2rem 0 0; opacity: .85; }
.psheet__hint a { color: var(--gold, #c9952c); font-weight: 800; }
/* ردیف پیام‌رسان‌ها: اینستاگرام، تلگرام، واتساپ، بله، روبیکا */
.psheet__apps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; }
.psheet__app { display: grid; justify-items: center; gap: .35rem; padding: .5rem .2rem; border: 0; border-radius: 14px; background: transparent; color: inherit; font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; }
.psheet__app:hover { background: rgba(127,127,127,.1); }
.psheet__app i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-style: normal; font-weight: 900; font-size: .95rem; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.psheet__app[data-app="ig"] i { background: linear-gradient(45deg, #f9a43a, #e1306c 45%, #8a3ab9) !important; }
.pe__note { margin: .5rem 0 0; font-size: .8rem; line-height: 1.9; padding: .5rem .7rem; border-radius: 12px; background: rgba(47,191,113,.1); }
.pe__note a { color: var(--gold, #c9952c); font-weight: 800; }
@media (max-width: 380px) { .psheet__app i { width: 40px; height: 40px; } .psheet__app { font-size: .7rem; } }
.pe__igb.is-hl { animation: peHl 1.4s ease-in-out 3; }
@keyframes peHl { 50% { box-shadow: 0 0 0 6px rgba(225,48,108,.3); } }
@media (prefers-reduced-motion: reduce) { .pe__igb.is-hl { animation: none; } }
/* شش برنامه: اینستاگرام، تلگرام، واتساپ، بله، ایتا، روبیکا */
.psheet__apps, .pe__ig { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .3rem; }
.pe__ig { margin-top: .6rem; }
.pe__app[data-pa="ig"] i { background: linear-gradient(45deg, #f9a43a, #e1306c 45%, #8a3ab9) !important; }
.pe__app.is-hl i { animation: peHl 1.4s ease-in-out 3; }
@media (max-width: 420px) { .psheet__app i { width: 40px; height: 40px; font-size: .85rem; } .psheet__app { font-size: .68rem; padding: .4rem 0; } }
/* «ساخت پوستر» باید دیده و زده شود: رنگ متمایز، درخشش ملایم و برچسب «بزنید» */
.psheet__opt--poster { position: relative; border: 1.5px solid #e9b949 !important; background: linear-gradient(135deg, rgba(233,185,73,.2), rgba(233,185,73,.05)) !important; animation: posterGlow 2.2s ease-in-out infinite; }
.psheet__opt--poster em { display: inline-block; margin-inline-start: .4rem; padding: .05rem .55rem; border-radius: 999px; background: #e9b949; color: #16120a; font-style: normal; font-size: .72rem; font-weight: 900; vertical-align: middle; animation: posterTap 1.1s ease-in-out infinite; }
@keyframes posterGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(233,185,73,.0); } 50% { box-shadow: 0 0 0 6px rgba(233,185,73,.22); } }
@keyframes posterTap { 0%, 100% { transform: none; } 50% { transform: translateX(-4px); } }
.psheet__opt--main { border-color: rgba(47,191,113,.55) !important; background: rgba(47,191,113,.1) !important; }
@media (prefers-reduced-motion: reduce) { .psheet__opt--poster, .psheet__opt--poster em { animation: none; } }
/* قدم‌های فرستادن پوستر در دسکتاپ */
.share-steps__t { display: block; font-size: .9rem; margin-bottom: .2rem; }
.share-steps { margin: .2rem 0 .3rem; padding-inline-start: 1.2rem; font-size: .86rem; line-height: 2; }
.share-steps b { color: var(--gold, #c9952c); }
.share-steps kbd { display: inline-block; padding: 0 .4rem; border-radius: 6px; border: 1px solid rgba(127,127,127,.45); font: inherit; font-size: .78rem; direction: ltr; }
.share-steps__s { display: block; opacity: .75; font-size: .76rem; }
/* رنگ‌های پوستهٔ «رنگی» */
.pe__sw { display: flex; flex-wrap: wrap; gap: .45rem; margin: .2rem 0 .4rem; }
.pe__sw button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.pe__sw button.is-on { border-color: #fff; outline: 2px solid var(--gold, #c9952c); outline-offset: 1px; }
.pe__sw[hidden] { display: none !important; }
