:root { --ink: #1f2937; --sub: #4b5563; --line: #d1d5db; --bg: #f8fafc; --acc: #0f766e; --acc-soft: #99f6e4; --warn: #fff7ed; --warnline: #fdba74; --ng: #b91c1c; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif; color: var(--ink); background: #fff; font-size: 17px; line-height: 1.6; }
a { color: var(--acc); }
header { border-bottom: 1px solid var(--line); padding: 14px 24px; display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
header .brand { font-weight: 700; letter-spacing: .04em; font-size: 20px; color: var(--ink); text-decoration: none; }
header .tag { color: var(--sub); font-size: 15px; }
main { max-width: 960px; margin: 0 auto; padding: 28px 16px 48px; }
h1 { font-size: 28px; margin: 0 0 6px; line-height: 1.4; }
.lead { color: var(--sub); margin: 0 0 24px; }
.lead b { color: var(--ink); font-weight: 600; }
.step { border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.step h2 { font-size: 18px; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.step h2 .n { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; align-items: center; justify-content: center; font-size: 15px; flex: none; }
.drop { border: 2px dashed #9ca3af; border-radius: 10px; padding: 34px 16px; text-align: center; background: var(--bg); }
.drop.over { border-color: var(--acc); background: #f0fdfa; }
.drop .big { font-size: 18px; margin: 0 0 8px; }
.drop .sm { color: var(--sub); margin: 0 0 14px; font-size: 15px; }
.picked { margin: 12px 0 0; font-size: 15px; word-break: break-all; }
.btn { display: inline-block; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 10px 18px; font-size: 16px; cursor: pointer; color: var(--ink); text-decoration: none; font-family: inherit; }
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; font-weight: 700; font-size: 18px; padding: 14px 28px; }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; }
input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; cursor: pointer; background: #fff; text-align: left; font-family: inherit; color: var(--ink); }
.choice[aria-pressed=true] { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc-soft) inset; }
.choice .kb { font-size: 22px; font-weight: 700; display: block; }
.choice .ex { color: var(--sub); font-size: 15px; margin-top: 4px; display: block; }
.note { background: var(--warn); border: 1px solid var(--warnline); border-radius: 10px; padding: 12px 16px; font-size: 16px; margin: 4px 0 18px; }
.actions { text-align: center; margin: 8px 0 28px; }
.result { border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; background: var(--bg); }
.result h2 { font-size: 18px; margin: 0 0 12px; }
.row { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.row.ng .d { color: var(--ng); font-weight: 600; }
.thumb { width: 120px; height: 85px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 13px; flex: none; overflow: hidden; }
.thumb img { max-width: 100%; max-height: 100%; }
.meta { flex: 1; min-width: 0; }
.meta .t { font-weight: 600; word-break: break-all; }
.meta .d { color: var(--sub); font-size: 15px; }
.meta .link { font-size: 15px; }
.saveall { text-align: right; padding-top: 12px; border-top: 1px solid var(--line); }
footer { border-top: 1px solid var(--line); padding: 18px 24px; color: var(--sub); font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { color: var(--sub); }
.doc { max-width: 780px; }
.doc h1 { font-size: 24px; margin-bottom: 18px; }
.doc h2 { font-size: 18px; margin: 26px 0 8px; }
.doc ol { padding-left: 1.4em; }
.doc li { margin: 4px 0; }
@media (max-width: 640px) {
  body { font-size: 16px; }
  .choices, .two { grid-template-columns: 1fr; }
  header { flex-direction: column; gap: 2px; }
  .row { flex-wrap: wrap; }
  .row .meta { flex: 1 1 180px; }
  .row .btn { flex: 1 1 100%; text-align: center; }
  .thumb { width: 96px; height: 68px; }
}
