:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #12161c;
  --ink-soft: #55606e;
  --line: #dde2e9;
  --seal: #14437f;
  --seal-soft: #e8eef7;
  --ok: #1c6b3f;
  --warn: #8a5a00;
  --err: #9b2226;
  --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10141a;
    --surface: #171d25;
    --ink: #e8ecf2;
    --ink-soft: #9aa6b5;
    --line: #2a333f;
    --seal: #8fb4e6;
    --seal-soft: #1c2836;
    --ok: #6fd39b;
    --warn: #e3b341;
    --err: #f28b82;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 5;
}
header h1 { font-size: 17px; margin: 0; font-weight: 650; color: var(--seal); }
header .who { margin-left: auto; color: var(--ink-soft); font-size: 13px; }
nav { display: flex; gap: 4px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; }
nav button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  min-height: 34px;
  font: inherit;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}
nav button[aria-selected="true"] { color: var(--seal); border-bottom-color: var(--seal); font-weight: 600; }
main { padding: 20px; max-width: 1180px; }
section[hidden] { display: none; }
h2 { font-size: 15px; margin: 0 0 10px; }
p.hint { color: var(--ink-soft); font-size: 13px; margin: 0 0 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 4px; }
input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 9px;
  min-height: 34px;
  width: 100%;
}
input:focus-visible, select:focus-visible, button:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 1px;
}
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.row > div { flex: 1 1 190px; }
.row > div.narrow { flex: 0 1 130px; }
button.act {
  font: inherit;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--seal);
  background: var(--seal);
  color: #fff;
  cursor: pointer;
}
button.act.ghost { background: transparent; color: var(--seal); }
button.act:disabled { opacity: .5; cursor: not-allowed; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink-soft); font-weight: 600; font-size: 13px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: var(--seal-soft); color: var(--seal); white-space: nowrap; }
.msg { padding: 10px 12px; border-radius: var(--radius); margin-bottom: 12px; font-size: 14px; }
.msg.err { background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); border: 1px solid color-mix(in srgb, var(--err) 35%, transparent); }
.msg.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.msg button { margin-left: 10px; font: inherit; background: none; border: 1px solid currentColor; color: inherit; border-radius: var(--radius); padding: 2px 9px; min-height: 26px; cursor: pointer; }
.pager { display: flex; gap: 10px; align-items: center; margin-top: 12px; color: var(--ink-soft); font-size: 13px; }
.stat { display: flex; gap: 22px; flex-wrap: wrap; }
.stat div span { display: block; font-size: 22px; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat div small { color: var(--ink-soft); font-size: 12px; }
dl.kv { margin: 0; display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 6px 14px; font-size: 14px; }
dl.kv dt { color: var(--ink-soft); }
dl.kv dd { margin: 0; }
.vn { font-weight: 600; }
.en { color: var(--ink-soft); }

button.linkish {
  background: none;
  border: none;
  color: var(--seal);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  min-height: 0;
}
#ecl-help table code { white-space: nowrap; }

.synonyms tr.muted td { opacity: .5; }
.synonyms input { min-height: 34px; padding: 7px 10px; border-radius: var(--radius); border: 1px solid var(--line); font: inherit; }

.semtag {
  color: var(--ink-soft);
  font-weight: 400;
  font-size: 13px;
  white-space: nowrap;
}
