:root {
  --bg: #050505;
  --text: #f4f4f4;
  --muted: #8a8a8a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overflow: hidden;
  color-scheme: dark;
}

.sci-app {
  height: 100%;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 18px 16px;
  gap: 10px;
  overflow-y: auto;
}

.sci-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-height: 52px;
  width: 100%;
}

.back-link,
.sci-top h1 {
  font-size: 26px;
  font-weight: 600;
}

.back-link {
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border: 2px solid #fff;
  border-radius: 999px;
  white-space: nowrap;
}

.back-link:active {
  background: #fff;
  color: #000;
}

.scores {
  display: flex;
  gap: 16px;
  font-size: 20px;
  color: var(--muted);
  white-space: nowrap;
}

.scores b {
  color: #fff;
}

.unit {
  color: var(--muted);
  font-size: 20px;
}

.question {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.45;
  max-width: 920px;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(640px, 100%);
  margin-top: 4px;
}

.choices button {
  min-height: 64px;
  padding: 12px 18px;
  border: 3px solid #fff;
  border-radius: 20px;
  background: transparent;
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  text-align: left;
}

.choices button:active {
  background: #fff;
  color: #000;
}

.choices button.good {
  background: #1f8a3b;
  border-color: #1f8a3b;
}

.choices button.bad {
  background: #e82127;
  border-color: #e82127;
  pointer-events: none;
}

.status {
  min-height: 28px;
  font-size: 22px;
  color: var(--muted);
}

.explain {
  font-size: 20px;
  line-height: 1.4;
  color: #d0d0d0;
  max-width: 920px;
}

.next-btn {
  min-height: 56px;
  padding: 10px 22px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 24px;
  font-weight: 600;
}

.next-btn:active {
  background: #fff;
  color: #000;
}

@media (max-height: 700px) {
  .sci-app { padding: 8px 14px 10px; gap: 8px; }
  .back-link, .sci-top h1 { font-size: 22px; }
  .question { font-size: 22px; }
  .choices button { min-height: 52px; font-size: 20px; }
}
