:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #fff;
  --line: #dce4ef;
  --line-strong: #c6d2e1;
  --text: #15243b;
  --muted: #65758b;
  --blue: #2864d8;
  --blue-soft: #e9f0ff;
  --green: #0f8a5f;
  --green-soft: #e3f7ee;
  --orange: #b65d08;
  --orange-soft: #fff1df;
  --red: #bd2d2d;
  --red-soft: #ffe7e7;
  font-family: Inter, "Noto Sans KR", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: calc(14px + var(--font-delta, 0px)); }
button, input, select, textarea { font: inherit; }
.crawler-shell { min-height: 100vh; padding: 8px 12px 24px; }
.page-header { display: grid; gap: 4px; margin-bottom: 6px; }
.font-controls { display: inline-flex; justify-self: center; align-items: center; gap: 4px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.font-controls button { border: 0; background: transparent; color: var(--text); font-weight: 800; padding: 4px 8px; cursor: pointer; }
.font-controls span { min-width: 38px; text-align: center; color: var(--muted); font-weight: 700; font-size: .78rem; }
.title-row { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.eyebrow { margin: 0 0 4px; color: #53657c; font-weight: 800; font-size: .72rem; letter-spacing: 0; text-transform: uppercase; }
h1, h2, h3 { margin: 0; letter-spacing: 0; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1rem; }
h3 { font-size: .92rem; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar.compact { gap: 6px; }
.button, .icon-button { border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); border-radius: 6px; padding: 7px 10px; font-weight: 800; cursor: pointer; }
.button.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.button.secondary { background: #f8fafc; }
.icon-button { width: 30px; height: 30px; padding: 0; }
.session-chip, .pill { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; background: var(--blue-soft); color: #1f4fa8; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 8px 10px; color: var(--muted); font-weight: 800; cursor: pointer; }
.tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }
.notice { margin: 8px 0; border: 1px solid var(--line); border-left: 4px solid var(--blue); background: #fff; padding: 8px 10px; border-radius: 6px; color: var(--text); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.metric { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.metric span { color: var(--muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; }
.metric strong { display: block; margin-top: 4px; font-size: 1.3rem; }
.panel, .mini-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; }
.mini-panel { background: #fbfdff; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.compact-title { margin-top: 2px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 7px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; background: #fff; }
th, td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; vertical-align: top; }
th { background: #f1f5f9; color: #52637b; font-size: .76rem; text-transform: uppercase; }
td { font-size: .9rem; }
tr:last-child td { border-bottom: 0; }
.compact-table table { min-width: 640px; }
.mode { border-radius: 999px; padding: 3px 7px; font-size: .74rem; font-weight: 900; white-space: nowrap; }
.mode.fetch-compatible { background: var(--green-soft); color: var(--green); }
.mode.browser-required { background: var(--orange-soft); color: var(--orange); }
.mode.needs-review, .mode.needs-porting { background: var(--red-soft); color: var(--red); }
.row-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.row-actions .button { padding: 5px 7px; font-size: .8rem; }
.muted { color: var(--muted); }
.payload { max-width: 460px; white-space: normal; word-break: break-word; color: #334155; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
label { display: grid; gap: 4px; color: #4b5e76; font-weight: 800; font-size: .78rem; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--text); padding: 7px 8px; min-height: 34px; }
.checkbox-line { display: flex; align-items: center; gap: 6px; min-height: 34px; }
.checkbox-line input { width: auto; min-height: 0; }
.queue-list { display: flex; gap: 6px; flex-wrap: wrap; }
.queue-list span { border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; background: #f8fafc; font-weight: 800; font-size: .78rem; }
dialog { border: 0; padding: 0; border-radius: 10px; max-width: min(920px, 96vw); width: 920px; box-shadow: 0 24px 80px rgba(15, 23, 42, .28); }
dialog::backdrop { background: rgba(15, 23, 42, .35); }
.dialog-card { padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.preview-box { border: 1px solid var(--line); border-radius: 7px; padding: 8px; margin-top: 8px; max-height: 260px; overflow: auto; background: #fbfdff; }
.preview-box iframe { width: 100%; height: 220px; border: 1px solid var(--line); background: #fff; }
@media (max-width: 760px) {
  .crawler-shell { padding: 6px; }
  .title-row, .panel-title { align-items: stretch; flex-direction: column; }
  .metric-grid, .form-grid { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; }
}
