跳转到内容
打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

MediaWiki:Citizen.css:修订间差异

MediaWiki界面页面
Admin留言 | 贡献
苹果设计系统重构 v2
Admin留言 | 贡献
回滚到 rev 8 (苹果风主题 v1)
标签手工回退
第1行: 第1行:
/*
/* ==========================================================================
* Kuke Wiki — Apple Design System for Citizen
  Kuke Wiki — Apple-inspired theme for Citizen
* 完整重构版 v2. 分层: tokens → 字体 → 排版 → 材质 → 组件 → 首页 → 系统偏好
  覆盖 Citizen 的 OKLCH 分量令牌,整站配色/圆角/字体随之改变。
* 回退方式: 清空本页 (MediaWiki:Citizen.css) 即可恢复 Citizen 原生外观。
  ========================================================================== */
*/


/* ============================================================
/* --- 1. 字体:优先 Apple 系统字体,中文走苹方 ------------------------------ */
  1. DESIGN TOKENS — 覆盖 Citizen 的 OKLCH 分量 (浅色)
  ============================================================ */
:root {
:root {
/* 主色: Apple Blue #0071e3 */
--font-family-citizen-base: -apple-system, BlinkMacSystemFont, 'SF Pro Text',
--color-progressive-oklch__l: 56.29%;
'SF Pro Display', 'Helvetica Neue', 'Segoe UI Variable Text', 'Segoe UI';
--color-progressive-oklch__c: 0.1933;
--font-family-language-base: 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei UI', 'Microsoft YaHei';
--font-family-citizen-serif: 'New York', 'Songti SC', 'Source Han Serif SC';
--font-family-citizen-monospace: 'SF Mono', 'Menlo', 'JetBrains Mono',
'Cascadia Code', 'Consolas';
 
/* Apple 的字距:大字号收紧,正文略松 */
letter-spacing: -0.003em;
}
 
/* --- 2. 配色:Apple Blue #0071e3 / 中性灰阶 -------------------------------- */
:root {
/* 主色相 = #0071e3 的 OKLCH 色相角 */
--color-progressive-oklch__l: 56.3%;
--color-progressive-oklch__c: 0.193;
--color-progressive-oklch__h: 256.16;
--color-progressive-oklch__h: 256.16;
--color-progressive-hsl__h: 211;
--color-progressive-hsl__h: 211;
--color-progressive-hsl__s: 100%;
--color-progressive-hsl__s: 100%;
--color-progressive-hsl__l: 44.5%;
--color-progressive-hsl__l: 45%;


/* 表面: 纯白页面, 极淡冷灰递进 (#fff → #f5f5f7 → #e8e8ed) */
/* 表面:接近 #ffffff / #f5f5f7,几乎无色偏(苹果的灰是中性偏冷) */
--color-surface-0-oklch__l: 100%;
--color-surface-0-oklch__l: 100%;
--color-surface-0-oklch__c: 0.004;
--color-surface-0-oklch__c: 0;
--color-surface-0-oklch__h: 286;
--color-surface-1-oklch__c: 0.003;
--color-surface-0-hsl__h: 240;
--color-surface-2-oklch__c: 0.004;
--color-surface-0-hsl__s: 12%;
--color-surface-3-oklch__c: 0.005;
--color-surface-0-hsl__l: 100%;
--color-surface-4-oklch__c: 0.006;
--delta-lightness-surface-base: -1.5%;
--delta-lightness-surface-base: -2.4%;


/* 文字层级: #1d1d1f / #1d1d1f / #6e6e73 / #86868b */
/* 文字:#1d1d1f 正文,#6e6e73 次要 */
--color-emphasized-oklch__l: 23.16%;
--color-emphasized-oklch__l: 15%;
--color-emphasized-oklch__c: 0.0038;
--color-emphasized-oklch__c: 0.004;
--color-base-oklch__l: 26%;
--color-base-oklch__l: 23.2%;
--color-base-oklch__c: 0.004;
--color-base-oklch__c: 0.004;
--color-subtle-oklch__l: 53.99%;
--color-subtle-oklch__l: 54%;
--color-subtle-oklch__c: 0.0077;
--color-subtle-oklch__c: 0.008;
--color-placeholder-oklch__l: 62.17%;
--color-placeholder-oklch__l: 62%;
--color-placeholder-oklch__c: 0.0074;
--color-placeholder-oklch__c: 0.008;
--color-disabled-oklch__l: 72%;
--color-disabled-oklch__c: 0.006;
 
/* 状态变化更克制 */
--delta-lightness-state-base: 3%;
 
/* 毛玻璃: 苹果导航栏配方 */
--backdrop-filter-frosted-glass: saturate(180%) blur(20px);
 
/* 形状 */
--border-radius-base: 10px;
--border-radius-pill: 980px;
--border-color-base: rgb( 0 0 0 / 0.09 );
 
/* 阴影: 苹果的多层柔和投影, 而非单层黑块 */
--shadow-opacity: 0.06;
--box-shadow-small: 0 1px 2px rgb( 0 0 0 / 0.04 ), 0 1px 1px rgb( 0 0 0 / 0.03 );
--box-shadow-medium: 0 4px 12px rgb( 0 0 0 / 0.06 ), 0 1px 3px rgb( 0 0 0 / 0.05 );
--box-shadow-large: 0 18px 40px rgb( 0 0 0 / 0.10 ), 0 4px 12px rgb( 0 0 0 / 0.06 );
 
/* 缓动 */
--transition-timing-function-ease: cubic-bezier( 0.4, 0, 0.2, 1 );
--transition-timing-function-ease-out: cubic-bezier( 0.16, 1, 0.3, 1 );
--transform-image-hover: scale( 1.035 );


/* --- Apple 私有令牌 (ap- 命名空间) --- */
/* 边框:苹果几乎不用实线边框,用极淡的分隔线 */
--ap-hairline: rgb( 0 0 0 / 0.09 );
--border-color-base: rgb( 0 0 0 / 0.08 );
--ap-hairline-strong: rgb( 0 0 0 / 0.14 );
--border-color-subtle: rgb( 0 0 0 / 0.05 );
--ap-tint: rgb( 255 255 255 / 0.72 );
--border-color-muted: rgb( 0 0 0 / 0.03 );
--ap-fill-quaternary: rgb( 120 120 128 / 0.08 );
--ap-fill-tertiary: rgb( 120 120 128 / 0.12 );
--ap-scrollbar: rgb( 0 0 0 / 0.2 );
--ap-scrollbar-hover: rgb( 0 0 0 / 0.35 );
--ap-accent: #0071e3;
--ap-accent-hover: #0077ed;
--ap-radius-card: 18px;
--ap-radius-panel: 22px;
--ap-ease: cubic-bezier( 0.4, 0, 0.2, 1 );
--ap-ease-out: cubic-bezier( 0.16, 1, 0.3, 1 );


/* 留白节奏 (8pt 网格 × 苹果的宽松倍率) */
/* 阴影:更柔、更散、几乎无色 */
--ap-space-1: 0.5rem;
--shadow-opacity: 0.07;
--ap-space-2: 1rem;
--box-shadow-color-alpha-base: rgb( 0 0 0 / 0.07 );
--ap-space-3: 1.5rem;
--ap-space-4: 2rem;
--ap-space-5: 3rem;
--ap-space-6: 4.5rem;
--ap-space-7: 6.5rem;
}
}


