:root { --brand: #7c4a1e; }
body { background: var(--paper); }
.app-top { background: #fff; border-bottom: 1px solid var(--line); }
.app-top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.app-name { display: block; font-size: 17px; font-weight: 750; }
.app-sub { display: block; font-size: 13px; color: var(--muted); }
.app-main { padding-top: 28px; padding-bottom: 64px; }
.help { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 20px; }
.help ol { margin: 0; padding-left: 20px; }
.help li { margin: 6px 0; color: var(--ink-2); }
.help p { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.step, .result { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px 20px; margin-bottom: 16px; }
@media (min-width: 900px) { .step, .result { padding: 28px 32px; } }
.step-h { font-size: 19px; font-weight: 750; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; letter-spacing: -0.02em; }
.step-h span { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; display: inline-grid; place-items: center; flex: none; }
.drop { display: grid; gap: 4px; place-items: center; text-align: center; padding: 28px 16px; border: 1.5px dashed var(--line-2); border-radius: var(--r); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.on { border-color: var(--brand); background: #fbf7f3; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop b { font-size: 17px; }
.drop span { color: var(--muted); font-size: 14px; }
.drop:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.sample-try { margin-top: 10px; font-size: 15px; }
.muted { color: var(--muted); font-size: 14px; }
.files { list-style: none; margin: 14px 0 0; padding: 0; }
.files li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: center; }
.files .fname { font-weight: 650; overflow-wrap: anywhere; }
.files .fmsg { grid-column: 1; font-size: 14px; color: var(--ink-2); }
.files li.bad .fmsg { color: var(--danger); }
.files li.ok .fmsg::before { content: '✓ '; color: var(--ok); font-weight: 700; }
.files button { grid-row: 1 / span 2; grid-column: 2; }
.tlink.small { font-size: 14px; min-height: 40px; }
.btn.big { min-height: 54px; padding: 0 32px; font-size: 17px; }
.btn[disabled] { opacity: .35; cursor: not-allowed; }
.hint { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.hint:empty { display: none; }
.summary { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 2px solid var(--ink); margin-bottom: 8px; }
.summary div { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); }
.summary b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.summary span { font-size: 13px; color: var(--muted); }
.summary .is-main b { color: var(--brand); }
.summary .is-warn b { color: var(--warn); }
@media (min-width: 760px) { .summary { grid-template-columns: repeat(4, 1fr); } .summary div + div { padding-left: 16px; border-left: 1px solid var(--line); } }
.done-note { font-size: 15px; color: var(--ink-2); margin: 10px 0 4px; }
.result .tabs { margin-top: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 16px 0 12px; }
.actions .hint { margin: 0; }
table.rt { font-size: 14px; }
table.rt td, table.rt th { padding: 10px 12px 10px 0; }
table.rt tr.warn td { background: var(--warn-soft); }
table.rt td.empty { color: var(--muted); padding: 24px 0; }
table.rt td.box { font-size: 18px; color: var(--faint); }
.nowrap { white-space: nowrap; }
.badge:not(:empty) { background: var(--danger); color: #fff; font-size: 12px; min-width: 20px; height: 20px; border-radius: 99px; display: inline-grid; place-items: center; padding: 0 6px; margin-left: 4px; }
.count { color: var(--faint); font-weight: 500; font-size: 13px; margin-left: 2px; }
.mark { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.mark p { margin: 0 0 10px; color: var(--ink-2); font-size: 15px; }
.foot-note { color: var(--muted); font-size: 13px; margin-top: 24px; }
@media print {
  body.print-pack .sample-bar, body.print-pack .app-top, body.print-pack .step, body.print-pack .summary, body.print-pack .done-note, body.print-pack .tabs,
  body.print-pack [data-panel="r-ship"], body.print-pack [data-panel="r-check"], body.print-pack .actions, body.print-pack .mark, body.print-pack .foot-note, body.print-pack .help { display: none !important; }
  body.print-pack [data-panel="r-pack"] { display: block !important; }
  body.print-pack .result { border: 0; padding: 0; }
  body { background: #fff; }
}

table.rt td:first-child, table.rt td.n, table.rt th.n { white-space: nowrap; }
table.rt th { white-space: nowrap; }
@media (max-width: 760px) {
  table.rt thead { display: none; }
  table.rt, table.rt tbody, table.rt tr, table.rt td { display: block; width: 100%; }
  table.rt tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.rt td { border: 0; padding: 2px 0; text-align: left !important; }
  table.rt td[data-label]::before { content: attr(data-label) ' '; color: var(--muted); font-size: 12px; margin-right: 6px; }
  table.rt tr.warn { background: var(--warn-soft); padding-left: 8px; padding-right: 8px; }
  table.rt tr.warn td { background: none; }
  table.rt tr.total td { border: 0; }
  #t-pack tr { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; }
  #t-pack td { width: auto; }
}
