@font-face { font-family: "Cinzel"; src: url("/app/fonts/Cinzel[wght].ttf"); font-weight: 400 900; }
@font-face { font-family: "Montserrat"; src: url("/app/fonts/Montserrat[wght].ttf"); font-weight: 100 900; }
:root {
  --gold: #D19F39; --blue: #12405E; --night: #000712; --ivory: #EEEAE6;
  --ink: #1d2733; --muted: #5b6672; --line: #d9d3cb; --ok: #2e7d4f; --warn: #b26a00; --bad: #b3261e;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Montserrat", system-ui, sans-serif; color: var(--ink); background: var(--ivory); }
h1, h2, h3 { font-family: "Cinzel", serif; color: var(--blue); margin: 0 0 .6em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; margin-top: 1.4em; } h3 { font-size: 1rem; }
a { color: var(--blue); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1.4rem;
  background: var(--night); color: var(--ivory); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--gold); text-decoration: none;
  font-family: "Cinzel", serif; font-weight: 700; font-size: 1.1rem; }
.brand img { width: 34px; height: 34px; }
nav { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
nav a, .link { color: var(--ivory); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
nav a:hover, .link:hover { color: var(--gold); }
main { max-width: 1180px; margin: 0 auto; padding: 1.6rem 1.4rem 4rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.grid { display: grid; gap: 1rem; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.scenes { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
label { display: block; font-weight: 600; font-size: .9rem; margin: .8rem 0 .3rem; }
input, textarea, select { width: 100%; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: #fff; }
textarea { min-height: 4.5rem; resize: vertical; }
.hint { color: var(--muted); font-size: .85rem; margin: .25rem 0 0; }
button.btn, a.btn { display: inline-block; padding: .55rem 1rem; border-radius: 8px; border: 1px solid var(--blue);
  background: var(--blue); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.secondary { background: #fff; color: var(--blue); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--night); }
.btn.small { padding: .3rem .6rem; font-size: .85rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); font-size: .92rem; }
th { background: #f6f3ef; font-weight: 600; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: #faf8f5; }
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: #e8eef3; color: var(--blue); white-space: nowrap; }
.badge.ok { background: #e3f3e9; color: var(--ok); } .badge.warn { background: #fff1db; color: var(--warn); }
.badge.bad { background: #fde8e6; color: var(--bad); } .badge.run { background: #fff7e0; color: #8a5a00; }
.scene img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #f0ece6; }
.scene.vertical img { aspect-ratio: 9 / 16; }
.scene .placeholder { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 8px;
  background: #f0ece6; color: var(--muted); font-size: .85rem; text-align: center; padding: .5rem; }
.scene audio { width: 100%; margin-top: .4rem; }
.scene p { margin: .45rem 0; font-size: .92rem; }
.muted { color: var(--muted); }
video { width: 100%; max-height: 72vh; border-radius: var(--radius); background: #000; }
.qc li { margin: .25rem 0; }
.scene-editor { border: 1px dashed var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin: .8rem 0;
  background: #fffdf9; }
.scene-editor .row > * { flex: 1 1 140px; }
#toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--night);
  color: var(--ivory); padding: .7rem 1.1rem; border-radius: 8px; max-width: 90vw; z-index: 10; }
.status-line { font-size: .95rem; margin: .3rem 0 1rem; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
@media (max-width: 640px) { main { padding: 1rem .8rem 3rem; } }
