/* Vidora — "Aura": أسود عميق، صور وفيديو بالواجهة، وتوهّج بنفسجي-وردي-كهرماني بس بالأماكن المهمة */
:root {
  --ink: #09090b;        /* خلفية */
  --ink-2: #131317;      /* أسطح */
  --ink-3: #25252c;      /* حدود وحقول */
  --ink-4: #1b1b21;      /* سطح مرفوع */
  --paper: #f4f4f6;      /* نص */
  --steel: #8d8d99;      /* نص ثانوي */
  --amber: #ff4f8b;      /* اللون المميز (وردي) — اختيار وتحديد */
  --violet: #7b61ff;
  --gold: #ffb347;
  --aura: linear-gradient(115deg, #7b61ff 0%, #ff4f8b 52%, #ffb347 100%);
  --rec: #ff4f5e;
  --ok: #3ddc97;

  --f-display: 'Readex Pro', system-ui, sans-serif;
  --f-body: 'Readex Pro', system-ui, sans-serif;
  --r-s: 10px; --r-m: 16px; --r-l: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 16px; line-height: 1.7;
  min-height: 100vh;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
img, video { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* ---------- شريط التنقل ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(26, 20, 48, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-3);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-size: 28px; line-height: 1; }
.logo-mark { width: 26px; height: 26px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 0 5px rgba(255,77,109,.18); }
.nav-links { display: flex; gap: 22px; }
.nav-links a { text-decoration: none; color: var(--steel); font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--paper); }
.nav-user { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; }
.credits-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 14px; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--ink-3);
  font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums;
}
.credits-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.demo-bar { background: var(--amber); color: var(--ink); text-align: center; padding: 6px 16px; font-size: 14px; font-weight: 600; }

/* ---------- أزرار وحقول ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--r-s); border: 1px solid var(--ink-3);
  background: var(--ink-2); cursor: pointer; font-weight: 600; text-decoration: none;
}
.btn:hover { border-color: var(--steel); }
.btn-primary { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.btn-primary:hover { filter: brightness(1.06); border-color: var(--amber); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--steel); }
.btn-ghost:hover { color: var(--paper); border-color: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-lg { padding: 14px 28px; font-size: 18px; border-radius: var(--r-m); }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; color: var(--steel); font-weight: 500; }
.input, textarea.input, select.input {
  width: 100%; padding: 11px 14px; border-radius: var(--r-s);
  border: 1px solid var(--ink-3); background: var(--ink); resize: vertical;
}
.input:focus { border-color: var(--amber); outline: none; }

/* ---------- الصفحة الرئيسية ---------- */
.hero {
  padding: clamp(48px, 9vw, 120px) clamp(16px, 4vw, 48px) 40px;
  max-width: 1200px; margin: 0 auto;
}
.hero h1 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(56px, 10vw, 148px); line-height: 1.05; margin: 0 0 20px;
  letter-spacing: 0;
}
.hero h1 .line2 { color: var(--amber); display: block; }
.hero p.lead { font-size: clamp(18px, 2vw, 22px); color: var(--steel); max-width: 34em; margin: 0 0 36px; }
.hero-prompt {
  display: flex; gap: 10px; max-width: 760px;
  background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--r-l); padding: 10px;
}
.hero-prompt input { flex: 1; border: 0; background: transparent; padding: 10px 14px; font-size: 18px; }
.hero-prompt input:focus { outline: none; }
.hero-note { color: var(--steel); font-size: 14px; margin-top: 12px; }

/* شريط فيلم بأمثلة الأوصاف — الحركة الوحيدة بالصفحة */
.reel { margin: 56px 0 0; overflow: hidden; border-block: 1px solid var(--ink-3); background: var(--ink-2); position: relative; }
.reel::before, .reel::after {
  content: ''; position: absolute; inset-inline: 0; height: 8px; z-index: 1;
  background: repeating-linear-gradient(90deg, transparent 0 14px, var(--ink) 14px 26px);
}
.reel::before { top: 6px; } .reel::after { bottom: 6px; }
.reel-track { display: flex; gap: 14px; padding: 26px 0; width: max-content; animation: reel 60s linear infinite; }
.reel-frame {
  width: 280px; padding: 16px 18px; border-radius: var(--r-s); background: var(--ink); border: 1px solid var(--ink-3);
  font-size: 15px; color: var(--paper); cursor: pointer; text-align: start;
}
.reel-frame small { display: block; color: var(--amber); margin-bottom: 4px; font-weight: 600; }
.reel:hover .reel-track { animation-play-state: paused; }
@keyframes reel { to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) { .reel-track { animation: none; flex-wrap: wrap; width: auto; padding: 26px 16px; } }

.section { max-width: 1200px; margin: 0 auto; padding: 80px clamp(16px, 4vw, 48px); }
.section h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(36px, 5vw, 60px); line-height: 1.15; margin: 0 0 12px; }
.section .sub { color: var(--steel); max-width: 36em; margin: 0 0 40px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px 32px; }
.feature h3 { margin: 0 0 6px; font-size: 20px; }
.feature p { margin: 0; color: var(--steel); }
.feature .glyph { font-size: 30px; margin-bottom: 10px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; counter-reset: s; }
.step { border-top: 3px solid var(--amber); padding-top: 16px; }
.step::before { counter-increment: s; content: counter(s); font-family: var(--f-display); font-size: 44px; color: var(--amber); line-height: 1; }
.step h3 { margin: 8px 0 4px; }
.step p { margin: 0; color: var(--steel); }

.models-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--ink-3); color: var(--paper); font-size: 15px; background: var(--ink-2); }

.footer { border-top: 1px solid var(--ink-3); padding: 32px clamp(16px, 4vw, 48px); color: var(--steel); font-size: 14px; display: flex; gap: 20px; flex-wrap: wrap; }
.footer a { color: var(--steel); }

/* ---------- الاستوديو ---------- */
.studio { display: grid; grid-template-columns: 400px 1fr; min-height: calc(100vh - 62px); }
.panel { border-inline-end: 1px solid var(--ink-3); padding: 22px; display: grid; gap: 18px; align-content: start; background: var(--ink-2); }
.tabs { display: grid; grid-template-columns: repeat(6, 1fr); background: var(--ink); border-radius: var(--r-m); padding: 4px; gap: 4px; }
.tab { padding: 9px 6px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; color: var(--steel); font-weight: 600; font-size: 14px; }
.tab[aria-selected="true"] { background: var(--ink-3); color: var(--paper); }
.model-list { display: grid; gap: 8px; }
.model-opt {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: start;
  padding: 11px 14px; border-radius: var(--r-s); border: 1px solid var(--ink-3); background: var(--ink); cursor: pointer;
}
.model-opt[aria-pressed="true"] { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.model-opt b { font-size: 15px; }
.model-opt .tag { font-size: 12px; color: var(--amber); align-self: center; }
.model-opt span.d { grid-column: 1 / -1; font-size: 13px; color: var(--steel); line-height: 1.5; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { padding: 7px 14px; border-radius: var(--r-s); border: 1px solid var(--ink-3); background: var(--ink); cursor: pointer; font-size: 14px; font-variant-numeric: tabular-nums; }
.seg button[aria-pressed="true"] { border-color: var(--amber); color: var(--amber); }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.presets button { padding: 8px 4px; border-radius: var(--r-s); border: 1px solid var(--ink-3); background: var(--ink); cursor: pointer; font-size: 13px; display: grid; gap: 2px; justify-items: center; }
.presets button[aria-pressed="true"] { border-color: var(--amber); }
.presets .ic { font-size: 18px; }
.prompt-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.prompt-wrap textarea { min-height: 120px; }
.enhance { padding: 5px 12px; font-size: 13px; border-radius: 999px; }
.drop {
  border: 1.5px dashed var(--ink-3); border-radius: var(--r-m); padding: 18px; text-align: center; color: var(--steel); cursor: pointer; font-size: 14px;
}
.drop:hover, .drop.over { border-color: var(--amber); color: var(--paper); }
.drop img { max-height: 160px; margin: 0 auto 8px; border-radius: var(--r-s); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; }
.toggle input { width: 42px; height: 24px; appearance: none; background: var(--ink-3); border-radius: 999px; position: relative; cursor: pointer; transition: background .2s; }
.toggle input::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); transition: transform .2s; }
.toggle input:checked { background: var(--amber); }
.toggle input:checked::after { transform: translateX(-18px); }
.go { position: sticky; bottom: 0; padding-top: 6px; background: var(--ink-2); }
.go .btn { width: 100%; }
.go .cost { text-align: center; font-size: 13px; color: var(--steel); margin-top: 6px; }

.results { padding: 22px clamp(16px, 3vw, 36px); }
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.results-head h2 { font-family: var(--f-display); font-weight: 400; font-size: 34px; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card { background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--r-m); overflow: hidden; display: flex; flex-direction: column; }
.card .media { aspect-ratio: 16/9; background: #000; display: grid; place-items: center; position: relative; }
.card .media video, .card .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.card .body { padding: 12px 14px; display: grid; gap: 6px; }
.card .p { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { font-size: 12px; color: var(--steel); display: flex; gap: 10px; flex-wrap: wrap; }
.card .actions { display: flex; gap: 4px; flex-wrap: wrap; padding: 0 8px 10px; }
.card .actions .btn { padding: 5px 10px; font-size: 13px; }
.status-rendering { color: var(--steel); display: grid; gap: 10px; justify-items: center; font-size: 14px; }
.rec-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--rec); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
.status-failed { color: var(--rec); padding: 16px; text-align: center; font-size: 14px; }
.empty { border: 1.5px dashed var(--ink-3); border-radius: var(--r-l); padding: 60px 20px; text-align: center; color: var(--steel); }
.empty h3 { color: var(--paper); font-size: 22px; margin: 0 0 6px; }

/* ---------- الأسعار ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.plan { border: 1px solid var(--ink-3); border-radius: var(--r-l); padding: 28px; background: var(--ink-2); display: grid; gap: 14px; align-content: start; }
.plan.popular { border-color: var(--amber); }
.plan .flag { justify-self: start; background: var(--amber); color: var(--ink); font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.plan h3 { margin: 0; font-size: 20px; }
.plan .price { font-family: var(--f-display); font-size: 64px; line-height: 1; }
.plan .price small { font-family: var(--f-body); font-size: 16px; color: var(--steel); }
.plan ul { margin: 0; padding-inline-start: 18px; color: var(--steel); }
.price-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.price-table th, .price-table td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--ink-3); font-variant-numeric: tabular-nums; }
.price-table th { color: var(--steel); font-weight: 500; }

/* ---------- الدخول ---------- */
.auth { max-width: 420px; margin: 8vh auto; padding: 32px; background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--r-l); display: grid; gap: 16px; }
.auth h1 { font-family: var(--f-display); font-weight: 400; font-size: 44px; margin: 0; line-height: 1.1; }
.auth .switch { text-align: center; color: var(--steel); font-size: 14px; }
.err { color: var(--rec); font-size: 14px; min-height: 1em; }

