@charset "utf-8";
/* 日汉大辞典 · 外置样式表 */

/* 扩展区补充字体（ExtB+），字形取天珩全字库，构建 src/build_font_cz303.py。
   范围要与脚本实收码位一致，收 ExtA 时一起改，否则构建报错。 */
@font-face {
	font-family: "日汉大辞典 ExtB";
	src: url("日汉大辞典.extb.ttf") format("truetype");
	unicode-range: U+20000-2FA1F, U+30000-3347F;
}

/* 字体（可选）：要内嵌就把下面注释解开，字体文件放 mdx 同目录 */
/*
@font-face { font-family: "Serif JP"; src: url("SourceHanSerifJP-Regular.otf") format("opentype"); }
@font-face { font-family: "Serif JP Bold"; src: url("SourceHanSerifJP-Bold.otf") format("opentype"); }
@font-face { font-family: "Serif SC"; src: url("SourceHanSerifSC-Regular.otf") format("opentype"); }
@font-face { font-family: "Serif SC Bold"; src: url("SourceHanSerifSC-Bold.otf") format("opentype"); }
@font-face { font-family: "Sans JP"; src: url("SourceHanSansJP-Regular.otf") format("opentype"); }
*/

/* 見出し */
.hd {
	display: block;
	font-family: "日汉大辞典 ExtB", "Times New Roman", "Serif JP", "Hiragino Mincho ProN",
		"Yu Mincho", "Source Han Serif JP", "Noto Serif JP", "Songti SC", "SimSun", serif;
	font-size: 1.28em;
	font-weight: 700;
	line-height: 1.5;
	color: #8a1f11;
	margin: .1em 0 .45em;
	padding: 0 0 .28em;
	border-bottom: 1px solid #ece7df;
	word-wrap: break-word;
}

/* 見出し・中文字形 */
.hd .zh {
	font-family: "日汉大辞典 ExtB", "Times New Roman", "Serif SC", "Songti SC", "SimSun",
		"Source Han Serif SC", "Noto Serif SC", "Hiragino Mincho ProN", serif;
}

/* 読音 */
.hd .kana { color: #8a1f11; }

/* 表記 */
.hd .kanji { color: #a3371f; }

/* 西文表記 */
.hd .lat { color: #6b6660; font-size: .84em; font-weight: 400; }

/* 词素边界符 */
.hd .sep { color: #c9bdab; font-weight: 400; margin: 0 .04em; }

/* 分类标注 */
.hd .mark {
	color: #7f776b;
	font-size: .6em;
	font-weight: 400;
	letter-spacing: .02em;
	margin: 0 .05em 0 .18em;
	vertical-align: .18em;
}

/* 历史假名遣小注 */
.hd .note {
	color: #a89d8c;
	font-size: .72em;
	font-weight: 400;
	letter-spacing: .01em;
	margin: 0 .04em 0 .06em;
}

/* 隐藏读法 */
.read { display: none; }

/* 正文 */
.l {
	font-family: "日汉大辞典 ExtB", "Times New Roman", "Serif SC", "Songti SC", "SimSun",
		"Source Han Serif SC", "Noto Serif SC", "Serif JP", "Hiragino Mincho ProN",
		"Yu Mincho", "Source Han Serif JP", "Noto Serif JP", serif;
	font-size: 1em;
	line-height: 1.85;
	color: #1b1b1b;
	margin: .16em 0;
	word-wrap: break-word;
}

/* 正文・日文段 */
.l .ja {
	font-family: "日汉大辞典 ExtB", "Times New Roman", "Serif JP", "Hiragino Mincho ProN",
		"Yu Mincho", "Source Han Serif JP", "Noto Serif JP", serif;
}

/* 正文・首行 */
.l.f1 { margin-top: .5em; }

/* 义项行 */
.l.f2 { padding-left: 1.25em; text-indent: -1.25em; }

/* 例句 */
.l.ex { color: #4a453e; font-size: .95em; }

/* 强制换行 */
.l.brk { height: .5em; }

/* 义项号 */
.sn { color: #b2312a; font-weight: 700; margin-right: .15em; }

/* 行内元素 */
b { font-weight: 700; }
i { font-style: italic; }
u { text-decoration: underline; }

/* 注音 */
rt { font-size: .55em; font-weight: 400; color: #5c5852; }

/* 外字 */
img.g { height: 1.05em; vertical-align: -.18em; }
span.g { color: inherit; }

/* 义项方框数字（外字 F02B/F02F/F021/F028/F029 → 一二三四五）与方框标记
   （外字 F222-F22B、F0D4/F0D5 → 古语/对义/…、音/训）：同一副方框，文字都不带括号。
   故意用行内盒：框宽＝文字自己的推进宽度，与字形同一来源。inline-block 的
   shrink-to-fit 在这里算出的最大内容宽度偏小（「比较」只算到 22.6px，实际字面
   31.9px），框比字窄，文字会溢到框外压住前一个字。 */
.bx, .lb {
	display: inline;
	padding: 0 .22em;
	border: 1px solid #b8b0a4;
	border-radius: .22em;
	font-size: .84em;
	vertical-align: .04em;
}

/* 标记：颜色浅一点，与义项数字区分；短语不折行 */
.lb { white-space: nowrap; color: #8a8378; }

/* 交叉引用 */
a, a:link, a:visited { color: #1c5fa8; text-decoration: none; }
a:hover, a:focus, a:active { color: #c2410c; }

.xref { border-bottom: 1px dotted #c3bdb2; }
a.xref { border-bottom-color: #9fb8d6; }
a.xref:hover { border-bottom-color: #c2410c; }
span.xref { color: inherit; cursor: default; border-bottom-color: #ded8cd; }

/* 空位标记 */
.unk, .rbmark { display: none; }

/* 同键多条 */
.m {
	display: block;
	margin: .8em 0 0;
	padding: .7em 0 0;
	border-top: 1px dashed #ece7df;
}
.m:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* 别名页・条目（可折的 details.ie / 展开的 div.ix —— 训读词、外来語、撞真键那条）。
   不设背景：阅读器允许用户自设底色，这里铺一层不透明色就会把整页染成一块白板——
   分区只靠边框，底色一律透出去。 */
details.ie, div.ix {
	display: block;
	margin: .1em 0 .25em;
	border: 1px solid #ebe6dd;
	border-radius: 4px;
}
details.ie > summary.it, div.ix > .it {
	display: block;
	padding: .3em .75em;
	list-style: none;
}
details.ie > summary.it { cursor: pointer; }
details.ie > summary.it::-webkit-details-marker { display: none; }
details.ie > summary.it:before { content: "\25B8"; color: #b3a894; margin-right: .45em; }
details.ie[open] > summary.it:before { content: "\25BE"; }
details.ie[open] > summary.it { border-bottom: 1px solid #f1ece4; }
/* 展开条目没有折／收这回事，标题行不用箭头，恒留分隔线 */
div.ix > .it { border-bottom: 1px solid #f1ece4; }
details.ie > summary.it .hd, div.ix > .it .hd {
	display: inline;
	font-size: 1.08em;
	margin: 0;
	padding: 0;
	border-bottom: 0;
}
details.ie > .ib, div.ix > .ib { padding: .45em .8em .6em; }

/* 窄屏 */
@media (max-width: 480px) {
	.hd { font-size: 1.18em; }
	.l { line-height: 1.75; }
	.l.f2 { padding-left: 1.1em; text-indent: -1.1em; }
}