/* --- 暗色: 三种选择器都要覆盖 --- */
/* 暗色:#000 纯黑底 + #0a84ff 提亮蓝,对齐 macOS/iOS 深色模式 */
.skin-theme-clientpref-night,
.skin-theme-clientpref-night,
.skin-theme-clientpref-black {
.skin-theme-clientpref-black {
--color-progressive-oklch__l: 62.43%;
--color-progressive-oklch__l: 62.4%;
--color-progressive-oklch__c: 0.2056;
--color-progressive-oklch__c: 0.206;
--color-progressive-oklch__h: 255.49;
--color-progressive-hsl__l: 58%;
--color-progressive-hsl__h: 211;
--color-surface-0-oklch__l: 11%;
--color-progressive-hsl__s: 100%;
--color-surface-0-oklch__c: 0;
--color-progressive-hsl__l: 52%;
--delta-lightness-surface-base: 3.2%;
 
--color-surface-0-oklch__l: 12%;
--color-surface-0-oklch__c: 0.004;
--color-surface-0-oklch__h: 286;
--color-surface-0-hsl__h: 240;
--color-surface-0-hsl__s: 8%;
--color-surface-0-hsl__l: 7%;
--delta-lightness-surface-base: 2.8%;
 
--color-emphasized-oklch__l: 97%;
--color-emphasized-oklch__l: 97%;
--color-emphasized-oklch__c: 0.003;
--color-emphasized-oklch__c: 0.002;
--color-base-oklch__l: 90%;
--color-base-oklch__l: 88%;
--color-base-oklch__c: 0.004;
--color-base-oklch__c: 0.003;
--color-subtle-oklch__l: 68%;
--color-subtle-oklch__l: 66%;
--color-subtle-oklch__c: 0.008;
--color-subtle-oklch__c: 0.006;
--color-placeholder-oklch__l: 58%;
--border-color-base: rgb( 255 255 255 / 0.1 );
--color-disabled-oklch__l: 45%;
--border-color-subtle: rgb( 255 255 255 / 0.06 );
 
--border-color-base: rgb( 255 255 255 / 0.11 );
--shadow-opacity: 0.5;
--shadow-opacity: 0.5;
--box-shadow-small: 0 1px 2px rgb( 0 0 0 / 0.4 );
--box-shadow-color-alpha-base: rgb( 0 0 0 / 0.5 );
--box-shadow-medium: 0 4px 14px rgb( 0 0 0 / 0.45 );
--box-shadow-large: 0 20px 44px rgb( 0 0 0 / 0.55 );
 
--ap-hairline: rgb( 255 255 255 / 0.11 );
--ap-hairline-strong: rgb( 255 255 255 / 0.18 );
--ap-tint: rgb( 30 30 32 / 0.72 );
--ap-fill-quaternary: rgb( 118 118 128 / 0.18 );
--ap-fill-tertiary: rgb( 118 118 128 / 0.24 );
--ap-scrollbar: rgb( 255 255 255 / 0.22 );
--ap-scrollbar-hover: rgb( 255 255 255 / 0.38 );
--ap-accent: #0a84ff;
--ap-accent-hover: #409cff;
}
}


@media ( prefers-color-scheme: dark ) {
@media ( prefers-color-scheme: dark ) {
.skin-theme-clientpref-os {
.skin-theme-clientpref-os {
--color-progressive-oklch__l: 62.43%;
--color-progressive-oklch__l: 62.4%;
--color-progressive-oklch__c: 0.2056;
--color-progressive-oklch__c: 0.206;
--color-progressive-oklch__h: 255.49;
--color-progressive-hsl__l: 58%;
--color-progressive-hsl__h: 211;
--color-surface-0-oklch__l: 11%;
--color-progressive-hsl__s: 100%;
--color-surface-0-oklch__c: 0;
--color-progressive-hsl__l: 52%;
--delta-lightness-surface-base: 3.2%;
 
--color-surface-0-oklch__l: 12%;
--color-surface-0-oklch__c: 0.004;
--color-surface-0-oklch__h: 286;
--color-surface-0-hsl__h: 240;
--color-surface-0-hsl__s: 8%;
--color-surface-0-hsl__l: 7%;
--delta-lightness-surface-base: 2.8%;
 
--color-emphasized-oklch__l: 97%;
--color-emphasized-oklch__l: 97%;
--color-emphasized-oklch__c: 0.003;
--color-emphasized-oklch__c: 0.002;
--color-base-oklch__l: 90%;
--color-base-oklch__l: 88%;
--color-base-oklch__c: 0.004;
--color-base-oklch__c: 0.003;
--color-subtle-oklch__l: 68%;
--color-subtle-oklch__l: 66%;
--color-subtle-oklch__c: 0.008;
--color-subtle-oklch__c: 0.006;
--color-placeholder-oklch__l: 58%;
--border-color-base: rgb( 255 255 255 / 0.1 );
--color-disabled-oklch__l: 45%;
--border-color-subtle: rgb( 255 255 255 / 0.06 );
 
--border-color-base: rgb( 255 255 255 / 0.11 );
--shadow-opacity: 0.5;
--shadow-opacity: 0.5;
--box-shadow-small: 0 1px 2px rgb( 0 0 0 / 0.4 );
--box-shadow-color-alpha-base: rgb( 0 0 0 / 0.5 );
--box-shadow-medium: 0 4px 14px rgb( 0 0 0 / 0.45 );
--box-shadow-large: 0 20px 44px rgb( 0 0 0 / 0.55 );
 
--ap-hairline: rgb( 255 255 255 / 0.11 );
--ap-hairline-strong: rgb( 255 255 255 / 0.18 );
--ap-tint: rgb( 30 30 32 / 0.72 );
--ap-fill-quaternary: rgb( 118 118 128 / 0.18 );
--ap-fill-tertiary: rgb( 118 118 128 / 0.24 );
--ap-scrollbar: rgb( 255 255 255 / 0.22 );
--ap-scrollbar-hover: rgb( 255 255 255 / 0.38 );
--ap-accent: #0a84ff;
--ap-accent-hover: #409cff;
}
}
}
}


