/* Web-only presentation. Included by the existing src/ static export allowlist. */
:root {
  --background: #f7f9fc;
  --surface: #fff;
  --text: #243247;
  --muted: #526176;
  --border: #dce3ed;
  --primary: #315a9b;
  --active: #254779;
}
body {
  font-family: "Malgun Gothic", "맑은 고딕", "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
button, input, select, textarea { font: inherit; }
.app-shell { max-width: 1760px; padding: 32px 32px 40px; }
header { margin-bottom: 28px; }
h1 { font-size: 28px; line-height: 1.4; letter-spacing: -.6px; margin-bottom: 6px; }
h2 { font-size: 20px; line-height: 1.5; margin-bottom: 14px; }
h3 { font-size: 16px; margin-top: 20px; }
p { margin: 8px 0 12px; }
small, .small { font-size: 14px; line-height: 1.65; }
.stage { font-size: 14px; color: var(--muted); margin-left: 16px; }
.workspace { grid-template-columns: minmax(0, 7fr) minmax(340px, 3fr); gap: 28px; }
.input-column, .document-column { min-width: 0; }
@media (min-width: 1001px) {
  .document-column { align-self: stretch; }
  .document-column > .document-writing {
    position: sticky;
    top: var(--document-sticky-top, 20px);
  }
}
fieldset {
  border: 1px solid #e2e8f1;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 6px #24324704;
}
legend { float: left; width: 100%; padding: 0; margin: 0 0 20px; font-size: 20px; line-height: 1.5; color: #213c63; }
fieldset > legend + * { clear: both; }
label, .inline-field > span:first-child, .period-row > span { font-size: 15px; color: #293d56; }
.required { color: #a12838; font-weight: 700; }
button, .file-button {
  min-height: 46px;
  border-radius: 8px;
  padding: 9px 16px;
  border-color: #cbd5e2;
  background: #f2f5f9;
  color: #263a55;
  line-height: 1.5;
  font-size: 16px;
  text-decoration: none;
}
button:hover, .file-button:hover { background: #e8eef6; }
.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.primary:hover { background: var(--active); color: #fff; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, .file-button:focus-within {
  outline: 3px solid #315a9b;
  outline-offset: 3px;
}
input:not([type=radio]):not([type=checkbox]):not([type=file]), select, .draft-panel textarea {
  height: 44px;
  border: 1px solid #a7b5c8;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 16px;
  color: var(--text);
}
input[type=text], input[type=tel] { text-align: left; }
input[readonly] { background: #f1f4f8 !important; color: #43536b; }
input:disabled, select:disabled { background: #f1f4f8 !important; color: #59677a; }
input[aria-invalid=true] { border-color: #a12838 !important; }
input[type=radio], input[type=checkbox] { width: 18px; height: 18px; margin-right: 8px; }
button:disabled { cursor: wait; opacity: .65; }
.drop-area { padding: 24px; min-height: 172px; border: 2px dashed #a7b9d3; border-radius: 10px; background: #f7faff; margin-bottom: 14px; }
.drop-area > p { margin: 0 0 4px; font-weight: 700; color: #29496f; font-size: 17px; }
.drop-area small { display: block; color: var(--muted); }
.drop-area .center { margin-top: 16px; }
#choose-quote { min-width: 148px; }
.drop-area.dragover, .drop-area:focus-within { background: #edf3fd; border-color: var(--primary); }
#quote-status { background: #f2f5f9; padding: 10px 12px; border-radius: 7px; margin-bottom: 0; color: #354c6c; }
#quote-summary { margin-bottom: 0; }
.school-row { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin: 0 0 20px; }
.school-row > label { flex: none; }
.school-row > input { width: 100%; flex: none; }
.school-row > p { margin: 0; }
.school-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.school-info-grid .school-row { min-width: 0; margin-bottom: 0; }
@media (max-width: 600px) { .school-info-grid { grid-template-columns: minmax(0, 1fr); } }
.staff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.inline-field, .staff-grid .inline-field { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.inline-field > span:first-child, .staff-grid .inline-field > span { flex: none; white-space: normal; }
.inline-field > input { flex: none; width: 100%; }
.business-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; margin: 0 0 8px; align-items: center; }
.business-row > label { grid-column: 1/-1; width: auto; }
.business-row > input { width: 100%; min-width: 0; }
.business-row .lookup { background: #e8effa; border-color: #b6c8e1; color: #244c85; }
.business-row .lookup:hover { background: #dce8f8; }
.business-row > .small { grid-column: 1/-1; padding: 0; color: #354c6c; }
.company-transfer-hint { margin: 8px 0 4px; }
#company-deployment-status { margin: 4px 0 24px; padding-left: 10px; border-left: 3px solid #b5c7df; }
.contract-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.supplier-fields, .job-fields { gap: 18px; }
.with-unit { flex: none; width: 100%; gap: 8px; }
.with-unit input { width: 100%; min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
.with-unit > span { flex: none; color: var(--muted); }
.segmented { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.segmented button { min-width: 0; min-height: 44px; padding: 8px 4px; border-radius: 7px; font-weight: 700; }
.segmented button[aria-pressed=true] { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 2px #315a9b24; }
.job-note { margin: 0; }
.period-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 20px; margin-top: 24px; }
.period-row > span { width: auto; }
.period-dates { grid-column: 1/-1; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; width: 100%; margin: 0; }
.period-dates input { width: 100%; }
.address-row { margin-top: 20px; }
.radio-group { gap: 8px 16px; }
.radio-group label, .check-row { min-height: 44px; }
.action-row { margin-top: 24px; gap: 12px; }
.action-row .primary { width: auto; flex: 1; min-height: 46px; }
.nested { margin: 24px 0 0; padding: 20px; background: #f8fafd; box-shadow: none; }
.nested legend { font-size: 19px; }
.criteria-grid { grid-template-columns: 1fr; gap: 16px; }
.small-button { min-height: 44px; }
.document-column > fieldset { padding: 24px 20px; }
.document-item { margin: 0; padding: 24px 0; border-bottom: 1px solid #e2e8f1; }
.document-item:first-of-type { padding-top: 8px; }
.document-item:last-of-type { border-bottom: 0; }
.document-item > h2 { margin-bottom: 12px; }
.document-item .small { margin: 10px 0 14px; }
.document-button { width: 100%; min-height: 48px; padding: 12px; }
.pledge-row { display: block; margin-bottom: 16px; }
.pledge-row > span { display: block; margin: 0 0 6px; min-width: 0; }
.pledge-row .radio-group { display: flex; gap: 4px 12px; }
.pledge-row .radio-group label { min-height: 44px; font-size: 15px; white-space: nowrap; }
#pledge-warning:not([hidden]), #safety-warning:not([hidden]), #input-validation:not([hidden]), #draft-notice:not([hidden]) {
  padding: 12px;
  border-radius: 7px;
  border-left: 3px solid #a65b16;
  background: #fff7e9;
  color: #754010;
  overflow-wrap: anywhere;
}
.document-item p, .document-item button, .document-item a { overflow-wrap: anywhere; }
.document-item .file-button { display: flex; justify-content: center; margin-top: 12px; text-align: center; }
.safety-settings, .draft-panel { margin-top: 18px; padding: 16px 12px; background: #f6f8fc; border-radius: 8px; }
.safety-settings > label:not(.check-row) { gap: 8px; margin: 16px 0; }
.safety-risks { flex-direction: column; gap: 4px; }
.safety-risks label { min-height: 44px; align-items: flex-start; }
.safety-risks input { margin-top: 4px; }
#safety-generate { width: 100%; }
.draft-panel label { margin-top: 14px; }
.draft-panel textarea { height: auto; min-height: 200px; line-height: 1.7; }
.draft-actions { gap: 8px; }
.draft-actions button { flex: 1 1 100%; min-height: 44px; }
#draft-regenerate { width: 100%; margin-top: 4px; }
.input-column > #draft-panel { margin: 0 0 24px; padding: 24px; background: #fff; border: 1px solid #e2e8f1; border-radius: 12px; scroll-margin-top: 24px; max-height: none; overflow: visible; }
.draft-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.draft-heading-row h2 { margin: 0; }
#draft-close { flex: 0 0 auto; min-height: 40px; padding: 6px 8px; font-size: 14px; color: #315a9b; background: #edf3fb; border-color: #cbd8eb; white-space: nowrap; }
@media (max-width: 600px) { .input-column > #draft-panel { padding: 20px 16px; } }
.photo-choices { flex-wrap: wrap; gap: 8px; }
.photo-choices button { flex: 1; background: var(--primary); border-radius: 7px; min-height: 44px; }
.photo-choices button:hover { background: var(--active); }
.photo-meta { gap: 18px 24px; }
.photo-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.photo-meta label { min-width: 0; }
.photo-meta input { height: 44px; min-width: 0; font-size: 16px; }
.photo-meta input[type=date] { text-align: left; }
#photo-selection { min-height: calc(100vh - 48px); min-height: calc(100svh - 48px); }
#photo-heading { scroll-margin-top: 24px; }
.photo-meta label { flex-direction: column; align-items: stretch; gap: 8px; }
.photo-meta input { width: 100%; flex: none; }
.photo-caption-row { flex-wrap: wrap; }
.photo-caption-row select { flex: 1 1 150px; min-width: 0; }
.photo-caption-row input { flex: 1 1 180px; min-width: 0; }
.photo-card { padding: 16px 0; gap: 12px 16px; }
.photo-card > img { border-radius: 6px; }
.photo-list { margin: 16px 0; }
.photo-toolbar { gap: 12px; margin-top: 20px; }
.photo-footer { gap: 12px; }
.audit-card { padding: 20px 0; }
.audit-card h3 { font-size: 18px; }
.audit-source { background: #f3f6fb; border-radius: 8px; padding: 16px; }
.processing-notice { font-size: 14px; line-height: 1.7; margin-top: 8px; padding: 20px 0 0; gap: 16px 28px; }
.processing-notice strong { font-size: 14px; color: #334c6e; }
.ui-notice { padding: 14px 16px; border-radius: 8px; line-height: 1.7; }
footer { font-size: 14px; color: #46566d; }
.muted, small, .small { color: #46566d; }
.processing-notice strong { font-size: 14px; }
.document-button { padding: 10px 12px; font-size: 16px; }
.segmented button, .small-button, .draft-actions button, .photo-choices button { min-height: 46px; font-size: 16px; }
.supplier-fields { align-content: start; }
.review-action + .review-action { margin-top: 20px; }
.review-tools .contract-review-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 18px; white-space: nowrap; }
#contract-review-close { flex: 0 0 auto; min-height: 40px; padding: 6px 8px; font-size: 14px; color: #315a9b; background: #edf3fb; border-color: #cbd8eb; }
#audit-results > .audit-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 18px; white-space: nowrap; }
#audit-results-close { flex: 0 0 auto; min-height: 40px; padding: 6px 8px; font-size: 14px; color: #315a9b; background: #edf3fb; border-color: #cbd8eb; }
.review-tools #contract-review { margin: 16px 0 0; padding: 16px 12px; scroll-margin-top: 24px; }
.review-tools .document-button { display: block; }
.review-tools .criteria-grid select { min-width: 0; max-width: 100%; }
.pledge-editor { min-width: 0; scroll-margin-top: 24px; }
.pledge-editor .radio-group { flex-wrap: wrap; }
.pledge-editor > .staff-grid { margin-bottom: 20px; }
.pledge-editor > .pledge-row { display: flex; flex-wrap: wrap; align-items: center; column-gap: 20px; min-height: 50px; margin: 0; padding: 3px 0; }
.pledge-editor > .pledge-row > span { flex: 0 0 150px; margin: 0; white-space: nowrap; }
.pledge-editor > .pledge-row > .radio-group { flex: 0 0 auto; max-width: 100%; gap: 4px 16px; }
.pledge-editor > .pledge-row + .pledge-row { border-top: 1px solid #e2e8f1; margin-bottom: 16px; }
.pledge-editor > .pledge-row .radio-group label { display: inline-flex; align-items: center; gap: 8px; }
.pledge-editor > .pledge-row input[type=radio] { margin: 0; }
.pledge-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.pledge-actions button { max-width: 100%; white-space: normal; }
.pledge-result { scroll-margin-top: 24px; background: #f7f9fc; padding: 16px; border-radius: 10px; }
.pledge-result h2 { font-size: 19px; }
.pledge-result p, .pledge-result a { overflow-wrap: anywhere; }
.pledge-result .file-button { max-width: 100%; white-space: normal; justify-content: center; text-align: center; }
.audit-pdf-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.audit-pdf-toolbar span { flex-basis: 100%; font-size: 14px; color: #354c6c; }
.audit-pdf-toolbar button { min-height: 46px; font-size: 15px; }
.audit-pdf-scroll { width: 100%; min-width: 0; max-height: 78vh; overflow: auto; background: #e4e9f0; border: 1px solid #bac6d6; }
.audit-pdf-scroll canvas { display: block; margin: 0 auto; background: #fff; }
.audit-pdf-unavailable { font-weight: 700; color: #754010; }
@media (min-width: 1280px) {
  .supplier-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
  .supplier-fields > .inline-field:nth-child(-n+3) { grid-column: 1 / -1; }
}
@media (max-width: 1180px) {
  .app-shell { padding: 24px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
  fieldset { padding: 20px; }
  .contract-grid { grid-template-columns: 1fr; gap: 20px; }
  .school-row > p { margin-left: 0; }
  .document-column > fieldset { padding: 20px 16px; }
}
@media (max-width: 1000px) {
  .workspace { grid-template-columns: 1fr; }
  .contract-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .document-column > fieldset { padding: 24px; }
  .document-item { padding: 24px 0; }
}
@media (max-width: 800px) {
  .app-shell { padding: 20px 16px 32px; }
  header { margin-bottom: 24px; }
  .stage { display: block; margin: 4px 0 0; }
  .pledge-row { display: block; }
  .period-dates label { min-width: 0; }
  .processing-notice { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  fieldset, .document-column > fieldset { padding: 20px 16px; }
  .staff-grid, .contract-grid { grid-template-columns: 1fr; gap: 18px; }
  .drop-area { padding: 20px 12px; }
  .drop-area > p { font-size: 16px; }
  .business-row { gap: 8px; }
  .business-row .lookup { padding: 9px 10px; }
  .action-row { flex-direction: column; }
  .action-row .primary { width: 100%; font-size: 15px; padding: 11px 12px; }
  .period-row { column-gap: 12px; }
  .period-dates { gap: 6px; }
  .period-dates input { padding: 8px 4px; font-size: 14px; }
  .safety-settings, .draft-panel { padding: 12px 10px; }
  .photo-meta { grid-template-columns: 1fr; }
  .photo-card { gap: 8px; }
  .photo-card-body > label { flex-direction: column; align-items: stretch; }
}

#safety-settings { scroll-margin-top: 20px; padding: 0; background: transparent; border-radius: 0; }
#safety-component { min-width: 0; overflow: visible; }
.safety-contract-grid, .safety-messages { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 12px 0; min-width: 0; }
.safety-contract-grid > label, .safety-messages > label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.safety-contract-grid input, .safety-messages textarea { width: 100%; min-width: 0; max-width: 100%; text-align: left !important; }
.safety-messages textarea { height: auto; min-height: 70px; padding: 7px; border: 1px solid #a7b5c8; border-radius: 7px; font: inherit; line-height: 1.5; resize: vertical; white-space: pre-wrap; overflow-wrap: anywhere; }
.safety-contract-grid .safety-period-toggle { display: flex; flex-direction: row; align-items: center; gap: 8px; min-height: 44px; }
.safety-period-toggle input { width: 18px; min-height: 18px; max-width: 18px; }
.safety-settings #safety-amount-note { margin-top: -6px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto !important; } }

/* Audit results share the left input column and use the page scroll. */
.input-column > #audit-results { scroll-margin-top: 24px; overflow: visible; max-height: none; }
