:root {
  color-scheme: dark;
  --bg: #151910;
  --stone: #26291f;
  --stone2: #30352a;
  --line: #484f3e;
  --ink: #f5f2df;
  --muted: #c6cbb3;
  --green: #b2e479;
  --green-d: #4f7f2d;
  --red: #ff9e8d;
  --amber: #f2ce77;
  --gray: #c5cfc5;
  --pixel: #080c08;
}
* { box-sizing: border-box }
html { scroll-behavior: smooth; scroll-padding-top: 92px }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: system-ui, "Noto Sans JP", sans-serif; line-height: 1.65;
  background-image: repeating-conic-gradient(#1a1e15 0% 25%, transparent 0% 50%);
  background-size: 32px 32px;
}
a { color: var(--green); text-underline-offset: .2em }
button, input, select { font: inherit }
button, select, summary { cursor: pointer }
:focus-visible { outline: 3px solid #e0f8b7; outline-offset: 3px }
header.site {
  position: sticky; top: 0; z-index: 10; background: #151a12;
  border-bottom: 3px solid #6a9049; box-shadow: 0 4px var(--pixel);
}
.wrap { max-width: 1192px; margin-inline: auto; padding-inline: clamp(12px, 3vw, 32px) }
.nav { display: flex; align-items: center; gap: 12px; min-height: 72px; padding-block: 9px }
.brand {
  display: inline-flex; align-items: center; gap: 10px; color: var(--ink);
  text-decoration: none; font-weight: 850; line-height: 1.2;
}
.brand img { width: 34px; height: 34px; image-rendering: pixelated }
.nav > .meta { display: none }
.nav nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap }
.nav nav a { color: var(--muted); padding: 6px 9px; text-decoration: none; border: 1px solid transparent; font-weight: 650 }
.nav nav a:hover, .nav nav a[aria-current] { color: var(--ink); background: var(--stone2); border-color: var(--line) }
.language-picker { margin-left: auto; flex: none; min-width: 93px }
.nav nav + .language-picker { margin-left: 0 }
.hero { padding: 52px 0 12px }
h1, h2, h3 { line-height: 1.2; text-wrap: balance }
h1 { font-size: clamp(1.85rem, 4.4vw, 3.75rem); letter-spacing: -.045em; margin: 0 0 14px; font-weight: 950 }
h2 { font-size: clamp(1.3rem, 2.1vw, 1.7rem); margin-top: 0; font-weight: 850 }
h3 { font-weight: 790 }
.accent { color: var(--green) }
.lead, .meta { color: var(--muted) }
.lead { max-width: 65ch }
.world-hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: 24px; min-height: 402px; display: flex; align-items: center;
  border: 3px solid #80885c; border-bottom: 6px solid #3f5230;
  padding: clamp(22px, 5vw, 62px); box-shadow: 0 6px var(--pixel);
  background: #35463a url("../img/block-world.png") center right / cover no-repeat;
  image-rendering: pixelated;
}
.world-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, #172116 1%, #172116eb 34%, #1721167d 61%, #17211615 100%);
}
.world-copy { max-width: 565px }
.world-tag { margin: 0 0 13px; color: #dfeba7; font: 750 .82rem/1.25 ui-monospace, monospace; letter-spacing: .055em }
.world-hero h1 { text-shadow: 3px 4px #111b12 }
.world-hero .lead { color: #edf1db; max-width: 49ch }
.world-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px }
.panel {
  border: 2px solid var(--line); border-top-color: #777d65; background: var(--stone);
  box-shadow: inset 0 1px #ffffff13, 0 5px var(--pixel);
  padding: clamp(16px, 3vw, 32px); margin-block: 24px;
}
#checker { border-top: 5px solid #8dbc5e }
.checker-hint { margin-top: -5px; color: var(--muted) }
.btn {
  display: inline-block; padding: 9px 16px; min-height: 44px;
  background: #a6d36b; color: #17240d; border: 2px solid #cce89e;
  box-shadow: inset 0 -3px #547634, 0 3px var(--pixel);
  text-decoration: none; font-weight: 800; text-align: center;
}
.btn:hover { background: #bee687 }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -1px #547634, 0 1px var(--pixel) }
.btn.sub { background: #394333; color: var(--ink); border-color: #707b60; box-shadow: inset 0 -3px #20271b, 0 3px var(--pixel) }
.btn.sub:hover { background: #47543e }
.btn.small { padding: 5px 9px; font-size: .85rem }
.btn[disabled] { opacity: .65; cursor: default }
select, input[type=text], input[type=search] {
  width: 100%; min-width: 0; min-height: 44px; padding: 7px 10px;
  background: #191e16; color: var(--ink); border: 2px solid #525b47;
  box-shadow: inset 0 2px #101410; border-radius: 0;
}
select.language-picker { width: auto; min-height: 38px }
input::placeholder { color: #b0b69f }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr)); gap: 14px }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 690; font-size: .92rem; min-width: 0 }
.drop {
  display: grid; place-items: center; gap: 6px; width: 100%; margin-top: 16px; padding: 25px 12px;
  border: 2px dashed #96bd70; color: var(--ink); background: #263621;
  box-shadow: inset 0 0 0 5px #202c1e; text-align: center;
}
.drop:hover, .drop.drag { background: #334a2c; border-color: #c7ec9f }
.drop strong { color: #ddf3b6; font-size: 1.12rem }
.drop span, #parseStatus { color: var(--muted); font-size: .9rem }
.progress { height: 8px; margin-top: 6px; border: 1px solid #4a5940; background: #11170e }
.progress i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg,#a9d470 0 8px,#82aa50 8px 10px) }
#parseStatus:empty { display: none }
.lookup-options { margin-block: 15px; color: var(--muted); border: 1px solid var(--line); padding: 8px 12px }
.lookup-options summary { color: var(--ink); font-weight: 650 }
.lookup-options .grid, .lookup-options label { margin-top: 10px }
.lookup-options p { margin: 4px 0 0; font-size: .86rem }
#modTableWrap { overflow-x: auto }
table { width: 100%; border-collapse: collapse; font-size: .92rem }
td, th { padding: 8px; text-align: left; vertical-align: top; border: 1px solid var(--line); overflow-wrap: anywhere }
th { background: var(--stone2) }
.badge { display: inline-block; padding: 1px 6px; background: #191e16; border: 1px solid var(--line); font-size: .8rem }
.badge.fabric { color:#b4ddff }.badge.forge { color:#ffd1a6 }.badge.neoforge { color:#ffb3a6 }.badge.quilt { color:#e1c7ff }
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-block: 14px }
.summary .box { padding: 10px 4px; text-align: center; border: 2px solid var(--line); background: #1b2118; box-shadow: inset 0 2px #11170e; overflow-wrap:anywhere }
.summary .num { display: block; font: 800 1.8rem/1.2 ui-monospace, monospace }
#issueFilter { max-width: 22rem }
.issue, .notice { margin-block: 12px; padding: 12px 16px; border: 1px solid var(--line); background: var(--stone2); overflow-wrap: anywhere }
.issue { border-left: 5px solid var(--gray) }
.issue.definite { border-left-color: var(--red) }
.issue.possible { border-left-color: var(--amber) }
.issue h3 { margin: 0 }
.issue code { background: #191e16; padding: 2px 5px; overflow-wrap: anywhere }
.notice { border-color: #797349; background: #33301f }
.card { background: #20271d; border: 2px solid var(--line); padding: 16px; overflow-wrap: anywhere }
.card img.icon { width: 44px; height: 44px }
.ad-slot { min-height: 110px; padding: 12px; border: 1px dashed var(--line); color: var(--muted); text-align: center }
footer.site { border-top: 3px solid #5c674d; margin-top: 48px; padding: 12px 0 24px; color: var(--muted); background: #151a12; font-size: .9rem }
footer.site a { color: var(--ink) }
.hidden { display: none !important }
@media (max-width: 680px) {
  html { scroll-padding-top: 12px }
  header.site { position: static }
  .nav { flex-wrap: wrap; gap: 8px }
  .nav nav { order: 2; flex-basis: 100%; margin-left: 0 }
  .nav nav a { padding: 4px 6px }
  .nav nav + .language-picker { margin-left: auto }
  .world-hero { margin-top: 16px; min-height: 338px; background-position: 62% center; align-items: end }
  .world-hero::before { background: linear-gradient(0deg,#172116 3%,#172116ed 29%,#17211680 63%,#17211635 100%) }
  .world-actions { gap: 8px; margin-top: 16px }
  .world-actions .btn { padding-inline: 9px }
  .summary .box { font-size: .8rem }
  #modTableWrap th:nth-child(3), #modRows td:nth-child(3) { display: none }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } }
:lang(ja) .world-hero h1 { word-break: auto-phrase; letter-spacing: -.025em }
