/* Popcorn Introductions: TaskTackler's purple and greys, in the system font
   Zoom itself uses, light and dark to follow the Zoom app's own setting. */

:root {
  --bg: #ffffff;
  --surface: #f6f6fd;
  --ink: #1f2933;
  --heading: #303848;
  --quiet: #52606d;
  --line: #e4e7eb;
  --accent: #6d48e6;
  --accent-strong: #592ae0;
  --accent-soft: #f1edfe;
  --on-accent: #ffffff;
  --warn: #c0143c;
  --warn-soft: #fde8ec;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1f26;
    --surface: #262a35;
    --ink: #e8eaef;
    --heading: #ffffff;
    --quiet: #9aa5b1;
    --line: #363b48;
    --accent: #9b82f5;
    --accent-strong: #b3a0f8;
    --accent-soft: #2e2850;
    --on-accent: #16131f;
    --warn: #ff7a93;
    --warn-soft: #3a1f27;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.panel, .page { padding: 16px 16px 40px; }

[hidden] { display: none !important; }

/* ---- Header ---- */
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.brand img { border-radius: 8px; flex: none; }
.brand h1 { margin: 0; font-size: 16px; font-weight: 700; color: var(--heading); line-height: 1.2; }
.page h1 { font-size: 20px; color: var(--heading); }
.tag { font-size: 11px; font-weight: 600; color: var(--quiet); letter-spacing: 0.02em; }
.byline { margin: 1px 0 0; font-size: 12px; color: var(--quiet); }
.byline a { color: var(--quiet); text-decoration: none; }
.byline a:hover { color: var(--accent); text-decoration: underline; }

.notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--warn-soft);
  color: var(--ink);
  font-size: 13px;
}

/* ---- The round ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
}

.lead { margin: 0 0 14px; color: var(--quiet); font-size: 14px; }
.label { margin: 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.now-name { margin: 2px 0 0; font-size: 24px; font-weight: 700; color: var(--heading); line-height: 1.25; overflow-wrap: anywhere; }
.next-name { margin: 4px 0 14px; color: var(--quiet); font-size: 14px; }
.count { margin: 6px 0 14px; color: var(--quiet); font-size: 13px; }

.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
#progress-bar { height: 100%; width: 0; background: var(--accent); transition: width 0.25s ease; }

button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
button:disabled { opacity: 0.45; cursor: default; }

button.primary {
  display: block;
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 700;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
button.primary:hover:not(:disabled) { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }

button.link {
  margin-top: 8px;
  border: none;
  color: var(--quiet);
  font-weight: 500;
  text-decoration: underline;
}

/* ---- Who's done, who's up, who's next ---- */
.order { list-style: none; margin: 12px 0 0; padding: 0; font-size: 14px; counter-reset: turn; }
.order:empty { display: none; }
.order li { padding: 6px 10px; border-radius: 6px; display: flex; gap: 8px; counter-increment: turn; }
.order li::before { content: counter(turn); color: var(--quiet); min-width: 1.4em; text-align: right; font-size: 12px; line-height: 21px; }
.order .done { color: var(--quiet); text-decoration: line-through; }
.order .now { background: var(--accent-soft); font-weight: 700; color: var(--heading); }
.order .left { color: var(--quiet); font-style: italic; }
.secondary { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.secondary button { flex: 1; }

/* ---- Options and test tools, folded away ---- */
.drawer { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.drawer summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--quiet); }
.drawer[open] summary { margin-bottom: 10px; }
.drawer h2 { font-size: 13px; margin: 16px 0 6px; color: var(--heading); }

fieldset { border: none; margin: 0 0 12px; padding: 0; }
legend { font-size: 12px; font-weight: 600; color: var(--quiet); margin-bottom: 4px; }
fieldset label, .check { display: block; font-size: 13px; margin: 4px 0; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--accent); margin-right: 6px; }
.hint { display: block; color: var(--quiet); font-size: 12px; margin: 2px 0 0 22px; }
.drawer > .hint { margin-left: 0; }

.buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.buttons.small button { font-size: 12px; padding: 3px 8px; }

.result { margin: 0 0 6px; font-size: 12px; font-weight: 600; min-height: 1.2em; color: var(--quiet); }
.result.error { color: var(--warn); }

.people { list-style: none; margin: 8px 0 0; padding: 0; }
.people li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.name { font-weight: 600; }

textarea {
  width: 100%;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.log { margin: 6px 0 0; padding-left: 18px; }
.log li { margin-bottom: 6px; }
.log strong { font-weight: 600; font-size: 12px; }
.log pre { margin: 2px 0 0; font-size: 11px; white-space: pre-wrap; word-break: break-word; color: var(--quiet); }

/* Demo mode (pictures for the Zoom Marketplace): no test-only parts. */
html[data-demo] #test-tools,
html[data-demo] .tag,
html[data-demo] #status { display: none !important; }
