:root {
  --bg: #0d1014; --panel: #151a21; --panel-2: #1b222b; --line: #262f3a;
  --text: #e6ebf1; --muted: #9aa6b4; --accent: #4ade80; --link: #7dd3fc; --live: #e91916; --twitch: #9146ff;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 17px/1.65 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); }
img { max-width: 100%; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

.top { border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; gap: 22px; height: 60px; max-width: 1100px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.brand img { border-radius: 6px; }
.brand b { color: var(--live); font-weight: 800; }
.top nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 15px; white-space: nowrap; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); background: var(--panel-2); }

.btn { display: inline-block; padding: 9px 16px; border-radius: 9px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.btn:hover { border-color: #3a4656; }
.btn.twitch { background: var(--twitch); border-color: transparent; color: #fff; }
.btn.big { padding: 12px 20px; font-size: 16px; }
body.anon .me-only, body.signed-in .anon-only { display: none; }
.btn.me { display: inline-flex; align-items: center; gap: 8px; }
.btn.me img { border-radius: 50%; }
pre { position: relative; }
pre .copy { position: absolute; top: 8px; right: 8px; font: 600 12px Inter, system-ui, sans-serif; padding: 4px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; }
pre .copy:hover { border-color: #3a4656; }
.script-view { position: relative; }
.script-view pre { max-height: 440px; overflow: auto; }
.script-view > .copy { position: absolute; top: 8px; right: 22px; font: 600 12px Inter, system-ui, sans-serif; padding: 4px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; z-index: 1; }
.cmd-list { display: grid; gap: 6px; margin: 12px 0; }
.cmd-list pre.one { margin: 0; padding: 9px 76px 9px 14px; white-space: pre-wrap; word-break: break-all; }
.cmd-list pre.one .copy { top: 50%; transform: translateY(-50%); }
.sv { background: rgba(74,222,128,.14); color: var(--accent); border-radius: 4px; padding: 0 3px; }
.mine { background: var(--panel); border: 1px solid rgba(74,222,128,.35); border-radius: 12px; padding: 10px 14px; font-size: 14px; color: var(--muted); margin-bottom: 26px; }
.mine button { font: inherit; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; }

/* main is also .wrap, so set all padding here (".wrap" alone would zero the top/bottom). */
main.wrap { flex: 1 0 auto; width: 100%; padding: 64px 20px 80px; }
h1 { font-size: 42px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 14px; }
h2 { font-size: 26px; letter-spacing: -.01em; margin: 44px 0 10px; }
h3 { font-size: 19px; margin: 28px 0 6px; }
p, li { color: #d3dae2; }
.lead { font-size: 20px; color: var(--muted); margin-top: 0; }
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }
code { font: 14px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--panel-2); padding: 2px 6px; border-radius: 5px; }
pre { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; }
pre code { background: none; padding: 0; font-size: 13.5px; }
.note { background: var(--panel); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: 0 10px 10px 0; margin: 20px 0; }
.note.warn { border-left-color: #fbbf24; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 18px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; text-decoration: none; color: var(--text); display: block; }
a.card:hover { border-color: #3a4656; }
.card h3 { margin: 0 0 4px; font-size: 17px; }
.card p { margin: 0; font-size: 15px; color: var(--muted); }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding-left: 46px; margin: 18px 0; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--accent); }
table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 15px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.cta { margin-top: 56px; padding: 26px 28px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.cta h2 { margin-top: 0; }
.faq h3 { margin-top: 30px; }

.streamers { display: grid; gap: 10px; margin: 18px 0; }
.streamer { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.streamer img, .streamer .ph { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #6441a5; display: grid; place-items: center; font-weight: 800; color: #fff; }
.streamer b a { color: var(--text); text-decoration: none; }
.streamer .meta { color: var(--muted); font-size: 14px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); margin-right: 6px; box-shadow: 0 0 0 3px rgba(233,25,22,.25); }
.empty { color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: 12px; padding: 20px; }

footer { flex-shrink: 0; border-top: 1px solid var(--line); background: var(--panel); padding: 40px 0 44px; }
.foot { display: grid; grid-template-columns: repeat(3, 1fr) 1.4fr; gap: 24px; max-width: 1100px; }
.foot h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.foot a { display: block; color: #c5ced8; text-decoration: none; font-size: 15px; padding: 2px 0; }
.foot a:hover { color: var(--text); }
.foot-note p { font-size: 14px; color: var(--muted); }
.foot-note p.indie { font-size: 12px; line-height: 1.5; }
p.fine { font-size: 14px; color: var(--muted); }
.foot-note p a { display: inline; color: var(--link); }

.consent { position: fixed; left: 12px; bottom: 12px; z-index: 50; width: min(360px, calc(100% - 24px)); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 6px 24px rgba(0,0,0,.5); font-size: 14px; }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 10px; }
.consent div { display: flex; gap: 8px; justify-content: flex-end; }
.consent button { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; }
.consent button.primary { background: var(--accent); color: #062b12; border-color: transparent; font-weight: 700; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  h1 { font-size: 32px; }
  main.wrap { padding: 40px 20px 56px; }
  .top-in { gap: 10px; }
  .top .btn.twitch { display: none; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot-note { grid-column: 1 / -1; }
}
