/* 바닷길 관리자 · 송장 출력 작업대 */
:root {
  --bg: #F2EEE6;
  --surface: #FFFFFF;
  --line: #DCD4C5;
  --text: #1C1F23;
  --muted: #5C6168;
  --primary: #1F3A5F;
  --primary-ink: #16304F;
  --primary-soft: #E4EAF2;
  --accent: #E2512B;
  --ok: #1E7B4F;
  --ok-soft: #E3F2EA;
  --warn: #8F5B00;
  --warn-soft: #FBF0DA;
  --danger: #B83227;
  --danger-soft: #FBE7E4;
  --r: 8px;
  --code: "Black Han Sans", "Pretendard Variable", system-ui, sans-serif;
  --mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --body: "Pretendard Variable", "Pretendard", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ad {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
:where(.ad) button, :where(.ad) input, :where(.ad) select { font: inherit; color: inherit; }
:where(.ad) button { cursor: pointer; }
:where(.ad) a { color: var(--primary); }
.ad :focus-visible { outline: 3px solid rgba(31, 58, 95, .35); outline-offset: 2px; }
.ad [hidden] { display: none !important; }
.ad-sprites { position: absolute; width: 0; height: 0; overflow: hidden; }
.ad-mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* 머리 */
.ad-top { position: sticky; top: 0; z-index: 30; background: var(--primary); color: #fff; }
.ad-top__inner { max-width: 1200px; margin: 0 auto; padding: 10px 16px 0; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand reset" "nav nav"; gap: 8px 12px; align-items: center; }
.ad-brand { grid-area: brand; display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; min-width: 0; flex-wrap: wrap; }
.ad-brand__mark { width: 30px; height: 30px; flex: none; border-radius: 6px; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.ad-brand__name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.ad-env { padding: 2px 8px; border-radius: 4px; background: rgba(255,255,255,.14); font-size: 12px; font-weight: 600; color: #F6D9CF; }
.ad-reset { grid-area: reset; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; background: transparent; color: #fff; font-size: 13px; font-weight: 600; }
.ad-reset:hover { background: rgba(255,255,255,.1); }
.ad-nav { grid-area: nav; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.ad-nav::-webkit-scrollbar { display: none; }
.ad-nav__item { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; color: rgba(255,255,255,.75); text-decoration: none; font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; }
.ad-nav__item:hover { color: #fff; }
.ad-nav__item.is-active { color: #fff; border-bottom-color: var(--accent); }
.ad-nav__badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
@media (min-width: 900px) {
  .ad-top__inner { grid-template-columns: auto 1fr auto; grid-template-areas: "brand nav reset"; padding: 0 24px; gap: 24px; }
  .ad-nav { margin: 0; padding: 0; align-self: stretch; }
  .ad-nav__item { min-height: 56px; }
}

.ad-main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 120px; }
@media (min-width: 900px) { .ad-main { padding: 28px 24px 120px; } }

.ad-eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.ad-h1 { margin: 0; font-size: 24px; line-height: 1.3; letter-spacing: -.03em; }
.ad-h3 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.ad-lead { margin: 8px 0 0; color: var(--muted); max-width: 680px; }
.ad-help { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.ad-tag { display: inline-block; padding: 2px 8px; border: 1px dashed var(--muted); border-radius: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ad-link { font-weight: 700; font-size: 14px; text-decoration: none; }
.ad-link:hover { text-decoration: underline; }
@media (min-width: 900px) { .ad-h1 { font-size: 28px; } }

.ad-head { display: grid; gap: 16px; margin-bottom: 20px; }
@media (min-width: 1000px) { .ad-head { grid-template-columns: 1fr auto; align-items: end; } }

/* 숫자 */
.ad-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ad-stat { padding: 10px 8px; text-align: center; border-left: 1px solid var(--line); }
.ad-stat:first-child { border-left: 0; }
.ad-stat dt { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ad-stat dd { margin: 0; font-family: var(--mono); font-size: 22px; font-weight: 700; }
.ad-stat--ok dd { color: var(--ok); }
.ad-stat--danger dd { color: var(--danger); }
@media (min-width: 1000px) { .ad-stat { min-width: 92px; padding: 10px 14px; } }

/* 버튼 */
.ad-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.ad-btn:hover { border-color: var(--primary); }
.ad-btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.ad-btn--primary:hover { background: var(--primary-ink); }
.ad-btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.ad-btn:disabled { opacity: .45; cursor: not-allowed; }
.ad-icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }

.ad-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ad-toolbar__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; font-size: 14px; }
.ad-check input, .ad-row__pick input { width: 20px; height: 20px; accent-color: var(--primary); }
@media (max-width: 520px) {
  .ad-toolbar__btns { width: 100%; }
  .ad-toolbar__btns .ad-btn { flex: 1; }
}

/* 칩 */
.ad-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; background: #EEEAE2; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ad-chip--ok { background: var(--ok-soft); color: var(--ok); }
.ad-chip--warn { background: var(--warn-soft); color: var(--warn); }
.ad-chip--danger { background: var(--danger-soft); color: var(--danger); white-space: normal; }
.ad-chip--pending { background: var(--primary-soft); color: var(--primary); }
.ad-chip--plain { background: #EEEAE2; color: var(--muted); }
.ad-spin { width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ad-spin .7s linear infinite; }
@keyframes ad-spin { to { transform: rotate(360deg); } }

/* 분류코드 */
.ad-code { display: inline-grid; flex: none; white-space: nowrap; place-items: center; min-width: 92px; padding: 6px 10px; border: 2px solid var(--text); border-radius: 4px; background: #fff; font-family: var(--code); font-size: 26px; line-height: 1; letter-spacing: .01em; color: var(--text); }
.ad-code.is-manual { border-style: dashed; color: var(--warn); border-color: var(--warn); }
.ad-code--sm { min-width: 70px; font-size: 18px; padding: 4px 6px; }

/* 송장 목록 */
.ad-grid { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ad-grid__head { display: none; }
.ad-row { display: grid; grid-template-columns: 32px 1fr; gap: 6px 10px; padding: 14px 14px 16px; border-top: 1px solid var(--line); }
.ad-row:first-child { border-top: 0; }
.ad-row > :not(.ad-row__pick) { grid-column: 2; }
.ad-row__pick { grid-row: 1 / span 4; padding-top: 2px; }
.ad-row__who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.ad-row__id { font-size: 12px; color: var(--muted); }
.ad-row__item { font-size: 13px; color: var(--muted); }
.ad-row__raw { font-size: 14px; }
.ad-row__detail { font-weight: 700; }
.ad-missing { display: inline-block; padding: 0 6px; border: 1px dashed var(--danger); border-radius: 4px; color: var(--danger); font-size: 12px; font-weight: 700; }
.ad-zip { display: inline-block; padding: 0 4px; border-radius: 3px; background: #EEEAE2; font-size: 13px; }
.ad-row__inv { font-size: 14px; }
.ad-row__inv small { margin-left: 6px; font-size: 12px; color: var(--muted); }
.ad-m { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.ad-row.is-pending { background: #F7F9FC; }
.ad-row.is-fail { background: #FFFBFA; }
.ad-row.is-printed { opacity: .7; }
.ad-res { display: flex; gap: 12px; align-items: flex-start; margin-top: 4px; }
.ad-res--fail { display: grid; gap: 4px; justify-items: start; }
.ad-res__txt { min-width: 0; }
.ad-res__addr { margin: 4px 0 0; font-size: 14px; }
.ad-res__meta { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.ad-res__why { margin: 0; font-size: 13px; color: var(--danger); }
.ad-keep { display: flex; gap: 4px; align-items: flex-start; margin: 6px 0 0; padding: 4px 8px; border-radius: 4px; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 600; }
.ad-keep svg { flex: none; margin-top: 2px; }
@media (min-width: 1000px) {
  .ad-grid__head, .ad-row { display: grid; grid-template-columns: 40px 170px minmax(0, 1.1fr) 150px minmax(0, 1.5fr); gap: 16px; align-items: start; }
  .ad-grid__head { padding: 10px 16px; background: #F7F4EE; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
  .ad-row { padding: 14px 16px; }
  .ad-row > :not(.ad-row__pick) { grid-column: auto; }
  .ad-row__pick { grid-row: auto; }
  .ad-row__who { flex-direction: column; gap: 0; }
  .ad-m { display: none; }
  .ad-row__inv small { display: block; margin: 0; }
  .ad-res { margin-top: 0; }
}

/* 요청 기록 */
.ad-log { margin-top: 20px; padding: 14px 16px; background: #1C1F23; color: #D7DCE2; border-radius: var(--r); }
.ad-log__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ad-log .ad-h3 { color: #fff; font-size: 14px; }
.ad-log .ad-tag { color: #AAB2BC; border-color: #6B737D; }
.ad-log__list { margin: 0; padding: 0; list-style: none; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; max-height: 220px; overflow: auto; white-space: pre-wrap; }
.ad-log__list li.is-bad { color: #FF9C8A; }
.ad-log__list li.is-ok { color: #7FE0A9; }
.ad-log__empty { color: #8E96A0; font-family: var(--body); }
.ad-log__list--compact { margin-top: 10px; padding: 10px 12px; border-radius: 6px; background: #1C1F23; color: #D7DCE2; }
.ad-log__list--compact:empty { display: none; }

/* 배너·빈 상태 */
.ad-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; padding: 12px 14px; border: 1px solid #C9D4E3; border-radius: var(--r); background: var(--primary-soft); font-weight: 600; }
.ad-empty { display: grid; justify-items: center; gap: 10px; padding: 40px 16px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--ok); }
.ad-empty p { margin: 0; color: var(--text); }

/* 실패 건 */
.ad-fixes { display: grid; gap: 14px; }
@media (min-width: 1000px) { .ad-fixes { grid-template-columns: 1fr 1fr; align-items: start; } }
.ad-fix { scroll-margin-top: 120px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--danger); border-radius: var(--r); }
.ad-fix.is-hold { border-left-color: var(--warn); }
.ad-fix__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ad-fix__who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.ad-fix__inv { font-size: 12px; color: var(--muted); }
.ad-fix__why { display: grid; gap: 4px; margin: 12px 0; padding: 10px 12px; border-radius: 6px; background: #F7F4EE; font-size: 14px; }
.ad-fix__why div { display: grid; grid-template-columns: 36px 1fr; gap: 8px; }
.ad-fix__why dt { font-weight: 700; color: var(--muted); }
.ad-fix__why dd { margin: 0; }
.ad-fix__memo, .ad-fix__refined { margin: 0 0 10px; font-size: 14px; }
.ad-m2 { margin-right: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.ad-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; width: 100%; min-height: 44px; margin-bottom: 10px; padding: 8px 12px; border: 1px dashed var(--primary); border-radius: 6px; background: var(--primary-soft); text-align: left; }
.ad-suggest span { font-size: 12px; color: var(--muted); }
.ad-suggest b { font-size: 14px; }
.ad-suggest em { margin-left: auto; font-style: normal; font-size: 13px; font-weight: 700; color: var(--primary); }
.ad-suggest.is-used { border-style: solid; opacity: .7; }
.ad-fix__form { display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
.ad-field--detail { grid-column: 1 / -1; }
.ad-fix__manual { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 10px; }
.ad-fix__manual .ad-field { flex: 1; }
.ad-fix__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ad-hist { margin: 14px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--line); list-style: none; font-size: 12.5px; color: var(--muted); }
.ad-hist li { display: flex; gap: 8px; }
.ad-hist time { font-family: var(--mono); flex: none; }

/* 입력 */
.ad-field { display: grid; gap: 4px; min-width: 0; margin: 0; padding: 0; border: 0; }
.ad-field__label { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0; }
.ad-input { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 15px; }
.ad-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(31,58,95,.15); }
.ad-input.is-filled { border-color: var(--primary); background: #F6F9FD; }
.ad-input.is-error { border-color: var(--danger); }
.ad-input[readonly] { background: #F7F4EE; color: var(--muted); }

/* 송장 출력 */
.ad-print { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.ad-print > * { min-width: 0; }
@media (min-width: 900px) { .ad-print { grid-template-columns: 300px minmax(0, 1fr); align-items: start; } }
.ad-queue { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.ad-queue h2 span { color: var(--muted); font-weight: 600; font-size: 14px; }
.ad-queue__list { display: flex; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; overflow-x: auto; }
.ad-queue__item { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 220px; min-height: 56px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-align: left; }
.ad-queue__item.is-active { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: #F6F9FD; }
.ad-queue__txt { display: grid; min-width: 0; flex: 1; }
.ad-queue__txt small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ad-queue__empty { color: var(--muted); font-size: 14px; }
@media (min-width: 900px) { .ad-queue__list { flex-direction: column; max-height: 620px; overflow-y: auto; } .ad-queue__item { min-width: 0; } }

.ad-preview__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.ad-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; font-size: 14px; cursor: pointer; }
.ad-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ad-switch__track { position: relative; width: 42px; height: 24px; border-radius: 12px; background: #CFC7B8; transition: background .15s; }
.ad-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.ad-switch input:checked + .ad-switch__track { background: var(--accent); }
.ad-switch input:checked + .ad-switch__track::after { transform: translateX(18px); }
.ad-switch input:focus-visible + .ad-switch__track { outline: 3px solid rgba(31,58,95,.35); outline-offset: 2px; }

.ad-paper { display: flex; justify-content: center; align-items: center; padding: 20px 12px; border-radius: var(--r); background: repeating-linear-gradient(135deg, #E7E1D5 0 10px, #ECE6DB 10px 20px); }
.ad-paper__empty { padding: 60px 16px; color: var(--muted); font-weight: 600; }
.ad-label { container-type: inline-size; width: min(100%, 400px); aspect-ratio: 2 / 3; display: flex; flex-direction: column; background: #fff; color: #111; box-shadow: 0 10px 28px rgba(28, 31, 35, .18); border: 1px solid #CFC7B8; font-size: 14px; }
.ad-label > div { position: relative; flex: none; font-size: 3.6cqw; line-height: 1.4; padding: 2.6cqw 3.6cqw; border-bottom: .5cqw solid #111; }
.ad-label > div:last-child { border-bottom: 0; }
.ad-label__cap { display: block; font-size: 2.7cqw; font-weight: 700; color: #444; letter-spacing: .02em; }
.ad-label__top { display: grid; grid-template-columns: 1.35fr 1fr; padding: 0 !important; }
.ad-label__code { position: relative; padding: 2.4cqw 3.6cqw; border-right: .5cqw solid #111; }
.ad-label__code strong { display: block; white-space: nowrap; font-family: var(--code); font-weight: 400; font-size: 12.5cqw; line-height: 1; letter-spacing: -.01em; }
.ad-label__manual { position: absolute; top: 2cqw; right: 2.4cqw; padding: .4cqw 1.6cqw; border: .4cqw solid #111; font-size: 2.6cqw; font-weight: 800; }
.ad-label__branch { position: relative; display: grid; align-content: center; padding: 2.4cqw 3.6cqw; font-size: 3.4cqw; }
.ad-label__branch b { font-size: 5.4cqw; }
.ad-label__inv b { font-size: 5.2cqw; letter-spacing: .02em; }
.ad-barcode { display: block; width: 100%; height: 11cqw; margin-top: 1cqw; fill: #111; }
.ad-label__order .ad-barcode { height: 5cqw; }
.ad-label > .ad-label__to { flex: 1; display: grid; align-content: start; }
.ad-label__name { margin: .6cqw 0 0; font-size: 5cqw; font-weight: 800; }
.ad-label__name span { font-size: 3.4cqw; font-weight: 500; }
.ad-label__addr { margin: 1cqw 0 0; font-size: 4.1cqw; line-height: 1.4; }
.ad-label__detail { margin: 1.2cqw 0 0; padding: .8cqw 2cqw; display: inline-block; justify-self: start; border: .5cqw solid #111; font-size: 5.6cqw; font-weight: 900; }
.ad-label__from p { margin: 0; font-size: 3.4cqw; }
.ad-label__foot { display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; font-size: 3.4cqw; }
.ad-label__order .ad-mono { display: block; }
.ad-paper.is-overlay [data-zone]::after { content: attr(data-zone); position: absolute; inset: .8cqw; border: .6cqw dashed var(--accent); background: rgba(226, 81, 43, .07); color: var(--accent); font-size: 2.6cqw; font-weight: 800; display: flex; align-items: flex-start; justify-content: flex-end; padding: .6cqw 1.2cqw; pointer-events: none; }

.ad-compare { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .ad-compare { grid-template-columns: 1fr 1fr; } }
.ad-compare__item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.ad-compare__item b { font-size: 14px; }
.ad-compare__item p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* 연동 설정 */
.ad-setup { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 1000px) { .ad-setup { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.ad-card { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.ad-card__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.ad-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.ad-steps__item { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.ad-steps__item:first-child { border-top: 0; padding-top: 0; }
.ad-steps__no { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); font-family: var(--mono); font-weight: 700; font-size: 13px; color: var(--muted); }
.ad-steps__item.is-done .ad-steps__no { background: var(--ok); border-color: var(--ok); color: #fff; }
.ad-steps__item.is-now .ad-steps__no { border-color: var(--primary); color: var(--primary); }
.ad-steps__title { margin: 2px 0 0; font-weight: 700; }
.ad-steps__who { margin-left: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ad-steps__detail { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.ad-form { display: grid; gap: 14px; }
.ad-seg { display: inline-grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 8px; background: #EEEAE2; width: 220px; }
.ad-seg__btn { min-height: 40px; border: 0; border-radius: 6px; background: transparent; font-weight: 700; color: var(--muted); }
.ad-seg__btn[aria-pressed="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ad-radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; margin-top: 6px; font-size: 14px; cursor: pointer; }
.ad-radio input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.ad-radio small { color: var(--muted); font-size: 12.5px; }
.ad-errors { display: grid; gap: 10px; }
@media (min-width: 700px) { .ad-errors { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .ad-errors { grid-template-columns: repeat(3, 1fr); } }
.ad-error { padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #FCFBF8; font-size: 13.5px; }
.ad-error__code { margin: 0 0 6px; font-weight: 800; font-size: 14px; }
.ad-error__code .ad-mono { color: var(--accent); }
.ad-error__cause, .ad-error__action { margin: 4px 0 0; }
.ad-error b { margin-right: 6px; font-size: 12px; color: var(--muted); }

/* 업로드 대화상자 */
.ad-modal, .ad-sheet { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.ad-modal::backdrop, .ad-sheet::backdrop { background: rgba(28, 31, 35, .45); }
.ad-modal { margin: auto; width: min(480px, calc(100vw - 24px)); }
.ad-modal__body, .ad-sheet__body { padding: 18px; background: var(--surface); border-radius: 12px; }
.ad-modal__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.ad-file { display: flex; align-items: center; gap: 8px; margin: 12px 0; padding: 10px 12px; border-radius: 6px; background: #F7F4EE; font-size: 14px; }
.ad-file span { margin-left: auto; color: var(--muted); font-size: 13px; }
.ad-cols { width: 100%; border-collapse: collapse; font-size: 14px; }
.ad-cols th, .ad-cols td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.ad-cols th { font-size: 12px; color: var(--muted); }

/* 공고 대응표 */
.ad-fab { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 6px 18px rgba(226, 81, 43, .35); }
.ad-sheet { margin: auto auto 0; width: 100%; }
.ad-sheet__body { border-radius: 14px 14px 0 0; max-height: 86vh; overflow: auto; }
@media (min-width: 700px) { .ad-sheet { margin: auto; width: 560px; } .ad-sheet__body { border-radius: 12px; } }
.ad-sheet__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ad-sheet__title { margin: 0; font-size: 20px; }
.ad-map { margin: 14px 0 0; padding: 0; list-style: none; }
.ad-map__row { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.ad-map__need { font-size: 14px; }
.ad-map__show { font-weight: 700; font-size: 14px; text-decoration: none; }
.ad-sheet__foot { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

.ad-toast { position: fixed; left: 50%; bottom: 72px; z-index: 50; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 8px; background: #1C1F23; color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.ad-toast.is-in { animation: ad-pop .2s ease-out; }
@keyframes ad-pop { from { opacity: 0; transform: translate(-50%, 8px); } }

.demo-notice { max-width: 1200px; margin: -96px auto 0; padding: 0 16px 96px; font-size: 12px; color: var(--muted); text-align: center; }

@media print {
  body.ad { background: #fff; }
  .ad-top, .ad-head, .ad-banner, .ad-queue, .ad-preview__bar, .ad-compare, .ad-fab, .ad-toast, .demo-notice { display: none !important; }
  .ad-main { padding: 0; }
  .ad-print { display: block; }
  .ad-paper { padding: 0; background: none; }
  .ad-label { width: 100mm; box-shadow: none; border: 0; }
  .ad-paper.is-overlay [data-zone]::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition: none !important; }
}

@media (max-width: 520px) {
  .ad-code { min-width: 78px; font-size: 22px; padding: 5px 8px; }
  .ad-res { gap: 10px; }
}
