:root {
  --bg: #0a0d0a;
  --surface: #161a16;
  --line: #2e362e;
  --text: #f2f5f2;
  --muted: #98a398;
  --accent: #16c60c;
  --warn: #ffb020;
  --bad: #ff5c5c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 800; letter-spacing: 0.04em; }
.account { font-size: 14px; color: var(--muted); }
.account.ok { color: var(--accent); }

.panel { padding: 22px; max-width: 1100px; margin: 0 auto; }
.panel[hidden] { display: none; }
.panel h2 { margin: 0 0 6px; font-size: 22px; }

.muted { color: var(--muted); font-size: 14px; line-height: 1.5; }

button {
  font-family: inherit;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.primary {
  min-height: 56px; padding: 0 26px; margin-top: 14px;
  border: none; background: var(--accent); color: #04210a; font-size: 17px;
}

.secondary {
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}

/* -------------------------------------------------------------- disclosure */

/* Sized to be read, not skimmed past. It sits above the button rather than
   beside it, and nothing collapses it. */
.disclosure {
  margin: 16px 0 22px;
  padding: 18px 20px;
  max-width: 680px;
  border: 1px solid rgba(255, 176, 32, 0.45);
  border-left: 4px solid var(--warn);
  border-radius: 12px;
  background: rgba(255, 176, 32, 0.07);
}

.disclosure h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--warn);
}

.disclosure ul { margin: 0; padding-left: 20px; }

.disclosure li {
  margin-bottom: 9px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.disclosure li:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ signin */

.code-line { font-size: 17px; }
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 40px; font-weight: 800; letter-spacing: 0.16em;
  margin: 8px 0 14px; color: var(--accent);
}

/* ----------------------------------------------------------------- quality */

.quality-row { margin: 14px 0 4px; }

.quality-row label {
  display: inline-block; margin-right: 10px;
  font-size: 14px; font-weight: 600;
}

.quality-row select {
  padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--muted);
  background: transparent; color: inherit;
  font: inherit;
}

/* Capped so the caveat reads as a paragraph rather than a banner running the
   full width of the shelf. */
.quality-row .muted { margin: 8px 0 0; max-width: 62ch; }

/* ------------------------------------------------------------------- shelf */

.shelf { display: flex; gap: 16px; overflow-x: auto; padding: 16px 0 8px; }

.tile {
  flex: 0 0 auto;
  width: 152px; height: 228px;   /* 2:3, matching Image_Poster */
  padding: 12px;
  display: flex; align-items: flex-end;
  border: 2px solid var(--line); border-radius: 16px;
  background: var(--surface) center / cover no-repeat;
  color: var(--text); text-align: left;
  position: relative; overflow: hidden;
}

.tile:disabled { opacity: 0.4; cursor: default; }
.tile::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0) 65%);
}
.tile span {
  position: relative; z-index: 1;
  font-size: 13px; font-weight: 700; line-height: 1.25;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}

/* ----------------------------------------------------------------- session */

.session-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.steps { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 8px; }

.steps li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--muted);
}

.steps li::before {
  content: ''; width: 10px; height: 10px; border-radius: 50%;
  background: var(--line); flex: 0 0 auto;
}

.steps li.active { color: var(--text); }
.steps li.active::before { background: var(--warn); }
.steps li.done { color: var(--text); }
.steps li.done::before { background: var(--accent); }
.steps li.blocked { color: var(--warn); }
.steps li.blocked::before { background: var(--warn); }
.steps li.failed { color: var(--bad); }
.steps li.failed::before { background: var(--bad); }

video {
  width: 100%; aspect-ratio: 16 / 9;
  background: #000; border-radius: 14px; border: 1px solid var(--line);
  display: block;
}

.gate {
  margin-top: 18px; padding: 16px 18px;
  border: 1px solid rgba(255,176,32,0.4); border-radius: 14px;
  background: rgba(255,176,32,0.08);
}
.gate[hidden] { display: none; }
.gate h3 { margin: 0 0 8px; font-size: 17px; color: var(--warn); }
.gate p { margin: 0 0 8px; font-size: 14px; line-height: 1.55; }

details { margin-top: 16px; }
summary { cursor: pointer; color: var(--muted); font-size: 14px; }
pre {
  background: #060806; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; overflow-x: auto;
  font-size: 12px; line-height: 1.5; color: var(--muted);
}
