:root {
  --bg: #f4f7f8;
  --card: #ffffff;
  --ink: #152126;
  --muted: #66757c;
  --line: #dbe3e6;
  --accent: #0f766e;
  --accent-dark: #0b5d57;
  --soft: #e8f5f2;
  --warn: #9a6700;
  --warn-bg: #fff7df;
  --danger: #b42318;
  --danger-bg: #fff0ee;
  --ok: #166534;
  --ok-bg: #ecfdf3;
  --shadow: 0 8px 28px rgba(21,33,38,.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 24px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.brand { font-weight: 800; letter-spacing: .02em; }
.subbrand { margin-top: 3px; font-size: 12px; color: var(--muted); }
.main { width: min(1120px, calc(100% - 32px)); margin: 28px auto 48px; flex: 1; }
.footer { padding: 24px; text-align: center; color: var(--muted); font-size: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 24px; }
.card + .card { margin-top: 18px; }
.narrow { width: min(520px, 100%); margin: 80px auto; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.4; }
h1 { font-size: 28px; }
h2 { font-size: 21px; }
h3 { font-size: 16px; }
p { line-height: 1.75; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 13px; }
input, select, textarea { width: 100%; border: 1px solid #cbd7db; border-radius: 10px; padding: 11px 12px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(15,118,110,.15); border-color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 800; background: var(--accent); color: #fff; }
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--accent); }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.secondary:hover { background: #f8fafb; }
.btn.danger { background: var(--danger); }
.btn.small-btn { padding: 7px 10px; font-size: 12px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.notice { border-radius: 12px; padding: 14px 16px; line-height: 1.7; border: 1px solid transparent; }
.notice.info { background: var(--soft); border-color: #c9e7e2; }
.notice.warn { background: var(--warn-bg); border-color: #f4d985; }
.notice.danger { background: var(--danger-bg); border-color: #f2c1bb; }
.notice.ok { background: var(--ok-bg); border-color: #bfe7cb; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; background: #eef2f3; color: #405158; }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.info { background: var(--soft); color: var(--accent-dark); }
.metric { background: #f9fbfb; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.metric .value { font-size: 28px; font-weight: 800; margin-top: 4px; }
.progress { height: 9px; background: #e6ecee; border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: 999px; transition: width .2s ease; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 14px; }
.question { border-top: 1px solid var(--line); padding: 18px 0; }
.question:first-child { border-top: 0; }
.qtext { font-weight: 700; margin-bottom: 12px; line-height: 1.6; }
.options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option label { display: flex; min-height: 54px; align-items: center; justify-content: flex-start; text-align: left; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; line-height: 1.45; }
.option label::before { content: ""; flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #aebcc1; background: #fff; box-shadow: inset 0 0 0 4px #fff; }
.option input:checked + label { border-color: var(--accent); background: var(--soft); color: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 800; }
.option input:checked + label::before { background: var(--accent); border-color: var(--accent); }
.group-prompt { margin: 20px 0 4px; padding: 10px 12px; background: #f6f9fa; border-radius: 10px; font-weight: 800; }
.result-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.result-state { font-size: 30px; font-weight: 900; letter-spacing: .01em; }
.bar-row { display: grid; grid-template-columns: 220px 1fr 80px; gap: 12px; align-items: center; margin: 14px 0; }
.bar { height: 12px; background: #e6ecee; border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 800; }
.tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border-bottom: 1px solid var(--line); padding: 11px 10px; text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; background: #fbfcfc; position: sticky; top: 0; }
.right { text-align: right; }
.topuser { display: flex; gap: 10px; align-items: center; }
.checkline { display: flex; gap: 10px; align-items: flex-start; }
.checkline input { width: auto; margin-top: 4px; }
.loading { padding: 60px; text-align: center; color: var(--muted); }
.sep { height: 1px; background: var(--line); margin: 18px 0; }
.questionnaire-section { display: none; scroll-margin-top: 160px; }
.questionnaire-section.active { display: block; }
.questionnaire-progress { position: sticky; top: 82px; z-index: 15; box-shadow: 0 6px 18px rgba(21,33,38,.08); }
.progress-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.save-status { text-align: right; color: var(--muted); }
.save-status.saved { color: var(--ok); }
.save-status.save-error { color: var(--danger); font-weight: 700; }
.draft-restored { margin-top: 14px; }
.section-helper { margin: 6px 0 18px; padding: 11px 13px; border-left: 3px solid var(--accent); background: #f7fbfa; color: var(--muted); line-height: 1.65; font-size: 13px; }
.section-dots { display: flex; gap: 8px; margin-top: 12px; }
.section-dot { width: 36px; height: 32px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-weight: 800; cursor: pointer; }
.section-dot.active { border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.section-dot.complete { background: var(--soft); color: var(--accent-dark); border-color: #b9ddd7; }
.section-dot.active.complete { background: var(--accent); color: #fff; }
.question[data-answered="true"] .qtext::after { content: "回答済み"; display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--ok); }
.questionnaire-nav { position: relative; }
.questionnaire-actions { justify-content: space-between; }
.questionnaire-actions .btn { min-width: 120px; }
.submit-note { margin-top: 16px; }
.section-status { margin-bottom: 14px; color: var(--muted); font-size: 13px; }
@media (max-width: 800px) {
  .topbar { padding: 14px 16px; }
  .main { width: min(100% - 20px, 1120px); margin-top: 18px; }
  .card { padding: 18px; border-radius: 13px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .options { grid-template-columns: 1fr; gap: 9px; }
  .bar-row { grid-template-columns: 1fr; gap: 6px; }
  .result-hero { align-items: flex-start; flex-direction: column; }
  .result-state { font-size: 24px; }
  .subbrand { display: none; }
  .questionnaire-progress { top: 66px; padding: 14px 16px; margin-left: -2px; margin-right: -2px; }
  .progress-row { align-items: flex-start; }
  .save-status { max-width: 46%; font-size: 11px; }
  .question { padding: 20px 0; }
  .qtext { font-size: 16px; margin-bottom: 13px; }
  .option label { min-height: 56px; padding: 14px; font-size: 15px; }
  .group-prompt { margin-top: 24px; padding: 12px 13px; line-height: 1.55; }
  .section-head { align-items: flex-start; }
  .questionnaire-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .questionnaire-actions .btn { width: 100%; min-height: 48px; }
  #submitCheck { grid-column: 1 / -1; }
}
.implementer-box { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfc; line-height: 1.65; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: .95em; }
