/*
Theme Name: 入夜 Ruye
Theme URI: https://example.invalid/ruye
Author: moban
Description: 深色夜间杂志风格的中文论坛资讯主题。首页由首屏、最近更新、四宫格滚动条、交流方向 A–F 便当格、口号字条、折叠常见问题、适合谁、了解边界组成，全部从分类与标签文章取内容，同一篇文章只出现一次，板块顺序可调；文章页带本文要点、H2 自动目录、一句话答案、出发前核实、同分类上下篇和相关 6 篇。暗夜 / 琥珀两套配色并跟随系统浅色模式。不输出 SEO 标签，不导入演示内容，不加载任何外部资源。
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ruye
*/

/* ---------- 色板 ---------- */
:root,
body {
	--ry-bg: #0b0b0e;
	--ry-fg: #f4f4f5;
	--ry-muted: #232328;
	--ry-mfg: #a1a1aa;
	--ry-accent: #d9e021;
	--ry-on-accent: #0b0b0e;
	--ry-border: #3a3a42;
	--ry-r: 0;
	--ry-wrap: 1200px;
	--ry-gut: 20px;
	--ry-sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
	--ry-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
	color-scheme: dark;
}
body.ry-p-amber {
	--ry-bg: #0c0a09;
	--ry-fg: #f5f5f4;
	--ry-muted: #292524;
	--ry-mfg: #a8a29e;
	--ry-accent: #f5b400;
	--ry-on-accent: #0c0a09;
	--ry-border: #44403c;
}
@media (prefers-color-scheme: light) {
	body.ry-auto-light {
		--ry-bg: #fafaf7;
		--ry-fg: #18181b;
		--ry-muted: #ededE8;
		--ry-mfg: #52525b;
		--ry-accent: #6b7000;
		--ry-on-accent: #fafaf7;
		--ry-border: #d4d4cf;
		color-scheme: light;
	}
	body.ry-auto-light.ry-p-amber { --ry-accent: #8a5300; }
}
body.ry-r-soft { --ry-r: 4px; }

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--ry-bg); color: var(--ry-fg); font: 16px/1.75 var(--ry-sans); overflow-x: hidden; }
body.ry-grained::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 90;
	pointer-events: none;
	opacity: .04;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ry-accent); }
:focus-visible { outline: 2px solid var(--ry-accent); outline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 800; overflow-wrap: anywhere; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
em { font-style: italic; }
.ry-wrap { width: 100%; max-width: calc(var(--ry-wrap) + var(--ry-gut) * 2); margin: 0 auto; padding: 0 var(--ry-gut); }
.ry-sr, .ry-open__sep { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ry-skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--ry-accent); color: var(--ry-on-accent); padding: 10px 16px; font-weight: 700; }
.ry-skip:focus { top: 12px; color: var(--ry-on-accent); }
.ry-main:focus { outline: none; }
.ry-ico { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -.2em; }
.ry-mono { font-family: var(--ry-mono); letter-spacing: .08em; }
.ry-eyebrow, .ry-meta, .ry-crumb, .ry-more, .ry-dir__note, .ry-strip__n, .ry-head__num, .ry-tile__n, .ry-who__n, .ry-qa__n, .ry-toc__n {
	font-family: var(--ry-mono);
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ry-mfg);
}
.ry-eyebrow { font-size: .78rem; margin-bottom: .6rem; }
.ry-meta { font-size: .78rem; display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; }
.ry-meta a:hover { color: var(--ry-accent); }

