@page{size:A4 portrait;margin:15mm 18mm}.sheet-root{--sheet-line: #333;--sheet-line-thin: #999;color:#000}.sheet-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}.sheet-pages{display:flex;flex-direction:column;align-items:center;gap:24px}.sheet-page{position:relative;width:174mm;min-height:265mm;display:flex;flex-direction:column;background:#fff;color:#000;font-size:10.5pt;line-height:1.45;box-shadow:0 1px 4px #0000002e}.sheet-page-head{display:flex;justify-content:space-between;gap:8px;font-size:8.5pt;color:#333;border-bottom:1px solid var(--sheet-line);padding-bottom:3px;margin-bottom:8px}.sheet-page-body{flex:1}.sheet-page-foot{border-top:1px solid var(--sheet-line);padding-top:3px;margin-top:8px;font-size:8pt;color:#333;position:relative}.sheet-page-foot .foot-disclaimer{font-weight:600}.sheet-page-foot .foot-pageno{position:absolute;right:0;bottom:0}.sheet-watermark{position:absolute;top:45%;left:0;right:0;text-align:center;font-size:64pt;font-weight:700;color:#b91c1c29;transform:rotate(-24deg);letter-spacing:.2em;pointer-events:none;z-index:2}.sheet-title{text-align:center;font-size:18pt;letter-spacing:.3em;margin:8mm 0 6mm;font-weight:700}.sheet-band{border:2px solid #b91c1c;background:#fef2f2;color:#b91c1c;font-weight:700;text-align:center;padding:5px;margin-bottom:5mm}.sheet-cover,.sheet-parts,.sheet-seal,.sheet-thickness,.sheet-items,.sheet-limits,.sheet-clause,.sheet-warn-table{width:100%;border-collapse:collapse;background:#fff;break-inside:avoid}.sheet-cover th,.sheet-cover td,.sheet-parts th,.sheet-parts td,.sheet-seal th,.sheet-seal td,.sheet-thickness th,.sheet-thickness td,.sheet-items th,.sheet-items td,.sheet-limits th,.sheet-limits td,.sheet-clause th,.sheet-clause td,.sheet-warn-table th,.sheet-warn-table td{border:1px solid var(--sheet-line);padding:3px 6px;font-size:9.5pt;line-height:1.4;vertical-align:middle;color:#000;white-space:normal;text-align:left}.sheet-cover th,.sheet-parts th,.sheet-seal th,.sheet-thickness th,.sheet-items th,.sheet-limits th,.sheet-clause th,.sheet-warn-table th{background:#f1f1f1;font-weight:600}.sheet-cover th{width:26%}.sheet-parts{margin-top:5mm}.sheet-parts th{text-align:center}.sheet-remarks{margin-top:5mm;break-inside:avoid}.sheet-remarks h2{font-size:11pt;margin:0 0 3px}.sheet-remarks ol{margin:0;padding-left:1.4em;font-size:9.5pt}.sheet-seal{margin-top:6mm;width:80mm;margin-left:auto}.sheet-seal th{text-align:center}.sheet-seal .seal-box td{height:18mm}.sheet-seal .seal-name td{text-align:center;font-size:9pt;height:7mm}.sheet-issued{margin-top:4mm;text-align:right;font-size:9pt}.sheet-page-title{font-size:12pt;margin:0 0 4mm;border-bottom:2px solid var(--sheet-line);padding-bottom:2px}.sheet-section{break-inside:avoid;margin-bottom:5mm}.sheet-section h3{font-size:11pt;margin:0 0 3px;display:flex;justify-content:space-between;gap:8px}.sheet-answer{font-weight:700}.sheet-clause th{width:16%;white-space:nowrap}.sheet-note{font-size:9pt;margin:3px 0;color:#333}.sheet-reason{font-size:9.5pt;font-weight:700;color:#b91c1c;margin:3px 0}.sheet-formulas{margin:3mm 0;break-inside:avoid}.sheet-formula{display:flex;align-items:center;justify-content:center;gap:6px;font-size:11pt;padding:2mm 0}.sheet-formula .frac{display:inline-flex;flex-direction:column;text-align:center}.sheet-formula .frac .num{padding:0 6px 1px;border-bottom:1.2px solid #000}.sheet-formula .frac .den{padding:1px 6px 0}.sheet-formula .plain{text-align:center}.sheet-items .c-sym,.sheet-items .c-unit{white-space:nowrap}.sheet-items .c-val,.sheet-parts .c-val{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.sheet-items .c-expr{font-family:var(--mono-stack);font-size:9pt}.sheet-limits .c-judge{text-align:center;width:12mm;white-space:nowrap}.sheet-limits .c-detail{font-variant-numeric:tabular-nums}.sheet-limits tr.ng td{color:#b91c1c;font-weight:700}.sheet-warnings{margin:3px 0 0;padding-left:1.2em;font-size:9pt;color:#92400e}.sheet-thickness{margin-top:4mm;width:100mm}.sheet-thickness th{width:60%}.sheet-thickness td{text-align:right;font-variant-numeric:tabular-nums}.sheet-thickness .prime th,.sheet-thickness .prime td{font-weight:700}.sheet-section.is-ng{outline:2px solid #b91c1c;outline-offset:2px}.sheet-ng-band{border:2px solid #b91c1c;background:#fef2f2;color:#b91c1c;font-weight:700;padding:4px 6px;margin:0 0 4mm}.sheet-blocked{border:2px solid #b91c1c;background:#fef2f2;color:#b91c1c;padding:12px 16px;margin-bottom:16px}.sheet-blocked ul{margin:6px 0 0;padding-left:1.4em}@media print{body.sheet-mode .sidebar,body.sheet-mode .no-print{display:none!important}body.sheet-mode .layout{display:block!important;min-height:0!important}body.sheet-mode .main-content{padding:0!important}body.sheet-mode{background:#fff!important}.sheet-pages{display:block;gap:0}.sheet-page{width:100%;min-height:265mm;box-shadow:none;break-after:page;page-break-after:always}.sheet-page:last-child{break-after:auto;page-break-after:auto}body.sheet-mode.is-blocked .sheet-pages{display:none!important}.sheet-blocked{break-inside:avoid}.sheet-watermark,.sheet-band,.sheet-ng-band,.sheet-parts th,.sheet-items th,.sheet-limits th,.sheet-clause th,.sheet-cover th,.sheet-seal th,.sheet-thickness th,.sheet-warn-table th{-webkit-print-color-adjust:exact;print-color-adjust:exact}}:root{--primary: #7c3aed;--primary-dark: #5b21b6;--primary-soft: #f5f3ff;--link: #6d28d9;--text: #1f2937;--text-muted: #6b7280;--border: #e5e7eb;--bg: #f3f4f6;--side-bg: #1f2937;--side-text: #d1d5db;--ng: #b91c1c;--ng-bg: #fef2f2;--ng-border: #fecaca;--warn: #92400e;--warn-bg: #fef3c7;--ok: #065f46;--font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;--mono-stack: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;font-family:var(--font-stack);font-size:14px;line-height:1.5;color:var(--text);background-color:var(--bg)}*{box-sizing:border-box}body{margin:0;min-height:100vh}h1{font-size:20px;margin:0 0 16px}h2{font-size:16px;margin:24px 0 8px}h3{font-size:14px;margin:16px 0 8px}button{cursor:pointer;font-family:inherit}button:disabled{cursor:not-allowed;opacity:.6}input,select,textarea{font-family:inherit;font-size:inherit;padding:6px 8px;border:1px solid #d1d5db;border-radius:6px;background:#fff}input:focus,select:focus,textarea:focus{outline:2px solid rgba(124,58,237,.2);border-color:var(--primary)}table{border-collapse:collapse;width:100%;background:#fff}th,td{padding:6px 10px;border:1px solid var(--border);text-align:left;vertical-align:top}th{background-color:#f9fafb;font-weight:600;white-space:nowrap}a{color:var(--link)}.loading-screen{display:flex;align-items:center;justify-content:center;height:100vh;font-size:18px;color:var(--text-muted)}.layout{display:flex;min-height:100vh}.sidebar{width:220px;background-color:var(--side-bg);color:#f9fafb;padding:16px;display:flex;flex-direction:column;flex-shrink:0}.sidebar h1{font-size:18px;margin:0 0 24px}.sidebar h1 .mark{display:inline-block;width:28px;height:28px;line-height:28px;text-align:center;border-radius:6px;background:linear-gradient(135deg,var(--primary),var(--primary-dark));color:#fff;margin-right:8px;font-size:15px}.sidebar nav{display:flex;flex-direction:column;gap:4px;flex:1}.sidebar nav a{color:var(--side-text);text-decoration:none;padding:8px 12px;border-radius:6px;border-left:3px solid transparent}.sidebar nav a:hover,.sidebar nav a.active{background-color:#374151;color:#fff}.sidebar nav a.active{border-left-color:var(--primary)}.sidebar .userbox{margin-top:auto;font-size:12px;color:#9ca3af;border-top:1px solid #374151;padding-top:12px;word-break:break-all}.sidebar .userbox button{background:transparent;color:var(--side-text);border:1px solid #4b5563;border-radius:4px;padding:4px 10px;margin-top:8px;width:100%}.main-content{flex:1;padding:24px;min-width:0}@media (max-width: 720px){.layout{flex-direction:column}.sidebar{width:100%}.sidebar nav{flex-direction:row;flex-wrap:wrap}.main-content{padding:16px}}.btn{display:inline-block;padding:6px 14px;border-radius:6px;border:1px solid #d1d5db;background:#fff;color:var(--text);font-size:14px;text-decoration:none}.btn:hover:not(:disabled){background:#f9fafb}.btn-primary{background:var(--primary);border-color:var(--primary);color:#fff}.btn-primary:hover:not(:disabled){background:var(--primary-dark);border-color:var(--primary-dark)}.btn-danger{background:#fff;border-color:var(--ng-border);color:var(--ng)}.btn-danger:hover:not(:disabled){background:var(--ng-bg)}.btn-block{width:100%;padding:10px}.btn-sm{padding:2px 8px;font-size:12px}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:12px 0}.toolbar input[type=search]{min-width:280px}.tabs{display:flex;gap:4px;margin-bottom:12px;flex-wrap:wrap}.tabs button{border:1px solid var(--border);background:#fff;padding:6px 12px;border-radius:999px}.tabs button.active{background:var(--primary);color:#fff;border-color:var(--primary)}.badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:12px;background:#e5e7eb;color:#374151;white-space:nowrap}.badge-draft{background:#e5e7eb;color:#374151}.badge-confirmed{background:#ddd6fe;color:#4c1d95}.badge-ng{background:var(--ng-bg);color:var(--ng)}.badge-warn{background:var(--warn-bg);color:var(--warn)}.badge-ok{background:#d1fae5;color:var(--ok)}.alert{padding:10px 12px;border-radius:6px;margin-bottom:12px}.alert-error{background:var(--ng-bg);color:#991b1b;border:1px solid var(--ng-border)}.alert-info{background:#f8fafc;color:#334155;border:1px solid #cbd5e1}.alert-warn{background:var(--warn-bg);color:var(--warn);border:1px solid #fcd34d}.alert-success{background:#ecfdf5;color:var(--ok);border:1px solid #a7f3d0}.card{background:#fff;border:1px solid var(--border);border-radius:8px;padding:16px;margin-bottom:16px}.field{margin-bottom:12px}.field label{display:block;font-weight:600;margin-bottom:4px}.field input,.field select,.field textarea{width:100%}.field input[type=checkbox]{width:auto;margin-right:6px}.field-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.muted{color:var(--text-muted);font-size:12px}.mono{font-family:var(--mono-stack);font-size:12px;word-break:break-all}.num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.table-scroll{overflow-x:auto;margin-bottom:12px}.props{display:grid;grid-template-columns:max-content 1fr max-content 1fr;gap:4px 16px;margin:0 0 12px}.props dt{color:var(--text-muted);white-space:nowrap}.props dd{margin:0}@media (max-width: 720px){.props{grid-template-columns:max-content 1fr}}.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin-bottom:16px}.stat{background:#fff;border:1px solid var(--border);border-top:3px solid var(--primary);border-radius:8px;padding:10px 14px}.stat-label{color:var(--text-muted);font-size:12px}.stat-value{font-size:20px;font-weight:600;font-variant-numeric:tabular-nums}.stat-unit{font-size:12px;font-weight:400;color:var(--text-muted);margin-left:4px}.empty-state{text-align:center;padding:28px 16px;color:var(--text-muted)}.empty-state strong{display:block;color:var(--text);margin-bottom:4px}.history{margin-top:24px}.history>summary{cursor:pointer;font-weight:600;font-size:15px;margin-bottom:8px}.vessels-table tr.clickable{cursor:pointer}.vessels-table tr.clickable:hover{background:#f9fafb}.vessels-table .actions{white-space:nowrap}.vessels-table .actions .btn+.btn{margin-left:4px}.vessel-grid{display:grid;grid-template-columns:minmax(320px,420px) minmax(0,1fr);gap:16px;align-items:start}@media (max-width: 1100px){.vessel-grid{grid-template-columns:minmax(0,1fr)}}.vessel-in,.vessel-out{display:grid;gap:12px;min-width:0}.vessel-in .card,.vessel-out .card{margin-bottom:0;min-width:0}.vessel-in h2,.vessel-out h2{margin-top:0}.in-field{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,160px);align-items:center;gap:2px 10px;margin-bottom:8px}.in-field label{font-size:13px}.in-field small{grid-column:1 / -1;color:var(--text-muted);font-size:11px;line-height:1.5}.in-field>input,.in-field>select{min-width:0;width:100%}.in-field>input[type=number]{text-align:right;font-variant-numeric:tabular-nums}.in-field.wide{grid-template-columns:minmax(0,1fr)}.in-field.check{grid-template-columns:auto minmax(0,1fr)}.in-field.check input{justify-self:start}.calc-section{border:1px solid var(--border);border-left:3px solid var(--primary);border-radius:6px;background:#fff;padding:10px 12px}.calc-section.ng{border-color:var(--ng-border);border-left-color:var(--ng);background:var(--ng-bg)}.calc-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap}.calc-title{font-weight:600;font-size:14px;margin:0}.calc-value{font-family:var(--mono-stack);font-variant-numeric:tabular-nums;font-weight:600}.calc-note{color:var(--text-muted);font-size:12px;margin:4px 0 0}.items-table th,.items-table td{font-size:13px;padding:4px 8px}.items-table td.sym,.items-table td.val{font-family:var(--mono-stack);font-variant-numeric:tabular-nums;white-space:nowrap}.items-table td.expr{font-family:var(--mono-stack);font-size:12px;color:var(--text-muted)}.limits{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:3px}.limits li{font-size:12px;padding:3px 8px;border-radius:4px;background:#f9fafb;color:var(--text-muted)}.limits li.ng{background:var(--ng-bg);color:var(--ng);font-weight:600;border:1px solid var(--ng-border)}.limits .mark{font-family:var(--mono-stack);margin-right:6px}.warnings{list-style:none;margin:8px 0 0;padding:6px 10px;background:var(--warn-bg);color:var(--warn);border-radius:4px;font-size:12px;display:grid;gap:4px}.calc-blocked{font-weight:600}.calc-blocked ul{margin:6px 0 0;padding-left:20px;font-weight:400}.settings-section+.settings-section{margin-top:8px}.materials-table th,.materials-table td{font-size:12px;padding:4px 8px}.login-screen{display:flex;justify-content:center;align-items:center;min-height:100vh;background:#f9fafb;padding:16px}.login-card{background:#fff;border-radius:12px;box-shadow:0 10px 15px -3px #0000001a;border-top:4px solid var(--primary);padding:32px;width:100%;max-width:400px}.login-title{text-align:center;color:var(--primary);font-size:28px;margin-bottom:4px}.login-lead,.login-note{text-align:center;color:var(--text-muted);font-size:13px}.login-links{display:flex;justify-content:center;gap:16px;margin:12px 0 4px;font-size:13px}.link-button{background:none;border:none;padding:0 4px;color:var(--link);text-decoration:underline;font-size:inherit}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:3000;display:flex;align-items:center;justify-content:center;background:#1118278c;padding:16px}.modal-card{width:100%;max-width:420px;padding:24px;background:#fff;border-radius:10px;box-shadow:0 20px 40px #00000040}.modal-title{margin:0 0 8px;font-size:18px;color:var(--warn)}.modal-lead{margin:0 0 16px;line-height:1.6;color:#4b5563}.modal-card input[readonly]{background:#f3f4f6;color:var(--text-muted)}.modal-actions{display:flex;flex-direction:column;gap:8px;margin-top:16px}
