@import url("https://fontsapi.zeoseven.com/437/main/result.css");

:root {
  color-scheme: light;
  --bg: #f7f3eb;
  --paper: #fffbf3;
  --paper-soft: #f2eadf;
  --text: #2f2a25;
  --muted: #756b61;
  --faint: #9b9084;
  --line: #ded3c4;
  --accent: #8b5e3c;
  --accent-soft: #eadccf;
  --shadow: 0 18px 48px rgba(78, 54, 35, .08);
  --serif: "Huiwen-MinchoGBK", "Huiwen-mincho", "汇文明朝体", "Huiwen Mincho", "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
  font-family: var(--serif);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body {
  background:
    linear-gradient(90deg, rgba(47,42,37,.025) 1px, transparent 1px),
    linear-gradient(180deg, #faf6ee 0%, #f4eee5 48%, #efe7dc 100%);
  background-size: 28px 28px, auto;
  letter-spacing: .015em;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.page {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 20px max(36px, env(safe-area-inset-bottom));
}

.hero {
  padding: 36px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.eyebrow {
  color: var(--accent);
  font: 500 12px/1.2 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
h1 {
  margin: 0 0 14px;
  font-size: clamp(40px, 13vw, 72px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.055em;
}
.subtitle {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.tile, .card {
  border: 1px solid var(--line);
  background: rgba(255, 251, 243, .72);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.tile {
  min-height: 154px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.tile:active { transform: scale(.992); }
.tile:hover { background: var(--paper); border-color: #cdbba8; }
.tile strong { display: block; font-size: 23px; font-weight: 500; margin-bottom: 12px; letter-spacing: -.025em; }
.tile span { color: var(--muted); line-height: 1.75; font-size: 14px; }
.index-mark {
  color: var(--faint);
  font: 500 12px/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  align-self: flex-end;
}
.card { padding: 22px; margin-top: 14px; }

.back {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  padding: 10px 0;
  font: 500 13px/1.2 var(--sans);
  letter-spacing: .08em;
}
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.btn {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255,251,243,.72);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font: 500 14px/1.2 var(--sans);
}
.btn.primary { background: var(--text); color: var(--paper); border-color: var(--text); font-weight: 600; }

.list { display: grid; gap: 10px; margin-top: 12px; }
.list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.list a:last-child { border-bottom: 0; }
.list small { color: var(--faint); white-space: nowrap; font: 500 12px/1.6 var(--sans); }

.prose { line-height: 2; font-size: 16px; }
.prose h1 { font-size: 34px; line-height: 1.18; letter-spacing: -.035em; }
.prose h2 { margin-top: 30px; font-weight: 500; }
.prose h3 { font-weight: 500; }
.prose p { color: var(--text); }
.prose br { display: block; content: ''; margin: 8px 0; }

.note-box { min-height: 190px; display: grid; place-items: center; text-align: center; font-size: 22px; line-height: 1.75; }
.note-sub { color: var(--faint); font: 500 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; margin-top: 16px; }

.board-wrap { overflow: auto; padding: 12px 0; }
.board {
  width: min(92vw, 540px);
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 1px;
  padding: 10px;
  border-radius: 8px;
  background: #d8c2a6;
  box-shadow: inset 0 0 0 1px rgba(70,45,28,.12), var(--shadow);
}
.cell { border: 0; border-radius: 2px; background: rgba(255,251,243,.38); padding: 0; position: relative; cursor: pointer; }
.cell.black::after, .cell.white::after { content: ''; position: absolute; inset: 16%; border-radius: 50%; box-shadow: 0 3px 8px rgba(55,38,24,.18); }
.cell.black::after { background: #2f2a25; }
.cell.white::after { background: #f8f2e8; box-shadow: inset 0 0 0 1px rgba(47,42,37,.18), 0 3px 8px rgba(55,38,24,.12); }

.status { color: var(--muted); line-height: 1.8; }
.footer { margin: 34px 0 6px; color: var(--faint); font: 500 12px/1.6 var(--sans); text-align: center; letter-spacing: .08em; }

@media (max-width: 560px) {
  .page { padding-left: 18px; padding-right: 18px; }
  .hero { padding-top: 28px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .tile { min-height: 132px; }
}
