:root { color-scheme: light; --bg: #f6f5ef; --paper: #fffefa; --ink: #253e35; --muted: #5e6b63; --green: #205749; --soft: #edf2e9; --line: #d7ded4; --edge: #7b8c80; --error: #a12e28; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; font-size: 16px; line-height: 1.7; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, a { touch-action: manipulation; }
a { color: var(--green); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #aa590e; outline-offset: 4px; }
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 92px; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); display: flex; gap: 10px; align-items: center; text-decoration: none; font-size: 13px; font-weight: 650; min-height: 44px; }
.brand-mark { background: var(--green); color: white; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-size: 21px; }
.day { margin-left: 8px; font-size: 10px; letter-spacing: .12em; color: var(--muted); }
.header-help { min-height: 44px; display: flex; align-items: center; gap: 12px; font-size: 13px; text-decoration: none; }
.intro { padding: 48px 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.eyebrow { font-size: 11px; letter-spacing: .12em; font-weight: 650; color: var(--muted); }
.intro .eyebrow { display: flex; gap: 9px; align-items: center; }
.intro .eyebrow > span { height: 6px; width: 6px; background: #b36b39; border-radius: 50%; }
h1 { margin: 12px 0 16px; font-size: clamp(29px, 3.4vw, 43px); letter-spacing: .06em; line-height: 1.45; font-weight: 600; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; }
.mobile-break { display: none; }
.lead { color: #47574c; line-height: 1.9; font-size: 14px; }
.intro-note { display: flex; gap: 12px; align-items: flex-start; padding: 20px; border: 1px solid var(--line); border-radius: 6px; transform: rotate(-1deg); background: #efefe4; min-width: 282px; }
.intro-note strong { font-size: 13px; }
.intro-note p { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.8; }
.note-icon { font-size: 21px; }
.scope-note { font-size: 12px; color: var(--muted); margin-bottom: 30px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: 40px; align-items: start; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 20px 26px 0; }
.steps button { min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-bottom: 2px solid var(--line); background: transparent; color: var(--muted); font-size: 13px; padding: 4px; }
.steps button span { height: 24px; width: 24px; border: 1px solid var(--edge); border-radius: 50%; display: grid; place-items: center; font-size: 11px; }
.steps button[aria-current] { color: var(--green); border-bottom-color: var(--green); font-weight: 700; }
.steps button[aria-current] span { background: var(--green); color: white; border-color: var(--green); }
.steps button:hover { background: var(--soft); }
.form-body { padding: 28px; }
.step-heading { margin-bottom: 28px; }
.step-heading h2 { font-size: 21px; line-height: 1.65; margin: 7px 0 6px; scroll-margin-top: 24px; }
.muted { color: var(--muted); font-size: 13px; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 24px; min-width: 0; }
.field > label, legend { display: block; font-weight: 600; font-size: 13px; margin-bottom: 9px; }
.optional { font-size: 10px; color: var(--muted); font-weight: 400; margin-left: 5px; white-space: nowrap; }
select, input[type="text"] { color: var(--ink); background: #fff; width: 100%; height: 48px; border: 1px solid var(--edge); border-radius: 5px; font-size: 16px; padding: 10px 12px; }
select { padding-right: 24px; text-overflow: ellipsis; }
input::placeholder { color: #6c746c; opacity: 1; font-size: 14px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--green); width: 18px; height: 18px; flex: 0 0 18px; margin: 0; }
.money-input { position: relative; }
.money-input input { padding-right: 40px; font-variant-numeric: tabular-nums; }
.money-input > span { position: absolute; right: 14px; top: 11px; font-size: 13px; pointer-events: none; color: var(--muted); }
.field-help { color: var(--muted); font-size: 11px; line-height: 1.8; margin-top: 7px; }
.field-error { font-size: 12px; color: var(--error); line-height: 1.7; margin-top: 7px; }
[aria-invalid="true"] { border-color: var(--error) !important; }
.error-message, .notice { color: var(--error); background: #fff0eb; padding: 12px; font-size: 13px; margin: 0 0 20px; border-left: 3px solid var(--error); }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
.check-label { display: flex; align-items: center; gap: 12px; min-height: 46px; cursor: pointer; font-size: 13px; line-height: 1.6; }
.charge-fields { border-top: 1px solid var(--line); margin-top: 16px; }
.charge-row { border-bottom: 1px solid var(--line); padding: 6px 0; }
.charge-row:has(input:checked) { background: #f5f7f0; }
.charge-row .check-label { padding: 4px 8px; }
.charge-amount { margin: 0 12px 12px 38px; }
.charge-amount label { font-size: 11px; display: block; margin-bottom: 5px; }
.subtotal { margin: 16px 0 30px; padding: 13px 14px; background: var(--soft); border-radius: 4px; font-size: 13px; font-weight: 650; }
.subtotal p { font-size: 10px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.concern-option { padding: 6px 8px; margin-bottom: 8px; border: 1px solid var(--edge); border-radius: 5px; }
.concern-option:has(input:checked) { background: var(--soft); border-color: var(--green); }
.soft-note { background: var(--soft); font-size: 12px; border-radius: 5px; padding: 14px 16px; margin-bottom: 24px; }
.document-row { margin-bottom: 22px; }
.document-row legend { margin: 0; }
.document-row .field-help { margin-top: 2px; }
.document-choices { display: flex; gap: 8px; margin-top: 10px; }
.document-choices label { position: relative; flex: 1; }
.document-choices input { position: absolute; left: 12px; top: 14px; }
.document-choices span { display: flex; align-items: center; justify-content: center; padding-left: 16px; min-height: 46px; font-size: 12px; border: 1px solid var(--edge); border-radius: 5px; cursor: pointer; }
.document-choices input:checked + span { background: var(--soft); border-color: var(--green); font-weight: 700; }
.document-choices input:focus-visible + span { outline: 3px solid #aa590e; outline-offset: 3px; }
.form-actions { display: flex; gap: 12px; margin-top: 30px; }
.button { min-height: 48px; padding: 11px 16px; border: 1px solid var(--green); border-radius: 5px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 12px; line-height: 1.5; transition: background .15s; }
.primary { background: var(--green); color: #fff; }
.primary:hover { background: #154638; }
.secondary { background: transparent; color: var(--green); }
.secondary:hover { background: #e6ede2; }
#next { flex: 1; }
.text-button { background: none; border: 0; text-decoration: underline; text-underline-offset: 4px; color: var(--muted); font-size: 12px; min-height: 44px; padding: 8px 0; }
.text-button:hover { color: var(--green); }
#preview { display: block; margin: 8px auto -8px; }
.draft-area { border-top: 1px solid var(--line); padding: 14px 28px 18px; background: #f4f6ef; }
.draft-area .field-help { margin: 0 0 0 30px; }
.storage-status { font-size: 11px; color: var(--muted); margin-top: 9px; }
.storage-error { color: var(--error); }
.reset { font-size: 11px; margin-top: 3px; }
.preview-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 1px 0 14px; }
.preview-label .eyebrow { font-size: 9px; }
.live-label { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.live-label i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.paper { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--green); box-shadow: 0 6px 18px #34483608, 4px 4px 0 -1px #eeeee5, 4px 4px 0 0 #d7ded4; padding: 30px 30px 24px; }
.paper-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.paper-kicker { font-size: 10px; letter-spacing: .1em; color: var(--muted); margin-bottom: 5px; }
.paper h2 { font-size: 23px; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-weight: 600; letter-spacing: .05em; scroll-margin-top: 24px; }
.paper-mark { flex-shrink: 0; border: 1px solid #819482; width: 44px; height: 44px; display: grid; place-content: center; text-align: center; font-size: 9px; letter-spacing: .13em; line-height: 1.5; color: #58715f; }
.paper-intro { font-size: 10px; color: var(--muted); margin: 13px 0 22px; }
.memo-section { margin-top: 20px; }
.memo-section h3 { display: flex; align-items: center; gap: 10px; font-size: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 12px; }
.memo-section h3 > span { font-size: 10px; font-weight: 400; color: #667b69; }
.memo-facts { display: grid; grid-template-columns: 1fr minmax(0, 1.2fr); gap: 5px 12px; margin: 0; font-size: 11px; }
.memo-facts dt { color: var(--muted); }
.memo-facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.memo-amounts { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; padding: 14px; background: #f0f3e9; margin-top: 13px; border-radius: 3px; }
.memo-amounts > div + div { border-left: 1px solid #cfd9ca; padding-left: 16px; }
.memo-amounts span { display: block; font-size: 9px; color: var(--muted); margin-bottom: 4px; }
.memo-amounts strong { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.paper-small { font-size: 9px; color: var(--muted); margin-top: 6px; }
.memo-subtotal { font-size: 11px; margin-top: 10px; font-weight: 600; }
.comparison { font-size: 10px; margin-top: 10px; background: #f6eedf; border-left: 2px solid #8c6927; padding: 10px; color: #654b23; }
.question-list { padding-left: 1.3em; margin: 0; font-size: 11px; line-height: 1.9; }
.question-list li + li { margin-top: 6px; }
.question-list li::marker { color: #60816d; }
.document-summary { display: flex; gap: 10px; align-items: flex-start; font-size: 10px; margin: 8px 0; }
.doc-badge { font-size: 9px; border: 1px solid #819482; border-radius: 3px; line-height: 1.7; flex: 0 0 43px; text-align: center; margin-top: 2px; }
.have .doc-badge { background: var(--soft); }
.paper-bottom { border-top: 1px dashed var(--line); margin-top: 22px; padding-top: 14px; font-size: 10px; }
.paper-bottom strong { font-size: 11px; }
.paper-bottom p { color: var(--muted); font-size: 9px; margin: 5px 0; }
.paper-bottom a { display: inline-flex; align-items: center; min-height: 44px; }
.export-area { margin: 28px 0 0; }
.export-heading { font-size: 13px; margin-bottom: 12px; font-weight: 600; }
.export-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.export-buttons .button { font-size: 12px; flex: 1 1 auto; }
.export-status { font-size: 12px; margin-top: 8px; min-height: 1.7em; color: var(--green); }
.consultation { display: grid; grid-template-columns: 1fr 240px; align-items: center; gap: 40px; background: #e9eee3; margin-top: 56px; padding: 32px 38px; border: 1px solid #d2ddcd; border-radius: 8px; }
.consultation h2 { font-size: 23px; font-weight: 600; margin: 8px 0; }
.consultation p:not(.eyebrow, .field-help) { font-size: 13px; }
.consultation .field-help { margin-top: 12px; }
.contact-actions { text-align: center; }
.phone-link { color: var(--green); display: block; border: 1px solid var(--green); border-radius: 6px; background: var(--paper); padding: 14px 18px; text-decoration: none; }
.phone-link > span { font-size: 11px; display: block; }
.phone-link strong { display: block; font-size: 43px; font-weight: 550; line-height: 1.3; letter-spacing: .06em; }
.phone-link strong span { font-size: 25px; }
.phone-link small { font-size: 10px; }
.phone-link:hover { background: #f5faee; }
.directory-link { font-size: 11px; min-height: 44px; display: inline-flex; align-items: center; margin-top: 8px; }
.about { font-size: 12px; color: var(--muted); margin: 24px 0; }
.about summary { cursor: pointer; min-height: 44px; padding: 11px 0; color: var(--ink); }
.about p { max-width: 800px; margin: 8px 0 16px; }
.about li a { min-height: 44px; display: inline-flex; align-items: center; }
.about ul { padding-left: 20px; }
.app-sharing { margin: 42px 0; max-width: 650px; }
.app-sharing > p { font-size: 14px; font-weight: 600; }
.app-sharing > p span { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 5px; }
.share { max-width: 100%; min-width: 0; }
.share__note { font-size: 11px; }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; border-top: 1px solid var(--line); padding: 22px 0; font-size: 10px; color: var(--muted); align-items: center; }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; }
.skip-link { position: fixed; top: -80px; left: 12px; z-index: 10; background: var(--paper); padding: 12px 20px; }
.skip-link:focus { top: 12px; }
.copy-fallback { position: fixed; left: -9999px; top: 0; }
dialog { width: min(480px, calc(100% - 32px)); padding: 28px; background: var(--paper); color: var(--ink); border: 1px solid var(--edge); border-radius: 10px; }
dialog::backdrop { background: #13291f80; }
dialog h2 { font-size: 20px; }
dialog p { font-size: 13px; margin: 16px 0 24px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.danger { background: var(--error); color: white; border-color: var(--error); }
.print-sources { display: none; }
@media (max-width: 1000px) {
  .workspace { gap: 24px; }
  .intro-note { min-width: 245px; padding: 16px; }
  .form-body, .draft-area { padding-inline: 22px; }
  .paper { padding: 24px 22px; }
  .two-fields { grid-template-columns: 1fr; gap: 0; }
  .paper h2 { font-size: 20px; }
  .memo-amounts strong { font-size: 16px; }
}
@media (max-width: 800px) {
  .wrap { width: min(620px, calc(100% - 40px)); }
  .site-header { min-height: 76px; }
  .day { display: none; }
  .intro { display: block; padding-top: 32px; }
  .intro-note { margin-top: 24px; max-width: 100%; transform: none; padding: 14px 18px; align-items: center; }
  .intro-note p { margin-top: 3px; font-size: 11px; }
  .intro-note br { display: none; }
  .workspace { grid-template-columns: 1fr; gap: 36px; }
  .two-fields { grid-template-columns: 1fr 1fr; gap: 14px; }
  .scope-note { font-size: 11px; margin-bottom: 26px; }
  .preview-label { margin-top: 0; }
  .paper { padding: 26px; }
  .paper h2 { font-size: 23px; }
  .memo-amounts strong { font-size: 20px; }
  .memo-facts, .question-list, .memo-subtotal { font-size: 14px; }
  .memo-section h3 { font-size: 14px; }
  .document-summary { font-size: 13px; }
  .doc-badge { font-size: 11px; flex-basis: 48px; }
  .paper-intro, .paper-small, .paper-bottom p, .comparison { font-size: 11px; }
  .paper-bottom, .paper-bottom strong { font-size: 12px; }
  .consultation { grid-template-columns: 1fr; gap: 24px; padding: 26px; margin-top: 40px; }
  .contact-actions { max-width: 290px; width: 100%; }
}
@media (max-width: 480px) {
  .wrap { width: calc(100% - 32px); }
  .brand { font-size: 11px; gap: 7px; }
  .brand-mark { height: 25px; width: 25px; font-size: 18px; }
  .header-help { font-size: 11px; gap: 5px; }
  .intro { padding-top: 30px; padding-bottom: 18px; }
  h1 { font-size: 32px; margin-top: 10px; line-height: 1.5; }
  .mobile-break { display: block; }
  .lead { font-size: 12px; }
  .intro-note { gap: 10px; margin-top: 22px; }
  .intro-note strong { font-size: 12px; }
  .intro-note br { display: block; }
  .steps { padding: 14px 18px 0; }
  .form-body { padding: 22px 20px; }
  .step-heading h2 { font-size: 19px; }
  .two-fields { grid-template-columns: 1fr; gap: 0; }
  .field { margin-bottom: 22px; }
  .muted { font-size: 12px; }
  .paper { padding: 24px 20px; }
  .paper h2 { font-size: 21px; }
  .memo-amounts { gap: 12px; padding: 12px; }
  .memo-amounts > div + div { padding-left: 12px; }
  .memo-amounts strong { font-size: 17px; }
  .memo-facts { font-size: 14px; }
  .export-buttons .primary { flex-basis: 100%; }
  .consultation { padding: 24px 22px; }
  .consultation h2 { font-size: 21px; }
  .document-choices input { left: 9px; }
  .preview-label .eyebrow { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@page { size: A4; margin: 12mm; }
@media print {
  body { background: #fff; color: #15271e; font-size: 10pt; line-height: 1.5; }
  body > :not(main), main > :not(.workspace), .workspace > :not(.memo-area), .memo-area > :not(.paper) { display: none !important; }
  .wrap, .workspace, .memo-area { display: block; width: 100%; margin: 0; padding: 0; }
  .paper { padding: 0; border: 0; box-shadow: none; background: #fff; }
  .paper h2 { font-size: 18pt; }
  .paper-kicker { font-size: 8pt; }
  .paper-mark { display: none; }
  .paper-intro { font-size: 8pt; margin: 8px 0 14px; }
  .paper-intro br { display: none; }
  .memo-section { margin-top: 10px; break-inside: avoid; }
  .memo-section h3 { font-size: 10pt; margin-bottom: 8px; padding-bottom: 5px; }
  .memo-facts, .memo-subtotal, .question-list, .document-summary { font-size: 9pt; }
  .memo-facts { grid-template-columns: 1fr 2fr; }
  .memo-amounts { background: #f4f6f1; border: 1px solid #b3bdb0; padding: 8px 12px; margin-top: 8px; }
  .memo-amounts strong { font-size: 13pt; }
  .memo-amounts span, .paper-small, .doc-badge, .paper-bottom p { font-size: 8pt; }
  .question-list { line-height: 1.6; }
  .question-list li + li { margin-top: 3px; }
  .paper-bottom { margin-top: 14px; padding-top: 8px; break-inside: avoid; }
  .paper-bottom a { display: none; }
  .comparison { font-size: 8pt; padding: 6px 10px; }
  .print-sources { display: block; font-size: 6.5pt; color: #495b4f; margin-top: 10px; overflow-wrap: anywhere; line-height: 1.6; }
  .print-sources p { margin: 2px 0; }
}