/* ---------- 按钮 ---------- */
.ry-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 48px; padding: 0 1.4em;
	border: 1px solid var(--ry-fg); border-radius: var(--ry-r);
	font-weight: 700; letter-spacing: .02em; white-space: nowrap;
	transition: background-color .15s, color .15s, border-color .15s;
}
.ry-btn:hover { border-color: var(--ry-accent); color: var(--ry-accent); }
.ry-btn--solid { background: var(--ry-accent); border-color: var(--ry-accent); color: var(--ry-on-accent); }
.ry-btn--solid:hover { background: transparent; color: var(--ry-accent); }
.ry-btn--sm { min-height: 40px; padding: 0 1em; font-size: .9rem; }
.ry-textlink { display: inline-flex; align-items: center; gap: .4em; font-family: var(--ry-mono); font-size: .8rem; letter-spacing: .08em; color: var(--ry-accent); }
.ry-textlink:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 页头 ---------- */
.ry-top { position: sticky; top: 0; z-index: 50; background: var(--ry-bg); border-bottom: 1px solid var(--ry-border); }
.ry-top__bar { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.ry-brand { display: flex; flex-direction: column; line-height: 1.2; margin-right: auto; min-width: 0; }
.ry-brand__name { font-weight: 800; font-size: 1.12rem; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ry-brand__host { font-family: var(--ry-mono); font-size: .7rem; letter-spacing: .08em; color: var(--ry-mfg); }
.ry-brand:hover .ry-brand__name { color: var(--ry-accent); }
.ry-menu { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.ry-nav--wide .ry-menu a { display: block; padding: 6px 0; font-size: .95rem; color: var(--ry-mfg); border-bottom: 1px solid transparent; }
.ry-nav--wide .ry-menu a:hover, .ry-nav--wide .current-menu-item > a { color: var(--ry-fg); border-bottom-color: var(--ry-accent); }
.ry-drawer { display: none; position: relative; }
.ry-drawer > summary {
	list-style: none; cursor: pointer;
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
	border: 1px solid var(--ry-border); border-radius: var(--ry-r); font-weight: 700;
}
.ry-drawer > summary::-webkit-details-marker { display: none; }
.ry-drawer[open] > summary { border-color: var(--ry-accent); color: var(--ry-accent); }
.ry-drawer__panel {
	position: absolute; right: 0; top: calc(100% + 12px); z-index: 60;
	width: min(360px, calc(100vw - var(--ry-gut) * 2));
	max-height: calc(100vh - 100px); overflow-y: auto;
	padding: 20px; background: var(--ry-bg); border: 1px solid var(--ry-border); border-radius: var(--ry-r);
	display: grid; gap: 18px;
}
.ry-drawer__panel .ry-menu { flex-direction: column; gap: 0; }
.ry-drawer__panel .ry-menu a { display: block; padding: 12px 0; border-bottom: 1px solid var(--ry-border); font-weight: 600; }
.ry-drawer__panel .ry-btn { width: 100%; }

/* ---------- 搜索框 ---------- */
.ry-search { display: flex; width: 100%; max-width: 520px; }
.ry-search input {
	flex: 1; min-width: 0; min-height: 46px; padding: 0 14px;
	background: var(--ry-muted); color: var(--ry-fg); border: 1px solid var(--ry-border); border-right: 0;
	border-radius: var(--ry-r) 0 0 var(--ry-r); font: inherit;
}
.ry-search input::placeholder { color: var(--ry-mfg); }
.ry-search button {
	display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; cursor: pointer;
	background: var(--ry-accent); color: var(--ry-on-accent); border: 1px solid var(--ry-accent);
	border-radius: 0 var(--ry-r) var(--ry-r) 0; font: inherit; font-weight: 700;
}

/* ---------- 首屏 ---------- */
.ry-open { padding: clamp(64px, 11vw, 132px) 0 clamp(56px, 8vw, 96px); }
.ry-open__brow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--ry-mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ry-mfg); margin-bottom: 28px; }
.ry-open__code { display: inline-block; padding: 2px 8px; border: 1px solid var(--ry-accent); color: var(--ry-accent); }
.ry-open__title { font-size: clamp(2.4rem, 7vw, 5.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -.01em; max-width: 14em; }
.ry-open__title > span, .ry-open__title > em { display: block; }
.ry-open__title em { color: var(--ry-accent); font-weight: 800; }
.ry-open__intro { max-width: 40em; margin-top: 28px; font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--ry-mfg); }
.ry-open__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---------- 区块 ---------- */
.ry-block { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--ry-border); }
.ry-head { display: flex; align-items: flex-start; gap: clamp(16px, 3vw, 40px); margin-bottom: clamp(32px, 5vw, 56px); }
.ry-head__num { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: .9; font-weight: 700; color: var(--ry-mfg); flex: none; }
.ry-head__text { flex: 1; min-width: 0; }
.ry-head__title, .ry-block-title { font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.12; }
.ry-head__title > span, .ry-head__title > em { display: block; }
.ry-head__title em { color: var(--ry-accent); }
.ry-head__more { align-self: flex-end; font-family: var(--ry-mono); font-size: .8rem; letter-spacing: .08em; }
.ry-head__more a { display: inline-flex; gap: .4em; align-items: center; color: var(--ry-mfg); }
.ry-head__more a:hover { color: var(--ry-accent); }
.ry-block-title { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 28px; }
.ry-more { margin-top: 36px; font-size: .82rem; }
.ry-more a { display: inline-flex; align-items: center; gap: .5em; color: var(--ry-fg); border-bottom: 1px solid var(--ry-accent); padding-bottom: 4px; }
.ry-more a:hover { color: var(--ry-accent); }

