#privacy{width:min(720px,94vw);max-height:90dvh;border:1px solid #cfdae1;border-radius:12px;padding:24px;color:#243443}#privacy::backdrop{background:#18394e66}#privacy p{line-height:1.8}#privacy form{box-shadow:none;padding:0;border:0}#privacy label{display:block;line-height:1.8;margin:16px 0}#privacy button,#privacy-open{font:inherit;border:1px solid #cad8e0;border-radius:6px;background:#f1f5f8;padding:8px 12px;margin:4px;cursor:pointer}#privacy-save{background:#173e55!important;color:white}#privacy textarea{border:1px solid #cad8e0;border-radius:6px;padding:10px;min-height:90px}.memory-item{border-top:1px solid #dce4e9;margin-top:18px;padding-top:10px}#balance{font-size:14px;line-height:1.6;color:#365b70}.save-option{display:block;font-size:14px;line-height:1.7;margin:8px 0}#privacy-status{color:#365b70}#memory-list{line-height:1.8}#privacy .privacy-note{font-size:14px}header{height:auto;min-height:82px;gap:8px;flex-wrap:wrap;padding-top:10px;padding-bottom:10px}.side-bottom .profile{font-size:13px}

/* Keep reading space dominant; secondary controls open above the composer. */
main{overflow:hidden}.stage{min-height:0;overscroll-behavior:contain;padding-top:22px;padding-bottom:22px}
.composer-area{flex-shrink:0;padding:8px 28px 12px;border-top:1px solid #edf0f2;background:#fff}
.composer-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-height:32px;margin-bottom:6px;position:relative}
#balance{margin-right:auto;font-size:12px}#balance:empty{display:none}
#privacy-open{font-size:12px;padding:6px 9px;margin:0;background:white;white-space:nowrap}
.composer-options{font-size:12px}.composer-options summary{cursor:pointer;padding:7px 8px;border-radius:6px;white-space:nowrap;color:#365b70}
.composer-options summary:focus-visible{outline:3px solid #438baf;outline-offset:2px}
.options-panel{position:absolute;z-index:5;right:0;bottom:calc(100% + 8px);width:min(460px,calc(100vw - 32px));max-height:55dvh;overflow:auto;background:#fff;border:1px solid #cad8e0;border-radius:10px;padding:16px;box-shadow:0 8px 30px #173e5526}
.options-panel .save-option{font-size:14px;margin:0 0 8px}.options-panel .footnote{text-align:left;font-size:12px;color:#617383}.options-panel .demo{margin-bottom:8px;color:#617383}
#form{display:flex;align-items:flex-end;gap:12px;padding:10px 12px;border-radius:10px}
#question{flex:1;min-width:0;min-height:44px;height:44px;max-height:min(120px,20dvh);resize:vertical;line-height:1.6;padding:8px 0}
.composer-bottom{flex-shrink:0;gap:8px;align-self:flex-end}.composer-bottom>span{display:none}#send{min-height:44px;padding:10px 17px}
#status{line-height:1.5;margin-top:5px;min-height:0}#status:empty{display:none}
header{min-height:64px;padding-top:8px;padding-bottom:8px}
#history{min-height:48px;overflow:auto;flex:1 1 auto;grid-auto-rows:max-content;align-content:start;padding:4px 0}#history button{min-height:48px;line-height:1.7;max-width:100%;width:100%;white-space:normal;overflow-wrap:anywhere;overflow:visible;text-overflow:clip}.sidebar{overflow-y:auto}.sidebar>*:not(#history){flex-shrink:0}.side-label{line-height:1.7}#mobile-history{display:grid;gap:8px}#privacy #mobile-history button{display:block;width:100%;margin:0;min-height:48px;height:auto;line-height:1.7;white-space:normal;overflow-wrap:anywhere;text-align:left}.message p{overflow-wrap:anywhere}
@media(max-width:760px){.composer-area{padding:6px 12px max(8px,env(safe-area-inset-bottom))}.composer-tools{gap:4px;flex-wrap:wrap;min-height:28px}#balance{font-size:11px}#privacy-open,.composer-options summary{font-size:11px;padding:6px}.stage{padding:16px}.welcome{margin-top:16px}header{min-height:58px;padding:6px 12px;gap:5px}.account-link{margin:0;padding:7px 8px;font-size:11px}.mobile-brand{margin-right:5px;font-size:24px}.mobile-new{font-size:11px;padding:7px}.message{margin:12px 0 20px}#form{gap:6px;padding:7px 9px}#question{min-height:40px;height:40px}#send{min-height:40px;padding:8px 12px}.composer-area #status{font-size:11px}.options-panel{max-height:50dvh}}

/* Put the consultation guidance immediately above the question field. */
.composer-area #status{font-size:16px;font-weight:600;line-height:1.6;text-align:left;margin:0 2px 8px;color:#8d6332}
.composer-area #status:empty{display:none;margin:0}

/* A saved, disabled checkbox must still look clearly selected. */
.save-option input[type="checkbox"]{appearance:none;-webkit-appearance:none;display:inline-block;vertical-align:middle;width:19px;height:19px;margin:0 7px 2px 0;border:2px solid #8b9da9;border-radius:4px;background:#fff;opacity:1;flex-shrink:0}
.save-option input[type="checkbox"]:checked{background-color:#173e55;border-color:#173e55;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10l4 4 8-8' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:17px 17px}
.save-option input[type="checkbox"]:disabled{opacity:1;cursor:default}
.save-option input[type="checkbox"]:focus-visible{outline:3px solid #438baf;outline-offset:3px}
@media(forced-colors:active){.save-option input[type="checkbox"]{appearance:auto;-webkit-appearance:auto;accent-color:Highlight}}

.consent-guide{display:flex;align-items:center;gap:16px;border:2px solid #c58b35;background:#fff5df;border-radius:10px;padding:12px 16px;margin-bottom:10px;color:#634517}.consent-guide strong{font-size:17px}.consent-guide p{font-size:14px;line-height:1.6;margin:5px 0 0}.consent-guide button{flex-shrink:0;border:0;border-radius:7px;background:#173e55;color:white;padding:12px 16px;font:inherit;font-weight:600;cursor:pointer;animation:consent-pulse 2.4s ease-in-out 4}.consent-steps{background:#fff5df;border-left:4px solid #c58b35;padding:12px;line-height:1.8}.consent-steps small{font-size:14px}.consent-guide button:focus-visible{outline:3px solid #438baf;outline-offset:3px}@keyframes consent-pulse{50%{box-shadow:0 0 0 5px #c58b3538}}@media(prefers-reduced-motion:reduce){.consent-guide button{animation:none}}@media(max-width:760px){.consent-guide{align-items:stretch;flex-direction:column;gap:8px;padding:10px}.consent-guide strong{font-size:16px}.consent-guide p{font-size:13px}.consent-guide button{padding:10px}}
.consent-guide[hidden]{display:none}

#consent-steps[hidden]{display:none}

#member-greeting{max-width:850px;margin:0 auto 18px;font-size:20px;font-weight:600;line-height:1.6;color:#365b70;overflow-wrap:anywhere}#member-greeting[hidden]{display:none}@media(max-width:760px){#member-greeting{font-size:17px;margin-bottom:12px}}

.voice-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:5px 0}.voice-controls button,.voice-dialog-actions button{font:inherit;font-size:14px;padding:7px 12px;border:1px solid #afc0cb;border-radius:7px;background:#f0f5f7;color:#173e55;cursor:pointer}.voice-controls button:disabled,.voice-dialog-actions button:disabled{opacity:.5;cursor:default}.voice-controls [hidden]{display:none}#voice-stop{background:#173e55;color:white}#voice-remaining{font-size:14px;color:#536975}#voice-status{font-size:14px;line-height:1.5;color:#365b70}#voice-status:empty{display:none}#voice-dialog{width:min(560px,calc(100vw - 32px));max-height:85dvh;border:1px solid #c7d5dd;border-radius:12px;padding:24px;color:#263e4d}#voice-dialog::backdrop{background:#13283388}#voice-dialog p{font-size:16px;line-height:1.8}#voice-dialog label{display:block;font-size:16px;line-height:1.7}.voice-dialog-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}#voice-confirm{background:#173e55;color:white}
#form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px}#question{grid-column:1;grid-row:1;width:100%}.composer-bottom{grid-column:2;grid-row:1}.voice-controls{grid-column:1/-1;grid-row:2;margin:0}#voice-status{grid-column:1/-1;grid-row:3}

.room-return{font-weight:700;background:#edf3f6}.special-room-context{position:sticky;top:-22px;z-index:2;background:#fff;padding:10px 0 12px;border-bottom:1px solid #e4ddd0;max-width:850px;margin:0 auto 16px}.special-room-context #member-greeting{margin-bottom:4px}#room-concept{margin:0;color:#916521;font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:clamp(17px,2vw,24px);font-weight:700;line-height:1.6;overflow-wrap:anywhere}#room-concept[hidden],#room-return[hidden]{display:none}@media(max-width:760px){.special-room-context{top:-16px;padding:8px 0}.special-room-context #member-greeting{margin-bottom:3px}}

#room-concept .concept-ending{color:#000}

header .room-return{background:transparent;font-weight:400}header .account-link[aria-current="page"]{background:#e5eef4;border-color:#9ab3c3;color:#173e55;font-weight:700}

.history-save-bar{position:relative;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 10px;margin:4px 0 7px;border:1px solid #cbd9e2;border-radius:8px;background:#f4f8fa}.history-save-bar .save-option{display:flex;align-items:center;gap:7px;margin:0;font-size:14px;color:#173e55;font-weight:600;cursor:pointer;line-height:1.5}.history-save-bar .save-option input{margin:0}.history-save-bar:has(input:checked){background:#e8f2f6;border-color:#7597ad}.history-save-bar summary{font-size:12px;text-decoration:underline}.history-save-bar .options-panel{bottom:calc(100% + 8px)}@media(max-width:760px){.history-save-bar{padding:7px 8px;flex-wrap:wrap;gap:3px 8px}.history-save-bar .save-option{font-size:12px}.history-save-bar .composer-options{margin-left:auto}}

/* Distinguish the scrollable conversation from the fixed composer. */
.stage{background:#f4f7fa}.special-room-context{background:#f4f7fa}.composer-area{background:#e5eef4;border-top:2px solid #adc2d1;box-shadow:0 -5px 18px #173e5510;position:relative}.composer-area #form{background:#fff;border:1px solid #b8cbd8}.history-save-bar{background:#fff}.assistant{background:#fff;border:1px solid #e1e9ef;border-radius:12px;padding:16px 18px}.user p{background:#dfebf3}.stage{scrollbar-color:#9db2c1 #edf2f6}#voice-activity{grid-column:1/-1;grid-row:3;display:flex;align-items:center;gap:10px;color:#a33636;font-size:13px;font-weight:700;padding:5px 9px;background:#fff2f0;border-radius:6px}#voice-activity[hidden]{display:none}#voice-status{grid-row:4}.recording-bars{display:flex;align-items:center;gap:3px;height:23px}.recording-bars i{display:block;width:4px;height:19px;border-radius:3px;background:#b14444;animation:recording-wave 1s ease-in-out infinite;transform-origin:center}.recording-bars i:nth-child(2){animation-delay:-.2s}.recording-bars i:nth-child(3){animation-delay:-.4s}.recording-bars i:nth-child(4){animation-delay:-.6s}.recording-bars i:nth-child(5){animation-delay:-.8s}@keyframes recording-wave{0%,100%{transform:scaleY(.25)}50%{transform:scaleY(1)}}@media(prefers-reduced-motion:reduce){.recording-bars i{animation:none}.recording-bars i:nth-child(even){height:10px}}@media(max-width:760px){.composer-area{border-top:2px solid #9fb9cb;border-radius:14px 14px 0 0}.assistant{padding:12px 13px}.stage{padding-bottom:20px}}

#end-consultation{display:block;width:100%;padding:9px 14px;margin:7px 0;border:1px solid #91aabd;border-radius:8px;background:#fff;color:#173e55;font:inherit;font-size:14px;line-height:1.6;cursor:pointer}#end-consultation[hidden]{display:none}#end-consultation:disabled{opacity:.55;cursor:wait}.consultation-ended{border-top:1px solid #adc2d1;margin:24px 0;padding:16px;color:#365b70;background:#e5eef4;border-radius:8px;line-height:1.8}
/* Give saved consultations the majority of the sidebar height. */
@media(min-width:761px){.sidebar{padding-top:24px;padding-bottom:16px}.sidebar .new{margin:18px 0 16px}.sidebar .account-link{margin-bottom:12px!important}.sidebar .side-label{margin-bottom:8px}.sidebar .side-bottom{padding-top:12px}.sidebar .side-bottom .note-mark,.sidebar .side-bottom>p{display:none}.sidebar .profile{padding-top:12px}.sidebar #history{min-height:240px;flex:1 1 auto}}
@media(min-width:761px){.sidebar .side-bottom>p{display:block;font-size:12px;line-height:1.6;margin:0 0 10px}}

#composer-toggle{display:none}
@media(max-width:760px){
 #composer-toggle:not([hidden]){display:block;width:100%;min-height:40px;padding:8px 12px;margin:0 0 4px;border:1px solid #91aabd;border-radius:8px;background:white;color:#173e55;font:inherit;font-size:14px;font-weight:600}
 .composer-area.is-compact .composer-tools,.composer-area.is-compact .history-save-bar,.composer-area.is-compact #form{display:none}
 .composer-area.is-compact #end-consultation{font-size:12px;padding:8px;margin:3px 0;min-height:40px}
 .composer-area.is-compact #status{font-size:11px;line-height:1.4;margin:3px 0}
 .composer-area:not(.is-compact){max-height:65dvh;overflow-y:auto}
 .composer-area .consent-guide{border-width:2px}
}

/* Keep disclosure content in flow: floating panels covered the history control. */
.history-save-bar{flex-wrap:wrap}
.history-save-bar .composer-options[open]{flex:1 1 100%;min-width:0}
.history-save-bar .options-panel{position:static;width:100%;max-height:24dvh;margin-top:6px;box-shadow:none;overflow:auto;overscroll-behavior:contain}
.mobile-history-link{display:none}
@media(max-width:760px){
 header{height:auto}
 .mobile-history-link{display:block;border:1px solid #9bb3c2;border-radius:6px;background:#e8f2f6;color:#173e55;font:inherit;font-size:12px;font-weight:700;padding:8px 10px;min-height:36px}
 .composer-area{min-height:0;max-height:65dvh;overflow-y:auto;overscroll-behavior:contain}
 .history-save-bar .composer-options[open]{margin-left:0}
 #privacy{max-height:85dvh;overflow-y:auto;overscroll-behavior:contain;padding:18px}
 #mobile-history{scroll-margin-top:12px}
}

#question-expand{grid-column:1 / -1;grid-row:2;justify-self:end;background:transparent;color:#173e55;border:1px solid #91adbc;border-radius:6px;padding:6px 12px;font:inherit;font-size:14px;cursor:pointer}
#form .voice-controls{grid-row:3}#form #voice-activity{grid-row:4}#form #voice-status{grid-row:5}
#question-editor{width:min(680px,94vw);max-height:90dvh;padding:22px;border:1px solid #a8bdc9;border-radius:16px;background:#f2f7fa;color:#243443}
#question-editor[open]{display:flex;flex-direction:column;gap:12px}#question-editor h2,#question-editor p{margin:0}#question-editor p{font-size:14px}#question-editor::backdrop{background:#18374788}
#question-editor #question-draft{width:100%;height:45dvh;min-height:100px;max-height:none;flex:1 1 auto;resize:vertical;font:16px/1.8 sans-serif;padding:14px;background:white;border:1px solid #91adbc;border-radius:8px;box-sizing:border-box}
#editor-done{flex-shrink:0;padding:12px;background:#173e55;color:white;border:0;border-radius:8px;font:inherit;cursor:pointer}
@media(max-width:760px){#form #question{height:96px;min-height:96px;max-height:160px;line-height:1.7}.history-save-bar{padding:6px 9px;gap:4px 8px}.history-save-bar .save-option{font-size:13px;line-height:1.5}.history-save-bar summary{font-size:12px}#question-editor{padding:16px}#question-editor #question-draft{height:48dvh}}

#balance .ticket-count{font-size:22px;font-weight:800;line-height:1.2;color:#173e55;font-variant-numeric:tabular-nums;display:inline-block;vertical-align:baseline;margin:0 2px}

.review-guide{background:#edf4f8;border:1px solid #8faec0;border-radius:10px;padding:10px 14px;margin:8px 0;color:#173e55;font-size:14px}.review-guide strong{font-size:16px}.review-guide p{margin:6px 0;line-height:1.6}.review-guide button,#review-dialog button{padding:10px 14px;min-height:44px;border:1px solid #527b94;border-radius:7px;background:white;color:#173e55;font:inherit;cursor:pointer}.review-guide.agreed{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 10px}.review-guide.agreed strong{font-size:14px}#review-dialog{width:min(560px,calc(100% - 24px));max-height:85dvh;overflow:auto;border:1px solid #8faec0;border-radius:14px;padding:22px;color:#243443}#review-dialog::backdrop{background:#18334366}#review-dialog p{line-height:1.8;font-size:16px}#review-dialog label{display:flex;align-items:flex-start;gap:10px;padding:14px 0;font-weight:700}#review-consent{width:22px;height:22px;flex-shrink:0;accent-color:#173e55}#review-consent-save{background:#173e55!important;color:white!important}#review-dialog button:disabled{opacity:.5}#review-consent-status{min-height:1.5em}#review-admin-link{display:block;margin:12px 0}

/* Compact secondary controls to leave more room for reading answers. */
.review-guide{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 10px;padding:5px 9px;margin:4px 0}
.review-guide[hidden]{display:none}
.review-guide strong{font-size:14px;line-height:1.5}
.review-guide #review-guide-description{display:none}
.review-guide button{font-size:14px;min-height:36px;padding:6px 10px}
.review-guide.agreed{padding:4px 9px}
.composer-tools{margin-bottom:3px}
.history-save-bar{padding:4px 8px;margin:3px 0 4px;gap:3px 8px}
.composer-area #status{margin-bottom:4px;font-size:14px}
#end-consultation{padding:6px 10px;margin:4px 0}
#question-expand{padding:4px 9px}
.consent-guide{padding:7px 10px;gap:7px;margin-bottom:5px}
.consent-guide strong{font-size:15px}
.consent-guide p{margin:3px 0 0}
.consent-guide button{padding:8px 10px}
@media(max-width:760px){
 .composer-area{padding-top:4px;padding-bottom:max(5px,env(safe-area-inset-bottom))}
 .composer-area:not(.is-compact){max-height:48dvh}
 #composer-toggle:not([hidden]){min-height:34px;padding:5px 9px;margin-bottom:3px}
 #form #question{height:64px;min-height:64px;max-height:140px}
 #form{padding:5px 8px;gap:3px 8px}
 .history-save-bar .save-option{font-size:13px}
 .review-guide button{margin-left:auto}
 .composer-area.is-compact .review-guide{padding:3px 8px;margin:3px 0}
 .composer-area.is-compact .review-guide strong{font-size:13px}
}

/* Desktop: share a row for voice and expanded editing controls. */
@media(min-width:761px){
 .composer-area{padding:4px 24px 6px}
 .composer-tools{min-height:26px;margin-bottom:2px}
 .review-guide,.review-guide.agreed{padding:2px 8px;margin:2px 0}
 .review-guide button{min-height:30px;padding:3px 9px}
 .history-save-bar{padding:2px 8px;margin:2px 0;gap:3px 8px}
 .history-save-bar summary{padding:4px 7px}
 .composer-area #status{margin:2px 2px 3px;line-height:1.4}
 #end-consultation{padding:4px 10px;margin:3px 0;line-height:1.4}
 #form{padding:6px 10px;gap:3px 10px}
 #form #question{min-height:40px;height:40px;padding:5px 0}
 #question-expand{grid-column:2;grid-row:2;align-self:center;padding:4px 8px;white-space:nowrap}
 #form .voice-controls{grid-column:1;grid-row:2;gap:5px;min-width:0}
 .voice-controls button{padding:4px 9px}
 #form #voice-activity{grid-row:3}
 #form #voice-status{grid-row:4}
}

.review-inline-label{display:flex;align-items:center;gap:8px;cursor:pointer;min-height:32px}.review-inline-label input{width:20px;height:20px;margin:0;flex-shrink:0;accent-color:#173e55}.review-inline-label input:focus-visible{outline:3px solid #438baf;outline-offset:3px}

.parenting-course-entry{margin:0 0 28px;padding:20px 24px;background:#fff;border:1px solid #b8cbd0;border-left:5px solid #a9853e;border-radius:12px;text-align:left}.parenting-course-entry strong{display:block;font-size:18px;color:#164c5a}.parenting-course-entry p{font-size:16px;line-height:1.7;margin:8px 0 16px;color:#465f6b}.parenting-course-entry a{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:12px 20px;background:#164c5a;color:#fff;border-radius:8px;text-decoration:none;font-size:16px;font-weight:700;line-height:1.6}.parenting-course-entry a:hover{background:#246475}.parenting-course-entry a:focus-visible{outline:3px solid #a9853e;outline-offset:4px}@media(max-width:760px){.parenting-course-entry{padding:16px;margin-bottom:20px}.parenting-course-entry a{display:flex;width:100%;box-sizing:border-box;text-align:center}}
