/* 上級者ドリル（スマホ縦1列）。妻用の初心者向けサイトと見分けられるよう、地の色を紺にしている */
:root {
  --pad: 16px;
  --felt: #13294b;
  --ink: #1f2328;
  --muted: #57606a;
  --right: #1a7f37;
  --wrong: #cf222e;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  color: var(--ink);
  background: var(--felt);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

.main {
  max-width: 680px;
  margin: 0 auto;
  padding: 12px var(--pad) calc(100px + env(safe-area-inset-bottom));
}

.status {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  margin-bottom: 12px;
}

#mode {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.panel {
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 14px;
}

.situation {
  word-break: keep-all;
  overflow-wrap: anywhere;
  font-size: 22px;
  font-weight: 700;
  margin: 4px 0 8px;
}

.question {
  font-size: 17px;
  margin: 0 0 12px;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.choice {
  min-height: 56px;
  border: 2px solid #d0d7de;
  border-radius: 12px;
  background: #f6f8fa;
  color: var(--ink);
  font: inherit;
  font-size: 22px;
  font-weight: 700;
  touch-action: manipulation;
  cursor: pointer;
}

.choice:disabled {
  cursor: default;
  opacity: 0.55;
}

.choice.right {
  border-color: var(--right);
  background: #dafbe1;
  opacity: 1;
}

.choice.wrong {
  border-color: var(--wrong);
  background: #ffebe9;
  opacity: 1;
}

.verdict {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}

.verdict.right {
  color: var(--right);
}

.verdict.wrong {
  color: var(--wrong);
}

.panel h2 {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 4px;
}

.steps {
  margin: 0 0 8px;
  padding-left: 1.4em;
  font-size: 17px;
  line-height: 1.55;
}

.steps li {
  margin: 4px 0;
}

.meaning {
  font-size: 16px;
  line-height: 1.55;
  margin: 8px 0;
}

.remember {
  font-size: 14px;
  color: var(--muted);
  margin: 4px 0 0;
}

/* 覚える表（押すと開く） */
.legend summary {
  cursor: pointer;
  font-weight: 700;
  padding: 4px 0;
}

.memo-note {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
}

.memo {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 14px;
}

.memo th,
.memo td {
  border-top: 1px solid #eaeef2;
  padding: 6px 4px;
  text-align: right;
}

.memo th:first-child,
.memo td:first-child {
  text-align: left;
}

.memo td:first-child {
  white-space: nowrap;
}

.memo th {
  color: var(--muted);
  font-weight: 700;
  vertical-align: bottom;
}

/* 画面下に固定の操作ボタン */
.controls {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom));
  background: rgba(10, 22, 41, 0.94);
}

.controls .inner {
  max-width: 680px;
  margin: 0 auto;
}

.next {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: #f0b429;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  touch-action: manipulation;
  cursor: pointer;
}

.next:disabled {
  opacity: 0.5;
}