/* ---------- 卡片 ---------- */
.ry-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ry-card { display: flex; flex-direction: column; border: 1px solid var(--ry-border); border-radius: var(--ry-r); overflow: hidden; transition: border-color .15s; }
.ry-card:hover, .ry-card:focus-within { border-color: var(--ry-accent); }
.ry-card__media { display: block; aspect-ratio: 16 / 10; background: var(--ry-muted); border-bottom: 1px solid var(--ry-border); overflow: hidden; }
.ry-card__media img, .ry-row__media img { width: 100%; height: 100%; object-fit: cover; }
.ry-card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 24px; flex: 1; }
.ry-card__body .ry-eyebrow { margin: 0; color: var(--ry-accent); }
.ry-card__title { font-size: 1.15rem; line-height: 1.45; font-weight: 700; }
.ry-card__text { color: var(--ry-mfg); font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ry-ph {
	display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 8px;
	width: 100%; height: 100%; padding: 18px; color: var(--ry-mfg);
	font-family: var(--ry-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
	background-color: var(--ry-muted);
	background-image: linear-gradient(var(--ry-border) 1px, transparent 1px), linear-gradient(90deg, var(--ry-border) 1px, transparent 1px);
	background-size: 28px 28px;
}
.ry-ph--1 { background-size: 20px 20px; }
.ry-ph--2 { background-image: radial-gradient(var(--ry-border) 1px, transparent 1.5px); background-size: 14px 14px; }
.ry-ph .ry-ico { width: 34px; height: 34px; color: var(--ry-accent); }

/* ---------- 四宫格条 / 口号字条 ---------- */
.ry-strip, .ry-slogans { border-top: 1px solid var(--ry-border); border-bottom: 1px solid var(--ry-border); }
.ry-strip__view { overflow: hidden; }
.ry-strip__track { display: flex; width: max-content; animation: ry-scroll 48s linear infinite; }
.ry-strip__track--slow { animation-duration: 36s; }
.ry-strip__view:hover .ry-strip__track, .ry-strip__view:focus-within .ry-strip__track { animation-play-state: paused; }
.ry-strip__list, .ry-slogans__list { display: flex; flex: none; }
.ry-strip__cell { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: baseline; width: 340px; padding: 22px 28px; border-right: 1px solid var(--ry-border); }
.ry-strip__n { grid-row: span 2; font-size: 1.6rem; font-weight: 700; color: var(--ry-accent); }
.ry-strip__name { font-weight: 700; font-size: .95rem; }
.ry-strip__post { font-size: .88rem; color: var(--ry-mfg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.ry-strip__post:hover { color: var(--ry-accent); }
.ry-slogans { background: var(--ry-accent); color: var(--ry-on-accent); }
.ry-slogans__list li { display: flex; align-items: center; gap: 28px; padding: 18px 0 18px 28px; font-size: clamp(1.3rem, 3vw, 2.2rem); font-weight: 800; white-space: nowrap; }
.ry-slogans__dot { font-size: .6em; }
@keyframes ry-scroll { to { transform: translateX(-50%); } }

/* ---------- 交流方向 ---------- */
.ry-dirs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.ry-dir {
	display: flex; flex-direction: column; gap: 14px; padding: 26px 26px 22px;
	border: 1px solid var(--ry-border); border-radius: var(--ry-r); transition: border-color .15s;
}
.ry-dir:hover, .ry-dir:focus-within { border-color: var(--ry-accent); }
.ry-dir__brow { display: flex; justify-content: space-between; align-items: center; font-family: var(--ry-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ry-mfg); }
.ry-dir__brow .ry-ico { width: 28px; height: 28px; color: var(--ry-accent); }
.ry-dir__title { font-size: 1.5rem; }
.ry-dir__desc { color: var(--ry-mfg); font-size: .95rem; }
.ry-dir__points li { position: relative; padding-left: 1.4em; font-size: .93rem; margin-top: 4px; }
.ry-dir__points li::before { content: "—"; position: absolute; left: 0; color: var(--ry-accent); }
.ry-dir__posts { border-top: 1px solid var(--ry-border); }
.ry-dir__posts li { border-bottom: 1px solid var(--ry-border); }
.ry-dir__posts a { display: block; padding: 10px 0 10px 1.4em; position: relative; font-size: .93rem; font-weight: 600; }
.ry-dir__posts a::before { content: "→"; position: absolute; left: 0; color: var(--ry-mfg); }
.ry-dir__note { margin-top: auto; padding-top: 4px; font-size: .72rem; }
@media (min-width: 1024px) {
	.ry-dirs--6 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
	.ry-dirs--6 .ry-dir:nth-child(1) { grid-column: span 7; grid-row: span 2; background: var(--ry-muted); }
	.ry-dirs--6 .ry-dir:nth-child(1) .ry-dir__title { font-size: clamp(1.8rem, 3vw, 2.6rem); }
	.ry-dirs--6 .ry-dir:nth-child(2), .ry-dirs--6 .ry-dir:nth-child(3) { grid-column: span 5; }
	.ry-dirs--6 .ry-dir:nth-child(4), .ry-dirs--6 .ry-dir:nth-child(5) { grid-column: span 4; }
	.ry-dirs--6 .ry-dir:nth-child(6) { grid-column: span 4; }
}

/* ---------- 常见问题 ---------- */
.ry-faq__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.ry-faq__grid .ry-head { flex-wrap: wrap; position: sticky; top: 100px; }
.ry-faq__grid .ry-head__more { flex-basis: 100%; }
.ry-faq__list { border-top: 1px solid var(--ry-border); }
.ry-qa { border-bottom: 1px solid var(--ry-border); }
.ry-qa > summary { list-style: none; cursor: pointer; display: flex; align-items: flex-start; gap: 16px; padding: 22px 4px; font-weight: 700; font-size: 1.08rem; }
.ry-qa > summary::-webkit-details-marker { display: none; }
.ry-qa > summary:hover .ry-qa__q { color: var(--ry-accent); }
.ry-qa__n { flex: none; font-size: .8rem; padding-top: .3em; min-width: 2.2em; }
.ry-qa__q { flex: 1; min-width: 0; }
.ry-qa__plus { width: 26px; height: 26px; flex: none; color: var(--ry-accent); transition: transform .2s; }
.ry-qa[open] .ry-qa__plus { transform: rotate(45deg); }
.ry-qa__a { padding: 0 4px 24px calc(2.2em + 20px); display: grid; gap: 12px; justify-items: start; }
.ry-qa__a p { color: var(--ry-mfg); }

/* ---------- 适合谁 ---------- */
.ry-aud__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ry-who { display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--ry-border); border-radius: var(--ry-r); transition: border-color .15s; }
.ry-who:hover, .ry-who:focus-within { border-color: var(--ry-accent); }
.ry-who__n { font-size: 2rem; font-weight: 700; color: var(--ry-accent); line-height: 1; }
.ry-who__name { font-size: 1.2rem; }
.ry-who__desc { color: var(--ry-mfg); font-size: .93rem; }
.ry-who__posts { border-top: 1px solid var(--ry-border); margin-top: auto; }
.ry-who__posts a { display: block; padding: 9px 0; border-bottom: 1px solid var(--ry-border); font-size: .9rem; font-weight: 600; }
.ry-aud__figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.ry-aud__fig { margin: 0; }
.ry-aud__fig img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--ry-border); border-radius: var(--ry-r); }
.ry-aud__fig figcaption { margin-top: 8px; font-family: var(--ry-mono); font-size: .75rem; letter-spacing: .08em; color: var(--ry-mfg); }

/* ---------- 了解边界 ---------- */
.ry-bound__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--ry-border); border-radius: var(--ry-r); }
.ry-bound__col { padding: clamp(24px, 4vw, 44px); }
.ry-bound__col + .ry-bound__col { border-left: 1px solid var(--ry-border); }
.ry-bound__col h3 { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; margin-bottom: 18px; }
.ry-bound__col h3 .ry-ico { color: var(--ry-accent); width: 26px; height: 26px; }
.ry-bound__col--no h3 .ry-ico { transform: rotate(45deg); color: var(--ry-mfg); }
.ry-bound__col li { padding: 12px 0; border-top: 1px solid var(--ry-border); color: var(--ry-mfg); }
.ry-bound__col li strong { color: var(--ry-fg); }
.ry-bound__col a { color: var(--ry-accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 页脚 ---------- */
.ry-foot { border-top: 1px solid var(--ry-border); padding: 56px 0 28px; margin-top: 0; }
.ry-foot__grid { display: grid; grid-template-columns: 2fr 1fr 1.3fr; gap: 40px; }
.ry-foot__name { font-weight: 800; font-size: 1.3rem; margin-bottom: 10px; }
.ry-foot__about p:not(.ry-foot__name) { color: var(--ry-mfg); max-width: 32em; }
.ry-foot__h { font-family: var(--ry-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ry-mfg); margin-bottom: 12px; }
.ry-foot__col .ry-menu { flex-direction: column; gap: 8px; font-size: .93rem; }
.ry-foot__col .ry-menu li { color: var(--ry-mfg); }
.ry-foot__col .ry-menu a { color: var(--ry-fg); }
.ry-foot__col .ry-menu a:hover { color: var(--ry-accent); }
.ry-foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--ry-border); font-size: .8rem; color: var(--ry-mfg); }

