:root {
  --bg: #1d2130; --panel: #272c3f; --line: #3a4160; --text: #e8ebf5; --muted: #9aa3bd;
  --accent: #5b7cff; --frame: #0c0e15; --cta: #3ccf7a; --err: #ff6b6b;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.dim { color: var(--muted); font-size: 12px; }
.spacer { flex: 1; }
.btn, select { font: inherit; color: var(--text); background: #343a52; border: 1px solid #454c68;
  border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.btn:hover, select:hover { border-color: var(--accent); text-decoration: none; }
.btn.small { padding: 2px 8px; font-size: 12px; }
.btn.on { background: rgba(60, 207, 122, .15); border-color: var(--cta); color: var(--cta); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  border: 1px solid; white-space: nowrap; }
.badge.ok { color: var(--cta); border-color: rgba(60, 207, 122, .4); background: rgba(60, 207, 122, .1); }
.badge.over { color: var(--err); border-color: rgba(255, 107, 107, .45); background: rgba(255, 107, 107, .1); }
.badge.tag { color: var(--muted); border-color: var(--line); }
.grp { display: inline-flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 1px solid var(--line); }

/* lists: games and builds */
.list { max-width: 820px; margin: 0 auto; padding: 24px 16px 48px; }
.list h1 { font-size: 22px; margin: 8px 0 4px; }
.list .crumb { font-size: 13px; }
.cards { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.cards a { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; color: var(--text); }
.cards a:hover { border-color: var(--accent); text-decoration: none; }
.cards .name { font-weight: 600; font-size: 15px; }
.cards .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.cards .note { color: #c9cfe3; font-size: 13px; margin-top: 6px; }
.cards .main { flex: 1; min-width: 0; }
.log li a { color: var(--cta); text-decoration: underline; }

/* one build */
body.version { height: 100vh; display: flex; flex-direction: column; }
body.version header { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); flex-wrap: wrap; }
body.version .back { white-space: nowrap; }
body.version h1 { font-size: 15px; margin: 0; }
body.version .meta { color: var(--muted); font-size: 12px; }
body.version .note { padding: 6px 16px; color: #c9cfe3; font-size: 13px; background: #222740; }
body.version .note:empty { display: none; }
.controls { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.controls label { display: inline-flex; gap: 6px; align-items: center; }
main { flex: 1; display: flex; min-height: 0; }
.stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; min-width: 0; }
.device { background: var(--frame); border-radius: 36px; padding: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5); transform-origin: center; }
.device iframe { display: block; border: 0; border-radius: 22px; background: #000; }
.log { width: 340px; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.log-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 0; }
.log p { margin: 4px 12px 8px; }
.log ol { list-style: none; margin: 0; padding: 0 12px 12px; overflow: auto; font: 12px/1.5 ui-monospace, Consolas, monospace; }
.log li { padding: 3px 0; border-bottom: 1px solid #2c3249; word-break: break-all; }
.log li .t { color: var(--muted); }
.log li.cta b { color: var(--cta); }
.log li.err b { color: var(--err); }
@media (max-width: 760px) {
  main { flex-direction: column; }
  .log { width: auto; height: 34vh; border-left: 0; border-top: 1px solid var(--line); }
}
