[hidden]{display:none!important}*{box-sizing:border-box}body{margin:0;font-family:"Yu Gothic",Meiryo,sans-serif;color:#10213a;background:#edf2f7}header{height:58px;background:#071a31;color:#fff;display:flex;align-items:center;gap:7px;padding:8px 12px;position:sticky;top:0;z-index:10}header b{margin-right:auto}button,header label{padding:8px 10px;border:1px solid #8da0b6;border-radius:5px;background:#fff;cursor:pointer}header button,header label{background:#16324e;color:#fff}.main{background:#0878b9!important}.layout{display:grid;grid-template-columns:300px minmax(480px,1fr) minmax(500px,1fr);height:calc(100vh - 58px)}aside{background:#fff;padding:10px;overflow:auto}.sideBtns{display:flex;gap:6px}.sideBtns button{flex:1}.page{display:grid;grid-template-columns:18px 1fr 30px 20px;gap:5px;border:1px solid #ccd6e3;border-radius:7px;padding:7px;margin:5px 0}.page.active{border:2px solid #1476bd;background:#eaf5ff}.page small{display:block;color:#66758a}.move{display:flex;flex-direction:column}.move button{padding:0;width:26px;height:22px}main{padding:14px;overflow:auto}.steps{padding:10px;background:#e9f4ff;border:1px solid #9dc4e9;border-radius:7px;margin-bottom:10px}section{background:#fff;padding:16px;border-radius:9px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.field{display:flex;flex-direction:column;gap:4px}.field input,.field textarea,.field select{padding:8px;border:1px solid #aebbd0;border-radius:5px;font:inherit}.field textarea{min-height:110px}.wide{grid-column:1/-1}.card{padding:10px;border:1px solid #ccd6e3;margin:8px 0;border-radius:6px}.pdfBtns{border-top:1px solid #ddd;padding-top:12px;margin-top:15px;display:flex;gap:8px}.preview{background:#dce3eb;overflow:auto;padding:15px}.a4{width:210mm;min-height:297mm;margin:0 auto 20px;background:#fff;padding:15mm 17mm 16mm;color:#111;font-family:"Yu Gothic",Meiryo,sans-serif;font-size:10.5pt;line-height:1.72;position:relative}.a4.landscape{width:297mm;min-height:210mm;padding:13mm 15mm}.title{font-size:15pt;margin:0 0 12mm}.cover{padding:14mm 18mm}.coverMeta{position:absolute;top:16mm;left:18mm;right:18mm;font-size:9.5pt}.coverMeta div{display:grid;grid-template-columns:25mm 1fr}.coverProject{position:absolute;top:101mm;left:20mm;right:20mm;text-align:center;font-size:12pt}.coverDoc{position:absolute;top:135mm;left:15mm;right:15mm;text-align:center;font-size:22pt;font-weight:bold}.coverDate{position:absolute;top:184mm;left:20mm;right:20mm;text-align:center}.coverCompany{position:absolute;top:219mm;left:20mm;right:20mm;text-align:center}.sign{position:absolute;bottom:14mm;left:18mm;right:18mm;border-collapse:collapse;width:174mm;font-size:8.5pt}.sign th,.sign td{border:1px solid #222;text-align:center}.sign th{height:7mm}.sign td{height:18mm}.toc h1{text-align:center;font-size:16pt;letter-spacing:.35em;margin:5mm 0 15mm}.tocRow{display:flex;margin:1.7mm 0}.dots{flex:1;border-bottom:1px dotted #333;margin:0 2mm 2mm}.a4 h2{font-size:11pt;margin:7mm 0 2mm}.kv{width:100%;border-collapse:collapse}.kv th,.kv td{border:0;padding:1.5mm 2mm}.kv th{width:38mm;text-align:justify;text-align-last:justify;font-weight:normal}.table{width:100%;border-collapse:collapse;font-size:8.5pt}.table th,.table td{border:1px solid #333;padding:1.5mm}.table input{width:100%}dialog{padding:22px;border-radius:9px}dialog input{display:block;width:450px;padding:8px;margin:8px 0}#busy{position:fixed;inset:0;background:#0008;display:grid;place-items:center;z-index:30}#busy>div{background:#fff;padding:25px;border-radius:8px;display:grid;gap:10px;width:360px}@media(max-width:1200px){.layout{grid-template-columns:280px 1fr}.preview{display:none}}@media print{header,aside,main{display:none}.layout{display:block}.preview{display:block;padding:0}.a4{box-shadow:none;break-after:page;margin:0}}

.signature-editor{margin-top:16px;border-top:2px solid #1f4e78;padding-top:12px}.signature-editor h3{margin:0 0 8px}.signature-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.signature-card{border:1px solid #b7c4d4;border-radius:7px;padding:10px;background:#f8fafc}.signature-card h4{margin:0 0 8px}.signature-card .stamp-preview{width:54px;height:54px;object-fit:contain;border:1px dashed #aaa;background:#fff}.signature-card .stamp-actions{display:flex;gap:6px;align-items:center;margin-top:7px}.signature-note{font-size:12px;color:#65758a;margin:5px 0 12px}
.sign-area{position:absolute;left:18mm;right:18mm;bottom:13mm;font-size:8pt;line-height:1.25}.sign-table{border-collapse:collapse;width:100%;table-layout:fixed}.sign-table th,.sign-table td{border:.25mm solid #222;text-align:center;vertical-align:middle;padding:1mm}.sign-table th{height:7mm;font-weight:400}.sign-table td{height:20mm}.sign-cell{position:relative;min-height:17mm;display:flex;align-items:center;justify-content:center;gap:2mm}.sign-cell .stamp-img{max-width:17mm;max-height:17mm;object-fit:contain}.sign-cell .sign-text{font-size:7.5pt;line-height:1.35;white-space:pre-line}.sign-company{font-size:8pt;font-weight:400}.sign-stack{display:grid;grid-template-columns:1fr 1fr;gap:8mm}.sign-block-label{margin-bottom:2mm}.sign-block{border-collapse:collapse;width:100%;table-layout:fixed}.sign-block th,.sign-block td{border:.25mm solid #222;text-align:center;padding:1mm}.sign-block th{height:6mm;font-weight:400}.sign-block td{height:18mm}.sign-design{display:grid;grid-template-columns:1fr;gap:7mm}.sign-design .sign-block-label{font-weight:600}.sign-placeholder{color:#777;font-size:7pt}
@media(max-width:800px){.signature-grid{grid-template-columns:1fr}}

/* 表紙左上の設計・監理／施工を非表示 */
.coverMeta { display: none !important; }

/* 表紙全体を上方向へ調整 */
.coverProject{top:82mm!important}.coverDoc{top:116mm!important}.coverDate{top:163mm!important}.coverCompany{top:196mm!important}.sign-area{bottom:24mm!important}
/* 2段署名欄は少し上へ詰め、表紙内に収める */
.sign-area.sign-design{bottom:18mm!important;gap:5mm!important}.sign-design .sign-block-label{margin-bottom:1.5mm!important}.sign-design .sign-block th{height:5.5mm!important}.sign-design .sign-block td{height:16mm!important}

/* 表紙位置の追加調整: v5.1 cover-up-more */
.coverProject{top:70mm!important}
.coverDoc{top:104mm!important}
.coverDate{top:151mm!important}
.coverCompany{top:184mm!important}
.sign-area{bottom:39mm!important}
.sign-area.sign-design{bottom:33mm!important}

/* PDF様式に合わせた階層型目次 */
.toc-pdf-style{padding:16mm 24mm 18mm!important;font-family:"Yu Gothic","YuGothic",Meiryo,sans-serif!important}.toc-pdf-style h1{text-align:center!important;font-size:16pt!important;letter-spacing:.65em!important;margin:0 0 13mm!important;font-weight:700!important}.toc-body{font-size:10pt;line-height:1.3}.toc-chapter{margin:0 0 7mm;break-inside:avoid}.toc-chapter-title{display:grid;grid-template-columns:9mm 1fr;column-gap:2mm;margin-bottom:2.3mm;font-weight:400}.toc-chapter-no{text-align:left}.toc-item{display:flex;align-items:flex-end;margin:1.7mm 0;padding-left:4mm;min-height:4.4mm}.toc-item-title{white-space:nowrap}.toc-leader{flex:1;border-bottom:.28mm dotted #222;margin:0 3mm 1.2mm;min-width:12mm}.toc-page-number{width:9mm;text-align:right}.toc-pending{color:#e60012;font-size:12pt;line-height:9pt}.toc-item-title::first-letter{letter-spacing:normal}

/* PDF様式: x.1ページの先頭に章見出し */
.document-chapter-heading{display:grid;grid-template-columns:11mm 1fr;column-gap:2mm;font-size:11pt;font-weight:400;margin:0 0 7mm}.document-chapter-heading+.title{margin-top:0}.preview-empty{width:210mm;min-height:80mm;margin:0 auto;background:#fff;border:1px dashed #9aa9ba;padding:24mm;text-align:center;color:#66758a}

/* 各章の先頭見出しをPDF様式に合わせて統一 */
.document-chapter-heading{
  display:grid!important;
  grid-template-columns:10mm 1fr!important;
  column-gap:2mm!important;
  align-items:baseline!important;
  margin:0 0 5mm 0!important;
  padding:0!important;
  font-family:"Yu Gothic","YuGothic",Meiryo,sans-serif!important;
  font-size:10.5pt!important;
  line-height:1.35!important;
  font-weight:400!important;
  letter-spacing:0!important;
}
.document-chapter-heading span:first-child{
  text-align:left!important;
  font-size:10.5pt!important;
  font-weight:400!important;
}
.document-chapter-heading span:last-child{
  font-size:10.5pt!important;
  font-weight:400!important;
}
.document-chapter-heading + .title{
  margin:0 0 9mm 10mm!important;
  padding:0!important;
  font-size:10.5pt!important;
  line-height:1.35!important;
  font-weight:400!important;
  letter-spacing:0!important;
}
/* 第1章の本文見出しも2章以降の小項目と同じ大きさへ統一 */
.a4:not(.toc):not(.cover) h2{
  font-size:10.5pt!important;
  line-height:1.35!important;
  font-weight:400!important;
}

/* 第1章と同じ章・項目階層へ統一 */
.a4.chapter-first .document-chapter-heading{margin:0 0 8mm 0!important;font-size:10.5pt!important;line-height:1.35!important;font-weight:400!important}
.a4.chapter-first>.title{margin:0 0 14mm 10mm!important;font-size:10.5pt!important;line-height:1.35!important;font-weight:400!important}
.a4.chapter-continuation>.title{margin:0 0 14mm 10mm!important;font-size:10.5pt!important;line-height:1.35!important;font-weight:400!important}
.a4.chapter-continuation>h2:first-of-type{margin-top:0!important}

/* 津田塾大学PDF準拠の本文階層・余白 最終調整 */
.a4.chapter-first,.a4.chapter-continuation{padding-top:18mm!important;padding-left:20mm!important;padding-right:18mm!important}
.document-chapter-heading{display:flex!important;align-items:baseline!important;margin:0 0 6mm 0!important;padding:0!important;font-family:"Yu Gothic","YuGothic",Meiryo,sans-serif!important;font-size:10.5pt!important;line-height:1.35!important;font-weight:400!important}
.document-chapter-heading .chapter-number{display:inline-block!important;width:15mm!important;text-align:left!important}
.document-chapter-heading .chapter-name{display:inline-block!important;font-size:10.5pt!important;font-weight:400!important}
.a4.chapter-first>.title{margin:0 0 10mm 15mm!important;padding:0!important;font-size:10.5pt!important;line-height:1.35!important;font-weight:400!important}
.a4.chapter-continuation>.title{margin:0 0 10mm 15mm!important;padding:0!important;font-size:10.5pt!important;line-height:1.35!important;font-weight:400!important}
.document-body{margin-left:15mm!important;font-size:10.5pt!important;line-height:1.65!important}
.document-body>h2{margin:0 0 2mm 0!important;font-size:10.5pt!important;line-height:1.35!important;font-weight:400!important}
.document-body>h2:not(:first-child){margin-top:6mm!important}
.document-body .kv{margin-left:0!important;width:auto!important;min-width:145mm!important}
.document-body .kv th{width:42mm!important;padding:1.6mm 2mm 1.6mm 0!important;text-align:justify!important;text-align-last:justify!important;white-space:nowrap!important}
.document-body .kv td{padding:1.6mm 0 1.6mm 2mm!important}
.document-body .table{margin-left:0!important}
.a4.landscape .document-body{margin-left:10mm!important}
.a4.landscape.chapter-first>.title,.a4.landscape.chapter-continuation>.title{margin-left:10mm!important}

/* 大項目と小項目の基準線を全章で完全統一 */
.a4.chapter-only,.a4.chapter-first,.a4.chapter-continuation{padding-top:18mm!important;padding-left:20mm!important;padding-right:18mm!important}
.a4.chapter-only>.document-chapter-heading,.a4.chapter-first>.document-chapter-heading{display:grid!important;grid-template-columns:15mm 1fr!important;column-gap:0!important;margin:0 0 6mm 0!important;padding:0!important;font-size:10.5pt!important;line-height:1.35!important;font-weight:400!important}
.a4.chapter-only>.document-chapter-heading .chapter-number,.a4.chapter-first>.document-chapter-heading .chapter-number{width:auto!important;text-align:left!important}
.a4.chapter-only>.document-chapter-heading .chapter-name,.a4.chapter-first>.document-chapter-heading .chapter-name{font-size:10.5pt!important;font-weight:400!important}
/* 小項目の左端は全章ともページ左から35mm */
.a4.chapter-first>.title,.a4.chapter-continuation>.title{margin:0 0 10mm 15mm!important;padding:0!important;font-size:10.5pt!important;line-height:1.35!important;font-weight:400!important}
.a4.chapter-only>.document-body,.a4.chapter-first>.document-body,.a4.chapter-continuation>.document-body{margin-left:15mm!important;font-size:10.5pt!important;line-height:1.65!important}
.a4.chapter-only>.document-body>h2,.a4.chapter-first>.document-body>h2,.a4.chapter-continuation>.document-body>h2{margin:0 0 2mm 0!important;padding:0!important;font-size:10.5pt!important;line-height:1.35!important;font-weight:400!important}
.a4.chapter-only>.document-body>h2:not(:first-child),.a4.chapter-first>.document-body>h2:not(:first-child),.a4.chapter-continuation>.document-body>h2:not(:first-child){margin-top:6mm!important}
