/* ============================================================
   MediEX Web問診 モック共通スタイル
   ベース: 類似システム(TAK健診Web)のUI構造 + フレイル健診システムの配色
   ※ 配色・ロゴはデザイン外注確定までの仮
   ============================================================ */
:root {
  --main:        #0094CE;   /* フレイル問診 ボタン基調色 */
  --main-light:  #47AADF;
  --main-dark:   #000048;   /* フレイル問診 質問枠色 */
  --q-bg:        #4e95d9;   /* フレイル問診 質問ボックス */
  --accent:      #FD841F;   /* 選択時(フレイル: orangered系) */
  --band-bg:     #FFFDF9;   /* 類似システム タイトル帯 */
  --border-gray: #d6d6d6;
  --bg:          #eef2f5;
  --notice-bg:   #C7D7FF;   /* 類似システム 通知ボックス */
  --notice-fg:   #1a3fbf;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: #333;
  font-family: "メイリオ", Meiryo, "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", sans-serif;
  line-height: 1.6;
  letter-spacing: 1px;
  -webkit-text-size-adjust: 100%;
}
#wrapper { max-width: 640px; margin: 0 auto; min-height: 100vh; background: #fff;
  border-top: 3px solid var(--main); box-shadow: 0 0 12px rgba(0,0,0,.12);
  display: flex; flex-direction: column; }
main { flex: 1; }

