/* Shared by index2.html and admin2.html: top bar and score cards. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: dark;
  --paper: #0c0c11;
  --panel: #16161e;
  --panel-border: #33333f;
  --ink: #e9e8ee;
  --ink-strong: #ffffff;
  --muted: #bdbcc8;
  --faint: #a3a2b0;
  --rule: #33333f;
  --accent: #b04dff;
  --green: #35d07f;
  --green-soft: #0b4a2a;
  --hi: #7a1450;
  --editor-bg: #0c0c11;
  --inst: #16161e; /* background */
  --neon: #c069ff; /* thin highlights: lines, outlines, light text */
  --fill: #7d1fd1; /* filled highlights, white text on top */
  --mono: 'Menlo', 'Monaco', 'Consolas', monospace;
}

html, body { height: 100%; }


/* ── Live instructions from admin.html ───────────── */
.instructions {
  grid-column: 1 / -1;
  padding: 10px 28px;
  background: #000;
  color: #e9e8ee;
  font-size: 1.1rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 30vh;
  overflow-y: auto;
}

.instructions[hidden] { display: none; }

.instructions b { color: var(--neon); font-weight: normal; margin-right: 6px; }

/* ── Left: score ─────────────────────────────────── */
.score {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--panel-border);
}

.subtitle {
  font-size: 0.85rem;
  color: var(--faint);
  font-style: italic;
}

.body h1 {
  font-size: 1.8rem;
  font-weight: normal;
  color: var(--ink-strong);
  margin: 4px 0 6px;
}

.cards {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 28px 0;
}

.card { display: none; max-width: 640px; margin: 0 auto; }
.card.active { display: flex; flex-direction: column; min-height: 100%; }

.kicker {
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 18px;
}

.body { flex: 1; }

.credit {
  font-size: 0.9rem;
  color: var(--faint);
  margin-bottom: 16px;
}

.credit em { font-style: normal; color: var(--faint); }
.credit a, .body a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.description, .body ul, .note {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
}

.description + .description { margin-top: 12px; }
.body ul { margin-top: 12px; padding-left: 1.4em; }
.body ul li + li { margin-top: 4px; }

.note {
  font-size: 0.88rem;
  color: var(--faint);
  font-style: italic;
  margin-top: 24px;
}

/* code block */
.label {
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 28px 0 6px;
}

.code-block {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  display: flex;
  overflow: hidden;
}

.code-block code {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.5;
  padding: 14px 16px;
  white-space: pre;
  overflow-x: auto;
}

.hl-str { color: #5fe39b; }
.hl-num { color: #ffa552; }
.hl-fn  { color: #4cc9ff; }

.side-btn {
  flex: none;
  background: none;
  border: none;
  border-left: 1px solid var(--panel-border);
  color: var(--faint);
  font: 0.7rem var(--mono);
  padding: 0 14px;
  cursor: pointer;
}

.side-btn:hover { background: #2a2a36; color: var(--muted); }
.side-btn.done { color: #5fe39b; }

.reset-btn {
  margin-top: 12px;
  font: 0.82rem var(--mono);
  color: var(--paper);
  background: var(--editor-bg);
  border: 1px solid #2e3038;
  border-radius: 6px;
  padding: 9px 16px;
  cursor: pointer;
}

.reset-btn:hover { background: #252730; color: #a3be8c; }

/* score flow */
.op-text {
  display: block;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
  text-transform: lowercase;
}

.op-text .sub { font-size: 0.86rem; color: var(--faint); font-style: italic; }

.op-text code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: #2a2a36;
  padding: 1px 6px;
  border-radius: 3px;
  color: #ff8ac4;
}

.op-text.big { font-size: 1.25rem; color: var(--ink); margin: 24px auto; }

.arrow { display: block; margin: 18px auto; }

.stage {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.stage-label {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}

/* collapsible stage: ~4 lines, blurred fade, expand button */
.collapsible {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.collapsible .stage { margin: 0; }

.collapsible.collapsed .stage {
  max-height: calc(4 * 1.65em + 16px);
  overflow: hidden;
}

.collapsible.collapsed::after {
  content: '';
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 1px;
  height: 3.4em;
  border-radius: 0 0 7px 7px;
  background: linear-gradient(to bottom, transparent, var(--panel) 85%);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 60%);
  mask-image: linear-gradient(to bottom, transparent, #000 60%);
  pointer-events: none;
}

.expand-btn {
  display: block;
  margin: 8px auto 0;
  font: 0.75rem var(--mono);
  color: var(--faint);
  background: none;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 4px 12px;
  cursor: pointer;
}

.expand-btn:hover { color: var(--ink); border-color: var(--accent); }

/* example notes: anything works here, so they are greyed out */
.loose { color: #93929f; }

.loose-note {
  text-align: center;
  font-style: italic;
  font-size: 0.86rem;
  color: var(--faint);
  margin-top: 10px;
}

.hi { background: var(--hi); border-radius: 3px; padding: 0 2px; }

.gather {
  margin: 28px auto 0;
  max-width: 420px;
  text-align: center;
  font-style: italic;
  font-size: 0.95rem;
  color: #d7b3ff;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  text-transform: lowercase;
}

.note-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8em;
  color: #5fe39b;
  background: #101017;
  border: 1px solid var(--green-soft);
  border-radius: 4px;
  padding: 1px 7px;
  margin: 2px 1px;
  cursor: pointer;
  text-transform: none;
}

.note-chip:hover { background: #16301f; border-color: #35d07f; }
.note-chip.done { background: #0d6b3a; color: #fff; }

/* ── One colour per instrument, used everywhere its name appears ── */
[data-instrument=general] { --inst: #34344a; --neon: #c9c9e8; --fill: #56567a; }
[data-instrument=strudel] { --inst: #0a3c69; --neon: #22b8ff; --fill: #0077b3; }
[data-instrument=drums]   { --inst: #6d0e39; --neon: #ff4596; --fill: #c8005c; }
[data-instrument=sampler] { --inst: #454d05; --neon: #d2ee1c; --fill: #697800; }
[data-instrument=wave]    { --inst: #0a5233; --neon: #1fd873; --fill: #007a3d; }
[data-instrument=unlock]  { --inst: #471a80; --neon: #b768ff; --fill: #7d1fd1; }
[data-instrument=speech]  { --inst: #6e3a05; --neon: #ff9330; --fill: #ad5200; }
.inst { background: var(--inst); color: #fff; border-radius: 4px; padding: 3px 8px; }
svg.arrow line { stroke: var(--neon); }
svg.arrow polygon { fill: var(--neon); }
