/* 確認の画面（試験用）。明るい地・はっきり読める文字・スマホを先に */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1d2330;
  --muted: #5b6475;
  --line: #d5d9e0;
  --accent: #1f5fbf;
  --accent-bg: #e8f0fc;
  --ok: #1b7a3d;
  --ng: #b3261e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.top, main { max-width: 720px; margin: 0 auto; padding: 0 12px; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: max(10px, env(safe-area-inset-top));
}
h1 { font-size: 18px; margin: 8px 0; }
h2 { font-size: 17px; margin: 16px 0 8px; }
p { margin: 6px 0; }
main { padding-bottom: 48px; }

.btn {
  min-height: 44px; padding: 8px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--text); cursor: pointer;
  touch-action: manipulation;
}
.btn:active { background: var(--accent-bg); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.small { min-height: 44px; padding: 6px 12px; }
.btn.on { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.btn:disabled { opacity: .5; cursor: default; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

input, select, textarea {
  width: 100%; font-size: 16px; color: var(--text);
  min-height: 44px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
textarea { line-height: 1.5; resize: vertical; }
label { display: block; margin: 10px 0 4px; font-weight: 600; }
label.check { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; font-weight: normal; }
label.check input { width: 22px; height: 22px; min-height: 0; margin: 0; flex: none; }
fieldset { border: 0; margin: 10px 0; padding: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 2px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; margin: 10px 0;
}
.card > .btn, form.card > .btn { margin-top: 10px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.choice { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.btns .btn { flex: 1 1 auto; }

.tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 6px 0;
}
.tabs button {
  min-height: 48px; font-size: 16px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--text); padding: 4px 0; letter-spacing: -0.02em;
}
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

.list { list-style: none; margin: 0; padding: 0; }
.tag {
  display: inline-block; font-size: 16px; padding: 1px 8px; border-radius: 999px;
  background: #eceff3; color: var(--text); margin-right: 6px;
}
.tag.warn { background: #fff1d6; color: #7a4b00; }
.meta { color: var(--muted); font-size: 16px; }
.muted { color: var(--muted); }
.note { color: #7a4b00; background: #fff8e6; border-radius: 8px; padding: 6px 10px; }
.msg { min-height: 1.6em; font-weight: 600; }
.msg.ok { color: var(--ok); }
.msg.ng { color: var(--ng); }
.body-text { white-space: pre-wrap; background: #f3f5f8; border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
pre {
  white-space: pre-wrap; font-size: 16px; background: #f3f5f8; border-radius: 8px;
  padding: 8px; max-height: 360px; overflow: auto;
}

img.thumb { display: block; max-width: 160px; max-height: 160px; border-radius: 8px; border: 1px solid var(--line); margin: 6px 0; cursor: zoom-in; }
img.thumb.big { max-width: 100%; max-height: none; cursor: zoom-out; }
img.preview { display: block; width: 100%; max-width: 480px; height: auto; border-radius: 8px; border: 1px solid var(--line); margin: 8px 0; -webkit-touch-callout: default; }

.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table { border-collapse: collapse; font-size: 16px; min-width: 100%; }
th, td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; white-space: nowrap; }
td.wrap { white-space: normal; min-width: 12em; }
th { background: #eef1f5; }
table input { min-width: 5em; min-height: 44px; }

.item { padding: 10px 0; border-top: 1px solid var(--line); }
.item:first-of-type { border-top: 0; }
.item .q { margin-bottom: 6px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.done { opacity: .9; }
