﻿/* 增量样式 */
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 28px 0 24px; }
a.rn-btn.hero-cta { display: inline-flex; align-items: center; gap: 10px; padding: 14px 30px; border-radius: 999px; }
a.rn-btn.hero-cta svg { width: 17px; height: 17px; transition: transform 0.3s ease; }
a.rn-btn.hero-cta:hover svg { transform: translateX(4px); }
a.rn-btn.hero-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 29px;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--card-text);
}
a.rn-btn.hero-more::before { border-radius: 999px; }
a.rn-btn.hero-more:hover { color: var(--btn-hover-color); }
a.rn-btn.hero-more svg { width: 17px; height: 17px; transition: transform 0.3s ease; }
a.rn-btn.hero-more:hover svg { transform: translateY(3px); }
.rn-comment-area .comment-head { max-width: 800px; margin: 0 auto 34px; text-align: center; }
.rn-comment-area .comment-head .subtitle { display: inline-block; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--color-primary); }
.rn-comment-area .comment-head .title { font-size: 34px; margin: 10px 0 0; color: var(--heading); }
.rn-comment-area .comment-head .gallery-desc { margin: 18px 0 0; font-size: 16px; line-height: 28px; color: var(--body-text); }
.comment-box {
  padding: 34px 30px;
  border-radius: 10px;
  background: var(--background-color-1);
  box-shadow: var(--shadow-1);
}
/* 留言板兜底态：本地预览 / 未放行评论的域名 */
.comment-empty { display: flex; flex-direction: column; align-items: center; padding: 26px 10px; text-align: center; }
.comment-empty__icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 14px; border-radius: 16px; background: var(--background-hover); color: var(--color-primary); box-shadow: var(--inner-shadow); }
.comment-empty__icon svg { width: 24px; height: 24px; }
.comment-empty b { font-size: 16px; font-weight: 400; color: var(--card-text); }
.comment-empty p { margin: 8px 0 0; max-width: 460px; font-size: 14px; line-height: 24px; color: var(--body-text); }
/* ---- Artalk：主题色与字体跟随站点 ---- */
html[data-theme="light"] .artalk,
html[data-theme="dark"] .artalk,
html[data-theme="light"] .atk-layer-wrap,
html[data-theme="dark"] .atk-layer-wrap {
  --at-color-main: var(--color-primary);
  --at-color-light: var(--color-primary);
  --at-color-pink: #ff4d7d;
  --at-color-bg-light: rgba(var(--accent-rgb), 0.08);
  font-family: var(--font-primary);
}
/* 评论列表内部：与卡片底色一致 */
html[data-theme="light"] .artalk,
html[data-theme="dark"] .artalk {
  --at-color-bg: var(--panel-bg);
  --at-color-bg-transl: var(--background-color-1);
  --at-color-bg-grey: var(--background-hover);
  --at-color-bg-grey-transl: var(--background-hover);
  --at-color-border: var(--input-border);
  --at-color-font: var(--card-text);
  --at-color-deep: var(--heading);
  --at-color-sub: var(--body-text);
  --at-color-grey: var(--body-text);
  --at-color-meta: var(--body-text);
  --at-color-gradient: linear-gradient(180deg, transparent, var(--background-color-1));
}
/* 挂载在 body 上的弹层 / 富文本编辑器 */
html[data-theme="light"] .atk-layer-wrap,
html[data-theme="dark"] .atk-layer-wrap {
  --at-color-bg: var(--panel-bg);
  --at-color-bg-transl: var(--panel-bg);
  --at-color-bg-grey: var(--background-hover);
  --at-color-bg-grey-transl: var(--background-hover);
  --at-color-border: var(--input-border);
  --at-color-font: var(--card-text);
  --at-color-deep: var(--heading);
  --at-color-sub: var(--body-text);
  --at-color-grey: var(--body-text);
  --at-color-meta: var(--body-text);
  --at-color-gradient: linear-gradient(180deg, transparent, var(--panel-bg));
}
/* ---- 昵称 / 邮箱 / 网址：补一层可见描边 ----
   只落到单行 input（:not() 反选排除复选框 / file / 按钮），**内容框 textarea 不加边框**（它是本站唯一的大块输入区）。
   不用 Artalk 的 --at-color-border（暗色下等于 --input-bg，描了等于没描），改取按明暗分档的中性色：暗色白 14% / 亮色黑 12% */
html[data-theme="dark"] .artalk,
html[data-theme="dark"] .atk-layer-wrap { --owo-field-border: rgba(255, 255, 255, 0.14); }

html[data-theme="light"] .artalk,
html[data-theme="light"] .atk-layer-wrap { --owo-field-border: rgba(0, 0, 0, 0.12); }

.artalk input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="file"]):not([type="button"]),
.atk-layer-wrap input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="file"]):not([type="button"]) {
  border: 1px solid var(--owo-field-border, rgba(128, 128, 128, 0.24));
  transition: border-color var(--transition), box-shadow var(--transition);
}

/* 聚焦反馈与站点其它输入框同一套：主色描边 + 一圈柔光 */
.artalk input:focus,
.atk-layer-wrap input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
  outline: none;
}

@media only screen and (max-width: 767px) {
  .rn-comment-area .comment-head .title { font-size: 26px; }
  .comment-box { padding: 24px 16px; }
}

/* =========================================================
   顶栏配色切换：变量表在 style.css「1.1 配色方案」，这里只管组件外观
   ========================================================= */
.accent-picker { position: relative; flex: none; }