/* ---------- الأدمن ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 32px; }
.stat { background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--r-m); padding: 16px 18px; }
.stat .v { font-family: var(--f-display); font-size: 40px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--steel); font-size: 14px; }
.stat.good .v { color: var(--ok); }
.table-wrap { overflow-x: auto; background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--r-m); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 10px 0; }
.bars div { flex: 1; max-width: 48px; background: var(--amber); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars div span { position: absolute; top: -20px; inset-inline: 0; text-align: center; font-size: 11px; color: var(--steel); }

/* ---------- عام ---------- */
.toast {
  position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(50%) translateY(20px);
  background: var(--paper); color: var(--ink); padding: 12px 20px; border-radius: var(--r-m); font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(50%) translateY(0); }
.toast.bad { background: var(--rec); color: #fff; }
.modal { border: 1px solid var(--ink-3); background: var(--ink-2); color: var(--paper); border-radius: var(--r-l); padding: 0; max-width: min(960px, 94vw); width: 100%; }
.modal::backdrop { background: rgba(10, 6, 24, .8); }
.modal .mb { padding: 20px; display: grid; gap: 14px; }
.modal video, .modal img { width: 100%; max-height: 70vh; object-fit: contain; background: #000; border-radius: var(--r-m); }

@media (max-width: 900px) {
  .studio { grid-template-columns: 1fr; }
  .panel { border-inline-end: 0; border-bottom: 1px solid var(--ink-3); }
  .nav { gap: 14px; flex-wrap: wrap; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; }
}
@media (max-width: 600px) {
  .hero-prompt { flex-direction: column; }
  .hero-prompt .btn { width: 100%; }
  .nav-user .btn-ghost { display: none; }
  .presets { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Multilingual: fonts and direction ---------- */
html[dir="ltr"] {
  --f-display: 'Archivo', 'Readex Pro', system-ui, sans-serif;
  --f-body: 'Readex Pro', system-ui, -apple-system, 'Segoe UI', 'Noto Sans', sans-serif;
}
/* Scripts the display faces don't cover: use the system's bold sans instead */
html:lang(zh), html:lang(ja), html:lang(ko), html:lang(hi) {
  --f-display: system-ui, -apple-system, 'Segoe UI', 'Noto Sans', 'PingFang SC', 'Hiragino Sans', 'Noto Sans CJK SC', sans-serif;
}
html[dir="ltr"] .hero h1,
html[dir="ltr"] .section h2,
html[dir="ltr"] .results-head h2,
html[dir="ltr"] .auth h1 { font-weight: 700; letter-spacing: -0.02em; }
html[dir="ltr"] .hero h1 { font-size: clamp(40px, 7vw, 100px); line-height: 1.04; }
html[dir="ltr"] .section h2 { font-size: clamp(30px, 4vw, 48px); }
html[dir="ltr"] .auth h1 { font-size: 34px; }
html[dir="ltr"] .results-head h2 { font-size: 28px; }
html[dir="ltr"] .plan .price, html[dir="ltr"] .stat .v { font-weight: 700; }
html[dir="ltr"] .step::before { font-weight: 700; }
html:lang(zh) .hero h1, html:lang(ja) .hero h1, html:lang(ko) .hero h1 { letter-spacing: 0; line-height: 1.15; }

/* Movement that depends on reading direction */
html[dir="ltr"] .reel-track { animation-name: reel-ltr; }
@keyframes reel-ltr { to { transform: translateX(-50%); } }
html[dir="ltr"] .toggle input:checked::after { transform: translateX(18px); }
html[dir="ltr"] .toast { transform: translateX(-50%) translateY(20px); }
html[dir="ltr"] .toast.show { transform: translateX(-50%) translateY(0); }

/* Language picker */
.lang select {
  appearance: none; background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: 999px;
  padding: 4px 30px 4px 14px; cursor: pointer; font-size: 14px;
  background-image: linear-gradient(45deg, transparent 50%, var(--steel) 50%), linear-gradient(135deg, var(--steel) 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
}
html[dir="rtl"] .lang select { padding: 4px 14px 4px 30px; background-position: 10px 55%, 15px 55%; }
.lang select:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mb-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Story tab */
.tabs .tab { grid-column: span 2; }

.tab-story[aria-selected="true"] { background: var(--amber); color: var(--ink); }
.pbar { width: 60%; height: 4px; border-radius: 4px; background: var(--ink-3); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--amber); transition: width .4s; }

/* Tools */
.tool-list { display: grid; gap: 6px; }
.tool-opt { display: flex; gap: 12px; align-items: center; text-align: start; padding: 10px 12px; border-radius: var(--r-s); border: 1px solid var(--ink-3); background: var(--ink); cursor: pointer; }
.tool-opt:hover { border-color: var(--amber); }
.tool-opt b { display: block; font-size: 15px; }
.tool-opt small { display: block; color: var(--steel); font-size: 12.5px; line-height: 1.45; }
.ti { font-size: 22px; width: 36px; height: 36px; display: grid; place-items: center; background: var(--ink-2); border-radius: 10px; flex: none; }
.ti.big { font-size: 28px; width: 48px; height: 48px; }
.tool-head { display: flex; gap: 12px; align-items: center; }
.tool-head h3 { margin: 0; font-size: 18px; }
.tool-head p { margin: 2px 0 0; color: var(--steel); font-size: 13.5px; line-height: 1.5; }
.back { justify-self: start; padding: 4px 0; }
.hint { color: var(--steel); font-size: 12.5px; }
.preview { display: grid; gap: 6px; justify-items: start; }
.preview img, .preview video { max-height: 200px; border-radius: var(--r-s); }
.preview audio, .audio-box audio { width: 100%; }
.audio-box { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 10px; padding: 16px; background: linear-gradient(135deg, var(--ink-3), var(--ink)); }
.audio-ic { font-size: 40px; }
.mask-wrap { position: relative; border-radius: var(--r-s); overflow: hidden; }
.mask-wrap { user-select: none; -webkit-user-select: none; }
.mask-wrap img { width: 100%; display: block; pointer-events: none; -webkit-user-drag: none; }
.mask-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }

/* transparent images (background removal) show on a checkerboard */
.card .media img, #modalBody img {
  background-color: #2a2342;
  background-image: conic-gradient(#3a3158 25%, transparent 0 50%, #3a3158 0 75%, transparent 0);
  background-size: 18px 18px;
}

/* ---------- مكتبتي ---------- */
.lib-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.lib-item { display: grid; gap: 4px; padding: 4px; border-radius: var(--r-s); border: 1px solid var(--ink-3); background: var(--ink); cursor: pointer; text-align: center; color: inherit; }
.lib-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #000; }
.lib-item span { font-size: 12px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-item[aria-pressed="true"] { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.lib-add { border-style: dashed; color: var(--steel); }
.lib-add b { display: grid; place-items: center; aspect-ratio: 1; font-size: 26px; color: var(--amber); }
.lib-add:hover { border-color: var(--amber); }
.lib-form h3 { margin: 0; font-size: 20px; }
.lib-form .field { margin: 0; }
.row-inline { display: flex; gap: 8px; }
.row-inline .input { flex: 1; min-width: 0; }
.lib-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.lib-ph { position: relative; width: 86px; height: 86px; border-radius: var(--r-s); overflow: hidden; border: 1px solid var(--ink-3); background: var(--ink); }
.lib-ph img { width: 100%; height: 100%; object-fit: cover; }
.lib-ph button { position: absolute; top: 4px; inset-inline-end: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; line-height: 1; }
.lib-up { display: grid; place-items: center; cursor: pointer; border-style: dashed; }
.lib-up b { font-size: 28px; color: var(--amber); }
.lib-sec { margin-bottom: 48px; }
.lib-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.lib-page .lib-head h2 { font-family: inherit; font-weight: 700; font-size: 22px; margin: 0; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.lib-card { border: 1px solid var(--ink-3); border-radius: var(--r-m); background: var(--ink-2, #231c3d); overflow: hidden; display: grid; }
.lib-imgs { display: flex; aspect-ratio: 4/3; background: #000; overflow: hidden; }
.lib-imgs img { flex: 1 1 0; min-width: 0; width: 100%; height: 100%; object-fit: cover; }
.lib-card { align-content: start; }
.lib-card .body { padding: 12px 14px 4px; }
.lib-card .body p { margin: 6px 0 0; color: var(--steel); font-size: 13.5px; line-height: 1.5; }
.lib-card .actions { padding: 8px 10px 12px; display: flex; gap: 6px; }

/* ---------- المحادثة الإبداعية ---------- */
.chat-app { display: grid; grid-template-columns: 260px 1fr; height: calc(100dvh - 78px); min-height: 520px; }
.chat-side { border-inline-end: 1px solid var(--ink-3); padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow: auto; background: var(--ink); min-width: 0; }
.chat-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.chat-li { display: flex; align-items: center; border-radius: var(--r-s); min-width: 0; overflow: hidden; }
.chat-li.on, .chat-li:hover { background: var(--ink-2); }
.chat-open { flex: 1; min-width: 0; text-align: start; padding: 9px 10px; background: none; border: 0; color: inherit; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.chat-del { opacity: 0; background: none; border: 0; color: var(--steel); cursor: pointer; font-size: 18px; padding: 0 10px; }
.chat-li:hover .chat-del, .chat-li.on .chat-del { opacity: 1; }
.chat-none { color: var(--steel); font-size: 13px; }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-main > .chat-msgs { flex: 1 1 auto; min-height: 0; }
.chat-assets[hidden] { display: none; }
.chat-assets { display: flex; gap: 8px; padding: 10px 20px; overflow-x: auto; border-bottom: 1px solid var(--ink-3); }
.ca { position: relative; flex: 0 0 auto; width: 52px; height: 52px; border-radius: 8px; overflow: hidden; border: 1px solid var(--ink-3); background: var(--ink); cursor: pointer; padding: 0; color: inherit; display: grid; place-items: center; }
.ca img { width: 100%; height: 100%; object-fit: cover; }
.ca b { position: absolute; bottom: 2px; inset-inline-start: 2px; font-size: 10.5px; background: rgba(0,0,0,.72); padding: 1px 4px; border-radius: 4px; }
.chat-msgs { overflow-y: auto; padding: 24px clamp(14px, 4vw, 56px); display: flex; flex-direction: column; gap: 18px; }
.msg { display: flex; flex-direction: column; gap: 10px; max-width: 760px; width: 100%; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.ai { align-self: flex-start; }
.bub { padding: 12px 16px; border-radius: 16px; line-height: 1.7; white-space: pre-wrap; max-width: 100%; }
.msg.me .bub { background: var(--ink-3); border-end-end-radius: 4px; }
.msg.ai .bub { background: var(--ink-2); border-end-start-radius: 4px; }
.msg-atts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ma { position: relative; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: #000; }
.ma img, .ma video { width: 100%; height: 100%; object-fit: cover; }
.ma b { position: absolute; top: 4px; inset-inline-start: 4px; font-size: 11px; background: rgba(0,0,0,.72); padding: 1px 5px; border-radius: 4px; }
.typing { display: flex; gap: 5px; padding: 16px 18px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--steel); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
.act { border: 1px solid var(--ink-3); border-radius: var(--r-m); background: var(--ink); padding: 12px; display: grid; gap: 10px; width: min(560px, 100%); }
.act-head { display: flex; align-items: center; gap: 10px; }
.act-head > div { flex: 1; min-width: 0; }
.act-head b { display: block; font-size: 15px; }
.act-head small { display: block; color: var(--steel); font-size: 12.5px; }
.act-ic { font-size: 22px; }
.act-n { font-weight: 700; color: var(--amber); font-variant-numeric: tabular-nums; }
.act-run { white-space: nowrap; padding: 8px 14px; }
.act-p summary { cursor: pointer; color: var(--steel); font-size: 13px; }
.act-p p { margin: 6px 0 0; font-size: 13px; color: var(--steel); line-height: 1.6; }
.act-out { border-radius: var(--r-s); overflow: hidden; background: #000; display: grid; place-items: center; min-height: 140px; }
.act-out img, .act-out video { width: 100%; max-height: 460px; object-fit: contain; display: block; }
.act-out audio { width: 100%; margin: 12px; }
.act-out img { background-color: #2a2342; background-image: conic-gradient(#3a3158 25%, transparent 0 50%, #3a3158 0 75%, transparent 0); background-size: 18px 18px; }
.cm-status { display: flex; align-items: center; gap: 10px; color: var(--steel); padding: 40px 16px; flex-wrap: wrap; justify-content: center; text-align: center; }
.cm-status.failed { color: var(--rec); flex-direction: column; }
.cm-status small { color: var(--steel); }
.act-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.chat-hello { margin: auto; text-align: center; max-width: 620px; padding: 20px 0; }
.chat-hello h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(30px, 4vw, 44px); margin: 0 0 10px; }
.chat-hello p { color: var(--steel); margin: 0 0 24px; line-height: 1.7; }
.chat-sugs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chat-sug { text-align: start; padding: 14px; border-radius: var(--r-m); border: 1px solid var(--ink-3); background: var(--ink-2); color: inherit; cursor: pointer; line-height: 1.5; font-size: 14px; }
.chat-sug:hover { border-color: var(--amber); }
.chat-input { border-top: 1px solid var(--ink-3); padding: 12px clamp(14px, 4vw, 56px) 14px; display: grid; gap: 8px; background: var(--ink); }
.chat-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-row textarea { flex: 1; resize: none; min-height: 46px; max-height: 160px; line-height: 1.5; }
.chat-clip { font-size: 20px; padding: 10px 12px; cursor: pointer; }
.chat-auto { color: var(--steel); font-size: 13px; display: flex; gap: 6px; align-items: center; }
.chat-att { display: flex; gap: 6px; }
.chat-att:empty { display: none; }
.pa { position: relative; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--ink-2); display: grid; place-items: center; }
.pa img { width: 100%; height: 100%; object-fit: cover; }
.pa button { position: absolute; top: 2px; inset-inline-end: 2px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; font-size: 12px; line-height: 1; }
@media (max-width: 800px) {
  .chat-app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; min-height: calc(100dvh - 78px); }
  .chat-side { flex-direction: row; border-inline-end: 0; border-bottom: 1px solid var(--ink-3); padding: 10px; overflow-x: auto; }
  .chat-side .btn { flex: 0 0 auto; }
  .chat-list { display: flex; gap: 4px; }
  .chat-li { flex: 0 0 auto; max-width: 180px; }
  .chat-main { min-height: calc(100dvh - 140px); }
  .chat-sugs { grid-template-columns: 1fr; }
  .chat-input { position: sticky; bottom: 0; }
}
.chat-assets, .chat-input { flex: 0 0 auto; }

/* =====================================================================
   Aura theme — واجهة إعلامية: الصور والفيديو بالمقدمة، خط عريض، وحركة هادية
   ===================================================================== */
body { font-weight: 400; letter-spacing: 0; -webkit-font-smoothing: antialiased; }
::selection { background: rgba(255, 79, 139, .35); }
:focus-visible { outline-color: var(--amber); }

/* الشريط العلوي */
.nav { background: rgba(9, 9, 11, .72); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid rgba(255,255,255,.06); padding-block: 12px; }
.logo { font-family: var(--f-body); font-weight: 700; font-size: 22px; gap: 10px; letter-spacing: -.01em; }
html[dir="ltr"] .logo-word { font-family: 'Archivo', sans-serif; font-variation-settings: 'wdth' 118; font-weight: 800; letter-spacing: -.02em; }
.logo-mark { width: 32px; height: 32px; border-radius: 0; background: none; box-shadow: none; display: block; transition: transform .5s var(--ease); }
.logo-mark svg, .logo-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 14px rgba(255, 79, 139, .35)); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.nav-links { gap: 4px; }
.nav-links a { padding: 7px 14px; border-radius: 999px; font-size: 14.5px; transition: color .2s, background .2s; }
.nav-links a:hover { background: rgba(255,255,255,.05); }
.nav-links a.active { background: rgba(255,255,255,.09); color: var(--paper); }
.credits-pill { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.08); padding: 6px 14px; }
.credits-pill::before { background: var(--aura); width: 9px; height: 9px; }
.demo-bar { background: var(--aura); color: #0b0b0f; }

/* أزرار */
.btn { border-radius: 999px; border-color: var(--ink-3); background: var(--ink-4); transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .25s; }
.btn:hover { border-color: #3a3a44; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--paper); color: #0b0b0f; border-color: var(--paper); }
.btn-primary:hover { filter: none; background: #fff; border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.08); }
.btn-aura, .go .btn-primary, .act-run.btn-primary {
  background: var(--aura); background-size: 160% 100%; color: #0b0b0f; border: 0; font-weight: 700;
  box-shadow: 0 8px 30px -8px rgba(255, 79, 139, .55); transition: background-position .5s var(--ease), transform .15s var(--ease), box-shadow .25s;
}
.btn-aura:hover, .go .btn-primary:hover, .act-run.btn-primary:hover { background-position: 100% 0; box-shadow: 0 10px 38px -6px rgba(255, 79, 139, .7); }
.btn-ghost { background: transparent; }
.btn-lg { border-radius: 999px; }
.input, textarea.input, select.input { background: var(--ink-2); border-color: var(--ink-3); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.input:focus { border-color: rgba(255,79,139,.7); box-shadow: 0 0 0 4px rgba(255,79,139,.12); }

/* ---------- الصفحة الرئيسية ---------- */
.h-hero { position: relative; min-height: min(88vh, 860px); display: grid; place-items: center; overflow: hidden; isolation: isolate; border-bottom: 1px solid rgba(255,255,255,.05); }
.h-wall { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.aura { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .55; }
.aura.a1 { background: #7b61ff; top: -25vmax; inset-inline-start: -15vmax; animation: drift1 22s ease-in-out infinite alternate; }
.aura.a2 { background: #ff4f8b; bottom: -30vmax; inset-inline-end: -10vmax; opacity: .45; animation: drift2 26s ease-in-out infinite alternate; }
.aura.a3 { background: #ffb347; top: 30%; inset-inline-start: 40%; width: 30vmax; height: 30vmax; opacity: .22; animation: drift1 30s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(8vmax, 6vmax) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-6vmax, -8vmax) scale(.92); } }
.h-wall.has-media .aura { opacity: .25; }
.h-cols { position: absolute; inset: -10% -4%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; transform: rotate(-4deg) scale(1.08); opacity: .55; }
.h-col { display: flex; flex-direction: column; gap: 12px; animation: colUp 60s linear infinite; }
.h-col.down { animation-name: colDown; }
.h-col video, .h-col img { width: 100%; aspect-ratio: 9/14; object-fit: cover; border-radius: 14px; background: #111; }
@keyframes colUp { to { transform: translateY(-50%); } }
@keyframes colDown { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.h-veil { position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(ellipse 70% 55% at 50% 45%, rgba(9,9,11,.55), rgba(9,9,11,.92) 70%),
  linear-gradient(to bottom, rgba(9,9,11,.4), var(--ink) 98%); }
.h-inner { width: min(980px, 100%); padding: 96px clamp(16px, 4vw, 40px) 72px; text-align: center; display: grid; justify-items: center; gap: 22px; }
.h-title { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: clamp(44px, 8.2vw, 112px); line-height: 1.02; letter-spacing: -.02em; display: grid; }
html[dir="ltr"] .h-title { text-transform: uppercase; font-variation-settings: 'wdth' 125; font-weight: 900; letter-spacing: -.035em; line-height: .92; font-size: clamp(42px, 8vw, 116px); }
html:lang(zh) .h-title, html:lang(ja) .h-title, html:lang(hi) .h-title { line-height: 1.15; }
.h-title span { display: block; animation: rise .9s var(--ease) both; }
.h-title .glow { background: var(--aura); -webkit-background-clip: text; background-clip: text; color: transparent; animation-delay: .12s; padding-bottom: .06em; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.h-lead { margin: 0; max-width: 40em; color: #b9b9c4; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.7; animation: rise .9s .24s var(--ease) both; }
.h-prompt { position: relative; width: min(760px, 100%); display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 999px;
  background: rgba(20,20,26,.78); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(14px); animation: rise .9s .34s var(--ease) both;
  box-shadow: 0 30px 80px -30px rgba(123,97,255,.5); }
.h-prompt::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--aura); opacity: .55;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; transition: opacity .3s; }
.h-prompt:focus-within::before { opacity: 1; }
.h-spark { padding-inline-start: 14px; color: var(--amber); font-size: 18px; }
.h-prompt input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 12px 6px; font-size: 17px; }
.h-prompt input:focus { outline: none; }
.h-prompt .btn { padding: 13px 26px; font-size: 16px; }
.h-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; animation: rise .9s .44s var(--ease) both; }
.h-chip { padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: #d2d2da; cursor: pointer; font-size: 13.5px; transition: background .2s, border-color .2s, color .2s; }
.h-chip:hover { background: rgba(255,255,255,.09); border-color: rgba(255,79,139,.5); color: #fff; }
.h-note { color: var(--steel); font-size: 13.5px; }

.h-sec { max-width: 1320px; margin: 0 auto; padding: 72px clamp(16px, 4vw, 48px) 8px; }
.h-sec h2, .h-cta h2 { font-family: var(--f-display); font-weight: 700; font-size: clamp(26px, 3.2vw, 40px); letter-spacing: -.02em; margin: 0; line-height: 1.15; }
html[dir="ltr"] .h-sec h2, html[dir="ltr"] .h-cta h2 { text-transform: uppercase; font-variation-settings: 'wdth' 118; font-weight: 800; }
.h-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.h-arrows { display: flex; gap: 8px; }
.h-arr { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--ink-3); background: var(--ink-2); cursor: pointer; font-size: 22px; line-height: 1; transition: background .2s, border-color .2s; }
.h-arr:hover { background: var(--ink-4); border-color: #3a3a44; }
html[dir="rtl"] .h-arr { transform: scaleX(-1); }
.h-rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 23vw, 290px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: none; }
.h-rail::-webkit-scrollbar { display: none; }
.h-tool { scroll-snap-align: start; text-align: start; padding: 0; border: 1px solid rgba(255,255,255,.07); border-radius: 20px; background: var(--ink-2); color: inherit; cursor: pointer; overflow: hidden; display: grid; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s; }
.h-tool:hover { transform: translateY(-4px); border-color: rgba(255,79,139,.45); box-shadow: 0 24px 50px -24px rgba(255,79,139,.45); }
.h-tool-media { position: relative; aspect-ratio: 4/5; overflow: hidden; display: grid; place-items: center; }
.hue-a .h-tool-media { background: radial-gradient(circle at 30% 20%, #7b61ff, transparent 60%), radial-gradient(circle at 80% 90%, #ff4f8b, transparent 55%), #15121f; }
.hue-b .h-tool-media { background: radial-gradient(circle at 70% 25%, #ff4f8b, transparent 60%), radial-gradient(circle at 20% 85%, #ffb347, transparent 55%), #1d1216; }
.hue-c .h-tool-media { background: radial-gradient(circle at 25% 30%, #ffb347, transparent 55%), radial-gradient(circle at 80% 80%, #7b61ff, transparent 60%), #17140f; }
.h-tool-media video, .h-tool-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.h-tool:hover .h-tool-media video, .h-tool:hover .h-tool-media img { transform: scale(1.06); }
.h-tool-media.has-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(9,9,11,.7), transparent 50%); }
.h-tool-ic { position: relative; z-index: 1; font-size: 54px; filter: drop-shadow(0 10px 24px rgba(0,0,0,.45)); transition: transform .5s var(--ease); }
.h-tool-media.has-media .h-tool-ic { position: absolute; bottom: 12px; inset-inline-start: 12px; font-size: 26px; }
.h-tool:hover .h-tool-ic { transform: scale(1.12) rotate(-4deg); }
.h-tool-body { padding: 14px 16px 16px; display: grid; gap: 4px; }
.h-tool-body b { font-size: 16px; }
.h-tool-body small { color: var(--steel); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.h-marquee { margin-top: 64px; border-block: 1px solid rgba(255,255,255,.06); overflow: hidden; padding: 18px 0; background: var(--ink); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.h-mq-track { display: flex; align-items: center; gap: 28px; width: max-content; animation: reel-ltr 40s linear infinite; }
html[dir="rtl"] .h-mq-track { animation-name: reel; }
.h-mq-track span { font-family: var(--f-display); font-weight: 700; font-size: clamp(20px, 2.4vw, 30px); color: #c9c9d3; white-space: nowrap; letter-spacing: -.01em; }
html[dir="ltr"] .h-mq-track span { text-transform: uppercase; font-variation-settings: 'wdth' 118; }
.h-mq-track i { font-style: normal; background: var(--aura); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 18px; }

.h-feed { columns: 4 240px; column-gap: 14px; }
.h-shot { break-inside: avoid; margin: 0 0 14px; position: relative; border-radius: 16px; overflow: hidden; cursor: zoom-in; background: var(--ink-2); }
.h-shot video, .h-shot img { width: 100%; display: block; transition: transform .8s var(--ease); }
.h-shot:hover video, .h-shot:hover img { transform: scale(1.04); }
.h-shot figcaption { position: absolute; inset-inline: 0; bottom: 0; padding: 30px 14px 12px; font-size: 13px; color: #e6e6ec; background: linear-gradient(to top, rgba(0,0,0,.8), transparent);
  opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s var(--ease); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.h-shot:hover figcaption { opacity: 1; transform: none; }

.h-features .sub { color: var(--steel); margin: 10px 0 30px; max-width: 40em; }
.h-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.h-step { padding: 24px; border-radius: 20px; background: var(--ink-2); border: 1px solid rgba(255,255,255,.06); }
.h-step .n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--aura); color: #0b0b0f; font-weight: 700; }
.h-step h3 { margin: 14px 0 6px; font-size: 18px; }
.h-step p { margin: 0; color: var(--steel); font-size: 14.5px; line-height: 1.6; }

.h-cta { margin: 88px auto 40px; max-width: 1240px; width: calc(100% - 2 * clamp(16px, 4vw, 48px)); text-align: center; padding: clamp(44px, 7vw, 84px) 24px; border-radius: 28px; position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 20% 0%, rgba(123,97,255,.45), transparent 55%), radial-gradient(ellipse at 90% 100%, rgba(255,79,139,.4), transparent 55%), var(--ink-2); border: 1px solid rgba(255,255,255,.07); }
.h-cta p { color: #c3c3cc; margin: 12px 0 26px; }
.footer { border-top: 1px solid rgba(255,255,255,.06); align-items: center; }
.f-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--paper); }
.f-brand .logo-svg { width: 22px; height: 22px; filter: none; }

@media (prefers-reduced-motion: reduce) {
  .aura, .h-col, .h-mq-track, .h-title span, .h-lead, .h-prompt, .h-chips { animation: none !important; }
}
@media (max-width: 700px) {
  .h-prompt { border-radius: 22px; flex-wrap: wrap; }
  .h-prompt input { flex-basis: calc(100% - 40px); }
  .h-prompt .btn { width: 100%; }
  .h-cols { grid-template-columns: repeat(3, 1fr); }
  .h-arrows { display: none; }
  .h-rail { grid-auto-columns: 72%; }
}

/* ---------- الاستوديو والصفحات الداخلية ---------- */
.studio { grid-template-columns: 420px 1fr; }
.panel { background: var(--ink); border-inline-end: 1px solid rgba(255,255,255,.06); }
.tabs { background: var(--ink-2); border: 1px solid rgba(255,255,255,.05); border-radius: 18px; padding: 5px; }
.tab { border-radius: 13px; transition: background .2s, color .2s; }
.tab:hover { color: var(--paper); }
.tab[aria-selected="true"] { background: var(--ink-4); color: var(--paper); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.tab-story[aria-selected="true"] { background: var(--aura); color: #0b0b0f; box-shadow: none; }
.model-opt, .tool-opt, .seg button, .presets button, .lib-item, .act, .chat-sug { background: var(--ink-2); border-color: rgba(255,255,255,.07); transition: border-color .2s, background .2s, transform .2s var(--ease); }
.model-opt:hover, .tool-opt:hover, .seg button:hover, .presets button:hover { border-color: rgba(255,255,255,.18); }
.model-opt { border-radius: 14px; }
.seg button { border-radius: 999px; }
.presets button { border-radius: 12px; }
.model-opt[aria-pressed="true"], .lib-item[aria-pressed="true"] { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber), 0 10px 30px -18px rgba(255,79,139,.7); background: linear-gradient(180deg, rgba(255,79,139,.07), transparent), var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--paper); color: #0b0b0f; border-color: var(--paper); }
.presets button[aria-pressed="true"] { border-color: var(--amber); background: rgba(255,79,139,.08); }
.ti { background: var(--ink-4); border-radius: 12px; }
.go { background: linear-gradient(to top, var(--ink) 70%, transparent); padding-top: 18px; }
.toggle input:checked { background: var(--amber); }
.results-head h2 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; }
html[dir="ltr"] .results-head h2 { text-transform: uppercase; font-variation-settings: 'wdth' 118; font-weight: 800; }
.grid { gap: 16px; }
.card { background: var(--ink-2); border-color: rgba(255,255,255,.06); border-radius: 18px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.14); box-shadow: 0 24px 50px -28px rgba(0,0,0,.9); }
.card .media { background: #050507; }
.card .media img, #modalBody img, .act-out img { background-color: #17171c; background-image: conic-gradient(#222229 25%, transparent 0 50%, #222229 0 75%, transparent 0); }
.pbar { background: var(--ink-3); } .pbar i { background: var(--aura); }
.rec-dot { background: var(--amber); box-shadow: 0 0 0 6px rgba(255,79,139,.15); }
.empty { border-color: rgba(255,255,255,.1); border-radius: 22px; background: radial-gradient(ellipse at top, rgba(123,97,255,.08), transparent 60%); }
.section h2 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; }
html[dir="ltr"] .section h2 { text-transform: uppercase; font-variation-settings: 'wdth' 118; font-weight: 800; }
.plan { background: var(--ink-2); border-color: rgba(255,255,255,.07); border-radius: 24px; transition: transform .3s var(--ease), border-color .3s; }
.plan:hover { transform: translateY(-4px); }
.plan.popular { border-color: transparent; background: linear-gradient(var(--ink-2), var(--ink-2)) padding-box, var(--aura) border-box; border: 1px solid transparent; }
.plan .flag { background: var(--aura); color: #0b0b0f; }
.plan .price { font-family: var(--f-display); font-weight: 700; letter-spacing: -.03em; }
.auth { background: var(--ink-2); border-color: rgba(255,255,255,.07); border-radius: 26px; box-shadow: 0 40px 100px -50px rgba(123,97,255,.6); }
.auth h1 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; }
.stat, .table-wrap, .lib-card { background: var(--ink-2); border-color: rgba(255,255,255,.07); }
.stat .v { font-family: var(--f-display); font-weight: 700; }
.bars div { background: var(--aura); }
.modal { background: var(--ink-2); border-color: rgba(255,255,255,.08); border-radius: 22px; box-shadow: 0 50px 120px -40px rgba(0,0,0,.9); }
.modal[open] { animation: pop .28s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal::backdrop { background: rgba(4,4,6,.78); backdrop-filter: blur(6px); }
.toast { border-radius: 999px; }
.lang select { background-color: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); }
.chat-side, .chat-input { background: var(--ink); }
.chat-li.on, .chat-li:hover { background: var(--ink-2); }
.msg.me .bub { background: var(--ink-4); border: 1px solid rgba(255,255,255,.07); }
.msg.ai .bub { background: transparent; padding-inline: 0; }
.act { border-radius: 18px; }
.act-n { background: var(--aura); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chat-hello h2 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; }
.chat-hello h2::after { content: ''; display: block; width: 64px; height: 4px; border-radius: 4px; background: var(--aura); margin: 14px auto 0; }
html[dir="ltr"] .chat-hello h2 { text-transform: uppercase; font-variation-settings: 'wdth' 118; font-weight: 800; }
.nav-links a { white-space: nowrap; }
@media (max-width: 900px) { .nav-links { scrollbar-width: none; padding-bottom: 2px; } .nav-links::-webkit-scrollbar { display: none; } }

/* ---------- القوائم المنسدلة الكبيرة ---------- */
.nav-dd { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 999px; border: 0; background: transparent; color: var(--steel); cursor: pointer; font-weight: 500; font-size: 14.5px; white-space: nowrap; transition: color .2s, background .2s; }
.nav-dd i { font-style: normal; font-size: 10px; opacity: .7; transition: transform .25s var(--ease); }
.nav-dd:hover, .nav-dd[aria-expanded="true"] { color: var(--paper); background: rgba(255,255,255,.06); }
.nav-dd[aria-expanded="true"] i { transform: rotate(180deg); }
.mega { position: fixed; z-index: 40; width: min(720px, calc(100vw - 24px)); background: rgba(19,19,23,.96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.09); border-radius: 22px; box-shadow: 0 40px 90px -30px rgba(0,0,0,.9); padding: 14px; animation: megaIn .22s var(--ease); }
@keyframes megaIn { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
.mega-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mega-card { display: grid; gap: 8px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; text-align: center; }
.mc-art { position: relative; aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.08); transition: transform .35s var(--ease), border-color .3s; }
.hue-a .mc-art { background: radial-gradient(circle at 25% 25%, #7b61ff, transparent 60%), radial-gradient(circle at 85% 85%, #ff4f8b, transparent 55%), #15121f; }
.hue-b .mc-art { background: radial-gradient(circle at 75% 25%, #ff4f8b, transparent 60%), radial-gradient(circle at 20% 85%, #ffb347, transparent 55%), #1d1216; }
.hue-c .mc-art { background: radial-gradient(circle at 25% 30%, #ffb347, transparent 55%), radial-gradient(circle at 80% 80%, #7b61ff, transparent 60%), #17140f; }
.mc-art span { font-size: 34px; transition: transform .45s var(--ease); filter: drop-shadow(0 8px 18px rgba(0,0,0,.45)); }
.mega-card:hover .mc-art { transform: translateY(-2px); border-color: rgba(255,255,255,.22); }
.mega-card:hover .mc-art span { transform: scale(1.14) rotate(-5deg); }
.mega-card b { font-size: 13.5px; font-weight: 600; }
.mega-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.mega-lists h4 { margin: 0 0 6px; padding-inline: 10px; font-size: 12px; color: var(--steel); font-weight: 500; }
.mega-li { display: block; width: 100%; text-align: start; padding: 7px 10px; border: 0; border-radius: 9px; background: none; color: #dcdce3; cursor: pointer; font-size: 14px; transition: background .15s; }
.mega-li:hover:not(:disabled) { background: rgba(255,255,255,.06); color: #fff; }
.mega-li:disabled { cursor: default; opacity: .75; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; text-decoration: none; background: var(--aura); color: #0b0b0f; box-shadow: 0 0 0 2px rgba(255,255,255,.08); transition: transform .2s var(--ease); }
.avatar:hover { transform: scale(1.06); }
@media (max-width: 700px) { .mega-cards { grid-template-columns: repeat(2, 1fr); } }

/* ---------- البلاطات (معرض وأعمالي) ---------- */
.masonry { columns: 5 220px; column-gap: 10px; }
.tile { break-inside: avoid; margin: 0 0 10px; position: relative; border-radius: 14px; overflow: hidden; background: var(--ink-2); }
.tile-media { cursor: zoom-in; }
.tile-media video, .tile-media img { width: 100%; display: block; transition: transform .8s var(--ease); }
.tile:hover .tile-media video, .tile:hover .tile-media img { transform: scale(1.035); }
.tile-audio { display: grid; gap: 10px; place-items: center; padding: 26px 12px; background: linear-gradient(135deg, #1d1530, #2a1220); }
.tile-audio span { font-size: 34px; } .tile-audio audio { width: 100%; }
.tile-over { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 30%, transparent 55%, rgba(0,0,0,.8)); }
.tile:hover .tile-over, .tile:focus-within .tile-over { opacity: 1; }
.tile-over > * { pointer-events: auto; }
.tile-top, .tile-bot { padding: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile-bot { flex-direction: column; align-items: stretch; }
.tile-bot p { margin: 0; font-size: 12.5px; line-height: 1.45; color: #e8e8ee; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.who { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.who i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--aura); color: #0b0b0f; font-size: 11px; }
.like, .fav { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; border: 0; cursor: pointer; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; backdrop-filter: blur(6px); transition: transform .15s var(--ease), color .2s; }
.like:active, .fav:active { transform: scale(.9); }
.like.on, .fav.on { color: var(--amber); }
.fav.on { opacity: 1; }
.tile.mine .fav.on { position: relative; }
.tile-btn { padding: 8px 12px; font-size: 13px; }
.chip-k { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); }
.tile-acts { display: flex; gap: 6px; }
.ic-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; border: 0; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; text-decoration: none; font-size: 14px; backdrop-filter: blur(6px); transition: background .2s; }
.ic-btn:hover { background: rgba(255,255,255,.26); }
@media (hover: none) { .tile-over { opacity: 1; background: linear-gradient(to bottom, rgba(0,0,0,.35), transparent 30%, transparent 60%, rgba(0,0,0,.7)); } }

.feed-page { max-width: 1600px; margin: 0 auto; padding: 36px clamp(12px, 3vw, 36px) 20px; }
.feed-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.feed-head h1 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.02em; }
html[dir="ltr"] .feed-head h1, html[dir="ltr"] .as-bar h1 { text-transform: uppercase; font-variation-settings: 'wdth' 118; font-weight: 800; }
.feed-head p { margin: 6px 0 0; color: var(--steel); }
.feed-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.pills { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--ink-2); border: 1px solid rgba(255,255,255,.06); }
.pills button { padding: 7px 14px; border-radius: 999px; border: 0; background: none; color: var(--steel); cursor: pointer; font-size: 13.5px; transition: background .2s, color .2s; }
.pills button[aria-pressed="true"] { background: var(--paper); color: #0b0b0f; }

/* ---------- أعمالي ---------- */
.assets-app { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100dvh - 62px); }
.as-side { border-inline-end: 1px solid rgba(255,255,255,.06); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 62px; align-self: start; height: calc(100dvh - 62px); overflow: auto; }
.as-side h4 { margin: 14px 10px 6px; font-size: 12px; color: var(--steel); font-weight: 500; }
.as-side h4:first-child { margin-top: 0; }
.as-nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; border: 0; background: none; color: #d4d4dc; cursor: pointer; text-decoration: none; font-size: 14.5px; text-align: start; transition: background .15s; }
.as-nav span { width: 22px; text-align: center; }
.as-nav em { margin-inline-start: auto; font-style: normal; font-size: 12px; color: var(--steel); font-variant-numeric: tabular-nums; }
.as-nav:hover { background: rgba(255,255,255,.05); }
.as-nav[aria-pressed="true"] { background: var(--ink-4); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.as-main { padding: 22px clamp(12px, 2.5vw, 30px); min-width: 0; }
.as-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.as-bar h1 { margin: 0; margin-inline-end: auto; font-family: var(--f-display); font-weight: 700; font-size: 28px; letter-spacing: -.02em; }
.as-search { width: min(320px, 100%); border-radius: 999px; padding-inline: 16px; }
.as-sort { width: auto; border-radius: 999px; }
.as-empty { display: grid; justify-items: center; text-align: center; padding: clamp(40px, 10vh, 110px) 16px; }
.as-empty-art { width: 120px; height: 120px; border-radius: 30px; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, #7b61ff, transparent 60%), radial-gradient(circle at 80% 85%, #ff4f8b, transparent 55%), var(--ink-2); transform: rotate(-6deg); box-shadow: 0 30px 70px -30px rgba(255,79,139,.6); margin-bottom: 22px; }
.as-empty-art span { font-size: 46px; color: #fff; }
.as-empty h3 { margin: 0 0 6px; font-size: 22px; }
.as-empty p { margin: 0 0 20px; color: var(--steel); max-width: 30em; }
.as-empty-go { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 800px) {
  .assets-app { grid-template-columns: 1fr; }
  .as-side { position: static; height: auto; flex-direction: row; overflow-x: auto; border-inline-end: 0; border-bottom: 1px solid rgba(255,255,255,.06); padding: 10px; }
  .as-side h4 { display: none; }
  .as-nav { flex: 0 0 auto; }
  .masonry { columns: 2 150px; }
}
.as-bar select.as-sort, .as-bar input.as-search { flex: none; }
.as-bar select.as-sort { width: auto; min-width: 130px; }
.credits-pill { white-space: nowrap; }
@media (max-width: 600px) { .as-bar input.as-search { width: 100%; flex: 1 1 100%; order: 3; } }

/* =========== ترتيب الصفحة الرئيسية الجديد (بانرات + عروض + سحابة ميزات) =========== */
.hx { max-width: 1480px; margin: 0 auto; padding: 18px clamp(12px, 2.4vw, 32px) 0; }
.rv { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }
.badge-new { display: inline-block; padding: 3px 10px; border-radius: 6px; background: var(--aura); color: #0b0b0f; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.hx-top { display: grid; grid-template-columns: 2.2fr 1fr; gap: 12px; }
.hx-hero { position: relative; isolation: isolate; overflow: hidden; border-radius: 24px; min-height: 460px; display: flex; align-items: flex-end; border: 1px solid rgba(255,255,255,.07); background: #0d0d11; }
.hx-hero .h-veil { background: linear-gradient(to top, rgba(9,9,11,.95) 10%, rgba(9,9,11,.35) 65%, rgba(9,9,11,.6)); }
.hx-hero .h-cols { grid-template-columns: repeat(3, 1fr); opacity: .75; }
.hx-hero-in { padding: clamp(22px, 3vw, 40px); display: grid; gap: 16px; justify-items: start; width: 100%; }
.hx-hero .h-title { font-size: clamp(36px, 5.4vw, 78px); text-align: start; }
html[dir="ltr"] .hx-hero .h-title { font-size: clamp(36px, 5.6vw, 84px); }
.hx-hero .h-prompt { width: min(680px, 100%); }
.hx-hero .h-chips { justify-content: flex-start; }
.hx-drops { display: grid; grid-template-rows: repeat(3, 1fr); gap: 12px; }
.hx-drop { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; text-align: start; padding: 10px; border-radius: 20px; border: 1px solid rgba(255,255,255,.07); background: var(--ink-2); color: inherit; cursor: pointer; overflow: hidden; transition: border-color .3s, transform .35s var(--ease), background .3s; }
.hx-drop:hover { border-color: rgba(255,79,139,.45); transform: translateY(-2px); background: var(--ink-4); }
.hx-drop-art { height: 100%; min-height: 86px; border-radius: 14px; display: grid; place-items: center; }
.hue-a .hx-drop-art, .hue-a.hx-ph { background: radial-gradient(circle at 30% 20%, #7b61ff, transparent 60%), radial-gradient(circle at 80% 90%, #ff4f8b, transparent 55%), #15121f; }
.hue-b .hx-drop-art, .hue-b.hx-ph { background: radial-gradient(circle at 70% 25%, #ff4f8b, transparent 60%), radial-gradient(circle at 20% 85%, #ffb347, transparent 55%), #1d1216; }
.hue-c .hx-drop-art, .hue-c.hx-ph { background: radial-gradient(circle at 25% 30%, #ffb347, transparent 55%), radial-gradient(circle at 80% 80%, #7b61ff, transparent 60%), #17140f; }
.hx-drop-art span { font-size: 34px; transition: transform .45s var(--ease); }
.hx-drop:hover .hx-drop-art span { transform: scale(1.15) rotate(-6deg); }
.hx-drop-txt b { display: block; font-size: 15.5px; margin-bottom: 3px; }
.hx-drop-txt small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--steel); font-size: 12.5px; line-height: 1.5; }
.hx-drop > i { position: absolute; top: 10px; inset-inline-end: 12px; font-style: normal; color: var(--steel); transition: color .2s, transform .3s var(--ease); }
html[dir="rtl"] .hx-drop > i { transform: scaleX(-1); }
.hx-drop:hover > i { color: #fff; }

.hx-spot { margin-top: 12px; display: grid; grid-template-columns: 1fr 1.6fr; gap: 20px; align-items: center; padding: clamp(20px, 3vw, 36px); border-radius: 24px; border: 1px solid rgba(255,255,255,.07);
  background: radial-gradient(ellipse 60% 120% at 0% 0%, rgba(123,97,255,.28), transparent 60%), radial-gradient(ellipse 50% 100% at 100% 100%, rgba(255,79,139,.22), transparent 60%), #0e0e12; }
.hx-spot-txt { display: grid; gap: 12px; justify-items: start; }
.hx-spot h2 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: clamp(28px, 3.6vw, 52px); line-height: 1.02; letter-spacing: -.02em; }
html[dir="ltr"] .hx-spot h2 { text-transform: uppercase; font-variation-settings: 'wdth' 122; font-weight: 900; letter-spacing: -.03em; }
.hx-spot p { margin: 0; color: #c2c2cc; max-width: 30em; }
.hx-spot-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.hx-spot-media { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.hx-ph { position: relative; aspect-ratio: 3/4; border-radius: 16px; overflow: hidden; display: grid; place-items: center; cursor: pointer; border: 1px solid rgba(255,255,255,.06); }
.hx-ph:nth-child(even) { transform: translateY(14px); }
.hx-ph span { font-size: 36px; }
.hx-ph video, .hx-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.hx-ph:hover video, .hx-ph:hover img { transform: scale(1.06); }

.hx .h-sec { max-width: none; padding-inline: 0; padding-top: 56px; }
.hx-grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-height: 620px; overflow: hidden; }
.hx-grid .tile { margin: 0; aspect-ratio: 4/5; }
.hx-grid .tile-media, .hx-grid .tile-media video, .hx-grid .tile-media img { height: 100%; }
.hx-grid .tile-media video, .hx-grid .tile-media img { object-fit: cover; }
.hx-fade { position: absolute; inset-inline: 0; bottom: 0; height: 190px; display: grid; place-items: end center; padding-bottom: 26px; background: linear-gradient(to top, var(--ink) 25%, transparent); pointer-events: none; }
.hx-fade .btn { pointer-events: auto; }
.hx-cloud { text-align: center; }
.hx-cloud h2 { margin-bottom: 22px !important; }
.hx-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 1100px; margin: 0 auto; }
.hx-tag { padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.09); background: var(--ink-2); color: #cfcfd8; cursor: pointer; font-size: 13.5px; transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease); }
.hx-tag:hover { background: var(--paper); color: #0b0b0f; border-color: var(--paper); transform: translateY(-2px); }
.hx .h-cta { width: 100%; margin-inline: 0; }
@media (max-width: 1000px) {
  .hx-top { grid-template-columns: 1fr; }
  .hx-drops { grid-template-rows: none; grid-template-columns: repeat(3, 1fr); }
  .hx-drop { grid-template-columns: 1fr; }
  .hx-spot { grid-template-columns: 1fr; }
  .hx-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .hx-drops { grid-template-columns: 1fr; }
  .hx-drop { grid-template-columns: 76px 1fr; }
  .hx-hero { min-height: 520px; }
  .hx-spot-media { grid-template-columns: repeat(2, 1fr); }
  .hx-grid { grid-template-columns: repeat(2, 1fr); max-height: 760px; }
}

/* =========== الاستوديو: لوحة ثابتة على الجنب + «كيف بتشتغل» =========== */
.studio { grid-template-columns: 380px 1fr; }
.panel { position: sticky; top: 62px; height: calc(100dvh - 62px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2a2a32 transparent; }
.results-head { align-items: center; }
.results-head .pills button span { font-size: 12px; opacity: .7; margin-inline-start: 4px; }
.model-cur { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; border: 1px solid rgba(255,255,255,.08); color: inherit; cursor: pointer; text-align: start;
  background: radial-gradient(ellipse at 0% 0%, rgba(123,97,255,.22), transparent 60%), var(--ink-2); transition: border-color .2s; }
.model-cur:hover, .model-cur[aria-expanded="true"] { border-color: rgba(255,79,139,.5); }
.mcur-art { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: var(--aura); flex: none; }
.mcur-txt { flex: 1; min-width: 0; }
.mcur-txt small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--amber); font-weight: 700; }
.mcur-txt b { font-size: 16px; }
.mcur-chg { font-size: 13px; color: var(--steel); white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.06); }
.mcur-chg i { font-style: normal; font-size: 10px; display: inline-block; transition: transform .25s var(--ease); }
.model-cur[aria-expanded="true"] .mcur-chg i { transform: rotate(180deg); }
.model-drop { margin-top: 8px; animation: megaIn .22s var(--ease); }
.how { padding: clamp(24px, 6vh, 70px) 0 30px; text-align: center; }
.how-t { margin: 0 auto 10px; max-width: 16em; font-family: var(--f-display); font-weight: 700; font-size: clamp(30px, 4.4vw, 60px); line-height: 1.04; letter-spacing: -.02em; }
html[dir="ltr"] .how-t { text-transform: uppercase; font-variation-settings: 'wdth' 122; font-weight: 900; letter-spacing: -.03em; }
.how-d { margin: 0 auto 34px; color: var(--steel); max-width: 34em; }
.how-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 980px; margin: 0 auto; text-align: start; }
.how-card { display: grid; gap: 8px; }
.how-art { position: relative; aspect-ratio: 4/3; border-radius: 20px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.07); margin-bottom: 6px; overflow: hidden; }
.hue-a .how-art { background: radial-gradient(circle at 30% 20%, #7b61ff, transparent 60%), radial-gradient(circle at 80% 90%, #ff4f8b, transparent 55%), #15121f; }
.hue-b .how-art { background: radial-gradient(circle at 70% 25%, #ff4f8b, transparent 60%), radial-gradient(circle at 20% 85%, #ffb347, transparent 55%), #1d1216; }
.hue-c .how-art { background: radial-gradient(circle at 25% 30%, #ffb347, transparent 55%), radial-gradient(circle at 80% 80%, #7b61ff, transparent 60%), #17140f; }
.how-art span { font-size: 46px; transition: transform .5s var(--ease); }
.how-card:hover .how-art span { transform: scale(1.12) rotate(-5deg); }
.how-art em { position: absolute; top: 12px; inset-inline-start: 12px; font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.55); font-weight: 700; font-size: 13px; }
.how-card b { font-size: 16px; }
.how-card small { color: var(--steel); font-size: 13.5px; line-height: 1.55; }
@media (max-width: 900px) {
  .studio { grid-template-columns: 1fr; }
  .panel { position: static; height: auto; overflow: visible; }
  .how-cards { grid-template-columns: 1fr; max-width: 420px; }
}
.hx .h-cta { max-width: none; }

/* ---------- أعمالي: مجلدات، تحديد جماعي، سلة ---------- */
.as-h-row { display: flex; align-items: center; justify-content: space-between; }
.as-add { border: 0; background: rgba(255,255,255,.07); color: var(--paper); width: 22px; height: 22px; border-radius: 7px; cursor: pointer; line-height: 1; }
.as-add:hover { background: var(--amber); color: #0b0b0f; }
.as-proj { display: flex; align-items: center; }
.as-proj .as-nav { flex: 1; min-width: 0; }
.as-proj .as-nav b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-pmenu { opacity: 0; border: 0; background: none; color: var(--steel); cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.as-proj:hover .as-pmenu { opacity: 1; }
.as-pmenu:hover { color: #fff; background: rgba(255,255,255,.08); }
.as-hint { margin: 2px 10px 6px; font-size: 12.5px; color: var(--steel); }
.as-view button { padding: 6px 11px; font-size: 15px; }
.as-bulk { position: sticky; top: 70px; z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 14px; border-radius: 16px;
  background: rgba(27,27,33,.92); backdrop-filter: blur(12px); border: 1px solid rgba(255,79,139,.35); animation: megaIn .22s var(--ease); }
.as-bulk .sp { flex: 1; }
.as-bulk .btn { padding: 7px 14px; }
.as-bulk select.bk-move { width: auto; border-radius: 999px; padding-block: 7px; }
.as-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: 14px; background: var(--ink-2); color: var(--steel); font-size: 14px; }
.sqgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.sqgrid .tile { margin: 0; aspect-ratio: 1; }
.sqgrid .tile-media, .sqgrid .tile-media video, .sqgrid .tile-media img { height: 100%; }
.sqgrid .tile-media video, .sqgrid .tile-media img { object-fit: cover; }
.sqgrid .tile-audio { height: 100%; }
.selecting .tile { cursor: pointer; }
.selecting .tile-media { pointer-events: none; }
.pick { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700;
  border: 2px solid rgba(255,255,255,.85); background: rgba(0,0,0,.35); color: transparent; transition: background .15s, color .15s, transform .15s var(--ease); }
.tile.picked .pick { background: var(--amber); border-color: var(--amber); color: #0b0b0f; transform: scale(1.08); }
.tile.picked { box-shadow: 0 0 0 3px var(--amber); }
.selecting .tile-over { display: none; }
.ic-btn.wide { width: auto; padding: 0 12px; font-size: 13px; }

/* عارض التفاصيل */
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 0; }
.v-media { background: #000; display: grid; place-items: center; min-height: 300px; border-radius: 22px 0 0 22px; overflow: hidden; }
html[dir="rtl"] .v-media { border-radius: 0 22px 22px 0; }
.v-media video, .v-media img { width: 100%; max-height: 80vh; object-fit: contain; border-radius: 0 !important; }
.v-media audio { margin: 40px 20px; }
.v-info { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.v-lab { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--steel); }
.v-copy { padding: 4px 10px; font-size: 12.5px; }
.v-prompt p { margin: 6px 0 0; font-size: 14px; line-height: 1.6; max-height: 220px; overflow: auto; padding: 10px 12px; border-radius: 12px; background: var(--ink); }
.v-meta { margin: 0; display: grid; gap: 8px; }
.v-meta div { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; border-bottom: 1px solid rgba(255,255,255,.05); padding-bottom: 8px; }
.v-meta dt { color: var(--steel); } .v-meta dd { margin: 0; text-align: end; }
.v-acts { margin-top: auto; display: grid; gap: 8px; }
.modal:has(.viewer) { max-width: min(1200px, 96vw); }
@media (max-width: 800px) { .viewer { grid-template-columns: 1fr; } .v-media { border-radius: 22px 22px 0 0 !important; } }

/* ---------- مُنشئ سير العمل ---------- */
.flows-app { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100dvh - 62px); }
.fl-side { border-inline-end: 1px solid rgba(255,255,255,.06); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 62px; align-self: start; height: calc(100dvh - 62px); overflow: auto; }
.fl-side h4 { margin: 14px 10px 6px; font-size: 12px; color: var(--steel); font-weight: 500; }
.fl-side h4:first-child { margin-top: 0; }
.fl-tpl { display: grid; gap: 4px; text-align: start; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.07); background: var(--ink-2); color: inherit; cursor: pointer; transition: border-color .2s, transform .2s var(--ease); }
.fl-tpl span { font-size: 15px; letter-spacing: 1px; }
.fl-tpl b { font-size: 13.5px; font-weight: 600; }
.fl-tpl:hover { border-color: rgba(255,79,139,.5); transform: translateY(-1px); }
.fl-main { min-width: 0; display: flex; flex-direction: column; }
.fl-bar { display: flex; align-items: center; gap: 10px; padding: 14px clamp(12px, 2vw, 24px); border-bottom: 1px solid rgba(255,255,255,.06); flex-wrap: wrap; }
.fl-name { flex: 1; min-width: 180px; max-width: 420px; border-radius: 999px; padding-inline: 16px; }
.fl-total { margin-inline-start: auto; color: var(--steel); font-size: 14px; font-variant-numeric: tabular-nums; }
.fl-canvas { flex: 1; overflow: auto; padding: 36px clamp(14px, 3vw, 40px) 60px;
  background-color: var(--ink); background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 22px 22px; }
.fl-track { display: flex; align-items: flex-start; width: max-content; min-width: 100%; }
.fl-node { width: 300px; flex: none; border-radius: 20px; border: 1px solid rgba(255,255,255,.09); background: rgba(19,19,23,.96); box-shadow: 0 20px 50px -30px rgba(0,0,0,.9);
  padding: 12px; display: grid; gap: 10px; transition: border-color .3s, box-shadow .3s, transform .3s var(--ease); animation: nodeIn .35s var(--ease); }
@keyframes nodeIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.fl-node:hover { border-color: rgba(255,255,255,.18); }
.fl-start, .fl-add { width: auto; min-width: 120px; place-items: center; text-align: center; padding: 18px; }
.fl-start span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--aura); color: #0b0b0f; font-size: 15px; }
.fl-add { width: 220px; border-style: dashed; background: rgba(19,19,23,.7); }
.fl-add select { width: 100%; }
.fl-wire { flex: none; width: 54px; height: 2px; margin-top: 38px; position: relative; background: repeating-linear-gradient(90deg, rgba(255,255,255,.25) 0 6px, transparent 6px 12px); }
.fl-wire::after { content: ''; position: absolute; inset-inline-end: -2px; top: -4px; border: 5px solid transparent; border-inline-start: 7px solid rgba(255,255,255,.35); }
.fl-wire.live { background: repeating-linear-gradient(90deg, var(--amber) 0 6px, transparent 6px 12px); background-size: 24px 2px; animation: wireFlow .6s linear infinite; }
html[dir="rtl"] .fl-wire.live { animation-direction: reverse; }
.fl-wire.ok { background: var(--aura); }
@keyframes wireFlow { to { background-position: 24px 0; } }
.fl-head { display: flex; align-items: center; gap: 8px; }
.fl-head em { font-style: normal; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--ink-4); font-size: 12px; font-weight: 700; }
.fl-head b { flex: 1; min-width: 0; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-acts { display: flex; gap: 2px; opacity: .55; transition: opacity .2s; }
.fl-node:hover .fl-acts { opacity: 1; }
.fl-acts button { border: 0; background: none; color: var(--paper); width: 24px; height: 24px; border-radius: 7px; cursor: pointer; }
.fl-acts button:hover:not(:disabled) { background: rgba(255,255,255,.08); }
.fl-acts button:disabled { opacity: .3; cursor: default; }
html[dir="rtl"] .fl-acts [data-mv] { transform: scaleX(-1); }
.fl-fields { display: grid; gap: 8px; }
.fl-fields label { display: grid; gap: 4px; font-size: 12px; color: var(--steel); }
.fl-fields .input { font-size: 13.5px; padding: 8px 10px; }
.fl-fields textarea.input { resize: vertical; min-height: 54px; }
.fl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fl-check { display: flex !important; align-items: center; gap: 8px; }
.fl-media { display: grid; gap: 6px; }
.fl-up { display: flex; align-items: center; gap: 8px; color: var(--paper); }
.fl-up img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.fl-cost { font-size: 12px; color: var(--steel); text-align: end; font-variant-numeric: tabular-nums; }
.fl-status { font-size: 13px; padding: 6px 10px; border-radius: 10px; background: var(--ink-4); display: grid; gap: 2px; }
.fl-status small { color: var(--rec); }
.st-running { border-color: rgba(255,79,139,.6); box-shadow: 0 0 0 4px rgba(255,79,139,.12), 0 20px 50px -30px rgba(255,79,139,.6); }
.st-running .fl-status::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); margin-inline-end: 6px; animation: blink 1s infinite; }
.st-done { border-color: rgba(61,220,151,.45); }
.st-done .fl-status { color: var(--ok); }
.st-failed { border-color: rgba(255,79,94,.6); }
.st-skipped { opacity: .55; }
.fl-out { border-radius: 12px; overflow: hidden; background: #000; }
.fl-out img, .fl-out video { width: 100%; display: block; max-height: 240px; object-fit: contain; }
.fl-out audio { width: 100%; }
@media (max-width: 800px) {
  .flows-app { grid-template-columns: 1fr; }
  .fl-side { position: static; height: auto; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; border-inline-end: 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .fl-side h4, .fl-side .as-proj, .fl-side .as-hint, .fl-side [data-runid] { display: none; }
  .fl-tpl { flex: 0 0 180px; }
  .fl-track { flex-direction: column; align-items: stretch; width: 100%; }
  .fl-node, .fl-add { width: 100%; }
  .fl-wire { width: 2px; height: 30px; margin: 0 auto; background: repeating-linear-gradient(180deg, rgba(255,255,255,.25) 0 6px, transparent 6px 12px); }
  .fl-wire::after { display: none; }
}
.fmt-pills { display: flex; width: 100%; }
.fmt-pills button { flex: 1; }

/* ---------- المعاينات: شبكة خيارات بصور وفيديو ---------- */
.pv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.pv-host:hover .pv { transform: scale(1.06); }
.vis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vis-grid.many { grid-template-columns: repeat(3, 1fr); max-height: 470px; overflow-y: auto; padding-inline-end: 4px; scrollbar-width: thin; }
.vis { display: grid; gap: 6px; padding: 5px; border-radius: 14px; border: 1px solid rgba(255,255,255,.07); background: var(--ink-2); color: inherit; cursor: pointer; text-align: center; transition: border-color .2s, transform .2s var(--ease); }
.vis:hover { border-color: rgba(255,255,255,.2); transform: translateY(-1px); }
.vis[aria-pressed="true"] { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.vis-art { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; display: grid; place-items: center; }
.hue-a .vis-art { background: radial-gradient(circle at 30% 20%, #7b61ff, transparent 60%), radial-gradient(circle at 80% 90%, #ff4f8b, transparent 55%), #15121f; }
.hue-b .vis-art { background: radial-gradient(circle at 70% 25%, #ff4f8b, transparent 60%), radial-gradient(circle at 20% 85%, #ffb347, transparent 55%), #1d1216; }
.hue-c .vis-art { background: radial-gradient(circle at 25% 30%, #ffb347, transparent 55%), radial-gradient(circle at 80% 80%, #7b61ff, transparent 60%), #17140f; }
.vis-ic { font-size: 26px; }
.vis b { font-size: 12px; font-weight: 500; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px 3px; }
.ti { position: relative; overflow: hidden; }
.ti .pv { border-radius: inherit; }
.tool-opt .ti { width: 52px; height: 52px; flex: none; }
.ti.big { width: 72px; height: 72px; }
.mcur-art { position: relative; overflow: hidden; }
.model-opt.has-pv { position: relative; overflow: hidden; padding-top: 0; }
.model-opt .mo-pv { position: relative; inset: auto; height: 120px; display: block; margin: 0 -14px 10px; width: calc(100% + 28px); border-radius: 0; }
.model-opt.has-pv { padding-top: 0; }

/* حركات الكاميرا: معاينة متحركة مرسومة لما ما يكون في فيديو */
.presets .cam { display: grid; gap: 6px; padding: 5px; text-align: center; }
.cam-art { position: relative; aspect-ratio: 4/5; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(180deg, #2a1f4d 0%, #ff8a5c 70%, #ffb347 100%); }
.cam b { font-size: 12px; font-weight: 500; }
.cam-scene { position: absolute; inset: 0; }
.cam-scene i { position: absolute; display: block; }
.cam-scene .sun { width: 34%; aspect-ratio: 1; border-radius: 50%; background: #ffe3a1; left: 33%; top: 30%; box-shadow: 0 0 30px #ffd27a; }
.cam-scene .hill { width: 140%; height: 50%; border-radius: 50%; left: -20%; }
.cam-scene .h1 { bottom: -18%; background: #3a2350; }
.cam-scene .h2 { bottom: -30%; left: 10%; background: #1d1430; }
.cam-scene .who { width: 8%; height: 22%; left: 46%; bottom: 22%; background: #0b0b0f; border-radius: 40% 40% 10% 10%; }
.cam-art .ic { position: relative; z-index: 2; font-size: 20px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); opacity: .9; }
.cam-none .cam-art { background: var(--ink-4); }
.cam-none .cam-scene { display: none; }
.cam:hover .cam-scene, .cam[aria-pressed="true"] .cam-scene { animation-duration: 2.4s; animation-iteration-count: infinite; animation-timing-function: ease-in-out; }
.cam-dolly-in:hover .cam-scene, .cam-dolly-in[aria-pressed="true"] .cam-scene { animation-name: camDolly; }
.cam-crash-zoom:hover .cam-scene, .cam-crash-zoom[aria-pressed="true"] .cam-scene { animation-name: camCrash; animation-duration: 1.4s; }
.cam-orbit:hover .cam-scene, .cam-orbit[aria-pressed="true"] .cam-scene { animation-name: camOrbit; }
.cam-fpv:hover .cam-scene, .cam-fpv[aria-pressed="true"] .cam-scene { animation-name: camFpv; animation-duration: 1.6s; }
.cam-crane-up:hover .cam-scene, .cam-crane-up[aria-pressed="true"] .cam-scene { animation-name: camCrane; }
.cam-handheld:hover .cam-scene, .cam-handheld[aria-pressed="true"] .cam-scene { animation-name: camShake; animation-duration: .5s; }
.cam-slowmo:hover .cam-scene, .cam-slowmo[aria-pressed="true"] .cam-scene { animation-name: camDolly; animation-duration: 6s; }
.cam-timelapse:hover .cam-scene .sun, .cam-timelapse[aria-pressed="true"] .cam-scene .sun { animation: camSun 1.6s linear infinite; }
.cam-anime .cam-art { background: linear-gradient(180deg, #8ad0ff, #ffc0e0); }
.cam-product .cam-art { background: radial-gradient(circle at 50% 40%, #3b3b46, #0d0d12); }
.cam-product .cam-scene { display: none; }
.cam-noir .cam-art { filter: grayscale(1) contrast(1.3); }
@keyframes camDolly { 50% { transform: scale(1.25); } }
@keyframes camCrash { 0%, 30% { transform: scale(1); } 45%, 100% { transform: scale(1.7); } }
@keyframes camOrbit { 0% { transform: perspective(300px) rotateY(-25deg); } 50% { transform: perspective(300px) rotateY(25deg); } 100% { transform: perspective(300px) rotateY(-25deg); } }
@keyframes camFpv { 0% { transform: scale(1) translateY(0); } 100% { transform: scale(1.6) translateY(12%); } }
@keyframes camCrane { 0% { transform: translateY(18%) scale(1.25); } 100% { transform: translateY(-6%) scale(1); } }
@keyframes camShake { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(2px, -1px) rotate(.6deg); } 75% { transform: translate(-2px, 1px) rotate(-.6deg); } }
@keyframes camSun { from { transform: translate(-120%, 60%); } to { transform: translate(120%, -40%); } }
@media (prefers-reduced-motion: reduce) { .cam-scene, .cam-scene .sun { animation: none !important; } }

/* لوحة إدارة المعاينات */
.pv-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pv-g { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--ink-2); border: 1px solid rgba(255,255,255,.07); cursor: pointer; }
.pv-g:has(input:checked) { border-color: var(--amber); }
.pv-k { font-size: 20px; }
.pv-n { flex: 1; display: grid; }
.pv-n small { color: var(--steel); font-size: 12px; }
.pv-c { font-variant-numeric: tabular-nums; font-weight: 700; }
.pv-acts { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.pv-sum { color: var(--steel); }
.pv-prog { margin-top: 14px; display: grid; gap: 6px; }
.pv-prog small { color: var(--steel); }
.pv-prog pre { white-space: pre-wrap; font-size: 12px; color: var(--steel); }
.h-tool-media.has-pv .pv { position: absolute; }
.hx-drop-art { position: relative; overflow: hidden; }
.presets { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 8px; }
.presets .cam { flex-direction: column; border-radius: 14px; }
.cam-art, .vis-art { width: 100%; }
.presets .cam { justify-items: stretch !important; }
.model-opt.has-pv .mo-pv { grid-column: 1 / -1; order: -1; position: relative; inset: auto; width: calc(100% + 28px); height: 130px; margin: 0 -14px 8px; border-radius: 0; }
.model-opt.has-pv { padding-top: 0; overflow: hidden; }
.model-opt.has-pv .mo-pv { width: auto; justify-self: stretch; margin: 0 -14px 8px; }
.model-opt.has-pv .mo-pv { width: calc(100% + 28px) !important; max-width: none; margin-inline: -14px !important; justify-self: center; }
.pub-badge { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--steel); background: rgba(255,255,255,.05); cursor: help; }
.auth-note { margin: 0; font-size: 12.5px; color: var(--steel); line-height: 1.6; text-align: center; }
.auth-note a { color: var(--paper); }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; margin-inline: auto; }
#view .section.legal h1 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 8px; text-transform: none; letter-spacing: -.01em; }
#view .section.legal h2 { font-family: inherit; font-size: 19px; font-weight: 700; line-height: 1.4; text-transform: none; letter-spacing: 0; margin: 32px 0 8px; color: var(--paper); }
.legal p { color: var(--steel); line-height: 1.75; margin: 0 0 10px; }
.legal a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.legal .legal-meta { font-size: 13px; opacity: .8; margin-bottom: 24px; }
.legal .contact-mail { margin: 24px 0; }
.legal .contact-mail .btn { text-decoration: none; }
.buy-agree { text-align: center; color: var(--steel); font-size: 13px; margin-top: 18px; }
.buy-agree a { color: var(--paper); text-decoration: underline; }
