/* 質問票の試作画面。既存の配色・イラストを引き継ぐ。 */
#quiz-screen .answer-btn { min-height:34px; max-height:52px; }
#quiz-screen .answers-container {gap:6px;}
.quantity-form {display:flex;flex-direction:column;gap:10px;}
.quantity-label{font-size:14px;font-weight:600;}
.quantity-form input {width:100%;border:1px solid #aaa99c;background:white;border-radius:10px;min-height:46px;padding:10px;font:inherit;font-size:16px;}
.quantity-help,.quantity-error {font-size:12px;line-height:1.5;margin:0;}
.quantity-error {color:#a54435;}
.quantity-error:empty{display:none;}
.quantity-submit {padding:10px;min-height:44px;font-size:15px;}
.preview-result-note {padding:16px 18px;margin:0 0 22px;background:#f1e8d4;border:1px solid #d9cba9;border-radius:14px;font-size:13px;line-height:1.7;}
.preview-result-note p {margin:6px 0 0;}
.preview-review {margin:24px 0;padding:18px;border:1px solid #d8d4c5;border-radius:14px;background:#fff;line-height:1.7;font-size:14px;}
.preview-review > summary {cursor:pointer;font-weight:700;color:#4f5d43;}
.preview-review:not([open]) > :not(summary),.preview-concerns:not([open]) > .preview-record-body {display:none;}
.preview-review p,.preview-review ul {margin:14px 0;}
.preview-review ul{padding-left:20px;}
.preview-review table{width:100%;border-collapse:collapse;font-size:12px;margin:16px 0;}
.preview-review td,.preview-review th{padding:8px 3px;border-bottom:1px solid #ddd;text-align:left;}
.preview-review a,.start-features a{color:#4f5d43;text-decoration:underline;text-underline-offset:3px;}
.reference-card{border-top:1px solid #ddd;padding:14px 0;}
.reference-card > summary{cursor:pointer;}
.reference-card .question-hint{margin:10px 0;}
.reference-answers{display:flex;flex-direction:column;gap:7px;}
.reference-answers .answer-btn{min-height:42px;flex:none;}
.reference-status{font-size:12px;color:#4f5d43;}
.preview-answer-list{border-top:1px solid #ddd;padding:14px 0;}
.preview-answer-list p{font-size:13px;border-bottom:1px solid #eee;padding:10px 0;}
@media(max-height:600px){
  #quiz-screen .question-text{font-size:16px;line-height:1.4;}
  #quiz-screen .question-hint{font-size:12px;line-height:1.45;}
  #quiz-screen .question-card{margin-bottom:8px;}
  #quiz-screen .quiz-content{padding:8px 16px;}
  #quiz-screen .answers-container{gap:5px;}
  #quiz-screen .answer-btn{min-height:32px;font-size:14px;padding:0 12px;}
  #quiz-screen .quantity-form{gap:6px;}
  #quiz-screen .quantity-submit{min-height:38px;}
}
/* 「追加」は進捗の行に表示済み。重複する見出しの高さを使わない。 */
#quiz-screen .phase-label {display:none;}

/* 年代・性別は自由な順で選び、独立した開始ボタンで確定する。 */
body[data-screen="gender-screen"] {min-height:var(--app-h,100dvh);display:flex;flex-direction:column;}
body[data-screen="gender-screen"] .hari-foot {display:none;}
body[data-screen="gender-screen"] .hari-nav {position:relative;}
body[data-screen="gender-screen"] .app-wrapper {min-height:0;width:100%;flex:1;background:transparent;box-shadow:none;}
.setup-screen {padding:28px 24px;gap:22px;justify-content:center;}
.setup-screen .gender-screen__title {margin:0;font-size:22px;}
.setup-screen .age-select-group {margin:0;}
.setup-label {font-size:14px;font-weight:600;margin:0 0 4px;}
.setup-screen .gender-screen__desc {font-size:12px;text-align:left;margin:0 0 10px;}
.setup-screen .gender-choices {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
.setup-screen .gender-btn {-webkit-tap-highlight-color:transparent;touch-action:manipulation;position:relative;flex-direction:column;justify-content:center;gap:7px;padding:14px 4px;min-height:94px;color:var(--color-text);font:inherit;}
.setup-screen .gender-btn__label {font-size:14px;white-space:nowrap;}
.setup-screen .gender-btn__icon img {width:30px;height:30px;}
.setup-screen .gender-btn:not([aria-pressed="true"]):hover,
.setup-screen .gender-btn:not([aria-pressed="true"]):focus {background:white;border-color:var(--color-border);}
.setup-screen .gender-btn[aria-pressed="true"] {border-color:var(--color-primary);background:#eaf0e3;}
.setup-screen .gender-btn[aria-pressed="true"]::after {content:'✓';position:absolute;right:6px;top:2px;font-size:13px;color:var(--color-primary);font-weight:700;}
.setup-screen .gender-btn:focus-visible {outline:2px solid var(--color-primary);outline-offset:3px;}
.setup-action #setup-start-help {font-size:12px;color:var(--color-text-light);margin:0 0 10px;text-align:center;}
.setup-action .btn-primary {width:100%;padding:14px 10px;font-size:16px;border-radius:10px;}
.setup-action .btn-primary:disabled {background:#dedfd6;color:#66695f;box-shadow:none;cursor:default;transform:none;}
.setup-answer-guide {font-size:12px;color:var(--color-text-light);}
.setup-answer-guide summary {cursor:pointer;text-align:center;text-decoration:underline;text-underline-offset:3px;}
.setup-answer-guide p {margin:10px 0 0;line-height:1.6;}
@media(max-height:600px){
 body[data-screen="gender-screen"] .hari-nav-inner{padding:8px 16px;}
 body[data-screen="gender-screen"] .hari-brand img{height:28px;}
 body[data-screen="gender-screen"] .hari-back{padding:5px 9px;font-size:11px;}
 .setup-screen{padding:14px 20px;gap:12px;}
 .setup-screen .gender-screen__title{font-size:20px;}
 .setup-screen .gender-btn{min-height:76px;padding:9px 4px;gap:4px;}
 .setup-screen .gender-btn__icon img{width:24px;height:24px;}
 .setup-action .btn-primary{padding:11px 10px;}
 .setup-action #setup-start-help{font-size:11px;margin-bottom:8px;}
}

/* 通常の5択を保ち、例外の操作は必要なときだけ開く。 */
.answer-help {flex:0 0 auto;align-self:center;min-height:32px;padding:5px 10px;border:0;background:transparent;color:#646558;font:inherit;font-size:12px;text-decoration:underline;text-underline-offset:3px;cursor:pointer;}
.answer-help-dialog {box-sizing:border-box;width:calc(100% - 32px);max-width:370px;max-height:calc(100dvh - 32px);margin:auto;padding:22px;border:1px solid #d8d4c5;border-radius:16px;background:#faf8f5;color:#3a3a32;box-shadow:0 14px 70px #30382b30;}
.answer-help-dialog::backdrop {background:#242e2455;}
.answer-help-dialog h2{margin:0 0 12px;font-size:20px;}
.answer-help-dialog p{font-size:14px;line-height:1.7;margin:0 0 16px;}
.answer-help-dialog button{display:block;width:100%;min-height:44px;margin:10px 0 0;padding:10px;font-size:14px;}
.preview-concerns{margin:20px 0;padding:20px;border:1px solid #d8d4c5;border-radius:16px;background:white;}
.preview-concerns h2{font-size:18px;}.preview-concerns ul{padding-left:22px;}.preview-concerns li{margin:14px 0;line-height:1.7;}.preview-concerns strong{display:block;color:#4f5d43;font-size:13px;}
.preview-concerns {padding:0;margin:0 0 26px;}
.preview-record-summary {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px;list-style:none;cursor:pointer;}
.preview-record-summary::-webkit-details-marker {display:none;}
.preview-record-summary strong {font-size:15px;}
.preview-record-summary small {display:block;margin-top:5px;font-size:12px;line-height:1.7;color:#6b655a;}
.preview-record-mark {display:flex;align-items:center;justify-content:center;flex:none;width:30px;height:30px;border:1px solid #d8d4c5;border-radius:50%;color:#4f5d43;font-size:20px;transition:transform .18s ease;}
.preview-concerns[open] .preview-record-mark {transform:rotate(45deg);}
.preview-record-body {padding:0 18px 16px;border-top:1px dashed #dedbce;}
.preview-record-body h2 {margin-top:18px;font-size:15px;}
.preview-record-body li {font-size:13px;}
.preview-record-summary:focus-visible {outline:3px solid #63744e;outline-offset:3px;border-radius:16px;}
@media(prefers-reduced-motion:reduce) {.preview-record-mark {transition:none;}}

/* 回答記録をWebとPDFで共用し、長い記録も切り捨てない。 */
.pdf-page .pdf-answer-record {font-size:11px;line-height:1.5;margin-top:9px;}
.pdf-page .pdf-answer-record h2 {font-size:13px;margin:0 0 5px;}
.pdf-page .pdf-answer-record li {margin:3px 0;line-height:1.5;}
#quiz-screen .answers-container[data-input-type="choice"] .answer-btn {flex:0 0 auto;min-height:38px;}
