@font-face {
  font-family: Magistral;
  src: url("/magistral-medium-italic.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: dark;
  font-family: Magistral, system-ui, "Segoe UI", sans-serif;
  background: #130c1a;
  color: #fff;
  --surface: #21142c;
  --line: #45344f;
  --muted: #cbbbd5;
  --lilac: #d096ff;
  --orange: #f56220;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 82% 0, #371545 0, transparent 47%); }
.top { border-bottom: 1px solid var(--line); background: #140c1be0; }
.top-inner, main { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.top-inner { height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: white; }
.brand b { font-size: 25px; letter-spacing: -.08em; }
.brand small { padding-left: 16px; border-left: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.brand span, h1 span { color: var(--orange); }
nav { display: flex; gap: 8px; }
main { padding-bottom: 64px; }
.hero { position: relative; padding: 66px 0 38px; overflow: clip; }
.hero::after { position: absolute; z-index: -1; content: ""; inset: 12% 0 auto auto; width: 15rem; height: 8rem; border: 1px solid #862cc4; transform: skew(-20deg); }
.eyebrow { color: var(--lilac); font-weight: 720; font-size: .82rem; letter-spacing: .10em; text-transform: uppercase; }
h1 { margin: .15em 0; font-size: clamp(2.4rem, 6vw, 5.3rem); font-weight: 850; line-height: 1.03; letter-spacing: -.065em; }
h1 em { font-style: normal; color: var(--lilac); }
h2, h3 { margin: 0; line-height: 1.18; letter-spacing: -.025em; }
.hero > p:last-child { color: var(--muted); margin: 18px 0 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.gate { max-width: 460px; padding: 28px; }
.gate form { display: grid; gap: 14px; margin: 18px 0 12px; }
.gate > p { line-height: 1.55; color: var(--muted); }
.filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(104px, .75fr) minmax(0, 1fr) auto; align-items: end; gap: 14px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: .875rem; font-weight: 620; }
button, select, input { font: inherit; }
button { cursor: pointer; border: 1px solid transparent; border-radius: 10px; min-height: 46px; padding: 0 16px; font-weight: 700; }
button:disabled { opacity: .48; cursor: default; }
.primary { background: var(--orange); color: #150b16; }
.primary:hover:enabled { background: #ff803f; }
.quiet { background: #30203c; border-color: var(--line); color: white; }
.quiet:hover:enabled { background: #442657; }
input, select { width: 100%; min-width: 0; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #140e1b; color: white; font-size: 1rem; }
input::placeholder { color: #b6a4c4; }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 3px; }
.section-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 14px; }
.section-title p { margin: 0; font-size: .9rem; color: var(--muted); }
#notice { margin: 0; color: #ffae99; }
#notice:not(:empty) { margin: 0 0 18px; }
#results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card { text-align: left; min-width: 0; display: grid; align-content: start; gap: 9px; background: var(--surface); border: 1px solid var(--line); color: white; font-weight: 400; padding: 17px; border-radius: 14px; overflow-wrap: anywhere; }
.card:hover { border-color: var(--lilac); background: #2a1938; }
.card strong { font-size: 1.12rem; }
.card small { color: var(--lilac); font-size: .82rem; }
.card span { font-size: .925rem; line-height: 1.45; color: var(--muted); }
.pages { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 24px; }
.users .section-title { margin-top: 0; }
.user-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; border-top: 1px solid var(--line); padding: 12px 0; overflow-wrap: anywhere; }
.user-row strong { margin-right: auto; }
.user-row span { color: var(--muted); }
dialog { padding: 0; color: white; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; width: min(850px, calc(100% - 24px)); max-height: 92dvh; }
dialog::backdrop { background: #0a050dcc; }
.detail-body { padding: clamp(16px, 4vw, 30px); }
.detail-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-body h2 { margin: 14px 0; font-size: clamp(1.35rem, 3.8vw, 2.2rem); }
video { display: block; width: 100%; max-height: 55vh; background: #09070b; border-radius: 12px; }
.video-message { background: #160e1e; color: var(--muted); padding: 18px; border-radius: 10px; }
.filename { color: var(--lilac); overflow-wrap: anywhere; }
#copy-status { margin: 0; color: var(--lilac); }
#transcript { line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 14px; }
mark { background: #f7a16f; color: #130c1a; border-radius: 3px; }
@media (max-width: 800px) {
  .filters { grid-template-columns: 1fr 1fr; }
  #results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .top-inner, main { width: calc(100% - 28px); }
  .brand small { display: none; }
  .hero { padding: 38px 0 24px; }
  .filters, #results { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
}
