:root {
  color-scheme: light;
  --ink: #183128;
  --muted: #4b6258;
  --border: #c8dcd2;
  --paper: #fff;
  --background: #eff6f2;
  --accent: #105e48;
  --selected: #deeee6;
  --error: #893e34;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--background);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.shell { width: min(100% - 2rem, 42rem); margin: 0 auto; padding: 1.15rem 0 1.8rem; }
.app-header, .brand-group, .bar, .pagination { display: flex; align-items: center; gap: .6rem; }
.app-header, .bar { justify-content: space-between; }
.bar { flex-wrap: wrap; }
.app-header { min-height: 2.75rem; border-bottom: 1px solid var(--border); padding-bottom: .6rem; }
.brand { font-weight: 800; font-size: 1.38rem; letter-spacing: -.025em; }
.region, .muted, small { color: var(--muted); }
.region, .muted { font-size: .875rem; }
h1, h2, h3, p, ul { margin: 0; }
h1 { margin: 1.3rem 0 1rem; font-size: clamp(1.75rem, 5vw, 2rem); line-height: 1.24; letter-spacing: -.03em; }
h2 { font-size: 1.15rem; line-height: 1.35; }
h3 { font-size: 1rem; line-height: 1.45; }
p { line-height: 1.55; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }

.stack, .panel, .field, .items { display: grid; gap: .7rem; }
.panel { padding: 1rem; border: 1px solid var(--border); border-radius: .8rem; background: var(--paper); }
.fill-form { gap: 1.05rem; }
.compact { gap: .6rem; }
.field { gap: .28rem; min-width: 0; font-size: .875rem; font-weight: 620; }
.field span { overflow-wrap: anywhere; }
.split, .filters { display: grid; gap: .6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
.culture-input { grid-template-columns: 1.25fr 1fr; }
.controls { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .42rem; }
.search > * { min-width: 0; }
.split input { width: 100%; }

button, input, select {
  border: 1px solid var(--border);
  border-radius: .53rem;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
  padding: .54rem .72rem;
  min-height: 2.75rem;
}
button { cursor: pointer; font-weight: 650; min-width: 2.75rem; }
button:hover:enabled { border-color: var(--accent); }
button:disabled { cursor: default; opacity: .55; }
input, select { width: 100%; min-width: 0; }
input { font-size: 1rem; }
select { padding-inline-end: 1.2rem; text-overflow: ellipsis; }
:focus-visible { outline: .16rem solid #1f8465; outline-offset: .12rem; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover:enabled { background: #084c3b; }
.wide { width: 100%; min-height: 3rem; }
[aria-pressed="true"] { background: var(--selected); color: var(--accent); border-color: var(--accent); }
.back { padding: .35rem; width: 2.75rem; border-color: transparent; background: transparent; }
.back span { display: block; width: .7rem; height: .7rem; margin: auto; border: solid var(--ink); border-width: 0 0 2px 2px; transform: rotate(45deg); }

.items { padding: 0; list-style: none; }
.items li { min-width: 0; }
.items li + li { border-top: 1px solid var(--border); padding-top: .55rem; }
.item {
  display: grid; gap: .2rem; width: 100%; text-align: start; padding: .6rem .75rem;
  font-weight: 400; overflow-wrap: anywhere;
}
.item strong { font-weight: 700; }
.panels li + li { padding-top: 0; border: 0; }
.panels .item { padding: .8rem; border-radius: .8rem; }
.metric { display: grid; gap: .24rem; padding: .65rem .8rem; border-radius: .55rem; background: var(--selected); }
.metric-value { color: var(--accent); font-size: 1.45rem; line-height: 1.25; font-weight: 800; font-variant-numeric: tabular-nums; }
.metric-value small { font-size: .875rem; font-weight: 650; }
.metric.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.break { overflow-wrap: anywhere; }
.total { font-variant-numeric: tabular-nums; }
.notice { padding: .65rem .8rem; border: 1px solid var(--border); border-radius: .5rem; margin-bottom: .7rem; }
.error { color: var(--error); background: #fff2ed; border-color: #dfb9ae; }
.pagination { justify-content: center; }
.line { margin-bottom: .25rem; }
details summary { cursor: pointer; color: var(--accent); padding: .45rem 0; font-size: .875rem; }
details p + p { margin-top: .38rem; }
.footer { text-align: center; margin-top: 1rem; font-size: .82rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 360px) {
  .shell { width: calc(100% - 1.4rem); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .culture-input { grid-template-columns: minmax(0, 1fr); }
}