/* ---------- 内页通用 ---------- */
.ry-page { padding-top: 28px; padding-bottom: 88px; }
.ry-page--narrow { max-width: calc(800px + var(--ry-gut) * 2); }
.ry-crumb { font-size: .75rem; margin-bottom: 36px; }
.ry-crumb ol { display: flex; flex-wrap: wrap; gap: 4px 0; }
.ry-crumb li { display: flex; align-items: center; min-width: 0; }
.ry-crumb li + li::before { content: "/"; margin: 0 .7em; color: var(--ry-border); }
.ry-crumb a:hover { color: var(--ry-accent); }
.ry-crumb [aria-current] { color: var(--ry-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 32em; }
.ry-page__head { margin-bottom: 40px; display: grid; gap: 14px; }
.ry-page__head .ry-eyebrow { margin: 0; }
.ry-page__title { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.12; }
.ry-page__paged { display: inline-block; margin-left: .5em; font-size: .45em; font-family: var(--ry-mono); color: var(--ry-mfg); vertical-align: middle; }
.ry-page__desc { color: var(--ry-mfg); max-width: 44em; font-size: 1.05rem; }
.ry-empty { padding: 28px; border: 1px dashed var(--ry-border); color: var(--ry-mfg); margin-bottom: 28px; }
.ry-grid3--lead { margin-bottom: 40px; }
.ry-grid3--lead .ry-card__title { font-size: 1.25rem; }
.ry-list { border-top: 1px solid var(--ry-border); }
.ry-row { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--ry-border); }
.ry-row__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--ry-border); border-radius: var(--ry-r); background: var(--ry-muted); }
.ry-row__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ry-row__title { font-size: 1.2rem; line-height: 1.45; font-weight: 700; }
.ry-row__text { color: var(--ry-mfg); font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ry-pager { margin-top: 36px; }
.ry-pager ul { display: flex; flex-wrap: wrap; gap: 8px; }
.ry-pager a, .ry-pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--ry-border); border-radius: var(--ry-r); font-family: var(--ry-mono); font-size: .85rem; }
.ry-pager a:hover { border-color: var(--ry-accent); }
.ry-pager .current { background: var(--ry-accent); color: var(--ry-on-accent); border-color: var(--ry-accent); }
.ry-other { margin-top: 72px; }
.ry-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ry-tile a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 20px; border: 1px solid var(--ry-border); border-radius: var(--ry-r); transition: border-color .15s; }
.ry-tile a:hover { border-color: var(--ry-accent); color: inherit; }
.ry-tile__n { font-size: .75rem; }
.ry-tile__name { font-size: 1.15rem; }
.ry-tile__desc { color: var(--ry-mfg); font-size: .88rem; }
.ry-tile__count { margin-top: auto; display: inline-flex; align-items: center; gap: .4em; font-family: var(--ry-mono); font-size: .75rem; color: var(--ry-accent); }
.ry-page__head .ry-search { margin-top: 8px; }

