:root {
  --navy: #1b365d;
  --navy-2: #12243f;
  --teal: #0f6b5c;
  --teal-2: #14967f;
  --gold: #c4a35a;
  --slate: #334155;
  --muted: #64748b;
  --line: #cbd5e1;
  --bg: #e8eef4;
  --card: #ffffff;
  --red: #991b1b;
  --red-bg: #fecaca;
  --amber: #92400e;
  --amber-bg: #fef3c7;
  --green: #166534;
  --green-bg: #dcfce7;
  --blue-bg: #dbeafe;
  --shadow: 0 10px 30px rgba(27, 54, 93, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Noto Sans", "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  background:
    radial-gradient(900px 400px at 10% -10%, #d7efe9 0%, transparent 50%),
    radial-gradient(700px 300px at 100% 0%, #f7ead0 0%, transparent 46%),
    var(--bg);
  color: var(--slate);
  font-size: 16px;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, .choice:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
h1, h2, h3 { margin: 0 0 .4rem; color: var(--navy); }
.hidden { display: none !important; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--navy); color: #fff; padding: 8px 16px; min-height: 48px;
  position: sticky; top: 0; z-index: 20;
}
.brand { font-weight: 800; letter-spacing: .04em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brand em { color: var(--gold); font-style: normal; }
.pill {
  display: inline-block; padding: .15rem .55rem; border-radius: 999px;
  background: #0b2a22; color: #b7f0e3; font-size: .72rem; font-weight: 800;
}
.meta { font-size: .85rem; opacity: .9; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 16px; }
.hero { text-align: center; padding: 28px 8px 12px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.join { max-width: 480px; margin: 0 auto; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 16px;
}
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
.btn {
  border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 800;
  background: var(--teal); color: #fff;
}
.btn:hover { background: var(--teal-2); }
.btn.navy { background: var(--navy); }
.btn.gold { background: var(--gold); color: var(--navy-2); }
.btn.ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn.danger { background: var(--red); }
.btn.warn { background: #b45309; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.teacher-head { justify-content: space-between; align-items: flex-end; margin-bottom: 4px; }
label { display: block; font-size: 12px; font-weight: 800; color: var(--muted); margin: 8px 0 4px; text-transform: uppercase; }
input { width: 100%; border: 2px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; }
.k { font-size: 11px; font-weight: 800; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; background: #f8fafc; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.chip { padding: 4px 10px; border-radius: 999px; background: #e2e8f0; font-size: 12px; font-weight: 800; color: var(--muted); }
.chip.on { background: var(--teal); color: #fff; }
.chip.done { background: var(--navy); color: #fff; }
canvas { width: 100%; background: #0b1c33; border-radius: 12px; display: block; image-rendering: pixelated; }
.choices { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.choice {
  text-align: left; border: 2px solid var(--line); background: #fff;
  border-radius: 12px; padding: 12px 14px; font-weight: 800; color: var(--navy); width: 100%;
}
.choice.picked { border-color: var(--teal); background: #e6f4f1; }
.blocks { display: flex; flex-direction: column; gap: 6px; min-height: 120px; }
.block {
  background: #12324a; color: #e8f4ff; border-radius: 8px; padding: 8px 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.block.control { background: var(--teal); }
.block.sense { background: #7c3a1d; }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 12px 0; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; text-align: center; padding: 8px; }
.kpi b { display: block; font-size: 22px; color: var(--navy); }
.kpi span { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { background: var(--navy); color: #fff; text-align: left; padding: 6px 8px; }
.table td { border-bottom: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
.status { font-weight: 800; padding: 2px 6px; border-radius: 6px; font-size: 12px; }
.st-red { background: var(--red-bg); color: var(--red); }
.st-amber { background: var(--amber-bg); color: var(--amber); }
.st-green { background: var(--green-bg); color: var(--green); }
.st-gray { background: #e2e8f0; color: var(--slate); }
.st-blue { background: var(--blue-bg); color: #1e3a8a; }
.log { max-height: 280px; overflow: auto; font-size: 13px; }
.log div { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.test { padding: 4px 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.test.pass { color: var(--green); }
.test.fail { color: var(--red); }
.banner { background: var(--navy); color: #fff; text-align: center; padding: 16px; font-size: 22px; font-weight: 800; border-radius: 10px; margin-bottom: 8px; }
.banner.spot { background: #0f766e; font-size: 16px; }
.hint { color: var(--muted); font-size: 13px; }
.footer-note { text-align: center; color: var(--muted); font-size: .8rem; padding: 1.2rem; }
@media (max-width: 900px) {
  .split, .kpis { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .top { flex-wrap: wrap; }
  .meta { order: 3; width: 100%; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
