:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #202b3b;
  background: #f3f5f8;
  font-size: 16px;
  line-height: 1.6;
  font-synthesis: none;
  --accent: #235bd8;
  --border: #dbe2eb;
  --muted: #607086;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #7599ed; outline-offset: 3px;
}
input:focus, select:focus { outline: 2px solid #8bacf4; border-color: var(--accent); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.8rem; letter-spacing: -.05em; line-height: 1.35; }
h2 { font-size: 1.125rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; margin: 1.75rem 0 .8rem; }
pre, code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
code { font-size: .875rem; color: #44617f; overflow-wrap: anywhere; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 50; padding: .75rem; background: white; }
.skip-link:focus { top: 1rem; }
.topbar { display: flex; align-items: center; gap: 2rem; padding: .8rem 2rem; background: #14253d; color: white; }
.brand { display: flex; align-items: center; gap: .7rem; font-size: 1rem; font-weight: 750; letter-spacing: .04em; }
.brand small { display: block; font-size: .75rem; font-weight: 500; letter-spacing: .12em; color: #afc1d9; }
.brand-mark { display: grid; place-items: center; border: 1px solid #567290; width: 2.5rem; height: 2.5rem; border-radius: 8px; font-size: .875rem; }
.topbar nav { display: flex; flex-wrap: wrap; gap: .35rem; margin-left: 1.5rem; }
.nav-button { padding: .6rem 1rem; background: transparent; border: 0; border-radius: 6px; color: #bed0e6; font-size: .875rem; }
.nav-button.active { color: white; background: #2c415c; }
.test-mode-panel{padding:20px;margin-bottom:24px}.test-mode-buttons{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:16px}.test-mode-buttons [aria-pressed=true]{color:white;background:#244e8f;border-color:#244e8f}
#analytics-test-frame,#server-on-test-frame{width:100%;min-height:1900px;border:0}
#execution-view [hidden]{display:none!important}
.site-badge { margin-left: auto; font-size: .75rem; color: #b7c7db; }
.site-badge strong { margin-left: .6rem; color: white; font-size: .875rem; font-variant-numeric: tabular-nums; }
main { max-width: 1640px; margin: auto; padding: 1.75rem 2rem; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.eyebrow { color: var(--muted); font-size: .75rem; font-weight: 650; margin-bottom: .25rem; }
.page-description { font-size: .875rem; color: var(--muted); margin-top: .4rem; }
.lab-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.operation-sidebar { position: sticky; top: 1.25rem; padding: .75rem 0; }
.sidebar-label { color: #64748b; font-size: .75rem; font-weight: 650; padding: 0 .85rem .65rem; }
.operation-tabs { display: grid; gap: .35rem; }
.operation { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; width: 100%; padding: .8rem 1rem; background: transparent; border: 1px solid transparent; border-radius: 8px; text-align: left; color: #47586d; font-size: .9375rem; }
.operation span { font-weight: 650; }
.operation small { font-size: .75rem; color: #687b91; }
.operation:hover { background: #e9eef6; }
.operation.active { background: #e6edfc; color: #164bab; border-color: #c8d8f8; box-shadow: inset 3px 0 var(--accent); }
.operation.active small { color: #4268a1; }
.operation.active.danger-tab { background: #fff0ee; color: #a73035; border-color: #efc9c7; box-shadow: inset 3px 0 #b33b41; }
.operation[data-operation="match"] { margin-top: .9rem; }
.operation.clear-tab { margin-top: 1rem; border-top-color: #e1c7c7; color: #a73035; }
#clear-fields h3 { margin-top: 0; color: #a73035; }
#clear-fields ol { padding-left: 1.5rem; font-size: .9375rem; }
#clear-fields li { margin: .65rem 0; }
#clear-trace { overflow-wrap: anywhere; }
.sidebar-help { margin: 1.25rem .85rem; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .75rem; }
.workbench { min-width: 0; }
.workspace-navigation { display: flex; align-items: center; gap: 1.5rem; border-bottom: 1px solid #cfd8e5; margin-bottom: 1.25rem; }
.workspace-tab { border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); padding: .65rem .25rem .8rem; font-size: .9375rem; }
.workspace-tab.active { border-bottom-color: var(--accent); color: #194aab; font-weight: 700; }
.workspace-state { margin-left: auto; color: var(--muted); font-size: .8125rem; }
.workspace-state.pending { color: #905c0b; }
.workspace-state.failure { color: #a73035; }
.panel { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem; }
.section-heading { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-heading code { background: #edf2f8; padding: .3rem .65rem; border-radius: 5px; }
.muted, .helper, .field-hint { color: var(--muted); }
.muted, .helper, .field-hint { font-size: .875rem; font-weight: 400; }
.helper { margin-top: .65rem; }
.connection { margin: 0 0 1.25rem; padding: 1rem 1.5rem; background: #fbfcfe; }
.connection > summary { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.connection > summary::before { content: "+"; color: #72839a; width: 1rem; }
.connection[open] > summary::before { content: "−"; }
.connection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1rem; }
label { display: flex; flex-direction: column; gap: .45rem; font-size: .875rem; font-weight: 600; min-width: 0; }
.input-action { display: flex; gap: .5rem; }
.input-action input { min-width: 0; }
.input-action button { border: 1px solid var(--border); border-radius: 6px; background: white; color: #48607c; padding: 0 .9rem; font-size: .875rem; }
input:not([type=checkbox]):not([type=radio]), select { width: 100%; min-height: 2.8rem; border: 1px solid #c5d0de; border-radius: 6px; background: white; color: #213047; padding: .6rem .8rem; font-size: 1rem; }
input:disabled, select:disabled { background: #f0f3f7; color: #718096; }
input::placeholder { color: #7d8b9e; font-size: .875rem; }
input[type=number] { font-variant-numeric: tabular-nums; }
input[type=checkbox] { width: 1.125rem; height: 1.125rem; flex-shrink: 0; accent-color: var(--accent); }
input[type=radio] { width: 1.125rem; height: 1.125rem; min-height: 0; flex-shrink: 0; margin: 0; padding: 0; accent-color: var(--accent); }
input[type=file] { font-size: .875rem; padding: .5rem; }
input::file-selector-button { border: 0; border-radius: 4px; background: #eaf0fa; color: #244e8f; padding: .35rem .65rem; margin-right: .7rem; cursor: pointer; }
.workspace-grid { display: block; }
.request-panel { padding: 1.5rem 1.75rem 0; }
.fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1.5rem; }
.full-width { grid-column: 1/-1; }
fieldset { min-width: 0; }
#mixed-fields, #match-fields { margin: 0 0 1.5rem; padding: 0 0 1.5rem; border: 0; border-bottom: 1px solid var(--border); }
#mixed-fields > legend, #match-fields > legend { font-size: 1rem; font-weight: 650; margin-bottom: 1rem; }
#match-generated-fields, #match-file-fields { margin-top: 1.25rem; }
#mixed-duration, #match-duration { max-width: 22rem; }
.mixed-workloads { margin-top: 1.25rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.mixed-workloads > div { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; border: 1px solid var(--border); border-radius: 8px; padding: 1rem; background: #fafbfd; }
.mixed-workloads > div > .check { grid-column: 1/-1; margin: 0; font-weight: 650; }
details { border-top: 1px solid var(--border); margin-top: 1.25rem; padding-top: 1rem; }
summary { cursor: pointer; color: #344c6c; font-size: .9375rem; font-weight: 650; }
summary .field-hint { margin-left: .6rem; }
.settings-section { margin-top: 1.5rem; }
#matching-fields { padding-top: 1.25rem; border-top: 1px solid var(--border); }
.ratio-group { border: 0; padding: 0; margin: 1.25rem 0; }
.ratio-group legend { width: 100%; display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; font-size: .875rem; font-weight: 600; }
.ratio-total { font-size: .875rem; font-weight: 500; color: #266548; }
.ratio-total.invalid { color: #b32f35; }
.ratio-inputs { display: grid; gap: 1rem; }
.ratio-inputs.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ratio-inputs.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ratio-inputs label { font-size: .875rem; color: #52647a; }
.ratio-inputs input { padding: .55rem; min-width: 0; }
.check { flex-direction: row; align-items: center; gap: .65rem; margin-top: 1rem; font-weight: 500; }
.filter-grid { margin-top: 1.25rem; }
.notice { padding: .85rem 1rem; margin-top: 1.25rem; border-left: 3px solid #8bacdf; border-radius: 4px; background: #f1f5fc; font-size: .875rem; color: #415b7e; }
.notice.warning { background: #fff8ee; border-color: #d9a64b; color: #79531e; }
.run-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; margin-top: 1.5rem; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: white; z-index: 2; }
.primary-button { padding: .75rem 1.4rem; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: white; font-size: .9375rem; font-weight: 650; min-width: 12rem; }
.primary-button:hover:not(:disabled) { background: #164bbf; }
.primary-button.destructive { background: #ad373d; border-color: #ad373d; }
.secondary-button { border: 1px solid #c9d4e3; border-radius: 6px; background: white; padding: .6rem 1rem; font-size: .875rem; color: #344c6c; }
.text-button { border: 0; background: transparent; color: #2857ae; padding: .35rem .2rem; font-size: .875rem; }
.error-message { padding: 1rem; background: #fff0ee; color: #a02a30; font-size: .875rem; margin-top: 1rem; border-radius: 6px; overflow-wrap: anywhere; white-space: pre-wrap; }
.status-pill { display: inline-flex; align-items: center; border-radius: 5px; font-size: .8125rem; font-weight: 650; padding: .3rem .7rem; background: #e9eef6; color: #405a78; }
.status-pill.success { background: #e5f4ed; color: #216340; }
.status-pill.failure { background: #fcebea; color: #a32a31; }
.status-pill.pending { background: #fff1d8; color: #895a10; }
.status-pill.skipped, .status-pill.unknown { background: #edf0f5; color: #5d6b7d; }
.result-panel { min-height: 30rem; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 23rem; color: var(--muted); }
.empty-state h3 { color: #334966; margin: 1rem 0 .5rem; }
.empty-state p { font-size: .9375rem; }
.empty-state button { margin-top: 1rem; }
.empty-symbol { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border: 1px solid #d6e1ef; border-radius: 8px; font-size: 1.5rem; color: #6182ad; background: #f2f6fc; }
.result-title { display: flex; justify-content: space-between; gap: .75rem; align-items: center; flex-wrap: wrap; }
#result-source { overflow-wrap: anywhere; }
.metric-grid, .scenario-layout .metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.metric { padding: 1rem 1.1rem; border: 1px solid var(--border); border-top: 3px solid #bed0ee; background: #fafcff; border-radius: 6px; }
.metric-label { color: #536982; font-size: .875rem; }
.metric-value { display: block; font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; color: #153a71; margin: .25rem 0; overflow-wrap: anywhere; line-height: 1.4; }
.metric-unit { font-size: .8125rem; color: #60748c; }
.table-scroll { overflow: auto; max-width: 100%; border: 1px solid var(--border); border-radius: 6px; margin-top: 1rem; max-height: 38rem; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
th { background: #eef3f9; color: #4e637e; font-size: .875rem; font-weight: 650; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
th, td { padding: .85rem .9rem; border-bottom: 1px solid #e3e9f1; }
td { font-variant-numeric: tabular-nums; vertical-align: top; }
td:first-child { overflow-wrap: anywhere; }
tbody tr:nth-child(even) { background: #fafbfd; }
tbody tr:hover { background: #f0f5fc; }
td a { color: #285abc; }
.scenario-table { min-width: 900px; }
.scenario-table td:nth-child(2) { min-width: 120px; }
.scenario-table td:last-child { min-width: 160px; max-width: 440px; overflow-wrap: anywhere; white-space: pre-wrap; }
.scenario-table .status-pill { white-space: nowrap; }
.stage-failure, tbody tr.stage-failure:nth-child(even) { background: #fff0ee; }
.stage-skipped { color: #687a90; }
#scenario-identity, #mixed-files { overflow-wrap: anywhere; }
#deletion-failures-file { overflow-wrap: anywhere; }
#deletion-failures-rows td:last-child { min-width: 240px; max-width: 680px; white-space: pre-wrap; overflow-wrap: anywhere; }
pre { font-size: .875rem; line-height: 1.7; background: #16253b; color: #d8e4f4; border-radius: 6px; padding: 1.25rem; max-height: 28rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 0; }
#run-status { padding: 1rem; margin-bottom: 1rem; color: #2855a1; background: #edf3ff; border: 1px solid #cfdef7; border-radius: 6px; font-size: .9375rem; }
#history-message { color: var(--muted); font-size: .9375rem; }
#history-table td:first-child { min-width: 240px; }
footer { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); margin-top: 2rem; font-size: .75rem; color: #64768c; }
@media (min-width: 1400px) {
  .request-panel > .fields-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #concurrency-field { grid-column: auto; }
}
@media (max-width: 1100px) {
  main { padding: 1.5rem; }
  .lab-layout { grid-template-columns: 175px minmax(0, 1fr); gap: 1rem; }
  .operation { padding: .7rem; }
  .metric-grid, .scenario-layout .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mixed-workloads { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .lab-layout { display: block; }
  .operation-sidebar { position: static; padding: 0; margin-bottom: 1rem; }
  .sidebar-label, .sidebar-help, .operation small { display: none; }
  .operation-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
  .operation { align-items: center; justify-content: center; text-align: center; padding: .65rem .35rem; background: white; border-color: var(--border); font-size: .875rem; }
  .operation[data-operation="match"] { margin-top: 0; }
  .operation.active { box-shadow: none; }
  .connection-grid { grid-template-columns: 1fr; }
  .request-panel { padding: 1.25rem 1.25rem 0; }
}
@media (max-width: 540px) {
  .topbar { padding: .85rem 1rem; flex-wrap: wrap; gap: .75rem; }
  .topbar nav { order: 3; width: 100%; margin: 0; }
  .nav-button { flex: 1; }
  main { padding: 1rem; }
  h1 { font-size: 1.5rem; }
  .page-heading { align-items: flex-start; }
  .page-heading .status-pill { flex-shrink: 0; }
  .operation-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 1rem; }
  .request-panel { padding-bottom: 0; }
  .fields-grid { grid-template-columns: 1fr; gap: 1rem; }
  .ratio-inputs.four, .ratio-inputs.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  summary .field-hint { display: block; margin-left: 0; margin-top: .25rem; }
  .connection summary .field-hint { display: none; }
  .run-actions { flex-direction: column; align-items: stretch; gap: .5rem; }
  .primary-button { width: 100%; min-width: 0; }
  .metric-grid, .scenario-layout .metric-grid { gap: .65rem; }
  .metric { padding: .75rem; }
  .metric-value { font-size: 1.4rem; }
  .workspace-navigation { gap: 1rem; }
  .workspace-state { font-size: .75rem; }
  footer { flex-direction: column; }
}
/* 실행 설정과 통합 리포트의 공통 레이아웃 */
.topbar { position: sticky; top: 0; z-index: 10; }
.topbar nav { flex-wrap: wrap; }
main { max-width: 1440px; }
.operation-sidebar { top: 6rem; }
.operation[data-operation="match"] { margin-top: 0; }
.operation[data-operation="scenario"], .operation[data-operation="deletion"] { margin-top: .8rem; }
.operation.clear-tab { margin-top: 0; }
.report-toolbar { display: grid; grid-template-columns: 180px minmax(220px, 1fr) minmax(200px, 280px); gap: 1rem; margin-bottom: 1rem; }
#history-view > .panel { margin-bottom: 1.5rem; }
#history-view #result-panel { margin-top: 1.5rem; }
#special-report td { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 540px; }
#special-report details { border: 1px solid var(--border); border-radius: 6px; padding: .8rem 1rem; }
.mode-switch { display: flex; gap: .6rem; margin-bottom: 1.25rem; }
.compact-help { margin-top: .75rem; padding-top: .6rem; }
.compact-help summary { font-size: .8rem; color: var(--muted); }
textarea { width: 100%; min-width: 0; border: 1px solid #c5d0de; border-radius: 6px; padding: .75rem; font: .85rem/1.6 ui-monospace, monospace; }
@media (max-width: 800px) {
  .topbar { position: static; gap: 1rem; flex-wrap: wrap; }
  .topbar nav { margin-left: 0; }
  .operation-sidebar { position: static; }
  .report-toolbar { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
[data-workspace-view][hidden],#module-view[hidden],#data-mode-shell[hidden]{display:none!important}
#module-view>section>main{padding:0;max-width:none;margin:0}
#module-feedback{padding:24px;background:#fff;border:1px solid #ccd7e3;border-radius:8px}
.run-banner{display:block;width:100%;text-align:left;cursor:pointer;margin:0 0 18px}
#current-result-slot{margin-top:24px}
