:root{font-family:"Yu Gothic","Hiragino Kaku Gothic ProN","Noto Sans JP",Meiryo,sans-serif;color:#17304a;background:#edf3f8;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #5ba3ec;outline-offset:2px}.topbar{height:76px;background:#123e69;color:white;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(18px,3vw,44px);box-shadow:0 2px 16px #123e691c;gap:16px}.brand{display:flex;align-items:center;gap:12px;min-width:0}.brand-symbol{width:38px;height:38px;background:#fff;color:#123e69;display:grid;place-items:center;font-weight:900;font-size:23px;border-radius:6px}.brand>div{display:flex;flex-direction:column;gap:2px}.brand strong{font-size:16px;letter-spacing:.02em;white-space:nowrap}.brand span:last-child{font-size:12px;color:#cddff0}.header-actions{display:flex;gap:9px}.button{border:1px solid transparent;border-radius:9px;min-height:42px;padding:9px 16px;line-height:1.3;font-size:14px;font-weight:700;white-space:nowrap;transition:background .15s,transform .15s,box-shadow .15s}.button:active{transform:translateY(1px)}.button-primary{background:#1472bf;color:white;box-shadow:0 3px 10px #0a518c2c}.button-primary:hover{background:#095f9f}.button-quiet{background:#fff;color:#204b70;border-color:#cbd8e4}.topbar .button-quiet{background:#ffffff19;border-color:#ffffff55;color:#fff}.button-quiet:hover{background:#eaf4ff}.topbar .button-quiet:hover{background:#ffffff30}.workspace{max-width:1540px;margin:0 auto;padding:26px 26px 52px;display:grid;grid-template-columns:minmax(420px,590px) minmax(0,1fr);gap:30px;align-items:start}.editor{background:white;border:1px solid #dbe6ef;border-radius:15px;box-shadow:0 6px 26px #1d416512;min-width:0}.editor-intro{padding:27px 30px 25px;border-bottom:1px solid #e2ebf2}.eyebrow{text-transform:uppercase;letter-spacing:.12em;color:#2077b5;font-size:12px;font-weight:800;margin-bottom:6px}.editor-intro h1{font-size:26px;line-height:1.35;letter-spacing:.01em;margin:0 0 6px}.editor-intro p{font-size:14px;line-height:1.6;color:#6a7c8d;margin:0}.form-section{padding:23px 30px 25px;border-bottom:1px solid #e7eef4}.form-section h2{font-size:18px;margin:0 0 20px;display:flex;align-items:center;gap:11px;line-height:1.4}.section-num{font-family:Arial,sans-serif;background:#e7f3fd;color:#146ba9;display:grid;place-items:center;width:29px;height:29px;border-radius:8px;font-size:13px;font-weight:800}.form-grid{display:grid;gap:14px}.form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.field{display:flex;flex-direction:column;gap:7px;margin-bottom:15px;min-width:0}.field>span,fieldset legend{font-weight:700;font-size:14px;line-height:1.55}.field em{font-style:normal;font-size:12px;color:#8392a1;font-weight:500;margin-left:4px}.required{color:#c13f40;font-weight:700;font-size:12px;margin-left:4px}.field input,.field textarea{border:1px solid #cddae4;border-radius:8px;min-height:44px;width:100%;padding:10px 12px;background:#fff;color:#142f47;font-size:16px}.field input::placeholder,.field textarea::placeholder{color:#9baab6}.field input:hover,.field textarea:hover{border-color:#77a3c6}.field textarea{min-height:122px;resize:vertical;line-height:1.5}.field-hint{font-size:13px;color:#668096;line-height:1.55;margin:0 0 1px}.field:last-child{margin-bottom:0}fieldset{border:0;padding:0;margin:0 0 19px;min-width:0}fieldset:last-child{margin-bottom:0}fieldset legend{padding:0;margin-bottom:9px}.legend-hint{font-size:12px;color:#8a99a5;font-weight:500}.choice-grid{display:grid;gap:8px}.choice-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.choice-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.choice-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.choice-grid.roofs{grid-template-columns:repeat(2,minmax(0,1fr))}.choice{display:flex;align-items:center;gap:8px;min-height:43px;border:1px solid #d5e1ea;border-radius:8px;padding:8px 10px;font-size:14px;line-height:1.4;cursor:pointer;transition:background .13s,border-color .13s}.choice:hover{border-color:#8ab9de;background:#f7fbff}.choice:has(input:checked){background:#eaf5ff;border-color:#4e99cd;color:#124d7e}.choice input{accent-color:#166eae;width:17px;height:17px;flex:none;margin:0}.compact{margin:12px 0 0;max-width:230px}.unit-input{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700}.unit-input input{flex:1;min-width:0}.form-bottom{padding:23px 30px 27px}.button-large{min-height:48px;width:100%;font-size:16px}.form-bottom p{font-size:13px;color:#b13c39;line-height:1.6;margin:10px 0 0;min-height:0}.form-bottom p:empty{display:none}.preview{position:sticky;top:18px;min-width:0;display:flex;flex-direction:column;align-items:center}.preview-toolbar{width:min(100%,670px);display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.preview-toolbar>div{display:flex;align-items:baseline;gap:10px}.preview-toolbar strong{font-size:16px}.preview-toolbar span{font-size:12px;color:#617d92}.paper-stage{max-height:calc(100vh - 165px);overflow:auto;width:min(100%,670px);background:#d6e1eb;padding:15px;border-radius:12px;box-shadow:inset 0 1px 5px #53718c24}.paper-stage canvas{width:100%;height:auto;display:block;background:#fff;box-shadow:0 4px 19px #1a395829}.paper-stage.zoomed canvas{width:850px;max-width:none}.preview-caption{width:min(100%,670px);font-size:12px;line-height:1.55;color:#71869a;margin:11px 0 0}.mobile-tabs{display:none}@media(max-width:1100px){.workspace{grid-template-columns:minmax(360px,1fr) minmax(400px,1fr);gap:17px;padding:18px}.form-section,.editor-intro,.form-bottom{padding-left:21px;padding-right:21px}.choice-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:780px){.topbar{height:64px;padding:0 14px}.brand strong{font-size:13px}.brand span:last-child{font-size:11px}.brand-symbol{width:33px;height:33px;font-size:20px}.header-actions{gap:6px}.header-actions .button{font-size:12px;padding:8px 10px;min-height:37px}.header-actions #reset-top{display:none}.mobile-tabs{display:flex;position:sticky;top:0;z-index:5;background:#fff;border-bottom:1px solid #dce7f0;padding:0 16px}.tab{flex:1;border:0;border-bottom:3px solid transparent;background:transparent;padding:13px 8px;font-size:15px;font-weight:700;color:#688399}.tab.active{border-color:#1373b9;color:#0e629e}.workspace{display:block;padding:14px 12px 42px}.editor{max-width:650px;margin:0 auto}.preview{position:static;display:none}.workspace[data-mode=preview] .editor{display:none}.workspace[data-mode=preview] .preview{display:flex}.paper-stage{max-height:none;padding:9px;width:100%}.preview-toolbar,.preview-caption{width:100%}.preview-toolbar{margin-top:8px}.preview-toolbar .button{font-size:12px}}@media(max-width:450px){.brand strong{font-size:12px}.brand-symbol{display:none}.header-actions .button-primary{font-size:12px;padding:7px 8px}.editor-intro h1{font-size:22px}.form-grid.two{grid-template-columns:1fr;gap:0}.choice-grid.roofs,.choice-grid.two,.choice-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}.choice{font-size:13px;padding:7px;gap:5px}.choice input{width:16px;height:16px}.choice-grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}.form-section,.editor-intro,.form-bottom{padding-left:18px;padding-right:18px}}@media print{@page{size:A4;margin:0}html,body{padding:0;margin:0;background:#fff}.topbar,.mobile-tabs,.editor,.preview-toolbar,.preview-caption{display:none!important}.workspace{display:block;padding:0;margin:0;max-width:none}.preview{display:block!important;position:static;width:210mm}.paper-stage{padding:0;overflow:visible;width:210mm;max-height:none;background:#fff;border:0;box-shadow:none;border-radius:0}.paper-stage canvas,.paper-stage.zoomed canvas{display:block;width:210mm;height:297mm;max-width:none;box-shadow:none;break-inside:avoid}}

.form-bottom .button-reset{margin-top:10px}

.button-save{background:#dfefff;color:#123e69;border-color:#9bc7e8}.button-save:hover{background:#c5e4ff}.button:disabled{opacity:.6;cursor:wait}.topbar{height:auto;min-height:80px;padding-top:14px;padding-bottom:14px}.header-actions{flex-wrap:wrap;justify-content:flex-end}.document-state{display:flex;gap:12px;justify-content:space-between;align-items:center;margin-bottom:10px}.document-state .eyebrow{margin:0;font-size:14px}.save-state{font-size:13px;color:#647789}.save-state.dirty{color:#98631a}.company-fixed{border:1px solid #dce6ee;background:#f7fafc;border-radius:8px;padding:12px 14px;font-size:14px;line-height:1.8}.company-fixed summary{cursor:pointer;font-weight:700}.company-fixed summary span{background:#e1e9f0;padding:2px 8px;border-radius:4px;margin-left:8px;font-size:12px}.company-fixed dl{display:grid;grid-template-columns:100px 1fr;gap:6px;margin:15px 0 8px}.company-fixed dt{color:#657d8f}.company-fixed dd{margin:0;overflow-wrap:anywhere}.company-fixed p{color:#657d8f;font-size:13px;margin:4px 0}.postal{max-width:230px}.form-bottom .button+.button{margin-top:10px}.choice-grid .choice{font-size:14px}.field-hint,.legend-hint,.preview-caption{font-size:14px}.preview-toolbar span{font-size:13px}.clear-choice{margin:9px 0 0;border:0;background:transparent;color:#536e84;font-size:13px;text-decoration:underline;min-height:30px;cursor:pointer}.notice{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#153954;color:#fff;border-radius:10px;padding:14px 20px;box-shadow:0 4px 30px #082c5533;max-width:min(90vw,650px);font-size:15px;z-index:30;line-height:1.6}.notice.error{background:#923d3a}dialog{border:1px solid #cddae5;border-radius:14px;padding:0;color:#17304a;background:#fff;box-shadow:0 20px 70px #122e4840;max-height:85dvh;overflow:auto}dialog::backdrop{background:#0b274a77}.history-dialog{width:min(700px,calc(100vw - 28px))}.dialog-header{display:flex;gap:15px;align-items:center;justify-content:space-between;padding:24px;position:sticky;top:0;background:white;border-bottom:1px solid #e2eaf1;z-index:1}.dialog-header h2,dialog h2{font-size:21px;margin:0 0 7px}.dialog-header p,dialog p{font-size:14px;margin:0;line-height:1.7;color:#647b8e}.record-list{padding:8px 22px 22px}.record-item{width:100%;display:flex;justify-content:space-between;align-items:center;text-align:left;gap:14px;background:white;border:0;border-bottom:1px solid #dce6ee;padding:20px 4px;color:inherit;cursor:pointer;line-height:1.65}.record-item:hover{background:#f2f8fd}.record-item strong{display:block;font-size:17px;overflow-wrap:anywhere}.record-meta{display:block;font-size:14px;color:#627c91;margin-top:4px}.record-open{font-size:14px;color:#146fae;white-space:nowrap}.record-empty{padding:36px 10px;text-align:center;line-height:1.8;color:#61798e}.more-records{margin:0 24px 24px;width:calc(100% - 48px)}.unsaved-dialog{padding:26px;width:min(550px,calc(100vw - 28px))}.dialog-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:24px}
@media(max-width:780px){.topbar{position:relative;gap:10px;flex-wrap:wrap;padding:12px 14px}.brand{width:100%;gap:10px}.brand-symbol{display:grid;width:32px;height:32px}.brand strong{font-size:14px}.brand span:last-child{font-size:12px}.header-actions{width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.header-actions .button{font-size:14px;min-height:42px;padding:9px 8px}.header-actions #reset-top{display:none}.form-section,.editor-intro,.form-bottom{padding-left:18px;padding-right:18px}.editor-intro h1{font-size:24px}.choice{font-size:14px;min-height:46px}.workspace{padding-bottom:32px}.preview-toolbar{flex-wrap:wrap}.preview-toolbar .button{font-size:14px}.notice{bottom:16px}.dialog-header{padding:18px}.record-list{padding:5px 16px 16px}.company-fixed dl{grid-template-columns:1fr;gap:0}.company-fixed dd{margin-bottom:8px}}
@media print{dialog,.notice{display:none!important}}

[hidden]{display:none!important}a.button{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.preview-toolbar{flex-wrap:wrap}

/* Keep iOS native date controls inside the same bounds as text fields. */
.field input[type="date"]{
  -webkit-appearance:none;
  appearance:none;
  display:block;
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
  height:46px;
  text-align:left;
}
.field input[type="date"]::-webkit-date-and-time-value{min-height:1em;text-align:left}
.field input[type="date"]::-webkit-datetime-edit{padding:0}
@media(max-width:450px){
  .form-section[aria-labelledby="section-basic"] .form-grid{row-gap:15px;margin-bottom:15px}
  .form-section[aria-labelledby="section-basic"] .form-grid>.field{margin-bottom:0}
}
