@font-face {
  font-family: Site;
  src: url('/assets/fonts/site.woff2?v=4') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #F5F6F8;
  --card: #fff;
  --line: #E5E7EB;
  --line-soft: #EEF0F3;
  --text: #1F2328;
  --muted: #55595F;
  --red: #D21F1D;
  --rail-width: 100px;
  --tabs-height: 64px;
  --bottom-height: 112px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 16px; scroll-padding-bottom: 24px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 Site, 'Apple SD Gothic Neo', Arial, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
button, a { min-width: 44px; min-height: 44px; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); line-height: 1.5; cursor: pointer; overflow-wrap: anywhere; }
button:hover { border-color: var(--text); }
button:disabled { color: var(--muted); cursor: wait; }
a { display: inline-flex; align-items: center; color: inherit; overflow-wrap: anywhere; text-underline-offset: 4px; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
input, select, textarea { width: 100%; min-width: 0; max-width: 100%; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); font-size: 16px; line-height: 1.5; }
input, select { height: 44px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type='search']::-webkit-search-cancel-button { filter: grayscale(1); }
input:disabled, select:disabled { color: var(--muted); background: var(--card); }
input[type='checkbox'], input[type='radio'] { flex: 0 0 20px; width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; accent-color: var(--text); }
[aria-invalid='true'] { border-color: var(--text); outline: 1px solid var(--text); }
textarea { min-height: 88px; resize: vertical; }
img { display: block; max-width: 100%; }
p { margin: 0; }
small { font-size: 14px; line-height: 1.5; }
[hidden] { display: none !important; }
.honey { position: fixed; left: -10000px; top: 0; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; }
header { display: flex; align-items: center; gap: 20px; height: 64px; padding: 8px 20px 8px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.brand { flex: 0 0 52px; justify-content: center; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.page-title { min-width: 0; font-size: 18px; font-weight: 750; }
.page-title span { margin-left: 16px; color: var(--muted); font-size: 14px; font-weight: 400; }
.phone { margin-left: auto; font-weight: 700; text-decoration: none; }
.rail { position: fixed; top: 64px; bottom: 0; left: 0; width: var(--rail-width); display: flex; flex-direction: column; padding-top: 8px; border-right: 1px solid var(--line); background: var(--card); }
.rail a { position: relative; flex-direction: column; justify-content: center; gap: 6px; padding: 14px 4px; text-decoration: none; }
.rail img { width: 32px; height: 32px; object-fit: contain; }
.rail span { font-size: 16px; text-align: center; }
.rail a[href="/privacy.html"] > span { max-width: 100%; word-break: keep-all; overflow-wrap: normal; }
.rail .rail-phone > span { display: block; white-space: nowrap; }
.rail .on { color: var(--red); font-weight: 700; }
.rail .on::before { content: ''; position: absolute; top: 12px; bottom: 12px; left: 0; width: 3px; background: var(--red); }
main { margin-left: var(--rail-width); padding: 20px 16px 0; }
h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.tabs { display: none; }
.order-layout { max-width: 1440px; margin: auto; }
#order-form { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 12px; }
.panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); scroll-margin-top: 16px; }
h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 20px; line-height: 1.5; font-weight: 750; }
h2 small { margin-left: auto; color: var(--muted); font-size: 14px; font-weight: 400; }
.step-number { display: inline-flex; flex: 0 0 28px; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: var(--card); font-size: 18px; font-weight: 750; }
.section-label, .map-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; font-size: 16px; font-weight: 700; }
.section-label > span:not(.tools) { color: var(--muted); font-size: 14px; font-weight: 400; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.row > .validation-message, .row > .address-failure { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 16px; }
.note, #distance-status, #address-status, .vehicle-info, .route-preview, .handling small, #char-count, .upload small, #file-list, .notice, .validation-message, .form-status, .live-dot, .order-legal, #dialog-content > p, .mobile-bottom span { color: var(--muted); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.note a { color: var(--text); }
.next { display: none; }
.schedule { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 8px; align-items: end; }
.requester, .location, #via-fields { display: flex; flex-direction: column; gap: 8px; }
.requester, .location { padding-top: 12px; border-top: 1px solid var(--line-soft); }
.inline, .consent { display: flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; font-size: 16px; cursor: pointer; }
.inline { padding: 8px 0; }
.location .address { grid-template-columns: minmax(0, 1fr); }
.field:has(> .address-search) { display: grid; grid-template-columns: minmax(44px, 1fr) auto; align-content: start; column-gap: 4px; }
.field:has(> .address-search) > input { grid-column: 1; grid-row: 2; }
.address-search { grid-column: 2; grid-row: 2; height: 44px; white-space: nowrap; padding: 8px; font-size: 16px; }
.text-btn { padding: 8px; font-size: 16px; }
.via { min-width: 0; }
#add-via { width: 100%; }
#via-fields .address-search { align-self: flex-start; }
#swap { font-size: 16px; }
#kakao-map { width: 100%; height: 180px; border-radius: 8px; background: var(--bg); }
/* Optional controls remain keyboard accessible with a visible open/close sign. */
.optional { min-width: 0; border-top: 1px solid var(--line-soft); }
.optional > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 44px; min-height: 44px; padding: 8px 0; list-style: none; font-size: 16px; font-weight: 500; cursor: pointer; }
.optional > summary::-webkit-details-marker { display: none; }
.optional > summary::after { content: '+'; flex: 0 0 24px; text-align: center; font-size: 20px; font-weight: 400; }
.optional[open] > summary::after { content: '−'; }
.details-content { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 4px 0 12px; }
.schedule > .optional { border: 1px solid var(--line); border-radius: 8px; }
.schedule > .optional > summary { padding: 8px; }
.schedule > .optional[open] { grid-column: 1 / -1; }
.schedule > .optional > .details-content { padding: 4px 8px 8px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tools button { flex: 1 1 auto; font-size: 16px; }
.cargo { gap: 8px; }
.vehicle-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.vehicle-cards label, .handling label, .service label, .flags label { position: relative; min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; }
.vehicle-cards label { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 0; height: 80px; padding: 4px; font-size: 16px; }
.vehicle-cards input, .handling input, .service input { position: absolute; top: 8px; left: 8px; opacity: 0; }
:is(.vehicle-cards, .handling, .service, .flags) label:has(:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
:is(.vehicle-cards, .handling, .service) label:has(:checked)::after { content: '✓'; position: absolute; top: 1px; right: 4px; font-size: 16px; font-weight: 750; }
:is(.vehicle-cards, .handling, .service, .flags) label:focus-within { outline: 2px solid var(--text); outline-offset: 2px; }
.vehicle-symbol { display: block; flex: 0 0 48px; width: 64px; height: 48px; }
.vehicle-symbol img, .handling-photo img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.vehicle-settings { display: flex; flex-direction: column; gap: 8px; }
.flags { display: flex; flex-wrap: wrap; gap: 8px; }
.flags label { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; font-size: 16px; }
.service { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.service label { display: flex; align-items: center; justify-content: center; padding: 8px 4px; }
.handling { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.handling label { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; align-items: center; column-gap: 8px; min-height: 64px; padding: 4px 18px 4px 4px; }
.handling-photo { display: block; grid-column: 1; grid-row: 1 / span 2; width: 60px; height: 54px; }
.handling strong { grid-column: 2 / -1; font-size: 16px; line-height: 1.5; font-weight: 500; }
.handling small { grid-column: 2; line-height: 1.4; }
.handling small + small { grid-column: 3; font-size: 14px; white-space: nowrap; }
.handling label:has(:checked) strong { font-weight: 750; }
.cargo-details { display: flex; flex-direction: column; gap: 8px; }
.cargo-text, .upload { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 16px; }
.cargo-text { position: relative; }
#char-count { position: absolute; top: 2px; right: 0; }
.upload { position: relative; }
.upload input { position: absolute; bottom: 0; left: 0; width: 100%; height: 44px; opacity: 0; cursor: pointer; }
.upload:focus-within #file-list { outline: 2px solid var(--text); outline-offset: 2px; }
#file-list { display: flex; align-items: center; min-height: 44px; padding: 8px; border: 1px dashed var(--muted); border-radius: 8px; font-size: 16px; color: var(--text); }
.fare-body, .fare-estimate, .fare-checkout { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.distance-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; }
#calculate-route { flex: none; align-self: start; margin-top: 28px; font-size: 16px; padding: 8px; white-space: nowrap; }
#distance-source:empty { display: none; }
#distance-status { padding-bottom: 4px; }
.price-row, .total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.price-row > span, .total > span { font-size: 16px; }
output { color: var(--text); font-weight: 750; overflow-wrap: anywhere; }
#base-fare { font-size: 18px; }
.total { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
#total-fare { font-size: 26px; line-height: 1.4; }
.notice, .validation-message { margin: 0; padding: 4px 0 4px 10px; border-left: 2px solid var(--muted); color: var(--text); }
.consent { padding: 4px 0; }
.submit, .next, #jump-fare, #search-address, #calc-apply { border-color: var(--red); background: var(--red); color: var(--card); font-weight: 700; }
:is(.submit, .next, #jump-fare, #search-address, #calc-apply):hover { border-color: var(--red); }
.submit { width: 100%; min-height: 48px; font-size: 16px; }
.submit:disabled { background: var(--muted); border-color: var(--muted); color: var(--card); }
.form-status:empty { display: none; }
.mobile-bottom { display: none; }
.summary-title { display: none; }
.order-legal { position: relative; margin-left: var(--rail-width); padding: 16px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.order-legal span { display: block; }
.order-legal a { color: var(--text); }
.order-legal .legal-brand { display: inline; }
.fare-table-status, .address-failure { padding: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
/* Utility dialogs share the existing page surfaces and accessible targets. */
dialog { width: min(640px, calc(100% - 24px)); max-width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); overscroll-behavior: contain; }
dialog::backdrop { background: var(--text); opacity: .35; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.dialog-head strong { min-width: 0; font-size: 20px; }
.dialog-head button { flex-shrink: 0; font-size: 16px; }
#dialog-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; }
#dialog-content:has([data-calc]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#dialog-content > p, #dialog-content > output, #dialog-content > img, .calc-actions { grid-column: 1 / -1; }
#dialog-content > img { width: 240px; height: auto; margin: auto; border-radius: 8px; }
#calc-result { padding: 16px 0; border-top: 1px solid var(--line-soft); font-size: 16px; }
.calc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.calc-actions button { flex: 1 1 auto; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { padding: 12px 8px; border-bottom: 1px solid var(--line-soft); text-align: left; }
#address-dialog { width: min(520px, calc(100% - 24px)); }
#address-status { margin: 16px 0; }
#search-address { width: 100%; margin-top: 12px; }
#address-results { display: flex; flex-direction: column; gap: 8px; max-height: 320px; margin-top: 16px; overflow-y: auto; }
#address-results button { flex-shrink: 0; width: 100%; justify-content: flex-start; text-align: left; }
@media (min-width: 1200px) {
  #order-form { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1.14fr) minmax(0, 1fr); }
  .fare { position: sticky; top: 16px; }
}
@media (max-width: 800px) {
  html { scroll-padding-top: var(--tabs-height); scroll-padding-bottom: calc(var(--bottom-height) + env(safe-area-inset-bottom) + 12px); }
  body { padding-bottom: calc(var(--bottom-height) + env(safe-area-inset-bottom) + 12px); }
  header { height: 64px; gap: 8px; padding: 4px 12px; }
  .brand { flex-basis: 44px; }
  .brand img { width: 40px; height: 40px; }
  .page-title { flex: 1; font-size: 16px; line-height: 1.4; }
  .page-title span { display: block; margin: 0; font-size: 14px; }
  .phone, .rail { display: none; }
  main { margin-left: 0; padding: 0; }
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); position: sticky; top: 0; z-index: 3; height: var(--tabs-height); margin-bottom: 8px; border-bottom: 1px solid var(--line); background: var(--card); }
  .tabs button { flex-direction: column; gap: 2px; min-width: 0; height: var(--tabs-height); padding: 4px 2px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; font-size: 16px; white-space: nowrap; }
  .tabs img { flex: 0 0 24px; width: 24px; height: 24px; object-fit: contain; }
  .tabs button[aria-selected='true'] { color: var(--red); border-bottom-color: var(--red); font-weight: 750; }
  #order-form { display: flex; flex-direction: column; gap: 12px; padding: 0 8px; }
  .panel { display: none; }
  .panel.active { display: flex; width: 100%; padding: 12px; gap: 8px; scroll-margin-top: calc(var(--tabs-height) + 8px); }
  .schedule { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .location .address { grid-template-columns: minmax(0, 1fr); }
  .requester, .location { padding-top: 8px; }
  .vehicle-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vehicle-cards label { flex-direction: row; height: 64px; gap: 4px; }
  .vehicle-symbol { flex: 0 0 64px; height: 52px; }
  .next { display: inline-flex; width: 100%; min-height: 48px; }
  .mobile-bottom { position: fixed; right: 0; bottom: 0; left: 0; z-index: 4; display: flex; flex-direction: column; height: calc(var(--bottom-height) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: var(--card); }
  .mobile-bottom > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 8px; min-height: 67px; padding: 4px 12px; }
  .mobile-bottom span { color: var(--muted); font-size: 14px; }
  #mobile-fare { grid-column: 1; font-size: 20px; line-height: 1.4; }
  #jump-fare { grid-column: 2; grid-row: 1 / 3; font-size: 16px; }
  .mobile-bottom > a { justify-content: center; min-height: 44px; border-top: 1px solid var(--line-soft); font-size: 16px; font-weight: 700; text-decoration: none; }
  .order-legal { margin-left: 0; padding: 12px 16px; }
  .order-legal .legal-brand { display: inline; }
  .fare-body, .fare-estimate, .fare-checkout { gap: 8px; }
}
@media (max-width: 360px) {
  h2 { gap: 6px; }
  .vehicle-symbol { flex-basis: 56px; width: 56px; }
  .vehicle-cards label { padding: 4px; gap: 2px; }
  .handling label { grid-template-columns: 56px minmax(0, 1fr); padding-right: 16px; }
  .handling-photo { width: 56px; }
  .handling small + small { grid-column: 2; }
  .schedule { grid-template-columns: minmax(0, 1fr); }
  .schedule > .optional { border: 0; border-top: 1px solid var(--line-soft); border-radius: 0; }
  .schedule > .optional > summary { padding: 8px 0; }
  .distance-row { gap: 4px; }
  #calculate-route { padding: 8px 6px; }
}

/* 320px: 연락처 예시(010-0000-0000) 잘림 방지 */
@media (max-width: 360px) { .row:has(#phone) { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }

/* staging bundle 2: compact fare notes */
.fare-compact { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.fare-compact p { margin: 0; font-size: 14px; line-height: 1.4; }
.fare-compact .fare-conditions { padding: 0; border: 0; background: none; }
@media (min-width:1200px){#fare .fare-body,#fare .fare-estimate,#fare .fare-checkout{gap:6px}#fare .total{padding:4px 0}#fare #distance-status,#fare .note{margin:0}#fare .field{gap:4px}}
.order-legal .legal-registration .legal-brand, .order-legal .legal-phone { display: inline; }
