:root {
  color-scheme: light;
  --ink: #172f2d;
  --muted: #506765;
  --paper: #f2f7f4;
  --surface: #fff;
  --line: #d4e2dc;
  --accent: #106952;
  --soft: #e0f2e8;
  font-family: "Noto Sans JP", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.6; }
a { color: var(--accent); text-underline-offset: .2em; }
button, input, select { font: inherit; }
button, .button { cursor: pointer; }
button, .button, input, select {
  min-height: 2.75rem; border: 1px solid var(--line); border-radius: .65rem;
  color: var(--ink); background: var(--surface); padding: .45rem .85rem;
}
button:hover, .button:hover { background: var(--soft); }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid #d48127; outline-offset: 3px; }
.skip { position: absolute; inset: .5rem auto auto 1rem; background: var(--surface); padding: .5rem; z-index: 1; }
.skip:not(:focus) { clip-path: inset(50%); }
.wrap { width: min(70rem, calc(100% - 2rem)); margin-inline: auto; }
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top-inner { display: flex; justify-content: space-between; align-items: center; min-height: 3.75rem; gap: 1rem; }
.top-inner a { font-size: .85rem; font-weight: 700; }
.top img { display: block; object-fit: contain; }
.hero {
  display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end;
  isolation: isolate; position: relative; overflow: hidden; margin-block: 1.5rem;
  padding: clamp(1.3rem, 5vw, 3.85rem); border-radius: 1.25rem; color: #fff; background: #10352d;
}
.hero::before {
  content: ""; z-index: -1; position: absolute; inset: 0;
  background: linear-gradient(104deg,#10352d 26%,#10352d88 70%,#27766580),
    repeating-linear-gradient(0deg,transparent 0 31px,#abe7b527 31px 32px),
    repeating-linear-gradient(90deg,#205346 0 31px,#98d6a14c 31px 32px);
}
.eyebrow { color: var(--accent); letter-spacing: .13em; font-size: .75rem; font-weight: 750; margin: 0; }
.hero .eyebrow { color: #9be3b9; }
h1, h2, h3, p { margin-block: 0; }
h1 { font-size: clamp(1.65rem, 5vw, 3.85rem); line-height: 1.16; margin-block: .5rem .75rem; }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.25; }
h3 { font-size: 1.05rem; }
.lead { color: #d5e9df; }
.hero nav { margin-top: 1.3rem; display: flex; flex-wrap: wrap; gap: .65rem; }
.button { display: inline-flex; align-items: center; font-size: .85rem; border-color: #ffffff57; color: #fff; background: #ffffff12; text-decoration: none; }
.button:hover { background: #ffffff35; }
.primary { background: #b7f2cf; color: #10352d; border-color: transparent; font-weight: 700; }
.primary:hover { background: #d3fae3; }
.snapshot { border: 1px solid #d5eadb55; background: #0d332be8; border-radius: .85rem; padding: .85rem 1rem; }
.snapshot span, .snapshot p { display: block; color: #c6e4d6; font-size: .8rem; }
.snapshot time { display: block; font-weight: 750; font-variant-numeric: tabular-nums; }
.summary, .profile-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.stat, .panel { border: 1px solid var(--line); border-radius: .9rem; background: var(--surface); padding: clamp(.75rem, 2vw, 1.25rem); }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: clamp(1rem, 2.2vw, 1.6rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat span, .stat small, .section-head p, .results, .pagination { color: var(--muted); font-size: .85rem; }
.section { margin-top: 2.75rem; scroll-margin-top: 1.25rem; }
.section-head { margin-bottom: .85rem; }
.section-head p { margin-top: .3rem; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: .7rem; }
.filters label { display: grid; gap: .3rem; font-size: .85rem; font-weight: 650; }
.filters input, .filters select { width: 100%; min-width: 0; font-weight: 400; }
.results { margin-block: .8rem .35rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: start; border-bottom: 1px solid var(--line); padding: .45rem .4rem; }
th { color: var(--muted); font-size: .8rem; }
th:last-child, td:last-child { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
td:first-child { width: 5ch; }
tbody tr:hover { background: var(--paper); }
.name { border: 0; padding: .25rem .3rem; min-height: 2.2rem; color: var(--accent); background: transparent; text-align: start; font-weight: 700; overflow-wrap: anywhere; }
.tag { display: inline-block; margin-inline: .25rem; padding: .05rem .4rem; color: var(--muted); background: var(--paper); border-radius: .3rem; font-size: .68rem; white-space: nowrap; }
.pagination { display: flex; justify-content: center; align-items: center; gap: .75rem; margin-top: .9rem; }
.world-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.bars { list-style: none; padding: 0; margin: .55rem 0 0; }
.bars li { margin-top: .45rem; }
.bar-label { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; overflow-wrap: anywhere; }
.bar-label strong { font-variant-numeric: tabular-nums; }
progress { display: block; appearance: none; width: 100%; height: .4rem; border: 0; border-radius: 1rem; overflow: hidden; background: var(--soft); }
progress::-webkit-progress-bar { background: var(--soft); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.method { margin-block: 1.5rem; color: var(--muted); font-size: .85rem; }
.method summary { cursor: pointer; color: var(--ink); font-weight: 700; }
.method p { margin-top: .4rem; }
dialog { width: min(43rem, calc(100% - 1.5rem)); max-height: 85vh; padding: clamp(.85rem, 3vw, 1.6rem); border: 1px solid var(--line); border-radius: 1rem; color: var(--ink); background: var(--surface); }
dialog::backdrop { background: #102b25aa; }
.profile-head, .profile-link { display: flex; gap: .7rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.profile-head h2 { overflow-wrap: anywhere; }
.profile-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block: 1rem; }
.profile-link { margin-top: 1.15rem; font-size: .85rem; }
.footer { display: flex; flex-wrap: wrap; gap: 1rem; border-top: 1px solid var(--line); padding-block: 1rem 2rem; margin-top: 1.5rem; font-size: .8rem; }
@media (max-width: 42rem) {
  .hero, .world-grid { grid-template-columns: 1fr; }
  .hero { gap: 1.2rem; }
  .snapshot { justify-self: start; }
  .summary, .profile-stats, .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters label:first-child { grid-column: 1 / -1; }
  .tag { display: block; width: fit-content; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
