:root {
  --ink: #193336;
  --ink-soft: #577074;
  --deep: #0c555c;
  --teal: #0b7b76;
  --teal-light: #e5f4f1;
  --aqua: #eef8f6;
  --line: #d9e4e4;
  --line-strong: #c8d7d7;
  --surface: #ffffff;
  --canvas: #f4f7f7;
  --amber: #bd6b09;
  --amber-bg: #fff4df;
  --blue: #2f6fa3;
  --blue-bg: #edf5fb;
  --green: #257159;
  --green-bg: #eaf6f0;
  --shadow: 0 12px 32px rgba(20, 56, 59, 0.07);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "Noto Sans JP", system-ui, sans-serif; font-size: 16px; line-height: 1.7; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.header-inner { max-width: 1240px; min-height: 76px; margin: auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; color: white; background: var(--deep); border-radius: 11px; box-shadow: 0 5px 12px rgba(12,85,92,.18); }
.brand-mark svg { width: 24px; height: 24px; }
.brand strong { display: block; font-size: 1.05rem; letter-spacing: .02em; }
.brand small { display: block; margin-top: -2px; color: var(--ink-soft); font-size: .75rem; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.prototype-badge { padding: 5px 10px; color: var(--teal); background: var(--teal-light); border: 1px solid #c8e7e1; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; color: var(--ink-soft); background: white; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }

main { max-width: 1240px; margin: auto; padding: 32px 28px 64px; }
.workflow-shell { margin-bottom: 28px; }
.workflow-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 4px; color: var(--teal); font-size: .75rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.45rem, 2.3vw, 1.9rem); letter-spacing: -.02em; }
.privacy-note { display: flex; align-items: center; gap: 8px; padding: 9px 12px; color: var(--ink-soft); background: white; border: 1px solid var(--line); border-radius: 10px; font-size: .78rem; }
.privacy-note svg { color: var(--teal); }

.stepper { display: grid; grid-template-columns: minmax(170px,1fr) 34px minmax(170px,1fr) 34px minmax(170px,1fr) 34px minmax(170px,1fr); align-items: center; padding: 18px 22px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 7px 24px rgba(20,56,59,.04); }
.step { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 8px; background: transparent; border: 0; border-radius: 10px; text-align: left; cursor: pointer; }
.step:hover { background: #f4f9f8; }
.step-number { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; color: #789093; background: #edf2f2; border-radius: 50%; font-size: .8rem; font-weight: 700; }
.step-label { min-width: 0; }
.step-label strong, .step-label small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-label strong { font-size: .83rem; }
.step-label small { color: #7a8f92; font-size: .7rem; }
.step.active .step-number { color: white; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-light); }
.step.active .step-label strong { color: var(--teal); }
.step-line { height: 1px; background: var(--line); }

.screen { display: none; animation: fade .22s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: .25; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.screen-grid { display: grid; grid-template-columns: 255px minmax(0,1fr); gap: 24px; align-items: start; }
.side-card, .content-card, .check-card, .review-panel, .report-document, .summary-strip, .report-toolbar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.side-card { padding: 20px 16px; position: sticky; top: 106px; }
.side-card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: .86rem; font-weight: 700; }
.completion { color: var(--teal); font-size: .75rem; }
.mini-progress { height: 5px; margin: 10px 0 20px; overflow: hidden; background: #e8eeee; border-radius: 999px; }
.mini-progress span { display: block; height: 100%; background: var(--teal); border-radius: inherit; }
.section-link { width: 100%; display: grid; grid-template-columns: 28px 1fr 18px; align-items: center; gap: 4px; min-height: 46px; padding: 8px 9px; background: transparent; border: 0; border-radius: 8px; text-align: left; font-size: .78rem; cursor: pointer; }
.section-link:hover, .section-link.active { color: var(--deep); background: var(--aqua); font-weight: 600; }
.section-link > span { color: #84989a; font-size: .68rem; }
.section-link svg { width: 16px; color: var(--teal); }
.main-column { min-width: 0; }
.content-card { padding: 28px; margin-bottom: 18px; }
.source-card { padding: 24px 28px; }
.source-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.source-heading h2 { margin-bottom: 3px; font-size: 1.15rem; }
.source-heading p:not(.section-number) { margin-bottom: 0; color: var(--ink-soft); font-size: .8rem; }
.local-processing { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; color: var(--ink-soft); background: #f3f7f7; border: 1px solid var(--line); border-radius: 8px; font-size: .68rem; white-space: nowrap; }
.local-processing svg { width: 15px; color: var(--teal); }
.input-method-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.method-tab { min-width: 0; display: grid; grid-template-columns: 42px 1fr 22px; align-items: center; gap: 12px; padding: 15px; color: var(--ink); background: #fafcfc; border: 1px solid var(--line); border-radius: 11px; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.method-tab:hover { border-color: #9bc8c5; }
.method-tab.active { background: var(--aqua); border-color: #79bdb8; box-shadow: 0 0 0 3px rgba(11,123,118,.08); }
.method-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--teal); background: white; border: 1px solid #d7e9e6; border-radius: 10px; }
.method-tab strong, .method-tab small { display: block; }
.method-tab strong { font-size: .8rem; }
.method-tab small { margin-top: 2px; color: var(--ink-soft); font-size: .68rem; }
.method-check { width: 20px; color: var(--teal); opacity: 0; }
.method-tab.active .method-check { opacity: 1; }
.method-panel { margin-top: 16px; }
.method-panel[hidden] { display: none; }
.manual-message { display: flex; align-items: center; gap: 11px; padding: 12px 14px; color: #4b6669; background: #f5f8f8; border-radius: 9px; }
.manual-message > svg { flex: 0 0 19px; color: var(--teal); }
.manual-message p { margin: 0; }
.manual-message strong, .manual-message span { display: block; }
.manual-message strong { font-size: .74rem; }
.manual-message span { color: var(--ink-soft); font-size: .68rem; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.drop-zone { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; color: var(--ink-soft); background: #f8fbfb; border: 1.5px dashed #9fc5c3; border-radius: 11px; text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.drop-zone[hidden] { display: none; }
.drop-zone:hover, .drop-zone.drag-over { background: var(--aqua); border-color: var(--teal); }
.upload-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 8px; color: var(--teal); background: var(--teal-light); border-radius: 13px; }
.upload-icon svg { width: 25px; height: 25px; }
.drop-zone strong { color: var(--ink); font-size: .82rem; }
.drop-zone > span:not(.upload-icon) { margin: 2px 0; font-size: .68rem; }
.drop-zone b { padding: 5px 13px; color: var(--teal); background: white; border: 1px solid #9bc8c5; border-radius: 7px; font-size: .72rem; }
.drop-zone small { margin-top: 12px; font-size: .66rem; }
.selected-file { display: grid; grid-template-columns: 42px minmax(0,1fr) auto 34px; align-items: center; gap: 12px; padding: 13px 14px; background: #f8fbfb; border: 1px solid var(--line); border-radius: 10px; }
.selected-file[hidden] { display: none; }
.file-type-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--blue); background: var(--blue-bg); border-radius: 9px; }
.file-summary { min-width: 0; }
.file-summary strong, .file-summary small { display: block; }
.file-summary strong { overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.file-summary small { color: var(--ink-soft); font-size: .66rem; }
.file-ready { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: .68rem; font-weight: 600; }
.file-ready svg { width: 17px; }
.remove-file { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; color: #758b8e; background: white; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.remove-file svg { width: 16px; }
.file-import-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 14px; }
.file-import-footer p { display: flex; align-items: flex-start; gap: 7px; max-width: 570px; margin: 0; color: var(--ink-soft); font-size: .68rem; }
.file-import-footer p svg { flex: 0 0 16px; width: 16px; color: var(--teal); }
.button:disabled { color: #91a2a4; background: #e9eeee; border-color: transparent; box-shadow: none; cursor: not-allowed; transform: none; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.card-heading.compact { align-items: center; margin-bottom: 18px; padding-bottom: 16px; }
.card-heading h2 { margin-bottom: 3px; font-size: 1.2rem; }
.card-heading p:not(.section-number) { margin-bottom: 0; color: var(--ink-soft); font-size: .82rem; }
.section-number { margin: 0 0 2px; color: var(--teal); font-size: .7rem; font-weight: 700; letter-spacing: .1em; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.status-chip.complete { color: var(--green); background: var(--green-bg); }
.status-chip span { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.form-grid { display: grid; gap: 18px 20px; }
.two-columns { grid-template-columns: repeat(2, minmax(0,1fr)); }
.field { display: flex; flex-direction: column; gap: 7px; color: #405a5d; font-size: .8rem; font-weight: 600; }
.field.full { grid-column: 1 / -1; }
.field em { margin-left: 5px; color: #a84b46; font-size: .65rem; font-style: normal; font-weight: 500; }
.field input, .field select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: white; border: 1px solid var(--line-strong); border-radius: 8px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(11,123,118,.11); }
.field input[readonly] { color: #335f62; background: #f2f8f7; border-color: #c9e1de; font-weight: 600; cursor: default; }
.field > small { margin-top: -2px; color: var(--ink-soft); font-size: .67rem; font-weight: 400; }
.auto-label { display: inline-flex; margin-left: 6px; padding: 2px 7px; color: var(--teal); background: var(--teal-light); border-radius: 999px; font-size: .62rem; font-weight: 700; vertical-align: middle; }
.intent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.intent-grid > div { padding: 16px; background: #f7f9f9; border: 1px solid #e5ecec; border-radius: 10px; }
.intent-label { display: inline-block; margin-bottom: 7px; font-size: .72rem; font-weight: 700; }
.intent-label.person { color: var(--teal); }
.intent-label.family { color: var(--blue); }
.intent-grid p { margin: 0; font-size: .85rem; }
.ai-heading { align-items: center; }
.api-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: .68rem; font-weight: 600; white-space: nowrap; }
.api-status > span { width: 7px; height: 7px; background: currentColor; border-radius: 50%; }
.api-status.checking { color: #6f8588; background: #eef2f2; }
.api-status.ready { color: var(--green); background: var(--green-bg); }
.api-status.missing { color: #a84b46; background: #fdeeee; }
.plan-draft-field textarea { min-height: 310px; font-weight: 400; }
.ai-notice { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 13px 15px; color: #526d70; background: #f1f6f5; border-radius: 9px; }
.ai-notice > svg { flex: 0 0 19px; width: 19px; color: var(--teal); }
.ai-notice p { margin: 0; }
.ai-notice strong, .ai-notice span { display: block; }
.ai-notice strong { color: var(--ink); font-size: .72rem; }
.ai-notice span { font-size: .67rem; }
.api-error { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 14px 15px; color: #93413d; background: #fff1f0; border: 1px solid #f0cfcc; border-radius: 9px; }
.api-error[hidden] { display: none; }
.api-error > svg { flex: 0 0 19px; width: 19px; }
.api-error strong { font-size: .76rem; }
.api-error p { margin: 2px 0 0; font-size: .7rem; }
.ai-action-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.ai-action-row > p { margin: 0; color: var(--ink-soft); font-size: .68rem; }
.generate-button { min-width: 168px; }
.generate-button.loading svg { animation: spin 1s linear infinite; }
.ai-loading { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; padding: 24px; background: var(--aqua); border: 1px solid #cfe7e3; border-radius: 10px; }
.ai-loading[hidden] { display: none; }
.spinner { width: 28px; height: 28px; border: 3px solid #b9dcda; border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
.ai-loading strong { font-size: .78rem; }
.ai-loading p { margin: 2px 0 0; color: var(--ink-soft); font-size: .68rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-results { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.ai-results[hidden] { display: none; }
.results-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.results-header h3 { margin: 0; font-size: 1.05rem; }
.result-count { padding: 4px 9px; color: var(--teal); background: var(--teal-light); border-radius: 999px; font-size: .68rem; font-weight: 700; }
.ai-summary { padding: 14px 16px; color: #405a5d; background: #f6f9f9; border-left: 3px solid var(--teal); border-radius: 4px 9px 9px 4px; font-size: .76rem; }
.good-points-result { margin-top: 14px; padding: 15px 16px; background: var(--green-bg); border-radius: 9px; }
.good-points-result h4 { margin-bottom: 7px; color: var(--green); font-size: .76rem; }
.good-points-result ul { margin: 0; padding-left: 20px; color: #45675c; font-size: .72rem; }
.generated-issues { display: grid; gap: 12px; margin-top: 14px; }
.generated-issue { padding: 17px; border: 1px solid var(--line); border-radius: 10px; }
.generated-issue-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.generated-issue-head > div { display: flex; align-items: center; gap: 8px; }
.generated-issue-index { width: 26px; height: 26px; display: grid; place-items: center; color: white; background: var(--deep); border-radius: 7px; font-size: .67rem; font-weight: 700; }
.generated-issue h4 { margin: 0; font-size: .82rem; }
.priority-badge { padding: 3px 8px; border-radius: 999px; font-size: .64rem; font-weight: 700; }
.priority-badge.high { color: #a3443e; background: #fdeceb; }
.priority-badge.medium { color: var(--amber); background: var(--amber-bg); }
.priority-badge.low { color: var(--blue); background: var(--blue-bg); }
.issue-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.issue-detail { padding: 12px; background: #f7f9f9; border-radius: 8px; }
.issue-detail.wide { grid-column: 1 / -1; }
.issue-detail strong { display: block; margin-bottom: 4px; color: var(--teal); font-size: .68rem; }
.issue-detail p { margin: 0; color: var(--ink-soft); font-size: .71rem; white-space: pre-wrap; }
.ai-disclaimer { margin: 16px 0 0; color: #708689; font-size: .66rem; }
.text-button { padding: 3px 0; color: var(--teal); background: transparent; border: 0; font-size: .78rem; font-weight: 600; cursor: pointer; }
.page-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.page-actions.wide { max-width: none; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 18px; border: 1px solid transparent; border-radius: 9px; font-size: .82rem; font-weight: 600; cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--deep); box-shadow: 0 5px 12px rgba(12,85,92,.18); }
.button.primary:hover { background: #08494f; }
.button.secondary { color: var(--ink); background: white; border-color: var(--line-strong); }
.button.secondary.accent { color: var(--teal); border-color: #9dccca; }
.button.ghost { color: var(--ink-soft); background: #f5f7f7; }
.button svg { width: 17px; }

.summary-strip, .report-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 24px 28px; margin-bottom: 22px; }
.summary-strip h2, .report-toolbar h2 { margin-bottom: 3px; font-size: 1.35rem; }
.summary-strip p:not(.eyebrow), .report-toolbar p:not(.eyebrow) { margin-bottom: 0; color: var(--ink-soft); font-size: .82rem; }
.summary-counts { display: flex; align-items: center; gap: 19px; }
.summary-counts > div:not(.divider) { display: grid; text-align: center; }
.summary-counts strong { font-size: 1.35rem; line-height: 1.2; }
.summary-counts span { color: var(--ink-soft); font-size: .68rem; }
.summary-counts .divider { width: 1px; height: 36px; background: var(--line); }
.summary-counts .good strong { color: var(--green); }
.summary-counts .attention strong { color: var(--amber); }
.summary-counts .missing strong { color: var(--blue); }
.check-layout { display: grid; grid-template-columns: minmax(0,1fr) 285px; gap: 22px; align-items: start; }
.check-list { display: grid; gap: 12px; }
.check-card { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 15px; padding: 20px; box-shadow: 0 5px 18px rgba(20,56,59,.04); }
.check-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; }
.attention-card .check-icon { color: var(--amber); background: var(--amber-bg); }
.okay-card .check-icon { color: var(--green); background: var(--green-bg); }
.missing-card .check-icon { color: var(--blue); background: var(--blue-bg); }
.check-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.check-top > div { display: flex; align-items: center; gap: 10px; }
.check-index { color: #8aa0a2; font-size: .68rem; font-weight: 600; }
.check-top h3 { margin: 0; font-size: .94rem; }
.check-content > p { margin: 7px 0 0; color: var(--ink-soft); font-size: .8rem; }
.result-badge { display: inline-flex; align-items: center; justify-content: center; padding: 3px 8px; border-radius: 999px; font-size: .66rem; font-weight: 700; white-space: nowrap; }
.result-badge.warning { color: var(--amber); background: var(--amber-bg); }
.result-badge.okay { color: var(--green); background: var(--green-bg); }
.result-badge.missing { color: var(--blue); background: var(--blue-bg); }
.detail-link { display: inline-flex; align-items: center; gap: 2px; margin-top: 8px; padding: 0; color: var(--teal); background: none; border: 0; font-size: .74rem; font-weight: 600; cursor: pointer; }
.detail-link svg { width: 15px; }
.collapsed-checks { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px 12px; padding: 18px 20px; background: white; border: 1px solid var(--line); border-radius: var(--radius); font-size: .78rem; }
.collapsed-checks > span { color: #8aa0a2; font-size: .68rem; }
.procedure-card > p { color: var(--ink-soft); font-size: .75rem; }
.info-icon { width: 20px; height: 20px; display: grid; place-items: center; color: var(--teal); background: var(--teal-light); border-radius: 50%; font-size: .68rem; }
.procedure-item { display: flex; align-items: flex-start; gap: 10px; padding: 13px 0; border-bottom: 1px solid #e7eded; cursor: pointer; }
.procedure-item input { width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--teal); }
.procedure-item strong, .procedure-item small { display: block; }
.procedure-item strong { font-size: .75rem; }
.procedure-item small { color: #829699; font-size: .68rem; }
.procedure-note { margin-top: 16px; padding: 12px; color: #526d70; background: var(--aqua); border-radius: 8px; font-size: .7rem; }

.review-progress { min-width: 210px; }
.review-progress > span { display: block; color: var(--ink-soft); font-size: .75rem; text-align: right; }
.review-progress strong { color: var(--teal); font-size: 1.05rem; }
.review-progress .mini-progress { margin: 8px 0 0; }
.improve-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 22px; align-items: start; }
.issue-nav { display: grid; gap: 8px; }
.issue-link { display: grid; grid-template-columns: 10px 1fr 22px; align-items: center; gap: 9px; padding: 13px 12px; background: white; border: 1px solid var(--line); border-radius: 10px; text-align: left; cursor: pointer; }
.issue-link.active { border-color: #8bc9c4; box-shadow: 0 0 0 3px rgba(11,123,118,.08); }
.issue-link small, .issue-link strong { display: block; }
.issue-link small { color: var(--ink-soft); font-size: .64rem; }
.issue-link strong { font-size: .73rem; }
.issue-link b { width: 21px; height: 21px; display: grid; place-items: center; color: #6f8588; background: #eef2f2; border-radius: 50%; font-size: .63rem; }
.issue-dot { width: 8px; height: 8px; border-radius: 50%; }
.warning-dot { background: #d58727; }
.missing-dot { background: #4c8cbd; }
.review-panel { padding: 28px; }
.review-header { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.review-header h3 { margin: 9px 0 0; font-size: 1.15rem; }
.issue-counter { color: #809497; font-size: .72rem; }
.quote-box { padding: 16px; background: #f7f9f9; border-left: 3px solid #92b8b7; border-radius: 4px 9px 9px 4px; }
.quote-box span { color: var(--ink-soft); font-size: .68rem; font-weight: 700; }
.quote-box blockquote { margin: 7px 0 0; font-size: .84rem; }
.explanation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.explanation-grid > div { padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.explanation-grid h4 { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; font-size: .78rem; }
.explanation-grid h4 svg { color: var(--teal); }
.explanation-grid p { margin: 0; color: var(--ink-soft); font-size: .76rem; }
.template-box { padding: 18px; background: var(--aqua); border: 1px solid #cfe7e3; border-radius: 10px; }
.template-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.template-title h4 { margin: 0; font-size: .82rem; }
.template-title span { color: var(--ink-soft); font-size: .66rem; }
textarea { resize: vertical; line-height: 1.7; font-size: .8rem; }
.question-box { margin-top: 16px; padding: 14px 16px; background: var(--blue-bg); border-radius: 9px; }
.question-box strong { color: var(--blue); font-size: .76rem; }
.question-box p { margin: 4px 0 0; color: #4e687c; font-size: .74rem; }
.review-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; flex-wrap: wrap; }

.report-toolbar { box-shadow: none; }
.toolbar-buttons { display: flex; gap: 10px; }
.report-document { overflow: hidden; }
.report-cover { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 34px; color: white; background: linear-gradient(125deg, #0d5057, #0b7773); }
.report-label { display: inline-block; margin-bottom: 6px; color: #bce4df; font-size: .68rem; font-weight: 700; letter-spacing: .1em; }
.report-cover h3 { margin: 0 0 4px; font-size: 1.5rem; }
.report-cover p { margin: 0; color: #dbeeed; font-size: .8rem; }
.report-meta { display: grid; grid-template-columns: auto auto; gap: 3px 16px; padding: 12px 16px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; }
.report-meta span { color: #cce5e3; font-size: .66rem; }
.report-meta strong { font-size: .72rem; }
.report-overview { display: flex; align-items: center; gap: 24px; padding: 28px 34px; border-bottom: 1px solid var(--line); }
.score-ring { position: relative; flex: 0 0 84px; width: 84px; height: 84px; }
.score-ring svg { width: 84px; height: 84px; transform: rotate(-90deg); stroke-width: 7; }
.ring-bg { stroke: #e5eded; }
.ring-value { stroke: var(--teal); stroke-dasharray: 171 214; }
.score-ring > span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.05; }
.score-ring strong { font-size: 1.35rem; }
.score-ring small { color: var(--ink-soft); font-size: .58rem; }
.overview-copy h4 { margin-bottom: 4px; font-size: 1rem; }
.overview-copy p { margin-bottom: 10px; color: var(--ink-soft); font-size: .78rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.report-sections { display: grid; grid-template-columns: .85fr 1.15fr; gap: 0; }
.report-sections > section { padding: 28px 34px; }
.report-sections > section + section { border-left: 1px solid var(--line); }
.report-section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.report-section-heading h4 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .86rem; }
.report-section-heading > span { color: var(--ink-soft); font-size: .68rem; }
.heading-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; }
.heading-icon svg { width: 17px; }
.good-icon { color: var(--green); background: var(--green-bg); }
.warning-icon { color: var(--amber); background: var(--amber-bg); }
.positive-list { padding: 0; margin: 0; list-style: none; }
.positive-list li { position: relative; padding: 0 0 16px 18px; }
.positive-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; background: var(--green); border-radius: 50%; }
.positive-list strong { font-size: .76rem; }
.positive-list p { margin: 3px 0 0; color: var(--ink-soft); font-size: .72rem; }
.report-issue { padding: 13px 0; border-top: 1px solid #e7eded; }
.report-issue > div { display: flex; align-items: center; gap: 8px; }
.report-issue strong { font-size: .76rem; }
.report-issue p { margin: 6px 0 2px; color: var(--ink-soft); font-size: .72rem; }
.disclaimer { display: flex; gap: 10px; margin: 0 34px 28px; padding: 13px 15px; color: #526d70; background: #f1f6f5; border-radius: 9px; }
.disclaimer svg { flex: 0 0 18px; width: 18px; color: var(--teal); }
.disclaimer p { margin: 0; font-size: .68rem; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; padding: 11px 16px; color: white; background: #193336; border-radius: 9px; box-shadow: 0 10px 28px rgba(0,0,0,.2); font-size: .78rem; opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 920px) {
  .stepper { grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 12px; }
  .step-line { display: none; }
  .step { justify-content: center; }
  .step-label small { display: none; }
  .screen-grid, .check-layout, .improve-layout { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .section-nav { display: none; }
  .procedure-card { order: -1; }
  .procedure-card .procedure-item { display: inline-flex; width: 49%; vertical-align: top; }
  .issue-nav { grid-template-columns: repeat(5, minmax(130px,1fr)); overflow-x: auto; padding-bottom: 5px; }
  .report-sections { grid-template-columns: 1fr; }
  .report-sections > section + section { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 680px) {
  body { font-size: 15px; }
  .header-inner { min-height: 66px; padding: 0 16px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand strong { font-size: .91rem; }
  .brand small, .prototype-badge { display: none; }
  main { padding: 22px 14px 48px; }
  .workflow-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 18px; }
  .privacy-note { width: 100%; }
  .stepper { grid-template-columns: repeat(4, minmax(0,1fr)); padding: 8px 5px; }
  .step { flex-direction: column; gap: 3px; padding: 7px 2px; text-align: center; }
  .step-number { flex-basis: 28px; width: 28px; height: 28px; }
  .step-label strong { font-size: .63rem; }
  .content-card, .review-panel { padding: 20px 16px; }
  .source-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .input-method-tabs { grid-template-columns: 1fr; }
  .method-tab { grid-template-columns: 38px 1fr 22px; padding: 13px; }
  .method-icon { width: 38px; height: 38px; }
  .drop-zone { min-height: 180px; padding: 20px 12px; }
  .selected-file { grid-template-columns: 38px minmax(0,1fr) 32px; }
  .file-ready { display: none; }
  .file-import-footer { align-items: stretch; flex-direction: column; }
  .file-import-footer .button { width: 100%; }
  .ai-heading { align-items: flex-start; }
  .ai-action-row { align-items: stretch; flex-direction: column; }
  .generate-button { width: 100%; }
  .issue-detail-grid { grid-template-columns: 1fr; }
  .issue-detail.wide { grid-column: auto; }
  .two-columns, .intent-grid, .explanation-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .card-heading { padding-bottom: 17px; margin-bottom: 18px; }
  .summary-strip, .report-toolbar { align-items: flex-start; flex-direction: column; padding: 20px 17px; }
  .summary-counts { width: 100%; justify-content: space-around; gap: 8px; }
  .check-card { grid-template-columns: 34px minmax(0,1fr); gap: 10px; padding: 16px 13px; }
  .check-icon { width: 34px; height: 34px; }
  .check-top { align-items: flex-start; }
  .check-top > div { align-items: flex-start; flex-direction: column; gap: 0; }
  .collapsed-checks { grid-template-columns: 25px 1fr auto; padding: 16px 13px; }
  .procedure-card .procedure-item { display: flex; width: 100%; }
  .review-progress { min-width: 100%; width: 100%; }
  .review-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .review-actions .button { padding-left: 8px; padding-right: 8px; }
  .page-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .page-actions .button { padding-left: 10px; padding-right: 10px; }
  .toolbar-buttons { width: 100%; }
  .toolbar-buttons .button { flex: 1; }
  .report-cover { align-items: flex-start; flex-direction: column; padding: 24px 20px; }
  .report-meta { width: 100%; }
  .report-overview { align-items: flex-start; padding: 22px 20px; }
  .report-sections > section { padding: 22px 20px; }
  .disclaimer { margin: 0 20px 22px; }
  .toast { width: calc(100% - 28px); text-align: center; }
}

@media print {
  body { background: white; }
  .app-header, .workflow-shell, .screen:not(#screen-report), .report-toolbar, #screen-report > .page-actions, .toast { display: none !important; }
  main { max-width: none; padding: 0; }
  #screen-report { display: block !important; }
  .report-document { border: 0; box-shadow: none; }
}
