* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: #f6f7f9; color: #242938; font: 14px/1.5 system-ui, -apple-system, sans-serif; }
a { color: #a31c28; }
header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 14px max(24px, calc((100% - 1120px)/2)); background: #fff; border-bottom: 1px solid #e8eaf0; }
header a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-weight: 700; }
header img { width: clamp(100px, 18vw, 156px); height: auto; object-fit: contain; flex-shrink: 0; }
header .brand-logo { min-width: 0; font-size: 14px; line-height: 1.3; }
header .brand-logo span { min-width: 0; }
header .brand-logo small { font-size: 11px; font-weight: 400; color: #737c8d; }
header .back-link { color: #657083; font-size: 12px; font-weight: 500; }
main { max-width: 1168px; margin: 26px auto; padding: 0 24px 32px; }
.page-intro { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #a31c28; letter-spacing: .3px; }
h1 { margin: 5px 0 6px; font-size: 26px; line-height: 1.25; letter-spacing: -.6px; }
.page-intro p { margin: 0; color: #657083; font-size: 13px; }
.date-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #e2e5eb; border-radius: 8px; background: #fff; color: #657083; font-size: 12px; white-space: nowrap; }
.notice, .success, .errors { margin: 0 0 18px; padding: 11px 14px; border: 1px solid #e1e6ee; border-radius: 8px; background: #eef2f7; font-size: 12px; }
.notice { display: flex; gap: 9px; align-items: flex-start; color: #59667a; }
.notice i { font-size: 17px; }
.success { border-color: #c9e7d1; background: #eaf6ee; color: #25633d; }
.errors { border-color: #f2c8cb; background: #fceced; color: #971e29; }
.errors ul { padding-left: 20px; }
.form-layout { display: grid; grid-template-columns: 176px minmax(0,1fr); gap: 24px; align-items: start; }
.form-sidebar { min-width: 0; }
.section-nav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 4px; }
.nav-title { padding: 5px 10px 12px; font-size: 9px; font-weight: 700; color: #667185; letter-spacing: 1px; }
.section-nav a { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 7px; color: #5b6679; font-size: 12px; font-weight: 500; text-decoration: none; }
.section-nav a:hover, .section-nav a:focus-visible { background: #f8e9eb; color: #a31c28; }
.section-nav a i { font-size: 17px; }
.nav-number { display: grid; place-items: center; width: 20px; height: 20px; flex-shrink: 0; border: 1px solid #d8dee7; border-radius: 6px; font-size: 10px; }
.nav-note { display: flex; gap: 7px; margin: 15px 10px; padding-top: 16px; border-top: 1px solid #e2e6ed; color: #667185; font-size: 11px; }
form { min-width: 0; }
.brand-panel { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 20px; padding: 17px 20px; border: 1px solid #e9c9cd; border-radius: 10px; background: linear-gradient(110deg, #fff7f7, #fff); }
.brand-panel + .brand-panel { margin-top: 12px; }
.brand-panel-copy { display: flex; align-items: center; gap: 11px; }
.panel-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #f8e2e5; color: #aa2130; font-size: 22px; }
h2 { margin: 0 0 3px; font-size: 14px; }
.brand-panel-copy p { margin: 0; color: #737080; font-size: 12px; }
.registration-type-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.registration-type-choice { position: relative; cursor: pointer; }
.registration-type-choice input[type=radio] { position: absolute; width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0; opacity: 0; }
.registration-type-choice > span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px; border: 1px solid #d3d9e3; border-radius: 7px; background: #fff; color: #4d586b; font-size: 13px; }
.registration-type-choice input:checked + span { border-color: #a31c28; background: #a31c28; color: #fff; }
.registration-type-choice input:focus-visible + span { outline: 3px solid #e8a5ab; outline-offset: 3px; }
.registration-type-choice input:disabled + span { cursor: not-allowed; opacity: .5; }
.form-hint { display: flex; justify-content: space-between; gap: 12px; margin: 12px 2px 8px; color: #737c8d; font-size: 10px; }
.required-marker, label > span, .error { color: #b21e2b; }
label > .field-label { color: inherit; }
fieldset, .receipt { min-width: 0; margin: 16px 0 0; padding: 17px 20px 20px; border: 1px solid #e0e4eb; border-radius: 10px; background: #fff; box-shadow: 0 2px 4px rgba(25,34,52,.025); }
legend { display: flex; align-items: center; gap: 8px; padding: 0 8px; color: #323949; font-size: 13px; font-weight: 700; }
legend > i { font-size: 18px; color: #a31c28; }
.section-index { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; background: #f9e9eb; color: #a31c28; font-size: 11px; }
.grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px 16px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.field [aria-invalid="true"] { border-color: #b21e2b; }
.dropzone:focus { outline: 3px solid #b84854; outline-offset: 3px; }
.field .error { font-size: 12px; line-height: 1.5; }
.errors a { color: inherit; text-underline-offset: 3px; }
.draft-notice { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; padding: 12px 14px; border: 1px solid #d3d9e3; border-radius: 8px; background: #fff; }
.draft-notice > div { flex: 1; min-width: 0; }
.draft-notice p { margin: 0 0 4px; font-size: 12px; }
.draft-notice small { color: #4d586b; font-size: 11px; }
.draft-notice button { flex-shrink: 0; }
@media(max-width: 600px) { .draft-notice { flex-direction: column; align-items: flex-start; } }
.wide { grid-column: 1/-1; }
.pic-greeting { grid-column-start: 1; }
label { font-size: 11px; font-weight: 600; color: #4d586b; }
input:not([type=checkbox]), select, textarea { width: 100%; min-height: 37px; padding: 8px 10px; border: 1px solid #d3d9e3; border-radius: 6px; background: #fff; color: #303849; font: inherit; font-size: 12px; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: #abb5c5; }
input:focus, select:focus, textarea:focus { border-color: #b84854; outline: none; box-shadow: 0 0 0 3px #f9e8eb; }
textarea { min-height: 62px; resize: vertical; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #e8a5ab; outline-offset: 3px; }
small { display: block; color: #737c8d; font-size: 10px; overflow-wrap: anywhere; }
.section-copy { margin: 0 0 12px; color: #657083; font-size: 12px; }
.documents-intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.template-link { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border: 1px solid #ebced3; border-radius: 6px; color: #a31c28; background: #fff7f8; font-size: 11px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.template-label-short { display: none; }
.upload-guide { margin: 0 0 14px; color: #697386; font-size: 11px; }
.upload-guide summary { cursor: pointer; font-weight: 500; }
.upload-guide p { max-width: 640px; margin: 8px 0; }
.document-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.document-card { padding: 11px; border: 1px solid #e7eaf0; border-radius: 8px; background: #fcfcfd; }
.document-card-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.document-card-heading > label { min-width: 0; flex: 1; font-size: 11px; }
.dropzone { min-height: 86px; padding: 10px; border: 1px dashed #c8cfdb; border-radius: 6px; background: #fff; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.dz-drag-hover { border-color: #b34b58; background: #fff8f9; }
.dropzone .dz-message { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.dropzone .dz-message::before { display: none; }
.dropzone .dz-message > span { font-size: 10px; color: #818b9a; }
.upload-icon { font-size: 21px; color: #b03947; }
.dropzone .choose-file { padding: 5px 8px; font-size: 11px; border-color: #e3d3d6; }
.dropzone .dz-preview { margin: 4px; max-width: 100%; font-size: 11px; }
.dropzone .dz-filename { position: static; inline-size: auto; padding: 4px 0; white-space: normal; overflow-wrap: anywhere; }
.dropzone .dz-size { padding: 4px 0; }
.dropzone .dz-preview .dz-error-message { position: static; opacity: 1; pointer-events: auto; }
.dropzone .dz-preview .dz-progress, .dropzone .dz-preview .dz-success-mark { display: none; }
.dropzone .dz-remove { font-size: 11px; }
.saved { margin: 0; font-size: 10px; overflow-wrap: anywhere; }
.native-upload.enhanced { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.table-scroll { max-height: 300px; overflow: auto; border: 1px solid #e8ebf0; border-radius: 6px; }
h3 { font-size: 13px; margin: 18px 0 10px; }
table { border-collapse: collapse; width: 100%; font-size: 11px; }
th,td { padding: 9px; border-bottom: 1px solid #e8ebf0; text-align: left; overflow-wrap: anywhere; }
th { background: #f7f8fa; color: #657083; }
.declaration { margin: 16px 0; padding: 13px 16px; border: 1px solid #e0e4eb; border-radius: 8px; background: #fff; }
.declaration label { display: flex; align-items: flex-start; gap: 9px; font-size: 11px; line-height: 1.7; font-weight: 400; }
.declaration label span { color: #5b6679; }
input[type=checkbox] { flex-shrink: 0; margin-top: 3px; accent-color: #ad2432; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.action-note { flex: 1; color: #737c8d; font-size: 10px; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 13px; border: 1px solid #cdd4de; border-radius: 7px; background: #fff; color: #505b6d; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
button:hover { background: #f4f6f9; }
.primary { border-color: #ab202d; background: linear-gradient(135deg,#bf2d3b,#a11b29); color: #fff; box-shadow: 0 3px 9px rgba(163,28,40,.12); }
.primary:hover { background: #961927; }
button:disabled { opacity: .6; cursor: wait; }
#submit-status { color: #657083; font-size: 12px; }
.receipt-header-label { display: inline-flex; align-items: center; gap: 7px; color: #657083; font-size: 12px; }
.receipt-page { max-width: 840px; margin: 32px auto; }
.receipt { margin: 0; padding: 30px; border-top: 3px solid #a31c28; box-shadow: 0 8px 30px rgba(25,34,52,.045); }
.receipt-hero { text-align: center; }
.receipt-success-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 14px; border: 6px solid #f0f9f3; border-radius: 50%; background: #daf1e2; color: #287a49; font-size: 30px; }
.receipt-hero h1 { margin-top: 8px; font-size: 25px; }
.receipt-hero p, .receipt-ticket p { margin: 7px 0 0; color: #657083; font-size: 12px; }
.receipt-ticket { margin: 24px 0; padding: 18px; border: 1px dashed #dec1c6; border-radius: 10px; background: #fff7f8; text-align: center; }
.receipt-ticket > span, .receipt-label { display: block; color: #657083; font-size: 11px; }
.receipt-number { display: block; margin: 6px 0; color: #a31c28; font-size: clamp(18px,4vw,27px); letter-spacing: 1px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.receipt-company { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid #e8ebf0; }
.receipt-company > div { min-width: 0; }
.receipt-company h2 { margin: 5px 0 0; font-size: 17px; overflow-wrap: anywhere; }
.receipt-status { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; padding: 5px 9px; border: 1px solid #cce7d5; border-radius: 20px; background: #ecf8f0; color: #287a49; font-size: 11px; font-weight: 600; }
.receipt-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 28px; margin: 20px 0; }
.receipt-details dt { display: flex; align-items: center; gap: 6px; color: #657083; font-size: 11px; }
.receipt-details dt i { font-size: 16px; }
.receipt-details dd { margin: 5px 0 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.receipt-note { display: flex; align-items: flex-start; gap: 9px; padding: 12px; border-radius: 8px; background: #f4f6f9; color: #657083; font-size: 11px; }
.receipt-note > i { margin-top: 2px; font-size: 17px; color: #a31c28; }
.receipt-note p { margin: 0; }
.receipt-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 22px; }
.receipt-actions a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; text-decoration: none; }
[hidden] { display: none !important; }
@media(max-width: 1000px) { .grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width: 760px) {
    main { padding: 0 16px 28px; margin-top: 20px; } header { padding: 12px 16px; }
    .form-layout { grid-template-columns: 1fr; gap: 12px; }
    .section-nav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 5px; }
    .section-nav a { white-space: nowrap; border: 1px solid #e1e6ee; background: #fff; padding: 7px 9px; }
    .nav-title, .nav-note { display: none; }
    .brand-panel { padding: 15px; }
    .action-note { flex-basis: 100%; }
}
@media(max-width: 480px) {
    h1 { font-size: 23px; } .date-badge { display: none; } header .back-link { font-size: 11px; }
    .grid, .document-grid, .brand-panel { grid-template-columns: 1fr; }
    fieldset { padding: 14px; } .brand-panel { gap: 12px; } .form-hint { flex-direction: column; gap: 2px; }
    input:not([type=checkbox]), select, textarea { font-size: 16px; }
    .actions button { flex: 1; } .documents-intro { flex-wrap: wrap; margin-bottom: 10px; }
    .receipt-page { margin-top: 20px; }
    .receipt { padding: 20px 16px; }
    .receipt-hero h1 { font-size: 21px; }
    .receipt-company { align-items: flex-start; flex-direction: column; gap: 10px; }
    .receipt-details { grid-template-columns: 1fr; gap: 16px; }
    .receipt-ticket { padding: 14px 10px; }
    .receipt-actions { flex-direction: column; gap: 16px; }
    .receipt-actions button { width: 100%; }
}
@media(prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media(max-width: 360px) {
    .template-link { padding: 4px 6px; }
    .template-label-full { display: none; }
    .template-label-short { display: inline; }
}
@media print { header, button, .receipt-actions { display: none; } body { background: #fff; } .receipt-page { margin: 0 auto; padding: 0; } .receipt { border: 0; box-shadow: none; break-inside: avoid; } }

.raw-material-field { margin-top: 10px; }
.raw-material-field label { display: flex; align-items: center; gap: 8px; }
.raw-material-field input[type="checkbox"] { width: auto; flex-shrink: 0; }
