:root {
  --bg: #0b1020;
  --card: #121a33;
  --text: #e9edff;
  --muted: #aab4e6;
  --accent: #5aa7ff;
  --good: #5dff9a;
  --bad: #ff5d73;
  --line: rgba(255,255,255,0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 20% 0%, #18224b, var(--bg));
  color: var(--text);
}

header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px;
}

h1 {
  margin: 0 0 6px;
  font-size: 22px;
}

.sub {
  color: var(--muted);
  font-size: 13px;
}

.grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: rgba(18,26,51,0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 35px rgba(0,0,0,0.35);
}

h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin: 10px 0 6px;
}

.label-inline {
  color: var(--muted);
  font-size: 12px;
  width: 48px;
  min-width: 48px;
}

.field {
  flex: 1;
}

textarea,
select,
input[type="range"],
input[type="number"],
input[type="text"] {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 10px;
  outline: none;
}

textarea:disabled,
input:disabled,
select:disabled {
  opacity: 0.6;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

button {
  border: 1px solid var(--line);
  background: var(--accent);
  color: #071022;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  flex: 1;
}

button.secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}

.checkbox {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
}

.hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  margin-bottom: 12px;
}

.promptBox {
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}

.maskedHint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  min-height: 18px;
}

.feedback {
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  min-height: 52px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.correctSentence {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  white-space: pre-wrap;
}

.details {
  margin-top: 12px;
}

details summary {
  cursor: pointer;
  color: var(--muted);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.good {
  color: var(--good);
  font-weight: 700;
}

.bad {
  color: var(--bad);
  font-weight: 700;
}

.diff {
  margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  white-space: pre-wrap;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #d7e2ff;
}

#reportOutput {
  margin-top: 10px;
  white-space: pre-wrap;
}