/* استوديو المحتوى — يبني فوق متغيرات ai-studio.css ولا يعيد تعريف الهوية. */

.content-ws { display: grid; gap: 1.15rem; }

/* ===== شريط الوعد الصادق ===== */
.truth-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.15rem;
  padding: 0.85rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(179, 147, 89, 0.28);
  background: linear-gradient(180deg, var(--gold-soft), transparent);
  font-size: 0.83rem;
  color: var(--muted);
}
.truth-bar b { color: var(--text); font-weight: 600; }
.truth-bar span { display: inline-flex; align-items: center; gap: 0.4rem; }
.truth-bar span::before {
  content: '';
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--gold);
  flex: 0 0 auto;
}

/* ===== لوحة المدخلات ===== */
.brief-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.15rem;
}
@media (min-width: 1040px) {
  .brief-grid { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); align-items: start; }
  .brief-grid > .compose-col { position: sticky; top: 1rem; }
}

.compose-col { display: grid; gap: 1.15rem; }

.voice-set { display: grid; gap: 0.55rem; }
.voice-option { position: relative; display: block; }
.voice-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.voice-option__face {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  transition: border-color 0.18s, background 0.18s;
}
.voice-option__face strong { font-size: 0.92rem; color: var(--text); }
.voice-option__face small { font-size: 0.78rem; color: var(--muted); line-height: 1.55; }
.voice-option input:checked + .voice-option__face {
  border-color: rgba(179, 147, 89, 0.6);
  background: var(--gold-soft);
}
.voice-option input:checked + .voice-option__face strong { color: var(--gold); }
.voice-option input:focus-visible + .voice-option__face { outline: 2px solid var(--gold); outline-offset: 2px; }

