:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #172821;
  background: #f2f5ef;
  --line: #d9e2d9;
  --muted: #52645a;
  --green: #204e3d;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.shell { width: min(100% - 40px, 1120px); margin-inline: auto; }
.top { border-bottom: 1px solid var(--line); background: #f9fbf7; }
.brand { height: 64px; display: flex; align-items: center; gap: 10px; font-weight: 750; }
.mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--green); color: white; font-size: 23px; }
main { padding-bottom: 48px; }
.intro { padding: 48px 0 24px; }
h1, h2 { margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.05em; }
h2 { font-size: 1.25rem; }
.intro p, .hint, #empty { color: var(--muted); }
.intro p { margin: 8px 0 0; }
.toolbar, .dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.actions { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
button, input, textarea, select { font: inherit; }
button { min-height: 40px; padding: 6px 13px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--green); cursor: pointer; }
button:hover { background: #e8f0e9; }
button:disabled { opacity: .55; cursor: default; }
.primary { background: var(--green); color: white; border-color: var(--green); }
.primary:hover { background: #173e2e; }
:focus-visible { outline: 2px solid #357858; outline-offset: 3px; }
.panel, dialog { background: white; border: 1px solid var(--line); border-radius: 15px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; min-width: 700px; }
th, td { padding: 12px 15px; border-bottom: 1px solid var(--line); font-size: .9rem; overflow-wrap: anywhere; }
th { background: #f8faf7; white-space: nowrap; }
td:first-child { white-space: nowrap; }
td:nth-child(3), td:nth-child(5) { max-width: 260px; }
td:nth-child(5) { white-space: pre-wrap; }
tbody tr:last-child td { border-bottom: 0; }
#empty { text-align: center; padding: 30px 12px; }
.link { border: 0; padding: 0; min-height: 32px; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.thumb { display: grid; place-items: center; padding: 3px; }
.thumb img { width: 44px; height: 44px; object-fit: contain; }
dialog { width: min(510px, 100% - 32px); padding: 22px; }
dialog::backdrop { background: #13251c77; }
form, #types { display: grid; gap: 12px; }
.dialog-heading { margin-bottom: 10px; }
label { display: block; font-size: .875rem; font-weight: 650; }
input, select, textarea { display: block; width: 100%; min-height: 40px; margin-top: 5px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; color: inherit; background: #fafcf9; }
textarea { resize: vertical; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint, .error { margin: 0; font-size: .875rem; }
.error { color: #a33028; }
.original { display: flex; align-items: center; gap: 12px; }
.original img { width: 74px; height: 74px; object-fit: contain; }
#full-image { display: block; max-width: 100%; max-height: 70vh; margin: auto; }
#type-form { display: flex; margin-top: 15px; }
.type-row { display: flex; align-items: end; gap: 8px; }
.type-row input, .grow { flex: 1; min-width: 0; }
@media (max-width: 640px) { .toolbar { align-items: flex-start; flex-direction: column; } .intro { padding-top: 28px; } }
