* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--tg-theme-bg-color, #fff);
  color: var(--tg-theme-text-color, #111);
}
.container { max-width: 640px; margin: 0 auto; padding: 16px; }
.header {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 8px; border-bottom: 1px solid #e5e5e5; margin-bottom: 16px;
  font-size: 14px;
}
.brand { font-weight: 700; letter-spacing: 0.04em; }
.score strong { color: var(--tg-theme-link-color, #0088cc); }
.category { font-size: 12px; color: #888; margin-bottom: 4px; }
.qtext { font-size: 20px; margin: 0 0 12px; line-height: 1.3; }
.qtype { font-size: 13px; color: #666; margin-bottom: 16px; }
.options { list-style: none; padding: 0; margin: 0 0 16px; }
.options li { margin: 6px 0; }
.options label {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border: 1px solid #d0d0d0; border-radius: 8px;
  cursor: pointer;
}
.options label:hover { background: #f6f6f6; }
.options input[data-correct="1"] + .opt-text { color: #0a8050; font-weight: 600; }
.btn {
  display: inline-block; padding: 10px 16px; border-radius: 8px;
  border: 0; cursor: pointer; font-size: 15px;
}
.btn-primary {
  background: var(--tg-theme-button-color, #0088cc);
  color: var(--tg-theme-button-text-color, #fff);
}
.btn-link {
  background: none; color: #888; padding: 8px 0; text-decoration: underline;
}
.reveal {
  margin-top: 18px; padding: 14px; border-radius: 10px;
  background: #f6f8fa; border: 1px solid #e1e4e8;
}
.verdict { font-weight: 700; margin-bottom: 8px; }
.verdict.ok { color: #0a8050; }
.verdict.bad { color: #c0392b; }
.reveal-row { margin: 8px 0; font-size: 14px; }
.reveal-row .lbl { color: #555; display: block; font-size: 12px; margin-bottom: 2px; }
.explanation { white-space: pre-wrap; font-family: inherit; margin: 0; font-size: 14px; }
.variant { font-style: italic; }
.mnemonic { max-width: 100%; border-radius: 8px; margin-top: 8px; }
.footer { text-align: center; margin-top: 24px; opacity: 0.6; }
.inline { display: inline; }

.hints { margin: 0 0 16px; display: flex; flex-direction: column; gap: 6px; }
.hint {
  padding: .4rem .6rem; background: #f4f4f4; border-radius: 6px;
  font-size: 14px;
}
.hint > summary {
  cursor: pointer; font-weight: 600; color: #365;
  font-size: 13px;
  list-style: none;
}
.hint > summary::-webkit-details-marker { display: none; }
.hint > summary::before { content: "▸ "; }
.hint[open] > summary::before { content: "▾ "; }
.hint[open] > summary { margin-bottom: .4rem; }
.hint-body { font-size: 14px; line-height: 1.4; }
.morph-dl {
  margin: 0; display: grid; grid-template-columns: max-content 1fr;
  column-gap: .75rem; row-gap: .2rem; font-size: 14px;
}
.morph-dl dt { font-weight: 600; font-family: ui-monospace, Menlo, monospace; }
.morph-dl dd { margin: 0; }
