[hidden] { display: none !important; }
:root {
  --fg: #1a1f24; --muted: #4a5560; --bg: #f5f7f9; --panel: #fff; --border: #c6ced6;
  --accent: #0b5cad; --accent-fg: #fff;
  --listed: #8a1c1c; --listed-bg: #fdecec;
  --not_listed: #1f4e79; --not_listed-bg: #e8f1fa;
  --invalid: #7a4b00; --invalid-bg: #fff4dc;
  --lookup_failed: #5b2a86; --lookup_failed-bg: #f1e9fa;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif; color: var(--fg); background: var(--bg); line-height: 1.55; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--accent); color: var(--accent-fg); padding: 10px 14px; z-index: 10; }
.skip-link:focus { top: 8px; }
.site-header { background: #12263a; color: #fff; padding: 20px 16px; }
.site-header h1 { margin: 0 0 4px; font-size: 1.5rem; }
.site-header p { margin: 0; color: #dbe6f0; }
.container { max-width: 1100px; margin: 0 auto; padding: 16px; }
.banner { background: #fff8e1; border: 1px solid #c9a227; border-radius: 6px; padding: 8px 16px; margin-bottom: 16px; }
.banner ul { margin: 4px 0; padding-left: 20px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.panel h2 { margin: 0 0 12px; font-size: 1.2rem; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
.hint, .counts { color: var(--muted); font-size: 0.9rem; margin: 2px 0 6px; }
textarea, input[type="search"], select, input[type="file"] { width: 100%; font: inherit; padding: 10px; border: 1px solid #6b7783; border-radius: 6px; background: #fff; color: var(--fg); }
textarea { font-family: ui-monospace, Menlo, monospace; min-height: 140px; resize: vertical; }
button { font: inherit; min-height: 44px; min-width: 44px; padding: 8px 16px; border: 1px solid #6b7783; border-radius: 6px; background: #fff; color: var(--fg); cursor: pointer; }
button.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
:focus-visible { outline: 3px solid #ff9f0a; outline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.status { min-height: 1.5em; margin-top: 8px; font-weight: 600; }
progress { width: 100%; height: 14px; }
.failure { border: 2px solid var(--lookup_failed); background: var(--lookup_failed-bg); border-radius: 6px; padding: 8px 12px; margin-top: 8px; }
.source { border: 1px solid var(--border); background: #f0f4f8; border-radius: 6px; padding: 8px 12px; margin-bottom: 12px; font-size: 0.92rem; }
.source dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 4px 0; }
.source dt { font-weight: 600; } .source dd { margin: 0; overflow-wrap: anywhere; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.card { display: flex; flex-direction: column; text-align: left; border-width: 2px; padding: 8px 12px; }
.card .num { font-size: 1.6rem; font-weight: 700; }
.card[aria-pressed="true"] { box-shadow: inset 0 -5px 0 currentColor; }
.s-listed { color: var(--listed); background: var(--listed-bg); border-color: var(--listed); }
.s-not_listed { color: var(--not_listed); background: var(--not_listed-bg); border-color: var(--not_listed); }
.s-invalid { color: var(--invalid); background: var(--invalid-bg); border-color: var(--invalid); }
.s-lookup_failed { color: var(--lookup_failed); background: var(--lookup_failed-bg); border-color: var(--lookup_failed); }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.tabs button { border-bottom-width: 3px; border-radius: 6px 6px 0 0; font-weight: 600; }
.tabs button[aria-selected="true"] { background: #12263a; color: #fff; border-color: #12263a; }
.hint-list { margin: 0 0 8px; padding-left: 20px; color: var(--muted); font-size: 0.9rem; }
.mapping { border: 1px solid var(--border); border-radius: 6px; margin: 12px 0 0; padding: 8px 12px; min-width: 0; }
.mapping legend { font-weight: 700; padding: 0 6px; }
.mapping-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 12px; }
.mapping-grid .field, .mapping p { min-width: 0; overflow-wrap: anywhere; }
.error-text { color: #8a1c1c; font-weight: 600; min-height: 1.2em; margin: 6px 0; }
select[aria-invalid="true"] { border: 2px solid #8a1c1c; }
.note-strong { border-left: 4px solid var(--invalid); background: var(--invalid-bg); padding: 6px 10px; margin: 8px 0; }
.note.warn { color: var(--invalid); font-weight: 600; }
.source h3 { margin: 4px 0; font-size: 1rem; }
.source ol { margin: 4px 0; padding-left: 20px; }
.skip-asset { left: 220px; }
.acard { display: flex; flex-direction: column; text-align: left; border-width: 2px; padding: 8px 12px; }
.acard .num { font-size: 1.6rem; font-weight: 700; }
.acard[aria-pressed="true"] { box-shadow: inset 0 -5px 0 currentColor; }
tr.group-row th { background: #12263a; color: #fff; }
table.plain { font-size: 0.88rem; }
.report { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.report-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.report h1 { font-size: 1.4rem; margin: 8px 0; }
.report h2 { font-size: 1.15rem; margin: 20px 0 6px; border-bottom: 2px solid var(--border); }
.report h3 { font-size: 1rem; margin: 14px 0 4px; }
.report-meta { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 8px 0; }
.report-meta dt { font-weight: 600; } .report-meta dd { margin: 0; overflow-wrap: anywhere; }
.report-list td:last-child { min-width: 12em; height: 3em; }
.toolbar { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 8px; }
.toolbar .field label { margin-top: 0; }
.dl { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--border); }
th { background: #eef2f6; }
th .sub { font-weight: 400; color: var(--muted); display: block; font-size: 0.8rem; }
.badge { display: inline-block; font-weight: 700; padding: 2px 8px; border-radius: 12px; border: 1.5px solid currentColor; white-space: nowrap; }
.badge.s-listed, .badge.s-not_listed, .badge.s-invalid, .badge.s-lookup_failed { background: transparent; }
.expander { min-height: 44px; font-family: ui-monospace, Menlo, monospace; }
tr.detail td { background: #fafbfc; }
.detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; }
.detail dt { font-weight: 600; } .detail dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.note { color: var(--muted); font-size: 0.85rem; }
.site-footer { color: var(--muted); font-size: 0.85rem; }

@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(4, 1fr); }
  .toolbar { grid-template-columns: 2fr 1fr auto; align-items: end; }
  .atoolbar { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .atoolbar .dl { grid-column: 1 / -1; }
  .mapping-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  #results-table, #results-table thead, #results-table tbody, #results-table tr, #results-table th, #results-table td,
  #asset-table, #asset-table thead, #asset-table tbody, #asset-table tr, #asset-table th, #asset-table td { display: block; }
  #results-table thead, #asset-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #results-table tr, #asset-table tr { border: 1px solid var(--border); border-radius: 6px; margin-bottom: 10px; padding: 4px; background: #fff; }
  #results-table td, #asset-table td { display: grid; grid-template-columns: 8.5em 1fr; gap: 8px; border-bottom: 0; overflow-wrap: anywhere; }
  #results-table td::before, #asset-table td::before { content: attr(data-label); font-weight: 600; color: var(--muted); }
  #results-table tr.detail td, #asset-table tr.detail td { display: block; }
  #results-table tr.detail td::before, #asset-table tr.detail td::before { content: none; }
  #results-table tr.detail[hidden], #asset-table tr.detail[hidden] { display: none; }
  #asset-table tr.group-row { border: 0; background: transparent; padding: 0; margin: 14px 0 6px; }
  .source dl, .detail dl { grid-template-columns: 1fr; }
  .detail dt { margin-top: 6px; }
  table.plain { min-width: 640px; }
  table.report-list { min-width: 1100px; }
  .report-meta { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
