:root {
  --bg: #0a0a0b;
  --bg-2: #121214;
  --card: #18181b;
  --line: #26262b;
  --text: #f5f5f6;
  --muted: #a1a1aa;
  --accent: #ffc300;
  --accent-ink: #141414;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; overflow: hidden;
}

.bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 17px; }
.tag { font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.grow { flex: 1; }
button, .cta {
  font: inherit; font-weight: 600; font-size: 14px; border-radius: 999px; padding: 7px 15px;
  cursor: pointer; text-decoration: none; white-space: nowrap; border: 1px solid transparent;
}
button:disabled { opacity: .45; cursor: default; }
.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.ghost:hover:not(:disabled) { border-color: #3a3a40; }
.primary { background: var(--text); color: #111; }
.cta { background: var(--accent); color: var(--accent-ink); }

.lang select { font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.note { margin: 0; padding: 6px 16px; font-size: 12.5px; color: var(--muted); background: var(--bg-2); border-bottom: 1px solid var(--line); }

main { flex: 1; min-height: 0; display: grid; grid-template-rows: 1fr minmax(260px, 42%); position: relative; }
#stage { min-height: 0; position: relative; background: #000; }
#dock { min-height: 0; border-top: 1px solid var(--line); }

#loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--bg); color: var(--muted); font-size: 14px; }
#loading[hidden] { display: none; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

#unsupported { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; background: var(--bg); text-align: center; }
#unsupported[hidden] { display: none; }
#unsupported > div { max-width: 560px; display: grid; gap: 14px; justify-items: center; }
#unsupported h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
#unsupported p { margin: 0; color: var(--muted); }
#unsupported video { width: 100%; border-radius: 12px; border: 1px solid var(--line); }

/* Pickers the page shows for the editor's requests. */
.sheet { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(0, 0, 0, .55); padding: 16px; }
.sheet > div { width: min(420px, 100%); max-height: 80vh; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 12px; }
.sheet h3 { margin: 0; font-size: 16px; }
.sheet .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet .opts button { background: var(--bg-2); color: var(--text); border-color: var(--line); }
.sheet .opts button:hover { border-color: var(--accent); }
.sheet input[type=text] { font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.sheet .row { display: flex; justify-content: flex-end; gap: 8px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 11; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; font-size: 14px; max-width: calc(100vw - 32px); }

@media (max-width: 899px) {
  .tag, .cta { display: none; }
  .bar { padding: 8px 12px; gap: 8px; }
  main { grid-template-rows: minmax(0, 46%) 1fr; }

}

@media (max-width: 599px) {
  #add { display: none; }
  .lang select { padding: 6px 8px; }
  .brand span { display: none; }
}
