:root { --ink:#1c1c1c; --paper:#faf8f5; --accent:#FF6103; }
* { box-sizing: border-box; }
body { margin:0; font-family:"IBM Plex Sans Arabic","Segoe UI",sans-serif;
       background:var(--paper); color:var(--ink); }
.topbar { display:flex; gap:1rem; align-items:center; padding:.8rem 1.2rem;
          background:#fff; border-bottom:1px solid #e5e0d8; }
.brand { font-weight:700; }
main { max-width:960px; margin:1.5rem auto; padding:0 1rem; }
button, .btn { background:var(--ink); color:#fff; border:0; border-radius:8px;
               padding:.55rem 1.1rem; font-size:1rem; cursor:pointer; }
.error { color:#b3261e; }
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:1rem; }
.card { display:flex; flex-direction:column; gap:.4rem; background:#fff; padding:.8rem;
        border:1px solid #e5e0d8; border-radius:10px; text-decoration:none; color:inherit; }
.card img { width:100%; border-radius:6px; }
.badge { font-size:.85rem; padding:.1rem .5rem; border-radius:6px; width:max-content; }
.badge-ready { background:#e6f4e6; } .badge-preparing { background:#fdf3e0; }
.badge-failed { background:#fde8e6; }
progress { width:100%; height:14px; }

.options { display:grid; gap:.6rem; margin:1rem 0; }
.option { display:flex; flex-direction:column; gap:.2rem; background:#fff;
          border:1px solid #e5e0d8; border-radius:10px; padding:.7rem 1rem; }
.option-rec { border-color:var(--accent); }
.option-off { opacity:.5; }
.muted { color:#6b6b6b; font-size:.9rem; }
.best-for { margin:0; }
.example { margin:.1rem 0 0; font-style:italic; color:#4a4a4a; }
.reel-list { list-style:none; padding:0; display:grid; gap:.4rem; }
details summary { cursor:pointer; margin:.8rem 0; }

.script { white-space:pre-wrap; line-height:1.9; }
.risks { background:#fdf3e0; border-radius:8px; padding:.5rem .8rem; }
.risks ul, details ul { margin:.3rem 0; padding-inline-start:1.2rem; }

.row { display:flex; gap:.6rem; align-items:center; margin:.8rem 0; }
audio { width:100%; margin:.5rem 0; }

.book-result { flex-direction:row; align-items:center; gap:.8rem; }
.book-result-cover { width:48px; height:48px; object-fit:cover; border-radius:6px; flex-shrink:0; }
.book-result-info { display:flex; flex-direction:column; gap:.15rem; flex:1; }

/* Job progress: a track with an eased fill plus a moving sheen, so a stage
   that reports one percentage for two minutes still looks alive. */
.bar { width:100%; height:14px; border-radius:7px; background:#ece7df;
       overflow:hidden; }
.bar-fill { height:100%; width:0; border-radius:7px; background:var(--ink);
            transition:width .25s linear; position:relative; }
.bar-fill::after { content:""; position:absolute; inset:0;
                   background:linear-gradient(90deg, transparent,
                              rgba(255,255,255,.35), transparent);
                   animation:sheen 1.4s ease-in-out infinite; }
@keyframes sheen { from { transform:translateX(-100%); }
                   to   { transform:translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .bar-fill::after { animation:none; }
}

.board { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
         gap:1rem; margin:1rem 0; }
.beat { background:#fff; border:1px solid #e5e0d8; border-radius:10px;
        padding:.7rem; display:flex; flex-direction:column; gap:.4rem; }
.beat img { width:100%; border-radius:8px; aspect-ratio:9/16; object-fit:cover; }
.beat-why { margin:0; font-weight:600; }
.beat input[type=text] { width:100%; padding:.4rem .6rem; border-radius:8px;
                         border:1px solid #e5e0d8; font-family:inherit; }
.beat video { width:100%; border-radius:8px; }

.option input[type=range] { flex:1; min-width:140px; }
.option output { min-width:2.5rem; text-align:center; font-variant-numeric:tabular-nums; }

.preview { width:100%; max-width:360px; border-radius:12px; display:block; margin:1rem 0; }

/* A card whose picture is being remade — without this the board looks
   untouched while the job runs and the button reads as if it did nothing. */
.beat-busy { border-color: var(--accent); }
.beat-busy img { opacity: .45; }
.beat-busy-note { margin: 0; font-weight: 600; color: var(--accent); }
.beat textarea { width: 100%; padding: .45rem .6rem; border-radius: 8px;
                 border: 1px solid #e5e0d8; font-family: inherit;
                 font-size: .95rem; resize: vertical; }
.beat button[disabled] { opacity: .55; cursor: default; }

.script-edit { width:100%; padding:.5rem .7rem; border-radius:8px;
               border:1px solid #e5e0d8; font-family:inherit; line-height:1.9; }
