:root {
  color-scheme: light dark;
  --bg: #0f172a;
  --card: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --good: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --border: #334155;
  --btn: #0284c7;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f1f5f9;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #cbd5e1;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}
.cc-app {
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem 1rem 2.5rem;
}
.cc-header { margin-bottom: 1rem; }
.cc-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.cc-header h1 { margin: 0 0 0.35rem; font-size: 1.65rem; }
.cc-lead { margin: 0; color: var(--muted); font-size: 0.95rem; }
.cc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.cc-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.75rem 0 0.35rem;
}
.cc-optional { font-weight: 400; color: var(--muted); }
.cc-input {
  width: 100%;
  font-size: 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: inherit;
}
.cc-textarea { resize: vertical; min-height: 3rem; }
.cc-callout {
  margin: 0.85rem 0;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  font-size: 0.9rem;
}
.cc-privacy {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.75rem 0 1rem;
}
.cc-btn {
  display: block;
  width: 100%;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.95rem 1rem;
  border: none;
  border-radius: 12px;
  background: var(--border);
  color: var(--text);
  cursor: pointer;
}
.cc-btn-primary { background: var(--btn); color: #fff; }
.cc-btn:active { transform: scale(0.98); }
.cc-muted { color: var(--muted); font-size: 0.9rem; }
.cc-profile { margin: 0.75rem 0; padding: 0.75rem; border-radius: 10px; border: 1px dashed var(--border); }
.cc-profile-title { margin: 0 0 0.35rem; font-weight: 700; }
.cc-profile-row { margin: 0.25rem 0; display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.9rem; }
.cc-progress {
  height: 10px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 1rem 0;
}
.cc-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.25s ease;
}
.cc-status { font-size: 0.95rem; min-height: 1.4em; }
.cc-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}
.cc-badge.good { background: rgba(34, 197, 94, 0.2); color: var(--good); }
.cc-badge.warning { background: rgba(245, 158, 11, 0.2); color: var(--warn); }
.cc-badge.fail { background: rgba(239, 68, 68, 0.2); color: var(--bad); }
.cc-ref { font-size: 0.95rem; }
.cc-form-error {
  margin: 0.75rem 0 0;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.15);
  color: var(--bad);
  font-size: 0.92rem;
}
.cc-console-hint { background: rgba(56, 189, 248, 0.18); }

/* Game console / TV browsers — larger targets, readable from couch distance */
body.cc-console .cc-app { max-width: 720px; font-size: 1.05rem; }
body.cc-console .cc-header h1 { font-size: 2rem; }
body.cc-console .cc-input,
body.cc-console .cc-btn {
  font-size: 1.15rem;
  padding: 1.05rem 1.1rem;
  min-height: 3.25rem;
}
body.cc-console .cc-btn-primary { font-size: 1.2rem; min-height: 3.5rem; }
body.cc-console .cc-progress { height: 14px; }
body.cc-console .cc-status { font-size: 1.05rem; }

.cc-input:focus-visible,
.cc-btn:focus-visible,
select.cc-input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