/* 触发器复用 .header-icon-btn 的方块外观（与 GitHub、汉堡同规格），内容换成调色板图标并取 --color-primary，
   图标颜色本身就是当前配色。浮层里只有配色与亮暗两组，min-width 按最宽那行算：10+16+10+56+10+15+10 = 127 → 留 140px */
.accent-picker__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  min-width: 140px;
  max-width: calc(100vw - 24px);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 14px;
  border: 1px solid var(--separator);
  background: var(--panel-bg);
  box-shadow: var(--shadow-float);
}
/* [hidden] 自带的 display:none 会被上面的 flex 覆盖，这里补回来 */
.accent-picker__menu[hidden] { display: none; }

.accent-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--card-text);
  font-family: var(--font-primary);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

/* hover 只在真的能悬停的设备上生效：触摸设备 tap 之后浏览器会一直保持 hover 态，
   最后点过的那一行便会一直亮着，看着像被选中（用户反馈的「触摸后背景不恢复」） */
@media (hover: hover) and (pointer: fine) {
  .accent-opt:hover { background: var(--background-hover); color: var(--color-primary); }
}

.accent-opt[aria-pressed="true"] { background: var(--background-hover); }

.accent-opt__swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex: none;
  background: var(--sw);
}

/* 四字名称不换行；所需宽度已由 .accent-picker__menu 的 min-width 预留 */
.accent-opt__name { flex: 1 1 auto; text-align: left; white-space: nowrap; }

.accent-opt__tick {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--color-primary);
  opacity: 0;
  transition: opacity var(--transition);
}

.accent-opt[aria-pressed="true"] .accent-opt__tick { opacity: 1; }

/* 色块取样自 style.css 的配色变量表，两处颜色需保持一致 */
.accent-opt[data-accent="red"] { --sw: #ff014f; }
.accent-opt[data-accent="teal"] { --sw: #009688; }
.accent-opt[data-accent="indigo"] { --sw: #5e72e4; }
.accent-opt[data-accent="clay"] { --sw: #e88b66; }

/* 下拉里的两组控件共用同一套「行」外观：整行可点、8px/10px 内边距、9px 圆角，
   与 .accent-opt 保持一致（配色行 hover 会亮起，滑轨行按用户要求不变底色） */

/* 分组线：把「选配色」与「亮暗」两段分开 */
.accent-picker__sep {
  height: 1px;
  margin: 5px 6px;
  background: var(--separator);
}

/* 亮暗切换：整行是一个 role="switch" 按钮 —— 左太阳（典雅白）、右月亮（静谧黑），中间是轨道；
   图标高亮与滑块靠哪一端都跟着 aria-checked 走（applyTheme() 维护）；hover 不变底色（用户要求）。
   Remix 图标不带宽高属性，尺寸必须显式给（见 style.css 的 :where(svg.ri-icon)） */
.theme-slider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}

.theme-slider__ico {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--color-subtitle);
  opacity: 0.45;
  transition: opacity var(--transition), color var(--transition);
}

.theme-slider__track {
  position: relative;
  flex: 1 1 auto;
  height: 18px;
  border-radius: 9px;
  background: var(--background-color-1);
  box-shadow: var(--inner-shadow);
}

.theme-slider__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-subtitle);
  transition: left var(--transition), right var(--transition), background var(--transition);
}

/* 滑块靠两端定位，不依赖轨道实际宽度，省掉一次百分比换算；
   left / right 不能同时过渡（另一端是 auto），所以两态各写一份 */
.theme-slider[aria-checked="false"] .theme-slider__thumb { left: auto; right: 2px; }

.theme-slider[aria-checked="true"] .theme-slider__thumb { background: var(--color-primary); }

.theme-slider[aria-checked="true"] .theme-slider__ico--sun,
.theme-slider[aria-checked="false"] .theme-slider__ico--moon {
  color: var(--color-primary);
  opacity: 1;
}

/* 简繁切换：顶栏单独一枚按钮，外壳复用 .header-icon-btn，里面放两个汉字字形（图标子集里没有能表达「读哪种中文」的图标）。
   互斥显隐看按钮自己的 data-encoding（syncLangUI() 维护）：显示「繁」＝当前简体、点一下变繁体；显示「简」＝当前繁体。
   字形不随语言变，因为整棵子树被 tc_sc.js 的 __inTranslateButton() 跳过 */
.lang-ico {
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
}

.lang-btn[data-encoding="2"] .lang-ico--simp,
.lang-btn[data-encoding="1"] .lang-ico--trad { display: none; }

/* 窄屏按钮收到 36 / 31px，字形跟着收一档，免得在方块里顶到边 */
@media only screen and (max-width: 575px) { .lang-ico { font-size: 14px; } }
@media only screen and (max-width: 380px) { .lang-ico { font-size: 13px; } }

/* 注：上面 .accent-picker__menu 刻意用 right: 0 右对齐触发器（而不是左对齐）——
   左对齐时浮层会从触发器往右伸出屏幕，右对齐向左伸则不会越界；
   宽度上限由 max-width 兜底 */

/* 图片懒加载的淡入：解码完成后才显现，长列表滚动时不再一张张「跳」出来。
   初始的 opacity: 0 由 .js-images 门控 —— 它是 app.js 跑起来后打在 <html> 上的标记，
   脚本不可用时图片照常显示，不会因等不到 .is-loaded 而永久留白 */
.js-images img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.32s ease;
}

.js-images img[loading="lazy"].is-loaded { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .js-images img[loading="lazy"] { transition: none; }
}

