:root {
  color-scheme: light dark;
  --accent: #2ea043;
  --bg: #0f1115;
  --panel: #1b1f27;
  --text: #e8eaed;
  --muted: #9aa0a8;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5f7;
    --panel: #ffffff;
    --text: #16181d;
    --muted: #555b66;
  }
}

* { box-sizing: border-box; }

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

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.25);
}

header h1 { margin: 0; font-size: 1.4rem; }
header a { color: var(--accent); text-decoration: none; font-size: 0.9rem; }
header a:hover { text-decoration: underline; }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  background: var(--panel);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

input, select {
  font-size: 1rem;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(128, 128, 128, 0.4);
  background: transparent;
  color: var(--text);
}

button {
  font-size: 1rem;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: default; }
button:hover:not(:disabled) { filter: brightness(1.1); }

.status { min-height: 1.2em; color: var(--muted); }
.hint { font-size: 0.85rem; color: var(--muted); }

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: black;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}

video { display: none; }

canvas#overlay {
  width: 100%;
  height: 100%;
  display: block;
}

#summary-panel p { margin: 6px 0; }
#summary-panel .tier { font-size: 1.2rem; color: var(--accent); }

#history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}
