:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --text: #16161a;
  --muted: #5d5d66;
  --line: #e4e4de;
  --accent: #0b6e4f;
  --accent-ink: #ffffff;
  --chip: #efefea;
  --warn: #9a3412;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --surface: #1b1b1f;
    --text: #ededf0;
    --muted: #a0a0aa;
    --line: #2c2c33;
    --accent: #3ecf8e;
    --accent-ink: #0b1f16;
    --chip: #26262c;
    --warn: #fdba74;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 16px; height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; }
.brand svg { width: 22px; height: 22px; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs button { background: none; border: 0; color: var(--muted); font: inherit; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--text); background: var(--chip); }
.gh { color: var(--text); text-decoration: none; border: 1px solid var(--line); padding: 5px 10px; border-radius: 8px; white-space: nowrap; }

.hero h1 { font-size: clamp(28px, 4.4vw, 44px); line-height: 1.12; margin: 40px 0 10px; letter-spacing: -0.02em; }
.hero p { color: var(--muted); max-width: 720px; margin: 0 0 24px; }

.search { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; font: inherit; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search button, .more { font: inherit; font-weight: 600; padding: 12px 18px; border-radius: var(--radius); border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; }
.kinds button { font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.kinds button[aria-checked="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.strict { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); margin: 4px 0 8px; cursor: pointer; }
.cc0.uploader { background: var(--chip); color: var(--warn); border: 1px solid currentColor; }
.warn { color: var(--warn); font-size: 14px; }
.status { color: var(--muted); min-height: 1.5em; font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.thumb { aspect-ratio: 4 / 3; background: var(--chip); display: grid; place-items: center; overflow: hidden; cursor: pointer; border: 0; padding: 0; width: 100%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ph { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.card audio { width: 100%; height: 36px; }
.meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.title { font-weight: 600; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.by { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--muted); }
.cc0 { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.more-row { display: flex; justify-content: center; margin: 20px 0; }
.errors { font-size: 14px; color: var(--warn); margin-bottom: 24px; }

h2 { margin-top: 36px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.plain { padding-left: 18px; }
.plain li { margin: 4px 0; }

.code { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 70px 14px 14px; overflow-x: auto; font-size: 14px; }
.copy { position: absolute; top: 8px; right: 8px; font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--chip); color: var(--text); cursor: pointer; }

dialog { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 64px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 20px; }
dialog::backdrop { background: rgb(0 0 0 / 0.5); }
.close { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 26px; color: var(--muted); cursor: pointer; }
#detail-body img, #detail-body video { max-width: 100%; border-radius: 8px; }
#detail-body h3 { margin: 0 32px 6px 0; overflow-wrap: anywhere; }
.evidence { font-size: 13px; background: var(--chip); border-radius: 8px; padding: 10px; overflow-wrap: anywhere; }
.files { font-size: 14px; padding-left: 18px; }
.files li { overflow-wrap: anywhere; }

.foot { color: var(--muted); font-size: 13px; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line); margin-top: 40px; }

@media (max-width: 560px) {
  .gh { display: none; }
  .tabs button { padding: 6px 8px; font-size: 14px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
