/* 土台（書体、地、本文の組み方）。tokens.css の後に読む。 */
@font-face{font-family:'Zen Kaku Gothic New';font-style:normal;font-weight:400;font-display:block;src:url('../../fonts/zenkakugothicnew/ZenKakuGothicNew-Regular.ttf') format('truetype')}
@font-face{font-family:'Zen Kaku Gothic New';font-style:normal;font-weight:500;font-display:block;src:url('../../fonts/zenkakugothicnew/ZenKakuGothicNew-Medium.ttf') format('truetype')}
@font-face{font-family:'Zen Kaku Gothic New';font-style:normal;font-weight:700;font-display:block;src:url('../../fonts/zenkakugothicnew/ZenKakuGothicNew-Bold.ttf') format('truetype')}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-tap-highlight-color:transparent;background:var(--c-bg);color:var(--c-ink);font-family:var(--font);font-size:clamp(.9375rem,.6rem + 1.6vw,1.125rem);line-height:1.75;-webkit-text-size-adjust:100%;word-break:auto-phrase;overflow-wrap:anywhere;touch-action:manipulation;letter-spacing:.02em}
body{font-size:var(--t-body)}
/* 本文はベタ組。字を詰める palt は見出しと札とボタンだけ（日本語組版の要件。docs/DESIGN.md 5） */
h1,h2,h3,.tag,.btn,.lead-q,.qbox .qt{font-feature-settings:"palt"}
/* ダブルタップで拡大しない（オーナーの指摘 2026-11-01）。指 2 本の拡大はそのまま */
body{margin:0;min-height:100dvh;padding-bottom:var(--safe-b)}
h1,h2,h3{font-weight:700;line-height:1.35;margin:0}
h1{font-size:var(--t-title)}
h2{font-size:var(--t-lead)}
h3{font-size:var(--t-body)}
p{margin:0}
a{color:var(--c-acc-text);text-decoration:underline;text-underline-offset:.15em;text-decoration-thickness:1px}
a:hover{text-decoration-thickness:2px}
button{font:inherit;color:inherit;background:none;border:0;padding:0;margin:0;cursor:pointer;touch-action:manipulation}
button:disabled{cursor:default;opacity:.5}
:focus-visible{outline:2px solid var(--c-acc);outline-offset:2px}
.nw{white-space:nowrap}
.vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* 数式の字（高校範囲。インラインだけ） */
/* 式の書体：LaTeX と同じ字形（KaTeX のフォント、SIL OFL。docs/licenses.md）。文字は斜体、数字・記号・大文字のギリシャ文字は立体（オーナーの指摘 B2・B4） */
@font-face{font-family:'CosmosMath';font-display:swap;src:url('../../fonts/katex/KaTeX_Math-Italic.woff2') format('woff2');unicode-range:U+41-5A,U+61-7A,U+3B1-3C9,U+3D1,U+3D5,U+3D6}
@font-face{font-family:'CosmosMath';font-display:swap;src:url('../../fonts/katex/KaTeX_Main-Regular.woff2') format('woff2');unicode-range:U+20-40,U+5B-60,U+7B-7E,U+A0-FF,U+391-3A9,U+2010-2027,U+2032,U+2033,U+2190-2193,U+2212,U+221A,U+221E,U+2248,U+2260,U+2264,U+2265,U+27E8,U+27E9}
@font-face{font-family:'CosmosUp';font-display:swap;src:url('../../fonts/katex/KaTeX_Main-Regular.woff2') format('woff2')}
.pr{font-size:.72em;vertical-align:.42em;line-height:0;margin-left:.12em}
.m,.mi{font-family:'CosmosMath',"Times New Roman","Noto Serif JP",serif;font-style:normal;letter-spacing:0}
.m{font-size:1.15em;white-space:nowrap}
.mi{font-size:1.1em;white-space:nowrap}
.mu,.m .u{font-family:'CosmosUp',"Times New Roman",serif;font-style:normal;letter-spacing:0}
.frac-t{font-family:'CosmosMath',"Times New Roman","Noto Serif JP",serif;font-size:.92em;letter-spacing:0;margin:0 .1em}
.mb{display:block;width:fit-content;max-width:100%;margin:.4em 0}   /* 独立した行の式（ja-wrap.js が付ける。オーナーの指摘 B3） */
.m .u{font-style:normal}
.frac{display:inline-flex;flex-direction:column;align-items:center;vertical-align:middle;line-height:1.1;margin:0 .15em;font-size:.95em}
.frac>span:first-child{border-bottom:1px solid currentColor;padding:0 .2em}
.frac>span:last-child{padding:0 .2em}
.vec{position:relative;display:inline-block}
/* ベクトルの矢印：字の幅に合わせて伸びる細い矢印を、斜体の傾きの分だけ右へ寄せて、字のすぐ上に（オーナーの指摘 B4） */
.vec::before{content:"";position:absolute;left:.04em;right:-.14em;top:-.12em;min-width:.6em;height:.36em;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 8' preserveAspectRatio='none'%3E%3Cpath d='M0 4H23M17.5 .6L23.4 4L17.5 7.4' stroke='black' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat center/100% 100%;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 8' preserveAspectRatio='none'%3E%3Cpath d='M0 4H23M17.5 .6L23.4 4L17.5 7.4' stroke='black' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat center/100% 100%}
.vec:not(.m .vec),.bar{font-family:'CosmosMath',"Times New Roman","Noto Serif JP",serif;font-style:normal}.bar{padding:0 .05em}
sup,sub{line-height:0}
/* 図と式のアニメーションは理解のためのものなので、OS の動きを減らす設定でも止めない（オーナーの指摘 2026-11-03、D8） */
