:root {
  --blue: #1565c0;
  --ink: #0f172a;
  --muted: #64748b;
  --bg: #eef3f9;
  --card: #fff;
  --safe: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
body { padding-bottom: calc(64px + var(--safe)); }
.meo-top {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(135deg, #0d47a1, #1565c0);
  color: #fff; padding: 12px 14px 10px;
}
.meo-top a { color: #fff; text-decoration: none; font-size: 13px; opacity: .9; }
.meo-top h1 { margin: 4px 0 0; font-size: 20px; }
.meo-top p { margin: 2px 0 0; font-size: 13px; opacity: .9; }
.wrap { max-width: 920px; margin: 0 auto; padding: 12px 12px 28px; }
.toc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 14px; }
@media (min-width: 720px) { .toc { grid-template-columns: repeat(3, 1fr); } }
.toc button {
  border: 1px solid #dbe7f5; background: #fff; border-radius: 12px;
  padding: 10px 10px; text-align: left; cursor: pointer;
}
.toc button strong { display: block; font-size: 13px; color: var(--blue); }
.toc button span { font-size: 11px; color: var(--muted); }
.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 10px;
}
.pager button {
  border: 0; background: var(--blue); color: #fff; border-radius: 10px;
  padding: 10px 14px; font-weight: 700; cursor: pointer; min-width: 88px;
}
.pager button:disabled { opacity: .4; }
.pager .pos { font-size: 13px; font-weight: 700; color: #334155; }
.card {
  background: var(--card); border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
  overflow: hidden;
}
.card-hd {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  padding: 12px 14px; border-bottom: 1px solid #fed7aa;
}
.card-hd .k { font-size: 11px; font-weight: 800; color: #c2410c; letter-spacing: .4px; }
.card-hd h2 { margin: 4px 0 0; font-size: 21px; line-height: 1.35; }
.card-bd { padding: 12px 14px 16px; }
.rules { margin: 0; padding: 0; list-style: none; }
.rules li {
  position: relative; padding: 8px 0 8px 22px;
  font-size: 16.5px; line-height: 1.55; border-bottom: 1px dashed #e2e8f0;
}
.rules li:before { content: "✔"; position: absolute; left: 0; color: #15803d; font-weight: 800; }
.qs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.qs a, .qs span {
  display: inline-block; background: #eff6ff; color: #1565c0;
  border: 1px solid #bfdbfe; border-radius: 999px;
  padding: 4px 8px; font-size: 12px; font-weight: 700; text-decoration: none;
}
.how { margin: 14px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: #c2410c; }
.book-fig { margin: 10px 0 12px; }
.book-fig img {
  width: 100%; height: auto; border-radius: 12px; display: block;
  background: #fff7ed; cursor: zoom-in;
  box-shadow: 0 2px 10px rgba(15,23,42,.08);
}
.book-fig figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.zoom-ov {
  display: none; position: fixed; inset: 0; z-index: 80;
  background: rgba(15,23,42,.92); padding: 12px;
  overflow: auto; -webkit-overflow-scrolling: touch;
}
.zoom-ov.on { display: flex; align-items: flex-start; justify-content: center; }
.zoom-ov img { width: min(100%, 1100px); height: auto; border-radius: 8px; }
.note { font-size: 13px; background: #f0fdf4; border-left: 3px solid #16a34a; padding: 8px 10px; border-radius: 8px; margin-top: 10px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.qlist { margin-top: 8px; display: flex; flex-direction: column; gap: 10px; }
.qcard {
  border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px;
  background: #f8fafc;
}
.qcard-hd { font-size: 12px; font-weight: 800; color: #1565c0; margin-bottom: 6px; }
.qtext { margin: 0 0 8px; font-size: 16px; line-height: 1.5; }
.qimg {
  width: 100%; max-width: 420px; height: auto; display: block;
  margin: 0 0 10px; border-radius: 10px; background: #fff; cursor: zoom-in;
}
.qopts { list-style: none; margin: 0; padding: 0; }
.qopts li {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 8px 10px; border-radius: 8px; font-size: 15px; line-height: 1.45;
  margin-bottom: 4px; background: #fff; border: 1px solid #e2e8f0;
}
.qopts li.ok { background: #ecfdf5; border-color: #86efac; }
.qopts .lbl {
  flex: 0 0 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; background: #e2e8f0; color: #334155;
}
.qopts li.ok .lbl { background: #16a34a; color: #fff; }
.qopts em { font-style: normal; color: #15803d; font-weight: 800; font-size: 12px; }
.qexp { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: #334155; background: #fffbeb; border-radius: 8px; padding: 8px; }
nav.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; background: #fff;
  box-shadow: 0 -2px 10px rgba(0,0,0,.08); z-index: 30;
  padding-bottom: var(--safe);
}
.bottom-nav-inner {
  display: grid; grid-template-columns: repeat(5, 1fr);
  max-width: 600px; margin: 0 auto; height: 56px;
}
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: #475569; font-size: 10px; font-weight: 600; }
.nav-item.active { color: #1565c0; }
.nav-icon { font-size: 18px; }
