:root{color-scheme:light;--wine:#915058;--wine-dark:#6d303b;--ink:#292d36;--line:#e2d9d7;--paper:#fff;--muted:#67646d}
*{box-sizing:border-box}body{margin:0;background:#f7f4f1;color:var(--ink);font-family:Meiryo,'Yu Gothic',system-ui,sans-serif;font-size:15px;line-height:1.7}button,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,a:focus-visible,textarea:focus-visible,input:focus-visible{outline:3px solid #bf7885;outline-offset:3px}a{color:var(--wine-dark)}.review-header{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:20px max(24px,calc((100vw - 1280px)/2));background:var(--wine-dark);color:white}.review-header a{color:white;text-decoration:none}.review-header small{display:block;font-size:10px;letter-spacing:2px}.review-shell{max-width:1280px;margin:36px auto;padding:0 24px 70px}.eyebrow{color:var(--wine);font-size:12px;font-weight:700;letter-spacing:1px}h1{font-size:clamp(26px,4vw,38px);line-height:1.4;margin:8px 0 12px}h2{font-size:22px;margin:0 0 12px}h3{font-size:17px;margin:12px 0}.prototype-notice,.important-note{background:#fff2dc;border-left:4px solid #b98535;padding:18px 22px;margin:24px 0}.prototype-notice p{margin:7px 0;font-size:13px}.role-switch,.action-row{display:flex;gap:10px;flex-wrap:wrap}.role-switch{margin:26px 0 16px}.role-switch button,.action-row button,.review-button{background:white;border:1px solid var(--line);border-radius:8px;padding:10px 15px;color:var(--ink)}.role-switch button[aria-pressed=true],.primary{background:var(--wine)!important;border-color:var(--wine)!important;color:white!important}.review-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:22px;align-items:start}.review-panel{background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:24px;box-shadow:0 8px 28px #4c253507}.case-list{padding:20px}.case-list h2{font-size:17px}.case-list h2 small{display:block;font-size:12px;color:var(--muted);font-weight:400}.case-choice{display:block;width:100%;text-align:left;border:1px solid var(--line);border-radius:10px;padding:13px;margin-top:12px;background:#fff}.case-choice.selected{border-color:var(--wine);background:#fbf0f1}.case-choice b,.case-choice span,.case-choice em{display:block}.case-choice span{font-size:12px;color:var(--muted)}.case-choice em{font-size:12px;font-style:normal;color:var(--wine);margin-top:5px}.panel-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.panel-heading p{margin:0 0 18px}.status{display:inline-block;white-space:nowrap;font-size:12px;background:#f3e7e9;padding:5px 9px;border-radius:6px;color:var(--wine-dark)}textarea{width:100%;display:block;border:1px solid #cdbdbf;border-radius:8px;padding:14px;resize:vertical;line-height:1.8;background:white;color:var(--ink)}textarea:disabled{background:#f5f3f2}.editor-label{display:block;font-weight:700;margin:20px 0 8px}.muted{font-size:12px;color:var(--muted)}pre{font-family:inherit;white-space:pre-wrap;overflow-wrap:anywhere;padding:16px;background:#f7f4f2;border-radius:8px;font-size:13px}.report-result{font-size:15px;padding:24px}.approval-stamp{color:var(--wine-dark);font-weight:700}.evidence-group{border-top:1px solid var(--line);margin-top:20px;padding-top:4px}.check-card{display:flex;align-items:flex-start;gap:10px;margin:10px 0;background:#faf8f6;border:1px solid var(--line);padding:14px;border-radius:8px}.check-card input{margin-top:7px;accent-color:var(--wine)}.check-card small{display:block;color:var(--muted);font-size:12px}.check-card p{font-size:13px;margin:6px 0}.secondary-actions{margin-top:14px}.history{margin-top:28px;border-top:1px solid var(--line);padding-top:16px}summary{cursor:pointer;color:var(--wine-dark)}.history ol{padding-left:20px}.history li{padding:8px 0}.history li span{display:block;font-size:11px;color:var(--muted)}.history li p{font-size:13px;margin:4px 0}.empty-result{background:#f7f4f2;border-radius:10px;padding:24px;margin:24px 0}.navigation-guard{position:relative;border:2px solid var(--wine);border-radius:12px;padding:24px;margin-bottom:22px;background:#fff7f5}.workflow-notice:not(:empty){padding:14px 18px;margin-bottom:18px;border-radius:8px;background:#eef3ed;color:#304832}.review-layout[inert]{opacity:.55}#unsaved-status{font-size:13px;color:var(--wine-dark);font-weight:700}
@media(max-width:850px){.review-layout{grid-template-columns:1fr}.case-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.case-list h2{grid-column:1/-1}.case-choice{margin:0}.panel-heading{display:block}.status{margin-bottom:16px}.review-header{padding:16px 20px}}
@media(max-width:540px){.review-shell{padding:0 14px}.review-panel{padding:18px}.case-list{grid-template-columns:1fr}.review-header{align-items:flex-start}.review-header>a:last-child{font-size:11px;max-width:130px}.action-row button{width:100%}.role-switch button{flex:1}}

.report-result{font-size:16px;line-height:1.95;padding:clamp(16px,3vw,28px);background:#faf8f6;border-radius:10px;margin-top:20px;overflow-wrap:anywhere}
.report-result p{white-space:pre-wrap;margin:0 0 1.3em;max-width:44em}
.report-result h3{font-size:19px;line-height:1.5;color:var(--wine-dark);border-top:1px solid var(--line);padding-top:22px;margin:30px 0 16px}
.report-result p:last-child{margin-bottom:0}
#report-editor{font-size:16px;min-height:30rem}
@media(max-width:540px){.report-result{padding:16px}.report-result h3{font-size:18px}#report-editor{min-height:24rem}}

.stage-chart-delta-98_4{--delta:98.4%}
.stage-chart-delta-100{--delta:100%}
.stage-chart-cost-28_6{--cost:28.6%}
.stage-chart-cost-71{--cost:71%}
.stage-chart-cost-100{--cost:100%}
.stage-chart-cost-10{--cost:10%}

/* The report stays full width; both roles use the same existing STAGE03 frame. */
.review-layout{display:block}
.case-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:24px}
.case-list h2{grid-column:1/-1;margin-bottom:0}
.case-choice{margin-top:0}
.stage03-document{margin:20px 0 28px;min-width:0}
.sample-stage-tabs>.sample-stage-tab{cursor:default}
.stage-simple-chart{display:block;width:100%;height:auto;max-height:270px;font:14px Meiryo,'Yu Gothic',sans-serif}
.stage-ratio{min-height:190px;display:flex;flex-direction:column;justify-content:center;gap:14px;padding:20px;background:#f7f5f3;border-radius:8px}
.stage-ratio b{font-size:clamp(21px,3vw,31px);color:#35435a}
.stage-ratio span{font-size:14px;color:#687487}
.diagnosis-letter .report-result{padding:0;margin:0;background:none;border-radius:0}
.diagnosis-letter .report-result p{font-size:16px;line-height:2;margin-bottom:16px;max-width:none}
.diagnosis-letter .report-result h3{border-top:1px solid #e7e1dd;padding-top:20px}
.diagnosis-letter #report-editor{font:inherit;font-size:16px;line-height:2;padding:16px;border:1px dashed #b8404d;overflow-y:hidden;resize:vertical;min-height:32rem}
.diagnosis-letter .editor-label{margin-top:0}
.editor-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:10px}
#copy-status:empty{display:none}
@media(max-width:720px){.review-panel{padding:16px}.stage03-document{padding:20px}.sample-stage-tabs>.sample-stage-tab{padding:12px 8px}.diagnosis-letter .report-result p{font-size:15px}}
@media(max-width:540px){.case-list{grid-template-columns:1fr}.sample-stage-tabs>.sample-stage-tab small{display:none}}
