:root {
  --bg: #0d0f12; --ink: #eceef1; --mute: #8a9099; --line: rgba(255,255,255,.08);
  --panel: rgba(18,21,26,.82); --accent: #ffb547; --ok: #5ad19a; --bad: #ff6b5e;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --bg: #0d0f12; } }
:root[data-theme="dark"] { --bg: #0d0f12; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: "Inter Tight", system-ui, sans-serif; overflow: hidden; }
#stage { position: fixed; inset: 0; }
#stage canvas { display: block; }

.top { position: fixed; left: 32px; top: 28px; max-width: 520px; pointer-events: none; }
.mark { font: 500 12px/1 "JetBrains Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.top h1 { font-weight: 600; font-size: 34px; line-height: 1.08; letter-spacing: -.02em; margin: 14px 0 10px; }
.sub { color: var(--mute); font-size: 15px; line-height: 1.5; margin: 0; max-width: 420px; }

.feed { position: fixed; right: 20px; top: 20px; bottom: 20px; width: 380px; display: flex; flex-direction: column;
  background: var(--panel); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.feed-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; font-size: 13px; font-weight: 500; border-bottom: 1px solid var(--line); }
.pill { font: 500 11px "JetBrains Mono", monospace; color: var(--mute); padding: 4px 8px; border: 1px solid var(--line); border-radius: 99px; }
.boards { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.bd { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px; background: rgba(255,255,255,.03); font-size: 12px; opacity: .35; transition: opacity .4s; }
.bd.on { opacity: 1; }
.bd i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.bd b { font-weight: 500; }
.bd small { color: var(--mute); margin-left: auto; font: 11px "JetBrains Mono", monospace; }
.log { flex: 1; overflow: hidden; padding: 8px 12px; font: 11.5px/1.55 "JetBrains Mono", monospace; display: flex; flex-direction: column-reverse; }
.log div { flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #c9ced6; animation: in .35s ease-out; }
.log div span.who { display: inline-block; min-width: 74px; }
.log div span.dir { color: var(--mute); margin-right: 6px; }
@keyframes in { from { opacity: 0; transform: translateY(-4px); } }
.feed-foot { padding: 10px 14px; font-size: 11px; color: var(--mute); border-top: 1px solid var(--line); }
.feed-foot code { font-family: "JetBrains Mono", monospace; color: #b8bec7; }

.steps { position: fixed; left: 32px; right: 420px; bottom: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.line { font-size: 22px; font-weight: 500; letter-spacing: -.01em; line-height: 1.3; max-width: 640px; min-height: 58px; }
.line em { font-style: normal; color: var(--accent); }
.line .k { display: block; font: 500 12px "JetBrains Mono", monospace; color: var(--mute); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.bar { display: flex; align-items: center; gap: 10px; }
.bar button { background: rgba(255,255,255,.06); color: var(--ink); border: 1px solid var(--line); border-radius: 99px; height: 34px; min-width: 34px; font: 500 14px "Inter Tight"; cursor: pointer; padding: 0 12px; }
.bar button:hover { background: rgba(255,255,255,.12); }
.dots { display: flex; gap: 6px; }
.dots span { width: 30px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.12); cursor: pointer; overflow: hidden; position: relative; }
.dots span.done { background: var(--accent); }
.dots span.cur::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }

.tag { font: 500 10.5px "JetBrains Mono", monospace; color: #e8ebef; background: rgba(13,15,18,.78); border: 1px solid var(--line); padding: 3px 7px; border-radius: 6px; white-space: nowrap; transform: translateY(-14px); }
.tag.miss { color: var(--bad); border-color: rgba(255,107,94,.4); }
.tag.hit { color: var(--ok); border-color: rgba(90,209,154,.4); }

@media (max-width: 860px) {
  .top { left: 16px; right: 16px; top: 16px; }
  .top h1 { font-size: 24px; }
  .sub { font-size: 13px; }
  .feed { left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; height: 34vh; }
  .boards { display: none; }
  .steps { left: 16px; right: 16px; bottom: calc(34vh + 28px); }
  .line { font-size: 16px; min-height: 44px; }
}