/* ============================================================
/* --- 3. 圆角与毛玻璃:苹果的连续曲率大圆角 -------------------------------- */
  2. 字体栈与渲染
  ============================================================ */
:root {
:root {
--font-family-citizen-base: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', 'Segoe UI Variable Text', 'Segoe UI', Inter;
--border-radius-base: 8px;     /* Citizen 默认 4px */
--font-family-citizen-serif: 'New York', 'Iowan Old Style', 'Source Serif Pro', Georgia;
--border-radius-pill: 980px;   /* apple.com 按钮就是 980px */
--font-family-citizen-monospace: 'SF Mono', ui-monospace, Menlo, 'Cascadia Code', 'JetBrains Mono', Consolas;
--font-family-language-base: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei';
--font-family-language-serif: 'Songti SC', 'Source Han Serif SC', 'Noto Serif CJK SC', SimSun;
--font-family-language-monospace: 'PingFang SC', 'Microsoft YaHei UI';


--font-size-medium: 1.0625rem;
/* 更强的毛玻璃,贴近 macOS 侧栏材质 */
--line-height-content: 1.55;
--backdrop-filter-frosted-glass: saturate( 180% ) blur( 20px );
--font-weight-semi-bold: 590;
--font-weight-bold: 680;
}


html {
/* 苹果标志性缓动曲线 */
-webkit-text-size-adjust: 100%;
--transition-timing-function-ease: cubic-bezier( 0.4, 0, 0.2, 1 );
--transition-timing-function-ease-out: cubic-bezier( 0.25, 0.1, 0.25, 1 );
}
}


body {
/* --- 4. 顶栏:磨砂玻璃 + 极细分隔线 --------------------------------------- */
-webkit-font-smoothing: antialiased;
.citizen-header {
-moz-osx-font-smoothing: grayscale;
background-color: color-mix( in srgb, var( --color-surface-0 ) 72%, transparent );
text-rendering: optimizeLegibility;
-webkit-backdrop-filter: var( --backdrop-filter-frosted-glass );
font-synthesis-weight: none;
backdrop-filter: var( --backdrop-filter-frosted-glass );
letter-spacing: normal;
border-inline-end: 1px solid var( --border-color-subtle );
}
}


/* ============================================================
/* --- 5. 排版:SF 风格的标题层级 ------------------------------------------- */
  3. 排版 — SF 的光学字距对照表
.mw-body h1,
  拉丁文字号越大字距越负; 中文一律 normal (负字距会让汉字粘连)
.mw-body h2,
  ============================================================ */
.mw-body h3,
.mw-body-content,
.citizen-page-heading {
.citizen-body {
font-size: var( --font-size-medium );
line-height: 1.55;
}
 
.mw-parser-output p {
margin: 0 0 1.05em;
text-wrap: pretty;
max-width: 74ch;
}
 
h1,
h2,
h3,
h4,
h5,
h6,
.citizen-page-heading,
.mw-headline {
font-family: var( --font-family-citizen-base ), var( --font-family-language-base ), system-ui, sans-serif;
font-weight: 600;
font-weight: 600;
line-height: 1.1;
letter-spacing: -0.022em;
text-wrap: balance;
line-height: 1.14;
color: var( --color-emphasized );
}
}


.citizen-page-heading,
.mw-body h1,
h1 {
#firstHeading {
font-size: clamp( 2rem, 1.35rem + 2.2vw, 2.75rem );
font-size: 2.5rem;
letter-spacing: -0.021em;
letter-spacing: -0.03em;
line-height: 1.08;
}
}


.mw-parser-output h2 {
/* h2 去掉 Citizen 的下划线,改用留白分隔(苹果不用横线) */
font-size: clamp( 1.5rem, 1.2rem + 1vw, 1.875rem );
.mw-body h2 {
letter-spacing: -0.02em;
margin: 2.6em 0 0.62em;
padding-bottom: 0;
border-bottom: 0;
border-bottom: 0;
line-height: 1.14;
margin-top: 2.2em;
}
font-size: 1.75rem;
 
.mw-parser-output h3 {
font-size: 1.3125rem;
letter-spacing: -0.016em;
margin: 2em 0 0.55em;
line-height: 1.2;
}
}


.mw-parser-output h4 {
.mw-body p {
font-size: 1.125rem;
line-height: 1.62;
letter-spacing: -0.014em;
margin: 1.7em 0 0.5em;
}
}


