:root {
  --bg: #f6f5f7; --card: #fff; --line: #e8e3e8; --text: #17141c; --muted: #6a6470;
  --red: #d7263d; --red-2: #ef4a5e; --tint: #fde8ea; --ok: #1d8a5f; --radius: 18px;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--text); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
h1, h2, h3 { letter-spacing: -.02em; margin: 0 0 .4em; }
h1 { font-size: 1.6rem; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 22px; padding: 12px 22px; background: #fffd; backdrop-filter: blur(10px); box-shadow: 0 4px 20px #0000000d; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.2rem; text-decoration: none; }
nav { display: flex; gap: 6px; flex: 1; }
nav a { text-decoration: none; padding: 7px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; }
nav a.on { background: var(--tint); color: var(--red); }
main { max-width: 1100px; margin: 0 auto; padding: 24px 18px 80px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: 0 6px 24px #3a0a1410; padding: 20px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
label { display: grid; gap: 5px; font-size: .85rem; font-weight: 600; color: var(--muted); }
input, textarea, select { font: inherit; color: var(--text); border: 1.5px solid var(--line); border-radius: 12px; padding: 9px 12px; background: #fff; width: 100%; }
textarea { min-height: 70px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--red); }
button, .btn { font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 10px 20px; cursor: pointer; background: linear-gradient(90deg, #b3182e, var(--red) 45%, var(--red-2)); color: #fff; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
button:disabled { opacity: .5; cursor: default; }
button.ghost, .btn.ghost { background: #fff; color: var(--red); border: 1.5px solid #f1c6cc; }
button.sm { padding: 6px 14px; font-size: .85rem; }
button.danger { background: #fff; color: #9a1a2a; border: 1.5px solid #f1c6cc; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--tint); color: var(--red); }
.pill.ok { background: #dcf3e7; color: var(--ok); }
.pill.gray { background: #eee; color: #555; }
.item { display: grid; gap: 6px; text-decoration: none; }
.item img.thumb { width: 100%; aspect-ratio: 9/12; object-fit: cover; border-radius: 12px; background: #eee; }
.scene { display: grid; grid-template-columns: 34px 80px 150px 1fr 1fr 1fr 80px 110px; gap: 10px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.scene .no { font-weight: 800; color: var(--red); padding-top: 28px; }
@media (max-width: 900px) { .scene { grid-template-columns: 1fr 1fr; } .scene .no { padding: 0; } }
.media { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.media figure { margin: 0; background: #faf8fa; border-radius: 12px; padding: 8px; font-size: .78rem; }
.media img, .media video { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 8px; background: #ddd; }
video.result { width: 320px; max-width: 100%; aspect-ratio: 9/16; border-radius: 16px; background: #000; }
pre.analysis { white-space: pre-wrap; font: .85rem/1.5 ui-monospace, Menlo, monospace; background: #faf8fa; padding: 12px; border-radius: 12px; }
.hooks label { flex-direction: row; display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--text); }
.hooks input { width: auto; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #17141c; color: #fff; padding: 11px 18px; border-radius: 12px; z-index: 9; }
.login { max-width: 360px; margin: 12vh auto; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid #fff8; border-top-color: #fff; border-radius: 50%; animation: s 1s linear infinite; }
@keyframes s { to { transform: rotate(1turn); } }
