.m-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); align-items: start; }
.m-side { position: sticky; top: 86px; max-height: calc(100vh - 100px); overflow: auto; padding-bottom: 20px; }
.m-side .sbox { display: flex; background: #fff; border-radius: 999px; padding: 4px; border: 1px solid var(--line); }
.m-side .sbox:focus-within { border-color: var(--blue); }
.m-side input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; padding: 7px 14px; }
.m-side .sbox button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; display: grid; place-items: center; cursor: pointer; }
.m-side .sbox button svg { width: 17px; }
.m-hit { margin: 10px 4px 0; font-size: 13px; color: var(--muted); }
.m-hit button { border: 0; background: none; color: var(--blue); text-decoration: underline; cursor: pointer; font-size: 13px; }
.m-toc { margin-top: 18px; font-size: 13.5px; }
.m-toc a { display: flex; gap: 10px; text-decoration: none; padding: 7px 10px; border-radius: 10px; color: var(--muted); line-height: 1.5; }
.m-toc a:hover { background: #fff; color: var(--ink); }
.m-toc a b { flex: none; width: 34px; font: 600 13px/1.6 var(--en); color: var(--sky); letter-spacing: .04em; }
.m-toc a.off { opacity: .3; }
.m-toc .grp { margin: 14px 10px 4px; font-size: 12px; font-weight: 700; color: var(--ink); letter-spacing: .08em; }

.m-page { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(22px, 3vw, 44px); margin-bottom: var(--gap); scroll-margin-top: 90px; }
.m-page[hidden] { display: none; }
.m-pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.m-pagehead .no { font: 700 22px/1 var(--en); color: var(--blue); letter-spacing: .06em; }
.m-pagehead button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--bg); border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer; color: var(--blue); font-weight: 500; }
.m-pagehead button:hover { background: var(--sky-soft); }
.m-pagehead svg { width: 15px; }
.m-page h3, .m-page h4, .m-page h5 { color: var(--navy); line-height: 1.5; letter-spacing: .04em; margin: 1.6em 0 .6em; }
.m-page h3 { font-size: 22px; }
.m-page h4 { font-size: 19px; }
.m-page h5 { font-size: 16.5px; color: var(--blue); }
.m-page > :nth-child(2) { margin-top: 0; }
.m-page p, .m-page li { line-height: 1.95; }
.m-page ol, .m-page ul { padding-left: 1.4em; }
.m-page strong { background: linear-gradient(transparent 62%, #fbeeb8 62%); }
.m-page table { border-collapse: collapse; margin: 0 0 1.4em; font-size: 14px; display: block; overflow-x: auto; max-width: 100%; }
.m-page th, .m-page td { border-bottom: 1px solid var(--line); padding: 9px 14px; text-align: left; vertical-align: top; }
.m-page th { background: #f2f6fb; color: var(--navy); white-space: nowrap; }
.m-page td { min-width: 5em; }
mark { background: #ffe58a; border-radius: 3px; padding: 0 1px; }
.mamma { color: #b4471f; font-size: .9em; }

.scan { border: 0; border-radius: 20px; padding: 18px; width: min(760px, 94vw); max-height: 92vh; box-shadow: 0 30px 80px -20px rgba(14, 27, 62, .5); }
.scan::backdrop { background: rgba(14, 27, 62, .5); backdrop-filter: blur(3px); }
.scan img { display: block; margin: 0 auto; max-width: 100%; max-height: calc(92vh - 90px); width: auto; height: auto; border-radius: 10px; }
.scan-t { margin: 0 0 12px; font-weight: 700; color: var(--navy); }
.close { position: absolute; right: 14px; top: 8px; border: 0; background: none; font-size: 28px; color: var(--muted); cursor: pointer; }

@media (max-width: 900px) {
  .m-layout { grid-template-columns: minmax(0, 1fr); }
  .m-side { position: static; max-height: none; }
  .m-toc { display: none; }
}