.mw-parser-output h5,
/* --- 6. 链接:去下划线,hover 才出现(apple.com 的做法) ------------------ */
.mw-parser-output h6 {
.mw-body-content a:not( .mw-ui-button ):not( .cdx-button ) {
font-size: 1rem;
letter-spacing: -0.01em;
margin: 1.5em 0 0.45em;
color: var( --color-subtle );
}
 
/* 第一个标题不要多余的上边距 */
.mw-parser-output > h2:first-child,
.mw-parser-output > h3:first-child {
margin-top: 0;
}
 
/* 中文: 关闭负字距, 放宽行高 */
html:lang( zh ) body,
html:lang( zh-cn ) body,
html:lang( zh-hans ) body,
html:lang( ja ) body,
html:lang( ko ) body {
letter-spacing: normal;
}
 
html:lang( zh ) h1,
html:lang( zh ) h2,
html:lang( zh ) h3,
html:lang( zh ) h4,
html:lang( zh ) h5,
html:lang( zh ) h6,
html:lang( zh ) .citizen-page-heading,
html:lang( zh-cn ) h1,
html:lang( zh-cn ) h2,
html:lang( zh-cn ) h3,
html:lang( zh-cn ) .citizen-page-heading,
html:lang( zh-hans ) h1,
html:lang( zh-hans ) h2,
html:lang( zh-hans ) h3,
html:lang( zh-hans ) .citizen-page-heading {
letter-spacing: -0.003em;
}
 
html:lang( zh ) .mw-parser-output p,
html:lang( zh ) .mw-parser-output li,
html:lang( zh-cn ) .mw-parser-output p,
html:lang( zh-hans ) .mw-parser-output p {
line-height: 1.75;
max-width: 40em;
}
 
/* 强调与小字 */
strong,
b {
font-weight: 600;
color: var( --color-emphasized );
}
 
small,
.citizen-footer__desc,
.citizen-siteStats__label {
font-size: 0.75rem;
letter-spacing: -0.005em;
}
 
/* ============================================================
  4. 链接
  ============================================================ */
.mw-parser-output a:not( .image ):not( .cdx-button ) {
color: var( --ap-accent );
text-decoration: none;
text-decoration: none;
transition: color 0.15s var( --ap-ease );
transition: color 0.2s var( --transition-timing-function-ease );
}
}


.mw-parser-output a:not( .image ):not( .cdx-button ):hover {
.mw-body-content a:not( .mw-ui-button ):not( .cdx-button ):hover {
color: var( --ap-accent-hover );
text-decoration: underline;
text-decoration: underline;
text-underline-offset: 0.2em;
text-underline-offset: 0.2em;
text-decoration-thickness: 0.06em;
text-decoration-thickness: 1px;
}
 
.mw-parser-output a.new,
.mw-parser-output a.new:hover {
color: #d93025;
}
 
/* ============================================================
  5. 材质与形状 — 顶栏 / 侧栏 / 浮层
  ============================================================ */
.citizen-header,
.citizen-sticky-header {
background-color: var( --ap-tint );
-webkit-backdrop-filter: saturate( 180% ) blur( 20px );
backdrop-filter: saturate( 180% ) blur( 20px );
border-color: var( --ap-hairline );
box-shadow: none;
}
}


.citizen-header__inner {
/* --- 7. 按钮:药丸形 + 按压回弹 ------------------------------------------- */
border-bottom: 1px solid var( --ap-hairline );
}
 
.citizen-drawer__card,
.citizen-menu__card,
.citizen-search__card,
.citizen-search-box__card,
.citizen-dropdown .citizen-menu__card,
.citizen-share-dialog {
border-radius: var( --ap-radius-panel );
border: 1px solid var( --ap-hairline );
box-shadow: var( --box-shadow-large );
background-color: var( --color-surface-1 );
-webkit-backdrop-filter: saturate( 180% ) blur( 24px );
backdrop-filter: saturate( 180% ) blur( 24px );
overflow: hidden;
}
 
.citizen-menu__content-list a,
.citizen-drawer__menu a {
border-radius: 8px;
transition: background-color 0.14s var( --ap-ease );
}
 
.citizen-menu__heading {
font-size: 0.6875rem;
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var( --color-placeholder );
}
 
/* ============================================================
  6. 按钮 — 药丸 + 按压回弹
  ============================================================ */
.cdx-button,
.cdx-button,
.citizen-cdx-button--size-large,
.mw-ui-button {
.mw-ui-button {
border-radius: var( --border-radius-pill );
border-radius: var( --border-radius-pill );
font-weight: 500;
font-weight: 500;
letter-spacing: -0.012em;
letter-spacing: -0.01em;
border-color: var( --ap-hairline-strong );
transition: transform 0.15s var( --transition-timing-function-ease ),
transition: background-color 0.16s var( --ap-ease ), transform 0.12s var( --ap-ease ), box-shadow 0.16s var( --ap-ease );
background-color 0.2s var( --transition-timing-function-ease );
}
}


.cdx-button:active,
.cdx-button:active,
.mw-ui-button:active,
.mw-ui-button:active {
.citizen-cdx-button--size-large:active {
transform: scale( 0.96 );
transform: scale( 0.96 );
}
}


.cdx-button--weight-primary,
/* --- 8. 搜索框:iOS 风格圆角胶囊 ------------------------------------------ */
.cdx-button--action-progressive.cdx-button--weight-primary {
background-color: var( --ap-accent );
border-color: transparent;
color: #fff;
box-shadow: none;
}
 
.cdx-button--weight-primary:hover {
background-color: var( --ap-accent-hover );
}
 
.cdx-button--icon-only {
border-radius: var( --border-radius-circle );
}
 
.citizen-page-actions__item .cdx-button,
.citizen-header__item .cdx-button {
border-color: transparent;
}
 
/* ============================================================
  7. 搜索框 — 胶囊 + 内嵌填充
  ============================================================ */
.citizen-search__form,
.citizen-search-box__form,
.citizen-search__input,
.citizen-search__input,
#searchInput {
.citizen-typeahead__input {
border-radius: var( --border-radius-pill );
border-radius: var( --border-radius-pill );
background-color: var( --ap-fill-quaternary );
border-color: transparent;
transition: background-color 0.18s var( --ap-ease ), box-shadow 0.18s var( --ap-ease );
}
}


.citizen-search__form:focus-within,
/* --- 9. 卡片/下拉:更大圆角 + 柔和投影 ------------------------------------ */
.citizen-search-box__form:focus-within {
.citizen-menu__card,
background-color: var( --color-surface-0 );
.citizen-dropdown-details .citizen-menu__card,
box-shadow: 0 0 0 3.5px rgb( 0 113 227 / 0.25 ), var( --box-shadow-medium );
.citizen-search__card {
border-radius: 14px;
box-shadow: 0 8px 32px rgb( 0 0 0 / 0.12 ), 0 2px 8px rgb( 0 0 0 / 0.06 );
}
}


