/* The Cartoon Maker: the story library, the importer, the brief's story and music cards, the cast review. Dark theme tokens from base.css. */

/* ---------- the story library ---------- */
.sl-top { margin-bottom: 12px; }
.sl-grid { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .sl-grid { grid-template-columns: 1fr; } }
.sl-list, .sl-pane { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; min-width: 0; }
.sl-pane { display: flex; flex-direction: column; gap: 14px; min-height: 260px; }
.sl-tools { padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.sl-rows { display: flex; flex-direction: column; gap: 8px; max-height: 70vh; overflow: auto; padding-right: 2px; }
.sl-row { text-align: left; display: flex; flex-direction: column; gap: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; color: var(--text); width: 100%; }
.sl-row:hover { border-color: var(--line-2); } .sl-row.on { border-color: var(--accent); background: var(--accent-bg); } .sl-row.gone { opacity: .55; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sl-title { font-size: 20px; }
.sl-head { align-items: flex-start; }
.sl-read { white-space: pre-wrap; line-height: 1.6; max-height: 60vh; overflow: auto; }
.sl-vers { display: flex; flex-direction: column; gap: 8px; }
.sl-ver { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.sl-ver.on { border-color: var(--ok); }
.sl-fam { display: flex; flex-direction: column; gap: 6px; }
.sl-fm { text-align: left; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; cursor: pointer; color: var(--text); width: fit-content; max-width: 100%; }
.sl-fm.on { border-color: var(--accent); cursor: default; } .sl-fm.gone { opacity: .5; }

/* a comparison of two versions */
.df { display: flex; flex-direction: column; gap: 2px; font-size: 13px; max-height: 60vh; overflow: auto; }
.df-sum { margin-bottom: 8px; }
.df-line { display: flex; gap: 8px; padding: 3px 8px; border-radius: 4px; white-space: pre-wrap; line-height: 1.5; }
.df-mark { width: 14px; flex: none; font-weight: 700; }
.df-add { background: rgba(62, 207, 142, .14); } .df-add .df-mark { color: var(--ok); }
.df-del { background: var(--danger-bg); text-decoration: line-through; text-decoration-color: rgba(255, 107, 107, .5); } .df-del .df-mark { color: var(--danger); }
.df-fold { color: var(--faint); text-align: center; font-size: 12px; padding: 4px; }

/* ---------- the importer ---------- */
.imp-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 26px 16px; border: 2px dashed var(--line-2); border-radius: 12px; background: var(--panel-2); color: var(--muted); }
.imp-drop b { color: var(--text); word-break: break-word; }
.imp-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.imp-checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.imp-checks em { color: var(--muted); font-style: normal; }
.imp-ck { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.imp-checks .ok .imp-ck { background: rgba(62, 207, 142, .18); color: var(--ok); }
.imp-checks .warn .imp-ck { background: rgba(245, 185, 66, .2); color: var(--warn); }
.imp-checks .bad .imp-ck { background: var(--danger-bg); color: var(--danger); }
.imp-prog { height: 6px; border-radius: 6px; background: var(--panel-3); overflow: hidden; } .imp-prog i { display: block; height: 100%; width: 40%; background: var(--accent); border-radius: 6px; animation: impslide 1.4s ease-in-out infinite; }
@keyframes impslide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.imp-found { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow: auto; }
.imp-story { display: flex; gap: 12px; align-items: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; }
.imp-story.on { border-color: var(--accent); background: var(--accent-bg); } .imp-story input { margin-top: 4px; }
.imp-prev { white-space: pre-wrap; margin-top: 6px; color: var(--muted); font-size: 13px; }

/* ---------- the brief ---------- */
.cb-story { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.cb-pick { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow: auto; }
.cb-suno { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.cb-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }
.cb-lyrics { white-space: pre-wrap; margin: 0; font: 13px/1.6 var(--font); color: var(--text); max-height: 280px; overflow: auto; }
.cb-clips { align-items: baseline; }

/* ---------- the cast review ---------- */
.cr-row { display: flex; gap: 14px; align-items: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; flex-wrap: wrap; }
.cr-row.done { border-color: rgba(62, 207, 142, .45); }
.cr-ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; background: var(--bg-2); }
.cr-none { display: grid; place-items: center; color: var(--faint); }
.cr-act { display: flex; flex-direction: column; gap: 8px; min-width: 220px; max-width: 100%; }
.cr-new { color: var(--warn); } .cr-sug { color: var(--accent-2); } .cr-ok { color: var(--ok); }
@media (max-width: 700px) { .cr-act { min-width: 0; width: 100%; } }

/* My cartoons: a card per cartoon with its post state and what to do next */
.mc-card { display: flex; gap: 14px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; align-items: flex-start; }
.mc-thumb { flex: 0 0 120px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--panel-3); display: flex; align-items: center; justify-content: center; }
.mc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mc-none { color: var(--muted); }
.mc-body { flex: 1; min-width: 0; gap: 8px; }
.mc-title { font-weight: 700; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.mc-post { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; border-radius: 8px; background: var(--panel-2, rgba(255,255,255,.03)); }
@media (max-width: 560px) { .mc-card { flex-direction: column; } .mc-thumb { flex-basis: auto; width: 100%; } }

/* the one-line safety status of an import */
.imp-safe { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; } .imp-safe.ok { color: var(--ok); } .imp-safe.bad { color: var(--danger); }

/* a cartoon's own page */
.mc-back { color: var(--muted); text-decoration: none; font-size: 13px; } .mc-back:hover { color: var(--text); }
.mc-h { margin: 0; font-size: 20px; overflow-wrap: anywhere; }
.mc-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .mc-grid { grid-template-columns: minmax(0, 1fr); } }
.mc-video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; display: block; }
.mc-novideo { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.mc-novideo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.mc-novideo-text { position: relative; align-items: center; text-align: center; padding: 16px; }
.mc-sec { padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; } .mc-sec h3 { margin: 0; font-size: 15px; }
.mc-dest .badge { margin: 0 4px 4px 0; }
.mc-words { white-space: pre-wrap; overflow-wrap: anywhere; }
.mc-thumb { position: relative; } .mc-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(0,0,0,.28); opacity: 0; transition: opacity .15s; } .mc-thumb:hover .mc-play { opacity: 1; }