/* ---- ヘッダー ---- */
header.appHeader {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: #fff; border-bottom: 1px solid #eee;
}
header.appHeader .brand { font-weight: bold; color: var(--main); font-size: 18px; }
header.appHeader .brand small { color: #888; font-weight: normal; margin-left: 6px; font-size: 11px; }
header.appHeader .menuBtn {
  font-size: 12px; color: #666; border: 1px solid var(--border-gray);
  border-radius: 4px; padding: 4px 12px; background: #f9f9f9; text-decoration: none;
}

/* ---- タイトル帯(類似システム .title14 準拠) ---- */
h3.titleBand {
  position: relative; margin: 0;
  background: var(--band-bg);
  border-top: 2px solid var(--main);
  border-bottom: 2px dotted #e2e6ea;
  font-size: 17px; font-weight: bold;
  padding: 13px 14px 13px 45px; color: #000;
}
h3.titleBand::before {
  position: absolute; top: 24px; left: 20px; width: 10px; height: 10px;
  border: 3px solid #a5d8ef; content: "";
}
h3.titleBand::after {
  position: absolute; top: 17px; left: 12px; width: 12px; height: 12px;
  border: 3px solid var(--main); content: "";
}
h3.titleBand .pageNo { float: right; font-size: 13px; font-weight: normal; color: #666; margin-top: 3px; }

/* ---- 案内文・通知 ---- */
.leadText { padding: 14px 16px 4px; font-size: 14px; }
.noticeBox {
  margin: 12px 14px; padding: 10px 14px; border-radius: 5px;
  background: var(--notice-bg); color: var(--notice-fg); font-size: 13px;
}

/* ---- ログインフォーム(類似システム .formUI01 準拠) ---- */
table.formUI { width: calc(100% - 28px); margin: 10px 14px; border-collapse: collapse; }
table.formUI th, table.formUI td {
  border: 1px solid #e3e3e3; padding: 10px 12px; font-size: 14px; text-align: left;
}
table.formUI th { background: #f5f8fa; width: 34%; font-weight: bold; vertical-align: middle; }
table.formUI input[type=text], table.formUI input[type=password] {
  width: 100%; height: 44px; padding: 0 10px; font-size: 16px;
  border: 1px solid #ccc; border-radius: 3px;
}
table.formUI input:focus, table.formUI select:focus {
  outline: none; border-color: var(--main-light); box-shadow: 0 1px 4px rgba(0,148,206,.3);
}
table.formUI select { height: 44px; font-size: 16px; padding: 0 6px; border: 1px solid #ccc; border-radius: 3px; }
.passVisible { font-size: 12px; color: #666; margin-top: 6px; display: inline-block; }

/* 利用規約ボックス */
.kiyakuBox {
  margin: 10px 14px 0; height: 110px; overflow-y: scroll;
  border: 1px solid #dfdad0; background: #fff; padding: 10px; font-size: 11px; color: #555;
}
.douiMessage { text-align: center; font-size: 12px; color: #666; margin: 8px 0 2px; }

/* ---- メインボタン(フレイル #start_btn グラデ準拠) ---- */
.mainBtn {
  display: block; width: calc(100% - 40px); margin: 16px auto;
  padding: 14px; font-size: 18px; font-weight: bold; text-align: center;
  color: #fff !important; text-decoration: none; border: none; cursor: pointer;
  background: linear-gradient(180deg, #47AADF 0%, #05A2DF 50%, #0094CE 100%);
  border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,.35);
}
.mainBtn:active { opacity: .7; }
.subBtn {
  display: inline-block; padding: 10px 22px; font-size: 14px; font-weight: bold;
  color: #666 !important; background: #f0f0f0; border: 1px solid var(--border-gray);
  border-radius: 6px; text-decoration: none; cursor: pointer;
}

/* ---- 受診者情報バー(フレイル question_header 準拠) ---- */
.patientBar { display: flex; gap: 8px; padding: 10px 14px 0; flex-wrap: wrap; }
.patientBar span {
  background: #c1e5f5; border: 2px solid #333; border-radius: 4px;
  box-shadow: 1px 2px 5px rgba(0,0,0,.3); padding: 2px 12px; font-size: 14px;
}
.patientBar .qcount { background: none; border: none; box-shadow: none; font-weight: bold; }

/* ---- 問診: 質問ボックス(フレイル div.examQuestion 準拠) ---- */
.examQuestion {
  margin: 16px 14px; padding: 18px 16px; line-height: 1.6;
  border: 4px solid var(--main-dark); border-radius: 14px;
  background: linear-gradient(to right, var(--q-bg), var(--q-bg));
  color: #fff; font-size: 20px; box-shadow: 0 2px 4px rgba(0,0,0,.5);
}
.examQuestion small { display: block; font-size: 13px; opacity: .9; margin-top: 6px; }

/* ---- 問診: 回答ボタン(フレイル a.examAnswer 準拠 丸型) ---- */
a.examAnswer {
  display: block; margin: 12px 34px; padding: 12px 15px;
  text-align: center; font-size: 18px; color: #fff; text-decoration: none; cursor: pointer;
  background: linear-gradient(180deg, #47AADF 0%, #05A2DF 50%, #0094CE 100%);
  border-radius: 50px; box-shadow: 0 1px 5px rgba(0,0,0,.5);
}
a.examAnswer:active, a.examAnswer.selected { background: var(--accent); }

/* ---- 問診(複数問形式): 設問リスト(類似システム準拠) ---- */
.sectionTitle {
  margin: 18px 14px 0; padding: 8px 12px; font-size: 15px; font-weight: bold;
  background: #eaf5fb; border-left: 5px solid var(--main);
}
.qBlock { margin: 10px 14px; border: 1px solid #e3e3e3; border-radius: 4px; }
.qBlock .qText { padding: 10px 12px; background: #f5f8fa; font-size: 14px; font-weight: bold; border-bottom: 1px solid #e3e3e3; }
.qBlock .qText .req { color: #c00; font-size: 11px; margin-left: 6px; }
.qBlock ul.opts { list-style: none; margin: 0; padding: 4px 8px; }
.qBlock ul.opts li { border-bottom: 1px dotted #dbdbdb; }
.qBlock ul.opts li:last-child { border-bottom: none; }
.qBlock ul.opts label { display: flex; align-items: center; gap: 10px; padding: 10px 8px; font-size: 15px; cursor: pointer; }
.qBlock ul.opts input[type=radio], .qBlock ul.opts input[type=checkbox] { width: 20px; height: 20px; flex: none; }
.qBlock .freeText { width: calc(100% - 20px); margin: 8px 10px; height: 60px; border: 1px solid #ccc; border-radius: 3px; padding: 8px; font-size: 15px; }

/* ---- プログレスバー ---- */
.progressWrap { padding: 12px 14px 0; }
.progressWrap .bar { height: 10px; background: #e4e9ee; border-radius: 5px; overflow: hidden; }
.progressWrap .bar > div { height: 100%; background: linear-gradient(90deg, #47AADF, #0094CE); transition: width .3s; }
.progressWrap .label { font-size: 12px; color: #777; text-align: right; margin-top: 2px; }

/* ---- ページ送りボタン行 ---- */
.pagerRow { display: flex; justify-content: space-between; padding: 10px 20px 20px; gap: 10px; }
.pagerRow .mainBtn { margin: 0; width: auto; flex: 1; }

/* ---- フッター(類似システム準拠) ---- */
footer { margin-top: 24px; border-top: 1px solid #eee; background: #f9f9f9; }
footer ul { display: flex; justify-content: center; gap: 18px; list-style: none; margin: 0; padding: 10px; }
footer ul a { font-size: 11px; color: #777; }
footer p.cr { text-align: center; font-size: 10px; color: #aaa; margin: 0; padding-bottom: 12px; }

/* ---- モック用注記 ---- */
.mockNote {
  margin: 0; padding: 4px 10px; background: #fff3cd; color: #856404;
  font-size: 11px; text-align: center;
}
