:root {
  --bg: #f6f7f9; --panel: #ffffff; --text: #1b1f24; --muted: #5b6470; --line: #d9dde3;
  --accent: #2357c5; --accent-text: #ffffff;
  --red: #b42318; --red-bg: #fdecea; --green: #1e7a3a; --green-bg: #e7f5ec;
  --orange: #a65400; --orange-bg: #fdf0e3; --gray: #4a525c; --gray-bg: #eceef1;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14171b; --panel: #1d2127; --text: #e7eaee; --muted: #9aa3ae; --line: #343a42;
    --accent: #6d9bff; --accent-text: #0d1117;
    --red: #ff8a80; --red-bg: #3a1d1b; --green: #7ad49a; --green-bg: #17301f;
    --orange: #ffb26b; --orange-bg: #36261a; --gray: #c3c9d1; --gray-bg: #2a2f36;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14171b; --panel: #1d2127; --text: #e7eaee; --muted: #9aa3ae; --line: #343a42;
  --accent: #6d9bff; --accent-text: #0d1117;
  --red: #ff8a80; --red-bg: #3a1d1b; --green: #7ad49a; --green-bg: #17301f;
  --orange: #ffb26b; --orange-bg: #36261a; --gray: #c3c9d1; --gray-bg: #2a2f36;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  word-break: keep-all; overflow-wrap: anywhere;
}
main { max-width: 760px; margin: 0 auto; padding: 20px 16px 8px; }
h1 { font-size: 1.45rem; margin: 0 0 12px; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
section, header .notice { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 0 0 16px; }
.notice { list-style: none; }
.notice li { margin: 0 0 6px; padding-left: 12px; border-left: 3px solid var(--line); }
.notice li:first-child { border-left-color: var(--red); }
.notice li:last-child { margin-bottom: 0; }
form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 240px; min-width: 0; }
label span { font-size: .9rem; color: var(--muted); }
input[type="text"], input[type="file"] {
  width: 100%; min-width: 0; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
}
input[type="text"] { font-family: ui-monospace, Consolas, monospace; letter-spacing: .03em; }
.cf-turnstile { flex: 1 1 100%; min-height: 65px; }
button {
  font: inherit; font-weight: 600; border: 0; border-radius: 8px; padding: 9px 18px;
  background: var(--accent); color: var(--accent-text); cursor: pointer;
}
button:disabled { opacity: .55; cursor: progress; }
button.sub { background: var(--gray-bg); color: var(--text); font-weight: 500; padding: 6px 12px; }
.hint { color: var(--muted); font-size: .9rem; margin: 12px 0 0; }
.banner { border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; }
.banner b { display: block; }
.c-red { background: var(--red-bg); color: var(--red); }
.c-green { background: var(--green-bg); color: var(--green); }
.c-orange { background: var(--orange-bg); color: var(--orange); }
.c-gray { background: var(--gray-bg); color: var(--gray); }
.fixed { color: var(--muted); font-size: .92rem; margin: 0 0 12px; }
dl.info { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 14px; }
dl.info dt { color: var(--muted); }
dl.info dd { margin: 0; min-width: 0; }
.mono { font-family: ui-monospace, Consolas, monospace; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 0 0 12px; table-layout: fixed; }
th, td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
th:nth-child(1) { width: 22%; } th:nth-child(2) { width: 20%; } th:nth-child(4) { width: 16%; }
td.L1 { color: var(--orange); } td.L2, td.L3 { color: var(--red); font-weight: 600; }
ul.flags { margin: 0 0 12px; padding-left: 18px; }
.err { color: var(--red); font-weight: 600; margin: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
footer { max-width: 760px; margin: 0 auto; padding: 0 16px 24px; color: var(--muted); font-size: .85rem; }
@media (max-width: 420px) {
  /* Turnstile 위젯은 폭 300px 고정: 360px 화면에서 가로 스크롤이 안 생기게 안쪽 여백을 줄인다(360-32-24-2=302) */
  section, header .notice { padding: 12px; }
  dl.info { grid-template-columns: 1fr; gap: 0; }
  dl.info dd { margin-bottom: 6px; }
  table { font-size: .86rem; }
}
