:root {
  --bg: #faf6ed;
  --surface: var(--white)fff;
  --band: #ffecec;
  --band-2: #fdf5f5;
  --line: #cdcdcd;
  --line-soft: #e7ded4;
  --text: #333333;
  --text-muted: #666666;
  --text-dim: #888888;
  --nav: #cc0000;
  --nav-active: #880000;
  --nav-hover: #660000;
  --accent: #ba350f;
  --link: #333333;
  --cta-fill: #8b0000;
  --radius: 3px;
  --white: var(--white)fff;
  --topbar: var(--topbar);
  --pipe: var(--pipe);
  --dot: var(--dot)bbb;
  --band-line: var(--band-line);
  --band-line-2: var(--band-line-2);
  --texture: rgba(186, 53, 15, 0.028);
  --nav-line: var(--nav-line);
  --focus-ring: var(--focus-ring);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: repeating-linear-gradient(90deg, var(--texture) 0 1px, transparent 1px 7px);
  color: var(--text);
  font-family: Tahoma, Helvetica, "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

h1 {
  font-size: 28px;
  line-height: 1.35;
}

h2 {
  font-size: 20px;
  line-height: 1.45;
}

h3 {
  font-size: 17px;
  line-height: 1.55;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 90;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--text);
}

.skip:focus {
  left: 12px;
  top: 12px;
}

.pipe {
  padding: 0 7px;
  color: var(--pipe);
}

/* top bar */

.toptb {
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 30px;
  color: var(--text-muted);
}

.toptb-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 16px;
}

.toptb a {
  display: inline-block;
  padding: 0 2px;
  min-height: 30px;
}

.toptb-r {
  color: var(--text-dim);
}

/* header */

.hd {
  background: var(--bg);
}

.hd-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.hd-logo {
  display: block;
  line-height: 0;
}

.hd-logo img {
  width: 198px;
  height: 48px;
}

.hd-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.search {
  display: flex;
  align-items: stretch;
}

.search input {
  width: 240px;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid var(--nav);
  border-right: 0;
  border-radius: 2px 0 0 2px;
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.search input:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

.search button {
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid var(--nav);
  border-radius: 0 2px 2px 0;
  background: var(--nav);
  color: var(--white);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.search button:hover {
  background: var(--nav-active);
}

.hd-note {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}

/* nav */

.nv {
  background: var(--nav);
}

.nv ul {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nv a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 15px;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  border-right: 1px solid var(--nav-line);
}

.nv a:hover {
  background: var(--nav-hover);
  color: var(--white);
  text-decoration: none;
}

.nv a[aria-current="page"] {
  background: var(--nav-active);
}

/* home title */

.home-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 16px;
  margin-bottom: 8px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.home-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.home-head p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* stats strip */

.chart {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  margin-bottom: 10px;
}

.chart-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  min-height: 36px;
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.chart-in p {
  margin: 0;
}

.chart-in em {
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
}

.chart-in a {
  color: var(--accent);
}

/* four-cell overview */

.grid4 {
  display: grid;
  grid-template-columns: 300px 1fr 1fr 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 10px;
}

.cell {
  padding: 10px 12px 12px;
  border-left: 1px solid var(--line-soft);
  min-width: 0;
}

.cell:first-child {
  border-left: 0;
}

.cell-pic {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  background: var(--band-2);
}

.cell-pic img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.pic-cap {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.pic-cap strong {
  color: var(--accent);
}

.cell-h {
  margin: 0 0 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

.dotlist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dotlist li {
  position: relative;
  padding: 2px 0 2px 12px;
  font-size: 14px;
  line-height: 24px;
  overflow-wrap: anywhere;
}

.dotlist li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dot);
}

.dotlist a {
  display: inline;
}

.find-note {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.find-note:empty {
  display: none;
}

/* board block */

.bm {
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 10px;
}

.bm-h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  min-height: 34px;
  padding: 5px 12px;
  background: var(--band);
  border-bottom: 1px solid var(--band-line);
}

.bm-h h1,
.bm-h h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--accent);
}

.bm-h h1 {
  font-size: 24px;
}

.bm-h span {
  font-size: 12px;
  color: var(--text-muted);
}

.bm-h a {
  color: var(--accent);
}

.bm-h--board {
  justify-content: flex-start;
  gap: 14px;
  padding: 10px 12px;
}

.bm-h--board img {
  width: 146px;
  height: 55px;
  border: 1px solid var(--line);
  background: var(--white);
}

.bm-h--board p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.bm-c {
  padding: 14px 16px 16px;
}

/* board table */

.bt {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.bt td {
  padding: 10px 8px;
  vertical-align: middle;
}

.bt tr + tr td {
  border-top: 1px dashed var(--line);
}

.bt tr:hover td {
  background: var(--band-2);
}

.bicon {
  width: 164px;
}

.bicon img {
  width: 146px;
  height: 55px;
  border: 1px solid var(--line);
  background: var(--white);
}

.bname {
  min-width: 0;
}

.bname h2 {
  margin: 0 0 2px;
  font-size: 17px;
  line-height: 1.5;
  font-weight: 700;
}

.bname h2 a {
  color: var(--accent);
}

.bname p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.bcount {
  width: 92px;
  text-align: right;
  font-size: 13px;
  color: var(--text-muted);
}

.bcount span {
  color: var(--accent);
  font-weight: 700;
}

.blast {
  width: 290px;
  font-size: 13px;
  line-height: 1.6;
}

.blast a {
  color: var(--text-muted);
}

/* intro & rows */

.intro {
  max-width: 900px;
}

.intro p {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.8;
}

.intro p:last-child {
  margin-bottom: 0;
}

.sub-h {
  margin: 20px 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 16px;
  font-weight: 700;
}

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-soft);
}

