:root {
  --bg: #1c1230;
  --bg2: #2a1b47;
  --card: #ffffff;
  --ink: #2a2140;
  --muted: #6b6480;
  --accent: #c9a24b;
  --accent2: #e5c877;
  --ok: #3fa34d;
  --bad: #cc4b5a;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.18);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 600px at 50% -10%, var(--bg2), var(--bg));
  min-height: 100vh;
}
a { color: var(--accent); }
h1, h2, h3 { font-weight: 700; line-height: 1.15; }
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 18px 60px; }
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 18px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px; width: 100%;
}
.brand { text-align: center; color: #fff; margin-bottom: 18px; }
.brand .ring { font-size: 40px; }
.brand h1 { margin: 6px 0 2px; color: #fff; }
.brand p { margin: 0; color: #d9cfef; }
label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
input, select, button, textarea {
  font: inherit; width: 100%; padding: 13px 14px; border-radius: 12px;
  border: 1px solid #ddd6ea; background: #fbfaff; color: var(--ink);
}
button {
  cursor: pointer; border: none; font-weight: 700;
  background: linear-gradient(180deg, var(--accent2), var(--accent)); color: #3a2c00;
}
button.secondary { background: #efeaf7; color: var(--ink); }
button.ghost { background: transparent; border: 1px solid #ddd6ea; color: var(--ink); }
button.danger { background: #fbe7ea; color: var(--bad); }
button:disabled { opacity: .5; cursor: not-allowed; }
button + button { margin-top: 10px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; }
.muted { color: var(--muted); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: #efeaf7; color: var(--ink); }
.msg { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.msg.err { background: #fbe7ea; color: var(--bad); }
.msg.ok { background: #e7f5e9; color: var(--ok); }
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 18px; margin-top: 12px; font-size: 18px;
}
.opt .k { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(0,0,0,.08); font-weight: 800; flex: 0 0 auto; }
.opt.correct { outline: 3px solid var(--ok); }
.opt.wrong { outline: 3px solid var(--bad); opacity: .7; }
.big-code { font-size: 34px; letter-spacing: 6px; font-weight: 800; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid #eee; }
.hint { font-size: 13px; color: var(--muted); }
