@font-face { font-family: "League Spartan"; src: url("../fonts/league-spartan-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; }

:root { --accent: #8d2556; --bg: #f3f3f1; --card: #fff; --ink: #17171a; --mute: #6b6b73; --line: #dedcd6; }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 Inter, system-ui, sans-serif; background: var(--bg); color: var(--ink); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 7px 12px; }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.ghost { background: transparent; }
button.danger { color: #b3261e; }
.lbl { color: var(--mute); font-size: 13px; display: inline-block; }
label.lbl { margin-top: 8px; margin-bottom: 4px; }
.hint { color: var(--mute); font-size: 12.5px; margin: 6px 0 0; }
.msg { margin: 6px 0 0; font-size: 13px; }
.msg.warn { color: #b3261e; }
.mono { font-variant-numeric: tabular-nums; }

.top { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 3px solid var(--accent); padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }
.sections { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.sections a { padding: 6px 14px; text-decoration: none; color: var(--ink); background: var(--card); }
.sections a.on { background: var(--ink); color: #fff; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills button { border-radius: 999px; }
.pills button.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: var(--card); }
.seg button.on { background: var(--ink); color: #fff; }

main { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 16px; padding: 16px; max-width: 1200px; margin: 0 auto; }
@media (max-width: 760px) { main { grid-template-columns: 1fr; } }
.left { position: sticky; top: 70px; align-self: start; }
@media (max-width: 760px) { .left { position: static; } }
.stage { aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; }
#nPreview { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.transport { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.transport input { flex: 1; min-width: 0; }

.right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.card h2 { font-size: 15px; font-weight: 650; margin: 0 0 4px; }
textarea, input[type=number] { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; }
textarea { resize: vertical; display: block; }
.row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 10px; }

.slot { margin-top: 10px; border: 1px dashed var(--line); border-radius: 10px; padding: 10px; }
.slot h3 { margin: 0 0 6px; font-size: 13px; font-weight: 650; }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.thumb { position: relative; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: #ddd; border: 2px solid transparent; }
.thumb.sel { border-color: var(--accent); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; padding: 0; border-radius: 50%; font-size: 11px; line-height: 18px; background: rgba(0,0,0,.6); color: #fff; border: 0; }
.thumb .tag { position: absolute; left: 3px; bottom: 3px; font-size: 10px; padding: 0 4px; border-radius: 4px; background: rgba(0,0,0,.6); color: #fff; }
.addbtn { width: 64px; height: 64px; border-radius: 8px; border: 1px dashed var(--mute); display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12px; color: var(--mute); cursor: pointer; background: #fafafa; }
.startrow { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; }
.startrow input { flex: 1; }
.exportcard { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.exportcard .msg, .exportcard progress { flex-basis: 100%; width: 100%; }