/* ============================================================
/* --- 10. 表格与代码块:圆角化,去掉生硬边框 ------------------------------- */
  8. 内容组件
.wikitable {
  ============================================================ */
border-radius: 12px;
.mw-parser-output table.wikitable {
border-radius: 14px;
border: 1px solid var( --ap-hairline );
border-collapse: separate;
border-collapse: separate;
border-spacing: 0;
border-spacing: 0;
overflow: hidden;
overflow: hidden;
font-size: 0.9375rem;
border: 1px solid var( --border-color-base );
box-shadow: none;
}
}


.mw-parser-output table.wikitable > * > tr > th,
.wikitable > * > tr > th,
.mw-parser-output table.wikitable > * > tr > td {
.wikitable > * > tr > td {
border: 0;
border: 0;
border-bottom: 1px solid var( --ap-hairline );
border-bottom: 1px solid var( --border-color-subtle );
padding: 0.7rem 1rem;
}
}


.mw-parser-output table.wikitable > * > tr:last-child > td {
.wikitable > * > tr:last-child > td {
border-bottom: 0;
border-bottom: 0;
}
}


.mw-parser-output table.wikitable > * > tr > th {
.wikitable > * > tr > th {
background-color: var( --color-surface-2 );
background-color: var( --color-surface-2 );
font-weight: 600;
font-weight: 600;
letter-spacing: -0.008em;
}
}


.mw-parser-output pre,
pre,
.mw-parser-output code,
.mw-highlight pre {
font-family: var( --font-family-citizen-monospace ), monospace;
font-size: 0.875em;
}
 
.mw-parser-output pre,
.mw-highlight pre {
.mw-highlight pre {
border-radius: 12px;
border-radius: 12px;
border: 1px solid var( --ap-hairline );
border: 1px solid var( --border-color-subtle );
background-color: var( --color-surface-1 );
padding: 1rem 1.2rem;
padding: 1rem 1.15rem;
line-height: 1.55;
}
}


.mw-parser-output code {
code,
kbd {
border-radius: 6px;
border-radius: 6px;
padding: 0.12em 0.38em;
background-color: var( --ap-fill-quaternary );
border: 0;
}
}


.mw-parser-output blockquote {
/* --- 11. 图片:圆角 + 悬停微缩放,去掉缩略图边框 -------------------------- */
border-left: 3px solid var( --ap-accent );
.thumbinner,
border-radius: 0 10px 10px 0;
figure[ typeof~='mw:File/Thumb' ] {
background-color: var( --color-surface-1 );
padding: 0.9rem 1.25rem;
margin: 1.6em 0;
font-size: 1.0625rem;
}
 
.mw-parser-output hr {
border: 0;
border-top: 1px solid var( --ap-hairline );
margin: var( --ap-space-5 ) 0;
}
 
.mw-parser-output img,
.mw-parser-output .thumbimage {
border-radius: 12px;
border-radius: 12px;
border: 0;
border: 0;
overflow: hidden;
}
}


.mw-parser-output .thumb .thumbinner {
.mw-body-content img {
border-radius: 14px;
border-radius: 8px;
border: 1px solid var( --ap-hairline );
background-color: var( --color-surface-1 );
padding: 8px;
}
 
/* ============================================================
  9. 页面框架 / 页脚 / 目录
  ============================================================ */
.citizen-page-header {
padding-bottom: var( --ap-space-2 );
}
}


.citizen-page-heading {
/* --- 12. 首页卡片(配合 首页 里的 .kuke-card) ---------------------------- */
margin-bottom: 0.25rem;
}
 
.citizen-toc .citizen-menu__content-list a {
letter-spacing: -0.008em;
font-size: 0.875rem;
}
 
.citizen-footer {
border-top: 1px solid var( --ap-hairline );
background-color: var( --color-surface-1 );
}
 
.citizen-footer__content,
.citizen-footer__bottom {
font-size: 0.75rem;
color: var( --color-subtle );
letter-spacing: -0.004em;
}
 
.citizen-siteStats__item {
border-radius: 12px;
background-color: var( --ap-fill-quaternary );
border: 0;
}
 
/* ============================================================
  10. 首页 — 苹果发布页式分段布局
  ============================================================ */
.kuke-hero {
.kuke-hero {
text-align: center;
text-align: center;
padding: var( --ap-space-7 ) var( --ap-space-2 ) var( --ap-space-6 );
padding: 4rem 1rem 3rem;
margin-bottom: var( --ap-space-4 );
}
}


.kuke-hero__title {
.kuke-hero__title {
font-size: clamp( 2.75rem, 1.6rem + 5.2vw, 5rem );
font-size: clamp( 2.4rem, 6vw, 3.6rem );
font-weight: 640;
font-weight: 600;
line-height: 1.05;
letter-spacing: -0.035em;
letter-spacing: -0.018em;
line-height: 1.06;
margin: 0 0 var( --ap-space-2 );
margin: 0;
text-wrap: balance;
background: linear-gradient( 180deg, var( --color-emphasized ), var( --color-subtle ) );
background-image: linear-gradient( 180deg, var( --color-emphasized ) 0%, var( --color-subtle ) 165% );
-webkit-background-clip: text;
-webkit-background-clip: text;
background-clip: text;
background-clip: text;
color: transparent;
-webkit-text-fill-color: transparent;
}
}