/* ---------- 文章页 ---------- */
.ry-read { display: block; }
.ry-article { max-width: 780px; min-width: 0; }
.ry-article__head { display: grid; gap: 14px; margin-bottom: 28px; }
.ry-article__head .ry-eyebrow { margin: 0; color: var(--ry-accent); }
.ry-article__title { font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.18; }
.ry-meta .ry-ico { margin-right: 4px; }
.ry-answer { margin-bottom: 24px; padding: 20px 22px; background: var(--ry-muted); border-left: 4px solid var(--ry-accent); border-radius: var(--ry-r); }
.ry-answer__h, .ry-gist__h, .ry-verify__h { display: flex; align-items: center; gap: 8px; font-family: var(--ry-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ry-accent); margin-bottom: 8px; }
.ry-answer__a { font-size: 1.18rem; font-weight: 700; line-height: 1.6; }
.ry-gist { margin-bottom: 28px; padding: 18px 22px; border: 1px dashed var(--ry-border); border-radius: var(--ry-r); color: var(--ry-mfg); }
.ry-gist__h { color: var(--ry-fg); }
.ry-article__cover { margin: 0 0 32px; border: 1px solid var(--ry-border); border-radius: var(--ry-r); overflow: hidden; }
.ry-article__cover img { width: 100%; }
.ry-toc--inline { margin-bottom: 32px; border: 1px solid var(--ry-border); border-radius: var(--ry-r); }
.ry-toc--inline > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-weight: 700; }
.ry-toc--inline > summary::-webkit-details-marker { display: none; }
.ry-toc__count { margin-left: auto; font-family: var(--ry-mono); font-size: .75rem; color: var(--ry-mfg); }
.ry-toc--inline ol { padding: 0 18px 14px; }
.ry-toc ol li a { display: flex; gap: 10px; padding: 7px 0; font-size: .92rem; color: var(--ry-mfg); border-top: 1px solid var(--ry-border); }
.ry-toc ol li a:hover, .ry-toc ol li a[aria-current] { color: var(--ry-accent); }
.ry-toc__n { font-size: .75rem; padding-top: .2em; }
.ry-toc__title { font-family: var(--ry-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ry-mfg); margin-bottom: 10px; }
.ry-read__side { display: none; }
.ry-prose { font-size: 1.06rem; line-height: 1.9; overflow-wrap: break-word; }
.ry-prose > * + * { margin-top: 1.1em; }
.ry-prose h2 { font-size: 1.55rem; margin-top: 2.2em; padding-top: .9em; border-top: 1px solid var(--ry-border); scroll-margin-top: 90px; }
.ry-prose h3 { font-size: 1.22rem; margin-top: 1.8em; }
.ry-prose a { color: var(--ry-accent); text-decoration: underline; text-underline-offset: 3px; }
.ry-prose ul, .ry-prose ol { padding-left: 1.4em; }
.ry-prose ul { list-style: square; }
.ry-prose ol { list-style: decimal; }
.ry-prose li + li { margin-top: .4em; }
.ry-prose li::marker { color: var(--ry-accent); }
.ry-prose blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--ry-accent); color: var(--ry-mfg); }
.ry-prose img { border-radius: var(--ry-r); }
.ry-prose figure { margin-left: 0; margin-right: 0; }
.ry-prose figcaption { font-family: var(--ry-mono); font-size: .78rem; color: var(--ry-mfg); margin-top: 8px; }
.ry-prose pre { overflow-x: auto; padding: 16px; background: var(--ry-muted); border-radius: var(--ry-r); font-family: var(--ry-mono); font-size: .9rem; }
.ry-prose code { font-family: var(--ry-mono); font-size: .9em; }
.ry-prose table { display: block; overflow-x: auto; border-collapse: collapse; max-width: 100%; }
.ry-prose th, .ry-prose td { padding: 8px 12px; border: 1px solid var(--ry-border); text-align: left; }
.ry-verify { margin-top: 40px; padding: 22px 24px; border: 1px solid var(--ry-accent); border-radius: var(--ry-r); }
.ry-verify ul { display: grid; gap: 8px; }
.ry-verify li { position: relative; padding-left: 1.5em; }
.ry-verify li::before { content: "□"; position: absolute; left: 0; color: var(--ry-accent); }
.ry-verify a { color: var(--ry-accent); text-decoration: underline; }
.ry-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 36px; }
.ry-tags span { font-family: var(--ry-mono); font-size: .75rem; letter-spacing: .08em; color: var(--ry-mfg); margin-right: 4px; }
.ry-tags a { padding: 4px 12px; border: 1px solid var(--ry-border); border-radius: var(--ry-r); font-size: .85rem; }
.ry-tags a:hover { border-color: var(--ry-accent); }
.ry-adj { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.ry-adj > div { padding: 18px 20px; border: 1px solid var(--ry-border); border-radius: var(--ry-r); display: grid; gap: 6px; }
.ry-adj > div:hover { border-color: var(--ry-accent); }
.ry-adj span { font-family: var(--ry-mono); font-size: .72rem; letter-spacing: .08em; color: var(--ry-mfg); }
.ry-adj a { font-weight: 700; }
.ry-adj__next { grid-column: 2; text-align: right; }
.ry-related { margin-top: 80px; padding-top: 56px; border-top: 1px solid var(--ry-border); }

/* ---------- 评论 ---------- */
.ry-comments { margin-top: 72px; max-width: 780px; }
.ry-comments__list .comment { padding: 18px 0; border-top: 1px solid var(--ry-border); }
.ry-comments__list .children { padding-left: 24px; }
.ry-comments__list .comment-meta { font-family: var(--ry-mono); font-size: .75rem; color: var(--ry-mfg); }
.ry-comments__reply { font-size: 1.2rem; margin: 28px 0 14px; }
.ry-comments label { display: block; font-size: .85rem; color: var(--ry-mfg); margin-bottom: 4px; }
.ry-comments input[type="text"], .ry-comments input[type="email"], .ry-comments input[type="url"], .ry-comments textarea {
	width: 100%; padding: 10px 12px; background: var(--ry-muted); color: var(--ry-fg); border: 1px solid var(--ry-border); border-radius: var(--ry-r); font: inherit;
}
.ry-comments .comment-form > p { margin-bottom: 14px; }
.ry-comments input[type="submit"] { min-height: 46px; padding: 0 22px; background: var(--ry-accent); color: var(--ry-on-accent); border: 0; border-radius: var(--ry-r); font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- 断点 ---------- */
@media (min-width: 1024px) {
	.ry-read.has-toc { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; align-items: start; }
	.ry-read.has-toc .ry-article { max-width: none; }
	.ry-read__side { display: block; position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; }
	.ry-toc--inline { display: none; }
}
@media (max-width: 1023px) {
	.ry-nav--wide, .ry-top__btn { display: none; }
	.ry-drawer { display: block; }
	.ry-aud__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ry-faq__grid { grid-template-columns: 1fr; gap: 0; }
	.ry-faq__grid .ry-head { position: static; }
	.ry-foot__grid { grid-template-columns: 1fr 1fr; }
	.ry-foot__about { grid-column: 1 / -1; }
	.ry-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.ry-grid3, .ry-aud__grid, .ry-aud__figs { grid-template-columns: 1fr; }
	.ry-dirs { grid-template-columns: 1fr; }
	.ry-bound__cols { grid-template-columns: 1fr; }
	.ry-bound__col + .ry-bound__col { border-left: 0; border-top: 1px solid var(--ry-border); }
	.ry-row { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
	.ry-row__title { font-size: 1.02rem; }
	.ry-adj { grid-template-columns: 1fr; }
	.ry-adj__next { grid-column: auto; text-align: left; }
	.ry-head { flex-direction: column; gap: 12px; }
	.ry-head__more { align-self: flex-start; }
	.ry-strip__cell { width: 280px; padding: 18px 20px; }
	.ry-reading .ry-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); }
	.ry-reading .ry-card__media { border-bottom: 0; border-right: 1px solid var(--ry-border); aspect-ratio: auto; min-height: 100%; }
	.ry-reading .ry-card__body { padding: 14px 16px; gap: 6px; }
	.ry-reading .ry-card__title { font-size: 1rem; }
	.ry-reading .ry-card__text, .ry-reading .ry-ph span { display: none; }
	.ry-reading .ry-ph { align-items: center; justify-content: center; padding: 8px; }
}
@media (max-width: 480px) {
	body { --ry-gut: 16px; }
	.ry-foot__grid { grid-template-columns: 1fr; }
	.ry-row { grid-template-columns: 96px minmax(0, 1fr); }
	.ry-row__text { display: none; }
	.ry-open__btns .ry-btn { flex: 1 1 100%; }
	.ry-dir { padding: 22px 18px 18px; }
	.ry-qa__a { padding-left: 4px; }
	.ry-brand__name { font-size: 1rem; }
}

/* ---------- 减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; }
	.ry-strip__track { animation: none; width: auto; }
	.ry-strip__dup { display: none; }
	.ry-strip__list, .ry-slogans__list { flex-wrap: wrap; }
	.ry-strip__cell { flex: 1 1 260px; }
	.ry-slogans__list li { white-space: normal; }
	.ry-qa__plus { transition: none; }
}
