:root {
  color-scheme: light;
  --paper: #fbfaf7;
  --ink: #202927;
  --muted: #525e59;
  --line: #dddcd5;
  --accent: #9b342c;
  --green: #205749;
  --soft: #f0f3ed;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: var(--green); text-underline-offset: .22em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.25; overflow-wrap: anywhere; }
[lang="ja"] { font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans CJK JP", sans-serif; }
.wrap { width: min(100% - 40px, 940px); margin-inline: auto; }
.skip { position: absolute; top: 8px; left: 16px; padding: 8px; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }
.mast { border-top: 4px solid var(--accent); border-bottom: 1px solid var(--line); }
.mast-inner, .footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mast-inner { min-height: 65px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 750; color: var(--ink); text-decoration: none; }
.brand img { border-radius: 5px; }
.brand span { padding-left: 9px; border-left: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.quiet { white-space: nowrap; font-size: .9rem; }
.intro { padding: 42px 0 24px; }
.intro h1 { font-size: 2.65rem; }
.intro p { margin-top: 10px; color: var(--muted); }
.follow { padding: 17px 0 18px 16px; border-left: 3px solid var(--green); background: var(--soft); }
.follow h2 { font-size: 1.1rem; }
.follow p { margin: 5px 12px 0 0; color: var(--muted); font-size: .92rem; }
.socials { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 8px; }
.socials a { display: inline-flex; gap: 5px; align-items: center; min-height: 32px; font-size: .9rem; font-weight: 650; }
.catalog { margin-top: 27px; }
.filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(145px, .34fr); gap: 12px; }
.filters label { display: block; margin-bottom: 4px; font-weight: 650; font-size: .86rem; }
.filters input, .filters select { width: 100%; min-width: 0; height: 44px; border: 1px solid #a9ada5; border-radius: 5px; padding: 0 10px; background: white; color: var(--ink); font: inherit; }
.result-count { margin-top: 9px; font-size: .87rem; color: var(--muted); }
.group { margin-top: 27px; }
.group h2 { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 9px; font-size: 1.28rem; }
.group h2 span { font-size: .83rem; font-weight: 500; color: var(--muted); }
.entries, .forms { list-style: none; padding: 0; margin: 0; }
.entries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 20px; }
.entries li { min-width: 0; border-bottom: 1px solid var(--line); }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 6px; align-content: center; min-height: 100%; padding: 12px 4px; color: var(--ink); text-decoration: none; }
.entry:hover { background: var(--soft); }
.entry-name { font-weight: 700; overflow-wrap: anywhere; }
.entry-gloss { grid-row: 2; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.arrow { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--green); }
.subtitle { color: var(--muted); font-size: .82em; font-weight: 500; }
.lesson { max-width: 720px; }
.crumb, .tags, .related { display: flex; gap: 8px 13px; flex-wrap: wrap; }
.crumb { padding: 24px 0 15px; font-size: .9rem; color: var(--muted); }
.lesson h1 { font-size: 2.35rem; }
.tags { margin-top: 10px; font-size: .83rem; color: var(--green); }
.tags span::before { content: "#"; margin-right: 2px; }
.lesson-section { margin-top: 28px; }
.lesson-section h2 { padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 1.24rem; }
.meanings { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 13px; margin: 0; }
.meanings dt { color: var(--muted); font-size: .88rem; padding-top: 2px; }
.meanings dd { margin: 0; overflow-wrap: anywhere; }
.forms { padding: 8px 14px; background: var(--soft); border-left: 3px solid var(--green); }
.forms li, .explanations p { overflow-wrap: anywhere; }
.forms li + li, .explanations p + p { margin-top: 5px; }
.examples { margin: 0; padding-left: 1.65rem; }
.examples li { padding: 7px 0 9px 4px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.examples li::marker { color: var(--muted); font-size: .83rem; }
.example-jp { line-height: 2.05; font-size: 1.05rem; }
.example-jp strong { color: var(--accent); }
rt { color: var(--muted); }
.example-zh { color: var(--muted); font-size: .92rem; }
summary { padding-block: 11px; cursor: pointer; color: var(--green); font-weight: 650; }
.related span { color: var(--muted); }
.sequence { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 30px; gap: 12px; }
.sequence a { padding: 9px 12px; border: 1px solid var(--line); border-radius: 5px; text-decoration: none; overflow-wrap: anywhere; }
.sequence a[rel="next"] { grid-column: 2; text-align: right; }
.sequence small { display: block; color: var(--muted); }
.footer { margin-top: 38px; padding-block: 15px; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); }

@media (max-width: 760px) {
  .entries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 500px) {
  .wrap { width: calc(100% - 32px); }
  .intro { padding-top: 28px; }
  .intro h1 { font-size: 2rem; }
  .lesson h1 { font-size: 1.9rem; }
  .filters { grid-template-columns: minmax(0, 1fr) minmax(103px, .42fr); gap: 8px; }
  .filters input, .filters select { padding-inline: 7px; }
  .entries { grid-template-columns: 1fr; }
  .socials { gap: 4px 15px; }
}