.kuke-hero__sub {
.kuke-hero__sub {
font-size: clamp( 1.0625rem, 0.9rem + 0.7vw, 1.5rem );
font-size: clamp( 1.05rem, 2.2vw, 1.3rem );
line-height: 1.42;
font-weight: 400;
color: var( --color-subtle );
color: var( --color-subtle );
max-width: 34em;
margin-top: 0.7rem;
margin: 0 auto var( --ap-space-4 ) !important;
letter-spacing: 0;
}
 
.kuke-cta {
display: inline-block;
padding: 0.72em 1.75em;
border-radius: var( --border-radius-pill );
background-color: var( --ap-accent );
color: #fff !important;
font-size: 1.0625rem;
font-weight: 500;
letter-spacing: -0.01em;
letter-spacing: -0.01em;
text-decoration: none !important;
margin: 0 0.35rem 0.6rem;
transition: background-color 0.16s var( --ap-ease ), transform 0.12s var( --ap-ease );
}
.kuke-cta:hover {
background-color: var( --ap-accent-hover );
color: #fff !important;
}
.kuke-cta:active {
transform: scale( 0.96 );
}
.kuke-cta--ghost {
background-color: transparent;
color: var( --ap-accent ) !important;
box-shadow: inset 0 0 0 1px var( --ap-accent );
}
.kuke-cta--ghost:hover {
background-color: rgb( 0 113 227 / 0.08 );
color: var( --ap-accent ) !important;
}
.kuke-section {
padding: var( --ap-space-6 ) 0;
border-top: 1px solid var( --ap-hairline );
}
.kuke-section__title {
font-size: clamp( 1.75rem, 1.3rem + 1.8vw, 2.5rem ) !important;
font-weight: 620 !important;
letter-spacing: -0.018em;
text-align: center;
margin: 0 0 0.5em !important;
border: 0 !important;
padding: 0 !important;
text-wrap: balance;
}
.kuke-section__lead {
text-align: center;
color: var( --color-subtle );
font-size: 1.0625rem;
max-width: 36em;
margin: 0 auto var( --ap-space-4 ) !important;
}
}


.kuke-grid {
.kuke-grid {
display: grid;
display: grid;
grid-template-columns: repeat( auto-fit, minmax( 260px, 1fr ) );
grid-template-columns: repeat( auto-fit, minmax( 250px, 1fr ) );
gap: var( --ap-space-2 );
gap: 1.1rem;
margin: 0;
margin: 2rem 0;
padding: 0;
list-style: none;
}
}


.kuke-card {
.kuke-card {
display: block;
padding: var( --ap-space-3 );
border-radius: var( --ap-radius-card );
background-color: var( --color-surface-1 );
background-color: var( --color-surface-1 );
border: 1px solid var( --ap-hairline );
border: 1px solid var( --border-color-subtle );
box-shadow: none;
border-radius: 18px;
transition: transform 0.32s var( --ap-ease-out ), box-shadow 0.32s var( --ap-ease-out ), background-color 0.2s var( --ap-ease );
padding: 1.6rem 1.5rem;
transition: transform 0.3s var( --transition-timing-function-ease ),
box-shadow 0.3s var( --transition-timing-function-ease );
}
}


.kuke-card:hover {
.kuke-card:hover {
transform: translateY( -4px );
transform: translateY( -3px );
box-shadow: var( --box-shadow-large );
box-shadow: 0 12px 32px rgb( 0 0 0 / 0.1 );
}
}


.kuke-card__icon {
.kuke-card h3,
font-size: 1.75rem;
.kuke-card .kuke-card__title {
line-height: 1;
margin: 0 0 0.9rem;
display: block;
font-size: 1.1rem;
margin-bottom: 0.75rem;
font-weight: 600;
letter-spacing: -0.015em;
border: 0;
}
}


.kuke-card__title {
.kuke-card ul {
font-size: 1.1875rem !important;
font-weight: 600 !important;
letter-spacing: -0.014em;
margin: 0 0 0.4rem !important;
border: 0 !important;
padding: 0 !important;
color: var( --color-emphasized );
}
 
.kuke-card__text {
font-size: 0.9375rem !important;
line-height: 1.5 !important;
color: var( --color-subtle );
margin: 0 !important;
max-width: none !important;
}
 
.kuke-stats {
display: grid;
grid-template-columns: repeat( auto-fit, minmax( 150px, 1fr ) );
gap: var( --ap-space-2 );
text-align: center;
margin: 0;
margin: 0;
padding: 0;
list-style: none;
list-style: none;
}
}


.kuke-stat__num {
.kuke-card li {
display: block;
margin: 0.45rem 0;
font-size: clamp( 2rem, 1.5rem + 2vw, 3rem );
font-weight: 620;
letter-spacing: -0.022em;
line-height: 1;
color: var( --ap-accent );
}
}


.kuke-stat__label {
.kuke-card li a {
display: block;
color: var( --color-progressive );
margin-top: 0.4rem;
font-size: 0.8125rem;
color: var( --color-subtle );
}
}


/* ============================================================
/* --- 13. 滚动条:macOS 细窄样式 ------------------------------------------- */
  11. 滚动条 / 选中 / 焦点环
  ============================================================ */
* {
* {
scrollbar-width: thin;
scrollbar-width: thin;
scrollbar-color: var( --ap-scrollbar ) transparent;
scrollbar-color: var( --color-placeholder ) transparent;
}
}


第741行: 第313行:
width: 9px;
width: 9px;
height: 9px;
height: 9px;
}
::-webkit-scrollbar-track {
background: transparent;
}
}