.rows li {
  border-bottom: 1px solid var(--line-soft);
}

.rows a {
  display: block;
  padding: 9px 4px;
}

.rows a:hover {
  background: var(--band-2);
  text-decoration: none;
}

.row-t {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.row-c {
  margin-left: 8px;
  font-size: 12px;
  font-style: normal;
  color: var(--text-dim);
}

.row-d {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.more {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.more a {
  margin-right: 8px;
  color: var(--accent);
}

/* chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 3px 10px;
  border: 1px solid #f0bcbc;
  border-radius: 2px;
  background: var(--band-2);
  color: var(--accent);
  font-size: 13px;
}

.chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  text-decoration: none;
}

/* crumb */

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.crumb a {
  color: var(--text-muted);
}

.crumb a:hover {
  color: var(--accent);
}

.crumb span[aria-current="page"] {
  color: var(--text);
}

/* article */

.sheet h1 {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.4;
  color: var(--text);
}

.lede {
  max-width: 860px;
  margin: 0 0 14px;
  padding: 8px 10px;
  background: var(--band-2);
  border: 1px solid var(--band-line-2);
  border-radius: 2px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
}

.prose {
  max-width: 860px;
}

.prose p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.85;
}

.prose p:last-child {
  margin-bottom: 0;
}

.foot-block {
  margin-top: 22px;
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
}

/* rules */

.rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.rule {
  padding: 12px 14px;
  background: var(--band-2);
  border: 1px solid var(--band-line-2);
  border-radius: 2px;
}

.rule h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--accent);
}

.rule p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

.closing {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
}

/* tag index */

.tg-name {
  width: 150px;
  vertical-align: top;
}

.tg-name h2 {
  margin: 0;
  font-size: 16px;
}

.tg-name h2 a {
  color: var(--accent);
}

.tg-desc p {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

.tg-links a {
  margin-right: 10px;
  font-size: 13px;
  color: var(--accent);
}

/* footer */

.ft {
  margin-top: 14px;
  padding: 20px 0 46px;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.ft-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px 30px;
}

.ft-brand p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-muted);
}

.ft-name {
  font-size: 16px;
}

.ft-name a {
  color: var(--text);
  font-weight: 700;
}

.ft-nav {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px 12px;
  font-size: 13px;
}

.ft-nav a {
  min-height: 26px;
  color: var(--text-muted);
}

.ft-nav-t {
  width: 100%;
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.ft-copy {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-dim);
}

/* responsive */

@media (max-width: 1024px) {
  .grid4 {
    grid-template-columns: 1fr 1fr;
  }

  .cell:nth-child(3) {
    border-left: 0;
  }

  .cell:nth-child(n + 3) {
    border-top: 1px solid var(--line-soft);
  }

  .blast {
    width: 210px;
  }
}

@media (max-width: 860px) {
  .bicon {
    width: 120px;
  }

  .bicon img {
    width: 110px;
    height: auto;
  }

  .bcount {
    display: none;
  }

  .blast {
    width: 180px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .hd-in {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .hd-side {
    width: 100%;
    align-items: stretch;
  }

  .search input {
    width: 100%;
    min-width: 0;
  }

  .search {
    width: 100%;
  }

  .nav-hidden {
    display: none;
  }

  .nv a {
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
  }

  .grid4 {
    grid-template-columns: 1fr;
  }

  .cell {
    border-left: 0;
  }

  .cell + .cell {
    border-top: 1px solid var(--line-soft);
  }

  .bt,
  .bt tbody,
  .bt tr,
  .bt td {
    display: block;
    width: auto;
  }

  .bt tr {
    padding: 8px 10px;
  }

  .bt td {
    padding: 2px 0;
  }

  .bt tr + tr td {
    border-top: 0;
  }

  .bt tr + tr {
    border-top: 1px dashed var(--line);
  }

  .bicon {
    display: none;
  }

  .bname h2 {
    font-size: 16px;
  }

  .blast {
    width: auto;
    margin-top: 2px;
  }

  .bcount {
    display: block;
    width: auto;
    text-align: left;
    margin-top: 2px;
  }

  .bm-h--board {
    align-items: flex-start;
  }

  .bm-h--board img {
    width: 110px;
    height: auto;
  }

  .bm-h h1 {
    font-size: 21px;
  }

  .sheet h1 {
    font-size: 22px;
  }

  .prose p,
  .intro p {
    font-size: 16px;
  }

  .rules {
    grid-template-columns: 1fr;
  }

  .ft {
    padding-bottom: 54px;
  }

  .ft-in {
    grid-template-columns: 1fr;
  }

  .tg-table,
  .tg-table tbody,
  .tg-table tr,
  .tg-table td {
    display: block;
    width: auto;
  }

  .tg-table tr + tr {
    border-top: 1px dashed var(--line);
  }

  .tg-name {
    padding-bottom: 0;
  }

  .tg-desc {
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
