/* Shared stylesheet for 围棋入门 lessons */
:root {
  --bg: #f5f1e8;
  --paper: #fffdf7;
  --ink: #1f2933;
  --muted: #667085;
  --line: #ded3bf;
  --accent: #7c4a18;
  --accent-soft: #f4eadc;
  --good: #166534;
  --warn: #9a3412;
  --shadow: 0 18px 50px rgba(31, 41, 51, 0.09);
  --board: #d9a441;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at top left, #fff7df, var(--bg) 46%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  line-height: 1.68;
}
main { max-width: 920px; margin: 0 auto; padding: 56px 22px 80px; }
article { background: rgba(255,253,247,.94); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 40px; }
h1, h2, h3 { line-height: 1.18; margin: 0 0 14px; }
h1 { font-size: clamp(2rem, 5vw, 3.35rem); letter-spacing: -0.04em; }
h2 { font-size: 1.55rem; margin-top: 34px; border-top: 1px solid var(--line); padding-top: 28px; }
h3 { font-size: 1.08rem; margin-top: 22px; color: var(--accent); }
p, ul, ol { margin-top: 0; }
a { color: var(--accent); text-decoration-thickness: .08em; text-underline-offset: .18em; }
.kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 750; }
.lede { font-size: 1.18rem; color: #344054; max-width: 68ch; }
.card, .practice, .quiz, .note, .board-card { border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: #fff; margin: 18px 0; }
.note { background: var(--accent-soft); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.term { font-weight: 750; color: var(--accent); }
.small { color: var(--muted); font-size: .92rem; }
.board { width: min(100%, 360px); aspect-ratio: 1; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr); gap: 0; background: var(--board); border: 3px solid #8b5a1f; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); margin: 12px auto; }
.pt { position: relative; display: grid; place-items: center; min-width: 0; }
.pt::before, .pt::after { content: ""; position: absolute; background: rgba(42,29,13,.55); }
.pt::before { width: 100%; height: 1px; top: 50%; left: 0; }
.pt::after { width: 1px; height: 100%; left: 50%; top: 0; }
.stone { width: 58%; aspect-ratio: 1; border-radius: 50%; z-index: 1; box-shadow: 0 2px 5px rgba(0,0,0,.28); }
.black { background: radial-gradient(circle at 34% 28%, #666, #060606 58%); }
.white { background: radial-gradient(circle at 34% 28%, #fff, #ddd 62%); border: 1px solid #aaa; }
.mark { z-index: 2; width: 32%; aspect-ratio: 1; border-radius: 50%; background: rgba(22,101,52,.82); box-shadow: 0 0 0 5px rgba(22,101,52,.16); }
.danger { background: rgba(154,52,18,.9); box-shadow: 0 0 0 5px rgba(154,52,18,.16); }
button { appearance: none; border: 1px solid #c8b79d; background: #fff; color: var(--ink); border-radius: 999px; padding: 9px 14px; margin: 5px 6px 5px 0; cursor: pointer; font: inherit; }
button:hover { background: var(--accent-soft); }
button.correct { border-color: var(--good); background: #ecfdf3; }
button.incorrect { border-color: var(--warn); background: #fff4e8; }
.feedback { font-weight: 750; margin-top: 10px; }
footer { margin-top: 34px; color: var(--muted); font-size: .95rem; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 30; background: var(--ink); color: white; padding: 10px 12px; border-radius: 12px; }
.skip-link:focus { top: 16px; }
.course-topbar { width: min(920px, calc(100% - 44px)); margin: 18px auto 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: .94rem; }
.course-topbar a, .lesson-bottom-nav a { color: var(--ink); text-decoration: none; border: 1px solid var(--line); background: rgba(255,255,255,.72); border-radius: 999px; padding: 8px 12px; }
.course-topbar a:hover, .lesson-bottom-nav a:hover { background: var(--accent-soft); }
.lesson-bottom-nav { width: min(920px, calc(100% - 44px)); margin: -42px auto 54px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.lesson-bottom-nav .next { justify-self: end; }
.lesson-bottom-nav .prev { justify-self: start; }
@media print { body { background: #fff; } main { padding: 0; } article { box-shadow: none; border: none; } button, .course-topbar, .lesson-bottom-nav { display: none; } }
@media (max-width: 700px) { article { padding: 26px; } main { padding-top: 34px; } .course-topbar { flex-wrap: wrap; } }


/* Readable code blocks: inline code stays highlighted, code inside <pre> does not inherit that pale chip background. */
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(226, 214, 195, .55); padding: .1em .35em; border-radius: 5px; }
pre { overflow-x: auto; background: #182230; color: #edf3f4; padding: 16px; border-radius: 14px; font-size: 15px; line-height: 1.55; }
pre code { background: transparent; color: inherit; padding: 0; border-radius: 0; }