::-webkit-scrollbar-thumb {
::-webkit-scrollbar-thumb {
background-color: var( --ap-scrollbar );
background-color: rgb( 0 0 0 / 0.22 );
border-radius: 980px;
border-radius: 999px;
border: 2px solid transparent;
border: 2px solid transparent;
background-clip: content-box;
background-clip: content-box;
第755行: 第323行:


::-webkit-scrollbar-thumb:hover {
::-webkit-scrollbar-thumb:hover {
background-color: var( --ap-scrollbar-hover );
background-color: rgb( 0 0 0 / 0.38 );
}
}


::selection {
::-webkit-scrollbar-track {
background-color: rgb( 0 113 227 / 0.24 );
background: transparent;
}
}


a:focus-visible,
/* --- 14. 焦点环:Apple 的蓝色柔光 ---------------------------------------- */
button:focus-visible,
:focus-visible {
input:focus-visible,
outline: 2px solid var( --color-progressive );
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.cdx-button:focus-visible {
outline: 2px solid var( --ap-accent );
outline-offset: 2px;
outline-offset: 2px;
border-radius: 8px;
border-radius: 6px;
}
 
/* ============================================================
  12. 系统偏好
  ============================================================ */
@media ( prefers-reduced-motion: reduce ) {
.kuke-card,
.kuke-cta,
.cdx-button {
transition: none;
}
 
.kuke-card:hover {
transform: none;
}
}
 
@media ( max-width: 720px ) {
.kuke-hero {
padding: var( --ap-space-5 ) var( --ap-space-1 ) var( --ap-space-4 );
}
 
.kuke-section {
padding: var( --ap-space-5 ) 0;
}
}
}

2026年8月19日 (三) 15:59的版本

/* ==========================================================================
   Kuke Wiki — Apple-inspired theme for Citizen
   覆盖 Citizen 的 OKLCH 分量令牌,整站配色/圆角/字体随之改变。
   ========================================================================== */

/* --- 1. 字体:优先 Apple 系统字体,中文走苹方 ------------------------------ */
:root {
	--font-family-citizen-base: -apple-system, BlinkMacSystemFont, 'SF Pro Text',
		'SF Pro Display', 'Helvetica Neue', 'Segoe UI Variable Text', 'Segoe UI';
	--font-family-language-base: 'PingFang SC', 'Hiragino Sans GB',
		'Microsoft YaHei UI', 'Microsoft YaHei';
	--font-family-citizen-serif: 'New York', 'Songti SC', 'Source Han Serif SC';
	--font-family-citizen-monospace: 'SF Mono', 'Menlo', 'JetBrains Mono',
		'Cascadia Code', 'Consolas';

	/* Apple 的字距:大字号收紧,正文略松 */
	letter-spacing: -0.003em;
}

/* --- 2. 配色:Apple Blue #0071e3 / 中性灰阶 -------------------------------- */
:root {
	/* 主色相 = #0071e3 的 OKLCH 色相角 */
	--color-progressive-oklch__l: 56.3%;
	--color-progressive-oklch__c: 0.193;
	--color-progressive-oklch__h: 256.16;
	--color-progressive-hsl__h: 211;
	--color-progressive-hsl__s: 100%;
	--color-progressive-hsl__l: 45%;

	/* 表面:接近 #ffffff / #f5f5f7,几乎无色偏(苹果的灰是中性偏冷) */
	--color-surface-0-oklch__l: 100%;
	--color-surface-0-oklch__c: 0;
	--color-surface-1-oklch__c: 0.003;
	--color-surface-2-oklch__c: 0.004;
	--color-surface-3-oklch__c: 0.005;
	--color-surface-4-oklch__c: 0.006;
	--delta-lightness-surface-base: -2.4%;

	/* 文字:#1d1d1f 正文,#6e6e73 次要 */
	--color-emphasized-oklch__l: 15%;
	--color-emphasized-oklch__c: 0.004;
	--color-base-oklch__l: 23.2%;
	--color-base-oklch__c: 0.004;
	--color-subtle-oklch__l: 54%;
	--color-subtle-oklch__c: 0.008;
	--color-placeholder-oklch__l: 62%;
	--color-placeholder-oklch__c: 0.008;

	/* 边框:苹果几乎不用实线边框,用极淡的分隔线 */
	--border-color-base: rgb( 0 0 0 / 0.08 );
	--border-color-subtle: rgb( 0 0 0 / 0.05 );
	--border-color-muted: rgb( 0 0 0 / 0.03 );

	/* 阴影:更柔、更散、几乎无色 */
	--shadow-opacity: 0.07;
	--box-shadow-color-alpha-base: rgb( 0 0 0 / 0.07 );
}

/* 暗色:#000 纯黑底 + #0a84ff 提亮蓝,对齐 macOS/iOS 深色模式 */
.skin-theme-clientpref-night,
.skin-theme-clientpref-black {
	--color-progressive-oklch__l: 62.4%;
	--color-progressive-oklch__c: 0.206;
	--color-progressive-hsl__l: 58%;
	--color-surface-0-oklch__l: 11%;
	--color-surface-0-oklch__c: 0;
	--delta-lightness-surface-base: 3.2%;
	--color-emphasized-oklch__l: 97%;
	--color-emphasized-oklch__c: 0.002;
	--color-base-oklch__l: 88%;
	--color-base-oklch__c: 0.003;
	--color-subtle-oklch__l: 66%;
	--color-subtle-oklch__c: 0.006;
	--border-color-base: rgb( 255 255 255 / 0.1 );
	--border-color-subtle: rgb( 255 255 255 / 0.06 );
	--shadow-opacity: 0.5;
	--box-shadow-color-alpha-base: rgb( 0 0 0 / 0.5 );
}

@media ( prefers-color-scheme: dark ) {
	.skin-theme-clientpref-os {
		--color-progressive-oklch__l: 62.4%;
		--color-progressive-oklch__c: 0.206;
		--color-progressive-hsl__l: 58%;
		--color-surface-0-oklch__l: 11%;
		--color-surface-0-oklch__c: 0;
		--delta-lightness-surface-base: 3.2%;
		--color-emphasized-oklch__l: 97%;
		--color-emphasized-oklch__c: 0.002;
		--color-base-oklch__l: 88%;
		--color-base-oklch__c: 0.003;
		--color-subtle-oklch__l: 66%;
		--color-subtle-oklch__c: 0.006;
		--border-color-base: rgb( 255 255 255 / 0.1 );
		--border-color-subtle: rgb( 255 255 255 / 0.06 );
		--shadow-opacity: 0.5;
		--box-shadow-color-alpha-base: rgb( 0 0 0 / 0.5 );
	}
}

/* --- 3. 圆角与毛玻璃:苹果的连续曲率大圆角 -------------------------------- */
:root {
	--border-radius-base: 8px;      /* Citizen 默认 4px */
	--border-radius-pill: 980px;    /* apple.com 按钮就是 980px */

	/* 更强的毛玻璃,贴近 macOS 侧栏材质 */
	--backdrop-filter-frosted-glass: saturate( 180% ) blur( 20px );

	/* 苹果标志性缓动曲线 */
	--transition-timing-function-ease: cubic-bezier( 0.4, 0, 0.2, 1 );
	--transition-timing-function-ease-out: cubic-bezier( 0.25, 0.1, 0.25, 1 );
}

/* --- 4. 顶栏:磨砂玻璃 + 极细分隔线 --------------------------------------- */
.citizen-header {
	background-color: color-mix( in srgb, var( --color-surface-0 ) 72%, transparent );
	-webkit-backdrop-filter: var( --backdrop-filter-frosted-glass );
	backdrop-filter: var( --backdrop-filter-frosted-glass );
	border-inline-end: 1px solid var( --border-color-subtle );
}

/* --- 5. 排版:SF 风格的标题层级 ------------------------------------------- */
.mw-body h1,
.mw-body h2,
.mw-body h3,
.citizen-page-heading {
	font-weight: 600;
	letter-spacing: -0.022em;
	line-height: 1.14;
}

.mw-body h1,
#firstHeading {
	font-size: 2.5rem;
	letter-spacing: -0.03em;
}

/* h2 去掉 Citizen 的下划线,改用留白分隔(苹果不用横线) */
.mw-body h2 {
	border-bottom: 0;
	margin-top: 2.2em;
	font-size: 1.75rem;
}

.mw-body p {
	line-height: 1.62;
}

/* --- 6. 链接:去下划线,hover 才出现(apple.com 的做法) ------------------ */
.mw-body-content a:not( .mw-ui-button ):not( .cdx-button ) {
	text-decoration: none;
	transition: color 0.2s var( --transition-timing-function-ease );
}

.mw-body-content a:not( .mw-ui-button ):not( .cdx-button ):hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

/* --- 7. 按钮:药丸形 + 按压回弹 ------------------------------------------- */
.cdx-button,
.mw-ui-button {
	border-radius: var( --border-radius-pill );
	font-weight: 500;
	letter-spacing: -0.01em;
	transition: transform 0.15s var( --transition-timing-function-ease ),
		background-color 0.2s var( --transition-timing-function-ease );
}

.cdx-button:active,
.mw-ui-button:active {
	transform: scale( 0.96 );
}

/* --- 8. 搜索框:iOS 风格圆角胶囊 ------------------------------------------ */
.citizen-search__input,
.citizen-typeahead__input {
	border-radius: var( --border-radius-pill );
}

/* --- 9. 卡片/下拉:更大圆角 + 柔和投影 ------------------------------------ */
.citizen-menu__card,
.citizen-dropdown-details .citizen-menu__card,
.citizen-search__card {
	border-radius: 14px;
	box-shadow: 0 8px 32px rgb( 0 0 0 / 0.12 ), 0 2px 8px rgb( 0 0 0 / 0.06 );
}

/* --- 10. 表格与代码块:圆角化,去掉生硬边框 ------------------------------- */
.wikitable {
	border-radius: 12px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	border: 1px solid var( --border-color-base );
}

.wikitable > * > tr > th,
.wikitable > * > tr > td {
	border: 0;
	border-bottom: 1px solid var( --border-color-subtle );
}

.wikitable > * > tr:last-child > td {
	border-bottom: 0;
}

.wikitable > * > tr > th {
	background-color: var( --color-surface-2 );
	font-weight: 600;
}

pre,
.mw-highlight pre {
	border-radius: 12px;
	border: 1px solid var( --border-color-subtle );
	padding: 1rem 1.2rem;
}

code,
kbd {
	border-radius: 6px;
}

/* --- 11. 图片:圆角 + 悬停微缩放,去掉缩略图边框 -------------------------- */
.thumbinner,
figure[ typeof~='mw:File/Thumb' ] {
	border-radius: 12px;
	border: 0;
	overflow: hidden;
}

.mw-body-content img {
	border-radius: 8px;
}

/* --- 12. 首页卡片(配合 首页 里的 .kuke-card) ---------------------------- */
.kuke-hero {
	text-align: center;
	padding: 4rem 1rem 3rem;
}

.kuke-hero__title {
	font-size: clamp( 2.4rem, 6vw, 3.6rem );
	font-weight: 600;
	letter-spacing: -0.035em;
	line-height: 1.06;
	margin: 0;
	background: linear-gradient( 180deg, var( --color-emphasized ), var( --color-subtle ) );
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.kuke-hero__sub {
	font-size: clamp( 1.05rem, 2.2vw, 1.3rem );
	color: var( --color-subtle );
	margin-top: 0.7rem;
	letter-spacing: -0.01em;
}

.kuke-grid {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 250px, 1fr ) );
	gap: 1.1rem;
	margin: 2rem 0;
}