.field-note {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.strict-only { display: none; }
.content-ws[data-voice="hudoo"] .strict-only { display: block; }

/* ===== الرسائل ===== */
.msg-stack { display: grid; gap: 0.6rem; }
.msg {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.65;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.msg strong { font-size: 0.8rem; letter-spacing: 0.02em; }
.msg--stop {
  border-color: rgba(196, 92, 92, 0.4);
  background: rgba(196, 92, 92, 0.09);
  color: #f0c2c2;
}
.msg--warn {
  border-color: rgba(194, 130, 44, 0.4);
  background: rgba(194, 130, 44, 0.09);
  color: #edcb96;
}
.msg--ok {
  border-color: rgba(61, 154, 106, 0.35);
  background: rgba(61, 154, 106, 0.08);
  color: #b7dcc7;
}

/* ===== نتيجة الحزمة ===== */
.pack { display: grid; gap: 1.1rem; }

.pack-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}
.pack-head__meta { display: grid; gap: 0.15rem; min-width: 0; }
.pack-head__meta h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--gold);
}
.pack-head__meta p { margin: 0; font-size: 0.82rem; color: var(--muted); }
.pack-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  white-space: nowrap;
}
.badge--draft { border-color: rgba(179, 147, 89, 0.5); color: var(--gold); background: var(--gold-soft); }
.badge--sample { border-color: rgba(91, 110, 225, 0.5); color: #a6b1f2; background: rgba(91, 110, 225, 0.12); }
.badge--over { border-color: rgba(196, 92, 92, 0.5); color: #eda6a6; background: rgba(196, 92, 92, 0.12); }
.badge--fit { border-color: rgba(61, 154, 106, 0.4); color: #9ed3b6; }

/* ===== تبويبات المنصات ===== */
.plat-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}
.plat-tab {
  display: grid;
  gap: 0.1rem;
  justify-items: center;
  padding: 0.7rem 0.4rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.plat-tab svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.plat-tab:hover { border-color: var(--line-strong); color: var(--text); }
.plat-tab.is-active {
  border-color: rgba(179, 147, 89, 0.55);
  background: var(--gold-soft);
  color: var(--gold);
}

.plat-panel { display: none; }
.plat-panel.is-active { display: grid; gap: 1.1rem; }

.plat-layout {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .plat-layout { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; }
}

/* ===== البطاقات النصية ===== */
.asset {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}
.asset + .asset { margin-top: 0.85rem; }
.asset__bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.asset__bar h4 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.asset__tools { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.asset__body { padding: 1rem; display: grid; gap: 0.7rem; }

.mini-btn {
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.16s;
}
.mini-btn:hover { color: var(--gold); border-color: rgba(179, 147, 89, 0.45); }

.counter {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}
.counter.is-over { color: #eda6a6; }

.text-block {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  line-height: 1.85;
  color: var(--text);
}
.text-block .blank {
  border-radius: 6px;
  padding: 0 0.3rem;
  background: rgba(194, 130, 44, 0.16);
  border: 1px dashed rgba(194, 130, 44, 0.55);
  color: #edcb96;
}
.text-block .tag { color: var(--gold); }

.hook-list { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.hook {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.7rem 0.85rem;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.hook__n {
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
}
.hook__text { flex: 1 1 auto; min-width: 0; }

.step-list { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.step {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr);
  gap: 0.2rem 0.8rem;
  padding: 0.7rem 0.85rem;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 0.87rem;
}
.step__at {
  grid-row: span 3;
  font-weight: 700;
  color: var(--gold);
  font-size: 0.78rem;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}
.step__row { display: block; line-height: 1.65; }
.step__row b { color: var(--muted); font-weight: 600; font-size: 0.76rem; }

.note-list { margin: 0; padding-inline-start: 1.1rem; display: grid; gap: 0.35rem; }
.note-list li { font-size: 0.82rem; color: var(--muted); line-height: 1.7; }

/* ===== معاينات تشبه التطبيقات ===== */
.stage {
  display: grid;
  gap: 0.6rem;
  justify-items: center;
  padding: 1.15rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(179, 147, 89, 0.08), transparent 70%),
    var(--panel-2);
}
.stage__label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

/* بطاقة X */
.x-card {
  width: min(100%, 340px);
  border-radius: 16px;
  border: 1px solid #2f3336;
  background: #000;
  padding: 0.9rem;
  color: #e7e9ea;
  font-size: 0.88rem;
  line-height: 1.6;
}
.x-card__top { display: flex; gap: 0.6rem; align-items: flex-start; }
.avatar {
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #1a140c;
  background: linear-gradient(140deg, #d4b87a, #b39359);
}
.x-card__who { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: baseline; min-width: 0; }
.x-card__who b { font-size: 0.9rem; }
.x-card__who span { color: #71767b; font-size: 0.82rem; }
.x-card__text {
  margin: 0.55rem 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.x-card__text .tag { color: #1d9bf0; }
.x-card__foot {
  display: flex;
  gap: 1.4rem;
  margin-top: 0.85rem;
  padding-top: 0.6rem;
  border-top: 1px solid #16181c;
  color: #71767b;
}
.x-card__foot svg { width: 1rem; height: 1rem; fill: currentColor; }
.x-thread-line {
  width: 2px;
  min-height: 0.9rem;
  margin-inline-start: 1.2rem;
  background: #2f3336;
}

/* إطار الجوال لإنستغرام وتيك توك */
.phone {
  width: min(100%, 268px);
  border-radius: 26px;
  border: 1px solid var(--line-strong);
  background: #0a0a0b;
  padding: 0.5rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.phone__screen {
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  color: #fff;
}

.ig-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.78rem;
}
.ig-top .avatar { width: 1.7rem; height: 1.7rem; font-size: 0.75rem; }
.ig-slide {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  align-content: center;
  gap: 0.6rem;
  padding: 1.15rem;
  text-align: start;
  background:
    radial-gradient(ellipse 90% 70% at 100% 0%, rgba(179, 147, 89, 0.4), transparent 60%),
    linear-gradient(160deg, #17130c, #05050600);
  background-color: #0b0b0d;
}
.ig-slide__kind {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
}
.ig-slide__title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.02rem;
  line-height: 1.5;
  color: #fdf6e7;
  overflow-wrap: anywhere;
}
.ig-slide__body {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.7;
  color: #cfc6b4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 8.5rem;
  overflow: hidden;
}
.ig-dots { display: flex; gap: 0.3rem; justify-content: center; padding: 0.5rem 0 0.2rem; }
.ig-dots i {
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: #3a3a3d;
}
.ig-dots i.is-on { background: var(--gold); }
.ig-caption {
  padding: 0.5rem 0.7rem 0.75rem;
  font-size: 0.76rem;
  line-height: 1.7;
  color: #d7d7db;
}
.ig-caption .more { color: #71767b; }

.tt-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  display: flex;
  align-items: flex-end;
  padding: 0.85rem;
  background:
    radial-gradient(ellipse 70% 40% at 20% 15%, rgba(179, 147, 89, 0.28), transparent 65%),
    linear-gradient(200deg, #101014, #050506);
}
.tt-overlay { position: relative; z-index: 1; max-width: 78%; display: grid; gap: 0.4rem; }
.tt-overlay b { font-size: 0.82rem; }
.tt-overlay p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.65;
  color: #ddd;
  overflow-wrap: anywhere;
}
.tt-screen-text {
  position: absolute;
  inset-block-start: 22%;
  inset-inline: 0.9rem;
  z-index: 1;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  overflow-wrap: anywhere;
}
.tt-rail {
  position: absolute;
  inset-inline-end: 0.6rem;
  inset-block-end: 1.2rem;
  display: grid;
  gap: 0.9rem;
  color: #fff;
  opacity: 0.85;
}
.tt-rail svg { width: 1.35rem; height: 1.35rem; fill: currentColor; }

/* بطاقة يوتيوب */
.yt-card {
  width: min(100%, 330px);
  display: grid;
  gap: 0.6rem;
}
.yt-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  display: grid;
  align-items: center;
  padding: 0.9rem;
  background:
    radial-gradient(ellipse 80% 90% at 100% 0%, rgba(179, 147, 89, 0.42), transparent 62%),
    linear-gradient(150deg, #1a150d, #08080a);
  overflow: hidden;
}
.yt-thumb b {
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1.45;
  color: #fdf6e7;
  overflow-wrap: anywhere;
}
.yt-thumb__dur {
  position: absolute;
  inset-block-end: 0.5rem;
  inset-inline-end: 0.5rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.8);
  font-size: 0.68rem;
  font-weight: 700;
  direction: ltr;
}
.yt-meta { display: flex; gap: 0.6rem; align-items: flex-start; }
.yt-meta__text { min-width: 0; }
.yt-meta__text b {
  display: block;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #f1f1f1;
  overflow-wrap: anywhere;
}
.yt-meta__text span { font-size: 0.78rem; color: #aaa; }

.preview-hint {
  font-size: 0.74rem;
  color: var(--muted);
  text-align: center;
  max-width: 22rem;
  line-height: 1.65;
}

/* ===== التقويم ===== */
.cal-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  justify-content: space-between;
}
.cal-table { display: grid; gap: 0.5rem; }
.cal-row {
  display: grid;
  grid-template-columns: 6.5rem 4rem minmax(0, 1fr) auto;
  gap: 0.5rem 0.85rem;
  align-items: center;
  padding: 0.65rem 0.9rem;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 0.85rem;
}
.cal-row__date { color: var(--muted); font-size: 0.78rem; }
.cal-row__time {
  font-weight: 700;
  color: var(--gold);
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}
.cal-row__what { min-width: 0; overflow-wrap: anywhere; }
.cal-row__what b { display: block; font-size: 0.72rem; color: var(--muted); font-weight: 600; }
@media (max-width: 640px) {
  .cal-row { grid-template-columns: minmax(0, 1fr) auto; }
  .cal-row__date, .cal-row__time { grid-column: 1; }
}

/* ===== الحسابات ===== */
.acct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.9rem;
}
.acct {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding: 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.acct__head { display: flex; align-items: center; gap: 0.55rem; }
.acct__head svg { width: 1.2rem; height: 1.2rem; fill: var(--gold); }
.acct__head strong { font-size: 0.95rem; }
.acct__truth { margin: 0; display: grid; gap: 0.3rem; padding: 0; list-style: none; }
.acct__truth li {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  font-size: 0.79rem;
  line-height: 1.6;
  color: var(--muted);
}
.acct__truth li::before { content: '—'; color: var(--gold); flex: 0 0 auto; }
.acct input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  direction: ltr;
  text-align: start;
}
.acct input:focus { border-color: rgba(179, 147, 89, 0.55); outline: none; }
.acct__row { display: flex; gap: 0.45rem; flex-wrap: wrap; }

.no-connect {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  border: 1px dashed rgba(196, 92, 92, 0.35);
  background: rgba(196, 92, 92, 0.06);
  font-size: 0.83rem;
  color: #e8bdbd;
  line-height: 1.7;
}
.no-connect b { color: #f4d3d3; }

/* ===== الحالة الفارغة ===== */
.empty {
  display: grid;
  gap: 0.85rem;
  justify-items: start;
  padding: 1.6rem;
  border-radius: 16px;
  border: 1px dashed var(--line-strong);
  background: var(--panel);
}
.empty h3 { margin: 0; font-family: var(--display); font-size: 1.1rem; color: var(--gold); }
.empty p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.8; max-width: 44rem; }
.empty ul { margin: 0; padding-inline-start: 1.15rem; display: grid; gap: 0.35rem; }
.empty li { color: var(--muted); font-size: 0.86rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .plat-tab, .mini-btn, .voice-option__face { transition: none; }
}
