/* A single editable paper surface; the side panel contains file/attachment tools. */
.direct-editor{overflow:hidden;background:#eae8e8}
.direct-editor .workspace{display:grid!important;grid-template-columns:292px minmax(0,1fr);height:calc(100dvh - 60px)}
.direct-editor .editor-pane{width:auto!important;max-width:none!important;box-shadow:none!important}
.direct-editor .selector-block{padding:17px 14px;background:#fff}
.direct-editor .selector-row{display:flex;flex-direction:column;gap:9px}
.direct-editor #templateSelect{width:100%;height:44px;font-size:14px}
.direct-editor .search-box{min-height:44px}
.direct-editor .mini-badge{font-size:10px}
.direct-editor .current-header{padding:16px 14px}
.direct-editor .current-header h2{font-size:16px}
.direct-editor .current-header p{font-size:12px;line-height:1.8}
.direct-editor .header-tools,.direct-editor #dynamicFields,.direct-editor #commonSection{display:none!important}
.direct-editor .form-section:has(>#dynamicFields),.direct-editor .form-section:has(>.section-title+#dynamicFields){display:none}
.direct-editor .form-scroll{flex:1;overflow:auto}
.direct-editor .form-section{padding:14px!important}
.direct-editor .section-title{font-size:13px}
.direct-editor .section-title span{display:none}
.direct-editor .photo-picker,.direct-editor .file-picker{min-height:44px}
.direct-editor .field-note{font-size:11px;line-height:1.7}
.direct-editor #referenceUrl,.direct-editor #attachmentName{font-size:13px}
.direct-editor .editor-footer{display:flex;flex-direction:column;gap:12px;padding:14px;position:static;box-shadow:0 -3px 15px #00000005}
.direct-editor .footer-secondary{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;width:100%;justify-content:stretch}
.direct-editor .footer-secondary .btn{padding:8px 5px;font-size:12px;min-height:44px}
.direct-editor .footer-primary,.direct-editor #wordBtn{width:100%}
.direct-editor #wordBtn{min-height:46px;background:#495e57;border-color:#495e57}
.direct-editor .preview-pane{display:flex!important;position:relative!important;inset:auto!important;width:auto!important;min-width:0;min-height:0;flex-direction:column;z-index:auto!important;background:#eae8e8}
.direct-editor .preview-toolbar{position:static;flex-shrink:0;display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:64px;padding:10px 24px;background:#faf9f8;border-bottom:1px solid #d9d4d5}
.direct-editor .preview-toolbar strong{font-size:14px}
.direct-editor #pageInfo{font-size:12px;color:#777}
.paper-tools{display:flex;align-items:center;gap:6px}
.paper-tools .btn{min-width:44px;min-height:44px;padding:6px;font-size:22px}
.paper-tools select{height:44px;border:1px solid #d6d0d2;border-radius:5px;background:white;font-size:12px;max-width:150px}
.paper-notice{display:flex;justify-content:space-between;gap:12px;padding:10px 24px;font-size:11px;color:#6c6567;background:#f4f1f2;line-height:1.6}
.paper-notice #autosaveStatus{white-space:nowrap}
.retired-notice{padding:12px 24px;background:#fff1cf;font-size:13px;line-height:1.7}
.direct-editor .preview-workspace{display:block!important;position:relative;overflow:auto!important;flex:1;min-height:0;padding:24px 16px 50px!important;overscroll-behavior:contain}
.paper-frame{position:relative;margin:0 auto 24px;flex:none}
.direct-paper{width:794px;height:1123px;position:absolute;left:0;top:0;background:white;color:#20252a;font-family:"Yu Gothic","Hiragino Kaku Gothic ProN",sans-serif;transform-origin:top left;box-shadow:0 4px 24px #30272d1a}
.paper-org{position:absolute;left:49px;top:35px;font-size:12px}
.paper-title{position:absolute;left:49px;right:49px;margin:0;text-align:center;font-size:23px;line-height:32px;font-weight:700;overflow-wrap:anywhere}
.paper-title textarea{width:100%;padding:0;border:1px solid transparent;resize:none;overflow:hidden;text-align:center;font:inherit;line-height:32px;background:transparent;border-radius:3px}
.paper-title textarea:focus{outline:2px solid #678c7d66;background:#f1f7f4}
.direct-seals{position:absolute;right:49px;display:flex;height:76px}
.direct-seal{width:68px;border:1px solid #9f989b;margin-left:-1px;font-size:12px;text-align:center}
.direct-seal b{display:block;background:#f7f0f2;border-bottom:1px solid #9f989b;height:23px;line-height:22px;font-weight:600}
.direct-seal span{display:flex;align-items:center;justify-content:center;min-height:50px;color:#b03740;padding:3px;overflow-wrap:anywhere;line-height:14px;font-size:12px}
.staff-seal-area{position:relative}
.staff-seal-image{display:block;width:44px;height:44px;object-fit:contain}
.staff-seal-input{display:block;position:absolute;inset:3px;width:60px;height:44px;min-height:44px;border:1px dashed #d3a6ab;border-radius:3px;resize:none;text-align:center;line-height:16px;font-size:12px;padding:6px 1px;color:#b03740;background:transparent;font-family:inherit;overflow:hidden}
.staff-seal-input.has-seal{opacity:0;cursor:text}
.staff-seal-input:focus{opacity:1;inset:auto;left:auto;right:0;top:54px;transform:none;width:180px;height:48px;padding:7px 10px;z-index:30;outline:2px solid #b0374044;background:#fff5f5;border:1px solid #b03740;box-shadow:0 5px 20px #33222222}
.staff-seal-area:focus-within .staff-seal-image{outline:2px solid #b0374033;outline-offset:2px}
.staff-seal-input::placeholder{font-size:10px;color:#ad7e82}
.direct-row{position:absolute;left:49px;right:49px;display:flex;border:1px solid #9f989b;margin-top:-1px;font-size:16px}
.direct-label{flex:none;width:146px;background:#f7f0f2;border-right:1px solid #9f989b;padding:9px 10px;font-size:12px;line-height:18px;font-weight:600;overflow-wrap:anywhere}
.direct-values{display:flex;min-width:0;flex:1;align-items:stretch}
.direct-cell{min-width:0;position:relative;padding:5px 9px;flex:none}
.direct-cell+.direct-cell{border-left:1px solid #9f989b}
.cell-caption{display:block;font-size:10px;line-height:18px;color:#686066;white-space:normal}
.direct-cell input,.direct-cell select,.direct-cell textarea{width:100%;max-width:100%;padding:3px 1px;margin:0;background:transparent;border:1px solid transparent!important;border-radius:2px;font-family:inherit;font-size:16px!important;line-height:24px!important;color:#20252a;box-shadow:none!important;resize:none;min-height:30px!important;height:auto;outline:none;vertical-align:top;overflow:hidden;overflow-wrap:anywhere;white-space:pre-wrap}
.direct-cell textarea{display:block;padding:3px 0;min-width:0}
.direct-cell input:hover,.direct-cell select:hover,.direct-cell textarea:hover{background:#f7f9f8}
.direct-cell input:focus,.direct-cell select:focus,.direct-cell textarea:focus{background:#f1f7f4;border-color:#678c7d!important;outline:2px solid #678c7d33}
.direct-cell ::placeholder{color:#a39ba0;font-size:13px}
.prose-row{border:0;display:block}
.prose-row .direct-label{width:auto;background:none;border:0;padding:0 10px;line-height:24px;font-size:13px}
.prose-row .direct-values{height:calc(100% - 24px)}
.prose-row .direct-cell{padding:0 9px}
.wide-row{display:block}
.wide-row .direct-label{width:100%;height:30px;border-right:0;border-bottom:1px solid #9f989b;padding:6px 10px;line-height:18px}
.wide-row .direct-values{height:calc(100% - 30px)}
.wide-row .direct-cell{padding:3px 9px}
.direct-photos{position:absolute;left:49px;right:49px;display:flex;gap:8px;padding:8px 0}
.direct-photo{position:relative;width:calc(50% - 4px);height:163px;border:1px solid #b2a9ae;display:flex;align-items:center;justify-content:center;background:white}
.direct-photo img{max-width:100%;max-height:150px;object-fit:contain}
.direct-photo small{position:absolute;top:166px;left:0;right:0;text-align:center;font-size:10px}
.direct-photo>button{border:1px dashed #c7bfc3;color:#756a70;background:#faf7f8;font-size:14px;min-height:44px;padding:8px 20px}
.photo-tools{position:absolute;bottom:4px;left:4px;display:flex;gap:4px;opacity:0}
.direct-photo:hover .photo-tools,.direct-photo:focus-within .photo-tools{opacity:1}
.photo-tools button{font-size:12px;min-height:32px;border:1px solid #b8b1b4;border-radius:3px;background:#fffffff2;padding:4px 9px}
.cost-total{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f7f4f5}
.cost-total output{margin-left:auto;font-weight:700;text-align:right}
.cost-total output span{display:block}
.cost-total:has([data-cost-difference]){padding-top:3px;padding-bottom:3px}
.cost-total .btn{min-height:32px;padding:4px 12px}
.direct-cell input[data-yen-amount][aria-invalid="true"]{border-color:#a63439!important;background:#fff4f4}
.cost-remove{display:block;margin-top:3px;padding:1px 6px;color:#635459;border:1px solid #c4b8bc;background:white;border-radius:3px;cursor:pointer}
.receipt-page-tools{padding:8px 14px 14px;background:#fff;border-bottom:1px solid #ded7d9}
.receipt-page-tools p{margin:0 0 6px;font-size:13px;font-weight:700}
#inheritEventPlan{margin-bottom:10px}
.receipt-page-tools div{display:flex;flex-wrap:wrap;gap:6px}
.receipt-page-tools .btn{min-height:44px;padding:6px 9px;font-size:12px}
.receipt-paste-area{position:absolute;left:49px;right:49px;border:1px dashed #9f989b}
.receipt-sheet-instruction{position:absolute;left:49px;right:49px;margin:0;font-size:16px;font-weight:700}
@media print{.cost-remove,.cost-total button,.receipt-page-tools{display:none!important}}
.direct-computed{position:absolute;left:49px;right:49px;padding:10px;font-size:14px;line-height:22px;overflow-wrap:anywhere}
.travel-tools{display:flex;align-items:center;gap:8px;padding:4px 10px;background:#f5f2f3;border:1px solid #c4b8bc}
.travel-tools strong{margin-right:auto}
.travel-tools .btn{min-height:44px;padding:4px 12px;font-size:14px}
@media print{.travel-tools{display:none!important}}
.paper-page-number{position:absolute;bottom:22px;left:49px;right:49px;text-align:center;font-size:11px;color:#655e62}
.vehicle-direct{display:flex;flex-wrap:wrap;gap:12px;max-width:794px;margin:0 auto 20px;background:white;padding:14px;border-radius:5px;font-size:13px}
.vehicle-direct input{display:block;min-height:44px;border:1px solid #aaa;padding:6px}
.direct-editor .a4-page.vehicle-permission{position:absolute;width:794px!important;height:1123px!important;max-width:none!important;transform-origin:top left;margin:0!important;padding:0!important}
.direct-editor .a4-page.vehicle-permission svg{width:100%;height:100%}
.direct-editor .topbar{padding:0 18px}
.direct-editor .top-actions .archive-link{display:none}
.direct-editor .server-state>span:first-child{display:none}
.direct-editor #app>p{display:none}
.direct-editor #vehicleSubmission p{font-size:12px;line-height:1.7}
@media(hover:none){.photo-tools{opacity:1}.photo-tools button{min-height:44px}}
@media(max-width:1050px){.direct-editor .workspace{grid-template-columns:248px minmax(0,1fr)}.direct-editor .preview-toolbar{padding:10px 14px}.paper-notice{display:block;padding:8px 14px}.paper-notice span{display:block}.direct-editor .preview-toolbar>div:first-child{display:flex;flex-direction:column}.direct-editor .brand h1{font-size:14px}.direct-editor .manual-link{display:none}}
@media(max-width:700px){
 .direct-editor{overflow:auto}.direct-editor .topbar{height:56px}.direct-editor .workspace{display:flex!important;flex-direction:column;height:auto;min-height:calc(100dvh - 56px)}
 .direct-editor .editor-pane{display:contents}.direct-editor .selector-block{padding:10px 14px}.direct-editor .selector-heading{margin-bottom:6px}.direct-editor .selector-row{flex-direction:row}.direct-editor .search-box{width:36%;flex:none}.direct-editor #templateSelect{flex:1;min-width:0;font-size:12px}
 .direct-editor .current-header{display:none}.direct-editor .preview-pane{order:1;height:calc(100dvh - 230px);min-height:420px}.direct-editor .form-scroll{order:2;max-height:none;flex:none;overflow:visible;background:white}
 .direct-editor .editor-footer{order:3;position:sticky;bottom:0;z-index:15;gap:8px}.direct-editor .footer-secondary{grid-template-columns:repeat(3,1fr)}.direct-editor .footer-primary{display:block}.direct-editor .brand p{font-size:9px}.direct-editor .brand-icon{width:30px;height:30px}.direct-editor .brand-line{display:none}
 .direct-editor .preview-toolbar{min-height:60px}.direct-editor .preview-toolbar strong{font-size:12px}.paper-tools select{max-width:120px;font-size:11px}.paper-notice{font-size:10px}.direct-editor .preview-workspace{padding-top:14px!important}
 .paper-tools .btn{font-size:20px}.direct-editor .server-state{display:none}.direct-editor .form-section:has(#dynamicFields){display:none}
}
@media print{
 @page{size:A4;margin:0}
 html,body,.direct-editor{width:auto!important;height:auto!important;overflow:visible!important;background:white!important}
 .direct-editor .topbar,.direct-editor .editor-pane,.direct-editor .selector-block,.direct-editor .current-header,.direct-editor .form-scroll,.direct-editor .editor-footer,.direct-editor .preview-toolbar,.paper-notice,.retired-notice,.vehicle-direct,.direct-editor dialog,.direct-editor .toast{display:none!important}
 .direct-editor .workspace,.direct-editor .preview-pane,.direct-editor .preview-workspace{display:block!important;position:static!important;width:auto!important;height:auto!important;overflow:visible!important;margin:0!important;padding:0!important;background:white!important}
 .paper-frame{width:794px!important;height:1123px!important;margin:0!important;break-after:page;page-break-after:always}
 .paper-frame:last-child{break-after:auto;page-break-after:auto}.direct-paper,.direct-editor .a4-page.vehicle-permission{position:relative!important;transform:none!important;box-shadow:none!important}
 .photo-tools,.direct-photo>button{display:none!important}.direct-cell input,.direct-cell select,.direct-cell textarea{border:0!important;outline:none!important;background:none!important}.direct-cell ::placeholder{color:transparent}
 .direct-label,.direct-seal b{-webkit-print-color-adjust:exact;print-color-adjust:exact}
 .staff-seal-input{display:none!important}.staff-seal-image{outline:none!important}
}


.direct-input-section {
  position: absolute;
  inset-inline: 49px;
  display: flex;
  align-items: center;
  padding-inline: 10px;
  background: #eef3f1;
  color: #263f37;
  border-bottom: 1px solid #527265;
  font-size: 13px;
  font-weight: 700;
}
.vehicle-input-title { flex-basis: 100%; }