.kuke-card {
	background-color: var( --color-surface-1 );
	border: 1px solid var( --border-color-subtle );
	border-radius: 18px;
	padding: 1.6rem 1.5rem;
	transition: transform 0.3s var( --transition-timing-function-ease ),
		box-shadow 0.3s var( --transition-timing-function-ease );
}

.kuke-card:hover {
	transform: translateY( -3px );
	box-shadow: 0 12px 32px rgb( 0 0 0 / 0.1 );
}

.kuke-card h3,
.kuke-card .kuke-card__title {
	margin: 0 0 0.9rem;
	font-size: 1.1rem;
	font-weight: 600;
	letter-spacing: -0.015em;
	border: 0;
}

.kuke-card ul {
	margin: 0;
	list-style: none;
}

.kuke-card li {
	margin: 0.45rem 0;
}

.kuke-card li a {
	color: var( --color-progressive );
}

/* --- 13. 滚动条:macOS 细窄样式 ------------------------------------------- */
* {
	scrollbar-width: thin;
	scrollbar-color: var( --color-placeholder ) transparent;
}

::-webkit-scrollbar {
	width: 9px;
	height: 9px;
}

::-webkit-scrollbar-thumb {
	background-color: rgb( 0 0 0 / 0.22 );
	border-radius: 999px;
	border: 2px solid transparent;
	background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
	background-color: rgb( 0 0 0 / 0.38 );
}

::-webkit-scrollbar-track {
	background: transparent;
}

/* --- 14. 焦点环:Apple 的蓝色柔光 ---------------------------------------- */
:focus-visible {
	outline: 2px solid var( --color-progressive );
	outline-offset: 2px;
	border-radius: 6px;
}