/* ==========================================================================
   个人主页 · 水下 Y2K / iPhone 4 风格样式
   --------------------------------------------------------------------------
   目录
   01 主题变量      02 基础重置      03 水下场景      04 排版
   05 玻璃面板      06 页头导航      07 Hero 窗口     08 区块标题
   09 关于          10 作品卡片      11 文章列表      12 联系
   13 页脚          14 文章页        15 按钮与小组件  16 动画
   17 响应式
   ========================================================================== */

/* --------------------------------------------------------------------------
   01 主题变量
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* 布局 */
  --edge: clamp(0.75rem, 3vw, 2.5rem);
  /* 宽屏时内容栏跟着变宽，避免两侧空出太多水面 */
  --container: min(76rem, max(68rem, 66vw));
  --radius: 22px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --radius-full: 999px;

  /* 玻璃面板 */
  --panel: rgba(240, 253, 255, 0.67);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --panel-line: rgba(255, 255, 255, 0.9);
  --panel-gloss: rgba(255, 255, 255, 0.95);
  --panel-edge: rgba(6, 70, 95, 0.16);

  /* 文字 */
  --ink: #06303f;
  --ink-2: #14586f;
  --ink-3: #3e7387;
  --on-dark: #eafaff;

  /* 强调色 */
  --accent: #0a7599;
  --accent-2: #0f9fc6;
  --accent-ink: #ffffff;
  --accent-soft: rgba(15, 159, 198, 0.14);
  --glow: rgba(150, 240, 255, 0.6);

  /* 阴影 */
  --shadow-panel: inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 1px 0 0 rgba(255, 255, 255, 0.55),
    inset -1px 0 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(6, 60, 80, 0.07),
    0 26px 54px -30px rgba(1, 45, 62, 0.58), 0 2px 6px rgba(1, 45, 62, 0.1),
    0 0 0 1px rgba(6, 70, 95, 0.06);
  --shadow-soft: 0 12px 24px -16px rgba(1, 45, 62, 0.45);
  --shadow-pop: 0 20px 40px -22px rgba(1, 45, 62, 0.6);

  /* 字体：2010 年前后就是 Helvetica 的天下 */
  --font-sans: "Helvetica Neue", Helvetica, Arial, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas,
    "Liberation Mono", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.3s;
  --header-h: 4.6rem;
}

/* --------------------------------------------------------------------------
   02 基础重置
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  background: #063445;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.97rem + 0.12vw, 1.0625rem);
  line-height: 1.75;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0 0 1.1em;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(120, 235, 255, 0.55);
  color: #03202c;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 滚动条：浅色轨道 + 水蓝色滑块 */
html {
  scrollbar-width: thin;
  scrollbar-color: #7fd8ef rgba(255, 255, 255, 0.66);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.66);
}

::-webkit-scrollbar-thumb {
  border: 2px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, #eafcff, #7fd8ef 45%, #2a9cbe);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffffff, #8fe4f7 45%, #1f8fb0);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 300;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.875rem;
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   03 水下场景：浅海 + 阳光 + 光束 + 像素气泡
   -------------------------------------------------------------------------- */
.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  /* 用一张实拍水面照当底：换图只改下面这一行 */
  background: #9fe9fa url("../img/bg-water.jpg") center / cover no-repeat;
}

/* 水面正上方的太阳光晕 */
/* 四周白色柔化：掩盖底图像素不足 */
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      120% 100% at 50% 50%,
      rgba(255, 255, 255, 0) 42%,
      rgba(255, 255, 255, 0.35) 68%,
      rgba(248, 254, 255, 0.82) 88%,
      #ffffff 100%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 18%, rgba(255, 255, 255, 0) 82%, rgba(255, 255, 255, 0.6));
  pointer-events: none;
}

/* 四周压暗，突出中间的玻璃窗口（浅海不那么狠） */
.scene__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 90% at 50% 32%,
    transparent 56%,
    rgba(2, 62, 84, 0.24) 100%
  );
  mix-blend-mode: multiply;
}

/* --------------------------------------------------------------------------
   04 排版
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* --------------------------------------------------------------------------
   05 玻璃面板：整页的「窗口」都靠这一组变量
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--edge);
}

/* 面板外框 */
.hero,
.section,
.page-head,
.post {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-top-color: var(--panel-gloss);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
  -webkit-backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
}

/* Windows 风格的窗口标题栏 */
.window-bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 2.6rem;
  padding-inline: 0.9rem;
  border-bottom: 1px solid var(--panel-edge);
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.94),
    rgba(219, 245, 252, 0.7)
  );
  font-size: 0.75rem;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  user-select: none;
}

.window-bar__dots {
  display: flex;
  gap: 0.4rem;
}

.window-bar__dots i {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.85),
    0 0 0 1px rgba(6, 60, 80, 0.18);
}

.window-bar__dots i:nth-child(1) {
  background: linear-gradient(180deg, #ff9e9e, #e84545);
}

.window-bar__dots i:nth-child(2) {
  background: linear-gradient(180deg, #ffe08a, #e8a723);
}

.window-bar__dots i:nth-child(3) {
  background: linear-gradient(180deg, #a8f09a, #3fa838);
}

.window-bar__title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  max-width: 60%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 面板共用内边距 */
.hero,
.page-head,
.post,
.section {
  padding: clamp(1.35rem, 3.2vw, 2.5rem) clamp(1.25rem, 3.2vw, 2.6rem);
}

/* 标题栏占位 */
.hero,
.page-head,
.post {
  padding-top: clamp(3.35rem, 5vw, 3.6rem);
}

/* 面板里的 container 不再放大 */
.hero > .container,
.page-head > .container,
.section > .container,
.post > .container {
  max-width: none;
  padding-inline: 0;
}

/* --------------------------------------------------------------------------
   06 页头：悬浮的玻璃胶囊
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.6rem var(--edge) 0.35rem;
}

/* 页头后面的一层柔焦，避免内容从缝隙里透出来 */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: linear-gradient(
    180deg,
    rgba(230, 250, 255, 0.35),
    rgba(230, 250, 255, 0)
  );
  mask-image: linear-gradient(180deg, #000 55%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  pointer-events: none;
}

.site-header__inner {
  position: relative;
  width: 100%;
  max-width: var(--container);
  min-height: var(--header-h);
  margin-inline: auto;
  padding: 0.45rem 0.5rem 0.45rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--panel-line);
  border-top-color: var(--panel-gloss);
  border-radius: var(--radius-full);
  background: var(--panel-strong);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  transition: box-shadow var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.site-header.is-scrolled .site-header__inner {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 18px 34px -20px rgba(1, 45, 62, 0.6);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  border: 1px solid #0a6b8a;
  background: linear-gradient(180deg, #8fe6ff 0%, #3fb9dd 46%, #0f8fb3 54%, #0a6f90 100%);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
  text-shadow: 0 -1px 0 rgba(0, 50, 70, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -2px 4px rgba(0, 40, 60, 0.25), 0 1px 2px rgba(1, 45, 62, 0.3);
  transition: transform var(--dur) var(--ease);
}

.brand__mark:hover {
  transform: rotate(-6deg) scale(1.06);
}

.brand__text {
  transition: color var(--dur) var(--ease);
}

.brand__text:hover {
  color: var(--accent);
}

.nav {
  margin-left: auto;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
}

.nav__link {
  display: inline-block;
  padding: 0.42rem 0.85rem;
  border-radius: var(--radius-full);
  color: var(--ink-2);
  font-size: 0.9375rem;
  transition: color var(--dur) var(--ease),
    background-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.nav__link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.nav__link.is-active,
.nav__link[aria-current="page"] {
  color: var(--accent-ink);
  background: linear-gradient(180deg, #7fdcf5 0%, #23a5cb 48%, #0d86aa 52%, #0a7293 100%);
  text-shadow: 0 -1px 0 rgba(0, 50, 70, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 5px rgba(0, 40, 60, 0.2), 0 2px 5px rgba(1, 45, 62, 0.25);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(222, 245, 252, 0.7));
  color: var(--ink-2);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(1, 45, 62, 0.12);
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.icon-btn:hover {
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 10px -4px rgba(1, 45, 62, 0.4);
}

.icon-btn:active {
  transform: translateY(0) scale(0.96);
}

.icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 2px;
  margin: -1px 0 0 -0.5rem;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle span:nth-child(1) {
  transform: translateY(-6px);
}

.nav-toggle span:nth-child(2) {
  transform: translateY(0);
}

.nav-toggle span:nth-child(3) {
  transform: translateY(6px);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   07 Hero：主窗口
   -------------------------------------------------------------------------- */
.hero {
  width: min(100% - 2 * var(--edge), var(--container));
  margin: 0.9rem auto clamp(0.9rem, 1.6vw, 1.4rem);
  overflow: hidden;
}

/* 水面反光，压在标题栏下面 */
.hero::after {
  content: "";
  position: absolute;
  inset: 2.6rem 0 auto;
  height: 62%;
  background:
    linear-gradient(
      112deg,
      rgba(255, 255, 255, 0.6) 0%,
      rgba(255, 255, 255, 0.12) 26%,
      rgba(255, 255, 255, 0) 42%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.35),
      rgba(255, 255, 255, 0) 70%
    );
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   08 区块标题
   -------------------------------------------------------------------------- */
.section {
  width: min(100% - 2 * var(--edge), var(--container));
  margin: clamp(0.9rem, 1.6vw, 1.4rem) auto;
}

.section__kicker {
  display: inline-block;
  margin: 0 0 0.65rem;
  padding: 0.22rem 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(180deg, #63cdec 0%, #1a93b8 52%, #0d7fa2 100%);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 -1px 0 rgba(0, 60, 80, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 3px 8px -4px rgba(1, 45, 62, 0.5);
}

.section__link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.5);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: color var(--dur) var(--ease),
    background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.section__link:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
}

.section__link::after {
  content: "→";
  transition: transform var(--dur) var(--ease);
}

.section__link:hover::after {
  transform: translateX(3px);
}

.tag {
  padding: 0.18rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, #ffffff, #d6f2fa);
  color: var(--ink-2);
  font-size: 0.8125rem;
  line-height: 1.7;
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(1, 45, 62, 0.12);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-sm);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.86),
    rgba(255, 255, 255, 0.58)
  );
  box-shadow: inset 0 1px 0 #fff, 0 12px 24px -18px rgba(1, 45, 62, 0.5);
  transition: transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 1);
  box-shadow: inset 0 1px 0 #fff, 0 22px 36px -20px rgba(1, 45, 62, 0.55);
}

.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card__index {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.card__arrow {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 6px;
  border: 1px solid rgba(10, 110, 140, 0.25);
  background: linear-gradient(180deg, #f2fdff, #cfeefa);
  color: var(--accent);
  font-size: 0.8rem;
  box-shadow: inset 0 1px 0 #fff;
  transition: transform var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.card:hover .card__arrow {
  transform: translate(2px, -2px);
  background: linear-gradient(180deg, #b9f0ff, #7fd9f2);
}

.card__title {
  font-size: 1.08rem;
  color: var(--ink);
}

.card__desc {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.72;
}

.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* --------------------------------------------------------------------------
   11 文章列表
   -------------------------------------------------------------------------- */
.post-list {
  list-style: none;
  display: grid;
}

.post-item + .post-item {
  border-top: 1px solid rgba(6, 70, 95, 0.1);
}

.post-item__link {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1rem 0.6rem;
  border-radius: var(--radius-xs);
  transition: background-color var(--dur) var(--ease);
}

.post-item__link:hover {
  background: rgba(255, 255, 255, 0.45);
}

.post-item__date {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.post-item__body {
  display: grid;
  gap: 0.2rem;
}

.post-item__title {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  transition: color var(--dur) var(--ease);
}

.post-item__link:hover .post-item__title {
  color: var(--accent);
}

.post-item__summary {
  color: var(--ink-3);
  font-size: 0.8438rem;
  line-height: 1.65;
}

.post-item__arrow {
  color: var(--accent);
  transition: transform var(--dur) var(--ease);
}

.post-item__link:hover .post-item__arrow {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   13 页脚
   -------------------------------------------------------------------------- */
.site-footer {
  width: min(100% - 2 * var(--edge), var(--container));
  margin: 0.4rem auto 1.5rem;
  padding: 0.85rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  color: var(--ink-2);
  font-size: 0.8rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
}

.site-footer p {
  margin: 0;
}

.site-footer__links {
  display: flex;
  gap: 1rem;
  list-style: none;
}

.site-footer__links a:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   14 文章页与内页
   -------------------------------------------------------------------------- */
.page-head {
  width: min(100% - 2 * var(--edge), var(--container));
  margin: 0.9rem auto clamp(0.9rem, 1.6vw, 1.4rem);
}

.section--tight {
  padding-top: clamp(1.1rem, 2.4vw, 1.8rem);
}

/* 文章主体 */
.post {
  width: min(100% - 2 * var(--edge), 56rem);
  margin: 0.9rem auto 0;
}

.post__header {
  max-width: 42rem;
  margin-inline: auto;
}

.post__back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 1.1rem;
  padding: 0.28rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-2);
  font-size: 0.78rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.post__back:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.85);
}

.post__title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.25;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin: 1rem 0 0;
  color: var(--ink-3);
  font-size: 0.78rem;
}

.post__meta span::before {
  content: "·";
  margin-right: 0.95rem;
  color: rgba(6, 70, 95, 0.3);
}

.post__meta span:first-child::before {
  display: none;
}

.prose {
  max-width: 42rem;
  margin-inline: auto;
  padding-top: 1.8rem;
  color: var(--ink-2);
}

.prose > * + * {
  margin-top: 1.3em;
}

.prose h2,
.prose h3,
.prose h4 {
  color: var(--ink);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.prose h2 {
  margin-top: 2.2em;
  font-size: 1.45em;
}

.prose h3 {
  margin-top: 1.8em;
  font-size: 1.18em;
}

.prose .prose__lede {
  font-size: 1.1em;
  color: var(--ink);
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur) var(--ease);
}

.prose a:hover {
  text-decoration-thickness: 2px;
}

.prose strong {
  color: var(--ink);
  font-weight: 700;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose li::marker {
  color: var(--accent);
}

.prose blockquote {
  margin: 1.8em 0;
  padding: 0.7em 1.2em;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
  font-size: 1.03em;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose :not(pre) > code {
  padding: 0.12em 0.4em;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 5px;
  background: linear-gradient(180deg, #ffffff, #d9f3fb);
  color: #0a6a8c;
  font-size: 0.85em;
  box-shadow: inset 0 1px 0 #fff;
}

/* 代码块：一小块深水终端 */
.prose pre {
  position: relative;
  margin-block: 1.6em;
  padding: 1.2rem 1.15rem;
  border: 1px solid rgba(140, 235, 255, 0.25);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #062b3a, #031c27);
  overflow-x: auto;
  line-height: 1.7;
  box-shadow: inset 0 1px 0 rgba(180, 245, 255, 0.16),
    0 14px 26px -18px rgba(0, 20, 30, 0.75);
}

.prose pre code {
  color: #c8f6ff;
  font-size: 0.85rem;
}

.prose hr {
  margin-block: 2.4em;
  border: 0;
  border-top: 1px solid rgba(6, 70, 95, 0.15);
}

.prose img {
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 30px -20px rgba(1, 45, 62, 0.6);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}

.prose th,
.prose td {
  padding: 0.55em 0.7em;
  border-bottom: 1px solid rgba(6, 70, 95, 0.12);
  text-align: left;
}

.prose th {
  color: var(--ink);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.4);
}

.copy-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(140, 235, 255, 0.35);
  border-radius: 5px;
  background: rgba(140, 235, 255, 0.12);
  color: #a8ecff;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.prose pre:hover .copy-btn,
.copy-btn:focus-visible {
  opacity: 1;
}

.copy-btn:hover {
  background: rgba(140, 235, 255, 0.24);
}

.post__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 42rem;
  margin: 2.2rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(6, 70, 95, 0.12);
  color: var(--ink-3);
  font-size: 0.8125rem;
}

.post__foot p {
  margin: 0;
}

.post__foot a {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   15 按钮与小组件
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.62rem 1.25rem;
  border: 1px solid #0a6b8a;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), filter var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

/* 果冻按钮：上半部分一道高光 */
.btn--primary {
  background: linear-gradient(
    180deg,
    #8ee7fb 0%,
    #3fb8d9 38%,
    #1286aa 52%,
    #065c7a 100%
  );
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 45, 62, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -2px 6px rgba(0, 45, 65, 0.3), 0 6px 14px -6px rgba(1, 45, 62, 0.6);
}

.btn--primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -2px 6px rgba(0, 45, 65, 0.3), 0 10px 18px -8px rgba(1, 45, 62, 0.65);
}

.btn:active {
  transform: translateY(0) scale(0.99);
}

/* 返回顶部 */
.to-top {
  position: fixed;
  right: clamp(0.9rem, 2.4vw, 1.6rem);
  bottom: clamp(0.9rem, 2.4vw, 1.6rem);
  z-index: 90;
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-full);
  background: var(--panel-strong);
  color: var(--ink-2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 20px -10px rgba(1, 45, 62, 0.55);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility var(--dur) var(--ease), color var(--dur) var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   16 动画
   -------------------------------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@keyframes ray-sway {
  from {
    transform: rotate(-1.2deg) translateX(-1.5%);
    opacity: 0.55;
  }
  to {
    transform: rotate(1.4deg) translateX(1.5%);
    opacity: 0.85;
  }
}

@keyframes caustic-drift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(3%, 2%, 0) scale(1.12);
  }
}

@keyframes bubble-rise {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0;
  }
  6% {
    opacity: 1;
  }
  45% {
    transform: translate3d(16px, -52vh, 0);
  }
  75% {
    transform: translate3d(-10px, -86vh, 0);
  }
  94% {
    opacity: 0.8;
  }
  100% {
    transform: translate3d(8px, -116vh, 0);
    opacity: 0;
  }
}

@keyframes sun-breathe {
  from {
    opacity: 0.72;
    transform: translateX(-50%) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1.06);
  }
}

@keyframes shimmer {
  from {
    opacity: 0.4;
    transform: translateY(0);
  }
  to {
    opacity: 0.7;
    transform: translateY(9px);
  }
}

@keyframes sparkle-twinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.5);
  }
  30% {
    opacity: 0.95;
    transform: scale(1);
  }
  60% {
    opacity: 0.2;
    transform: scale(0.75);
  }
}

/* --------------------------------------------------------------------------
   17 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 64rem) {
}

@media (max-width: 56rem) {
  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.45rem;
    display: none;
    border: 1px solid var(--panel-line);
    border-top-color: var(--panel-gloss);
    border-radius: var(--radius);
    /* 下拉面板用实色，避免透过它看到后面的内容 */
    background: #f7fdff;
    box-shadow: var(--shadow-pop);
  }

  .nav.is-open {
    display: block;
    animation: nav-drop 0.26s var(--ease);
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }

  .nav__link {
    display: block;
    padding: 0.7rem 0.9rem;
    font-size: 1rem;
  }

  .post-item__link {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.25rem 0.9rem;
  }

  .post-item__date {
    grid-column: 1;
  }

  .post-item__body {
    grid-column: 1;
  }

  .post-item__arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

@media (max-width: 40rem) {

  :root {
    --header-h: 4.1rem;
    --radius: 16px;
  }

  .site-header {
    top: 0;
    padding-top: 0.45rem;
  }

  .site-header__inner {
    gap: 0.5rem;
    padding-left: 0.6rem;
  }

  .brand__text {
    font-size: 0.95rem;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@keyframes nav-drop {
  from {
    transform: translateY(-6px);
  }
  to {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   18 单屏门户（首页）：左侧标题，右侧内容入口
   -------------------------------------------------------------------------- */
.page-hub {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.hub {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: clamp(1rem, 2.4vw, 2rem);
  width: min(100% - 2 * var(--edge), var(--container));
  margin-inline: auto;
  padding-block: clamp(1rem, 3.5vh, 2.5rem);
}

/* 桌面端锁死一屏，不出现滚动条 */
@media (min-width: 56.0625rem) {
  .page-hub {
    height: 100svh;
    overflow: hidden;
  }
}

/* 左边也做成一块玻璃窗，和右侧入口卡同一套语言 */
.hub__intro {
  flex: 1.15;
  justify-content: center;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(0.55rem, 1.5vh, 1rem);
  padding: clamp(1.3rem, 2.8vw, 2.1rem);
  border: 1px solid var(--panel-line);
  border-top-color: var(--panel-gloss);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
  -webkit-backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
}

.hub__eyebrow {
  margin: 0;
  padding: 0.2rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 #fff;
}

/* 主标题沿用原来的果冻渐变字 */
.hub__title {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.1rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  background: linear-gradient(
    176deg,
    #0a4f68 6%,
    #0f7f9f 42%,
    #37b6d7 58%,
    #0a5f7a 96%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.95))
    drop-shadow(0 10px 18px rgba(2, 50, 70, 0.16));
}

.hub__sub {
  margin: 0;
  color: var(--ink-2);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  letter-spacing: 0.01em;
}

.hub__meta {
  margin: clamp(0.3rem, 1.2vh, 0.8rem) 0 0;
  color: var(--ink-3);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
}

/* 右侧入口卡片：沿用玻璃面板 */
.hub__panel {
  flex: 0.92;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: clamp(1.1rem, 2.6vw, 1.8rem);
  border: 1px solid var(--panel-line);
  border-top-color: var(--panel-gloss);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
  -webkit-backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
}

.hub__panel-title {
  margin: 0 0 clamp(0.8rem, 2vh, 1.2rem);
  color: var(--ink);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.entry-list {
  display: grid;
  gap: clamp(0.55rem, 1.4vh, 0.85rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(0.7rem, 1.8vh, 1rem) clamp(0.9rem, 2vw, 1.2rem);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-sm);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(228, 246, 252, 0.85)
  );
  color: var(--ink);
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 #fff, 0 10px 18px -12px rgba(6, 48, 63, 0.55);
  transition: transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), color var(--dur) var(--ease);
}

.entry:hover {
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 #fff, 0 16px 26px -14px rgba(6, 48, 63, 0.6);
}

.entry:active {
  transform: translateY(0);
}

.entry__arrow {
  color: var(--accent);
  font-weight: 700;
  transition: transform var(--dur) var(--ease);
}

.entry:hover .entry__arrow {
  transform: translateX(4px);
}

@media (max-width: 56rem) {
  .hub {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: clamp(1rem, 2.4vw, 2rem);
  width: min(100% - 2 * var(--edge), var(--container));
  margin-inline: auto;
  padding-block: clamp(1rem, 3.5vh, 2.5rem);
}
}
.site-footer__note {
  display: inline;
  margin-left: 0.45rem;
  color: var(--ink-3);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   19 水的「活气」：缓慢漂移的水光 + 细颗粒
   -------------------------------------------------------------------------- */
.scene__swell {
  position: absolute;
  inset: -18% -12%;
  background:
    radial-gradient(45% 38% at 28% 32%, rgba(255, 255, 255, 0.5), transparent 70%),
    radial-gradient(42% 34% at 72% 58%, rgba(190, 250, 255, 0.42), transparent 72%),
    radial-gradient(55% 45% at 48% 86%, rgba(120, 230, 255, 0.32), transparent 76%);
  filter: blur(70px);
  mix-blend-mode: screen;
  opacity: 0.5;
  animation: swell-drift 80s ease-in-out infinite alternate;
  will-change: transform;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .scene__swell {
    animation: none;
  }
}
.brand__mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* 社交链接：小字里也要看得出能点 */
.hub__meta a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: rgba(10, 127, 163, 0.35);
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease),
    text-decoration-color var(--dur) var(--ease);
}

.hub__meta a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.hub__meta span {
  margin: 0 0.15rem;
}
/* --------------------------------------------------------------------------
   20 教程宫格（小红书式封面流）
   -------------------------------------------------------------------------- */
.tut-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}

.chip {
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #fff;
  transition: color var(--dur) var(--ease),
    background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.chip:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.chip.is-active {
  border-color: rgba(10, 110, 140, 0.55);
  background: linear-gradient(180deg, #7fdcf5 0%, #23a5cb 48%, #0d86aa 100%);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 50, 70, 0.4);
}

.tut-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.2rem 0.9rem;
}

/* 窄一些的窗口退成 3 列 / 2 列，避免封面被压得太小 */
@media (max-width: 68rem) {
  .tut-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 40rem) {
  .tut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tut-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: var(--ink);
}

.tut-card.is-hidden {
  display: none;
}

.tut-card__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(160deg, var(--c1, #1d5f95), var(--c2, #6fd0ef));
  box-shadow: 0 12px 24px -16px rgba(3, 45, 62, 0.7);
  transition: transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.tut-card__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0 1px, transparent 1px 4px),
    radial-gradient(75% 55% at 28% 18%, rgba(255, 255, 255, 0.4), transparent 70%),
    linear-gradient(180deg, transparent 42%, rgba(3, 30, 45, 0.6) 100%);
}

.tut-card__cover::after {
  content: attr(data-label);
  position: absolute;
  left: 0.7rem;
  bottom: 0.5rem;
  color: #fff;
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 8px rgba(0, 25, 40, 0.45);
}

.tut-card:hover .tut-card__cover {
  transform: translateY(-3px);
  box-shadow: 0 18px 30px -16px rgba(3, 45, 62, 0.75);
}

.tut-card__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
  transition: color var(--dur) var(--ease);
}

.tut-card:hover .tut-card__title {
  color: var(--accent);
}

.tut-card__tag {
  padding: 0.05rem 0.4rem;
  border-radius: 5px;
  background: rgba(10, 127, 163, 0.12);
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 40rem) {
  .tut-grid {
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 0.9rem 0.7rem;
  }
}
/* --------------------------------------------------------------------------
   21 教程页顶部：小方块标题 + 右侧贴士
   -------------------------------------------------------------------------- */
.page-top {
  width: min(100% - 2 * var(--edge), var(--container));
  margin: 0.9rem auto 0;
}

.page-top__grid {
  display: grid;
  grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: stretch;
}

.page-card,
.page-tips {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-top-color: var(--panel-gloss);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
  -webkit-backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
}

.page-card {
  padding: 1.35rem 1.25rem 1.2rem;
}

.page-card__body {
  display: grid;
  gap: 0.2rem;
}

.page-card__title {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.1;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.page-card__meta {
  margin: 0.35rem 0 0;
  color: var(--ink-3);
  font-size: 0.78rem;
}

.page-tips {
  padding: 1.2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  /* 右侧放实拍图，左侧用淡蓝白渐变把文字托住 */
  background-image:
    linear-gradient(
      100deg,
      rgba(246, 253, 255, 0.97) 0%,
      rgba(244, 252, 255, 0.95) 32%,
      rgba(238, 251, 255, 0.78) 50%,
      rgba(236, 250, 255, 0.3) 68%,
      rgba(236, 250, 255, 0) 82%
    ),
    url("../img/tips-bg.webp");
  background-position: 0 0, 82% 52%;
  background-size: auto, cover;
  background-repeat: no-repeat, no-repeat;
}

.page-tips > * {
  position: relative;
  max-width: 66%;
}

@media (max-width: 56rem) {
  .page-tips > * {
    max-width: 100%;
  }

  /* 窄屏文字会压到图上，把左侧的托底加重一点 */
  .page-tips {
    background-position: 0 0, 6% 46%;
    background-size: auto, 165% auto;
    background-image: linear-gradient(
        100deg,
        rgba(246, 253, 255, 0.96) 0%,
        rgba(246, 253, 255, 0.92) 55%,
        rgba(246, 253, 255, 0.6) 82%,
        rgba(246, 253, 255, 0.3) 100%
      ),
      url("../img/tips-bg.webp");
  }
}

.page-tips__title {
  margin: 0 0 0.55rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.page-tips__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.3rem;
  color: var(--ink-2);
  font-size: 0.84rem;
  line-height: 1.6;
}

.page-tips__list li {
  position: relative;
  padding-left: 1rem;
}

.page-tips__list li::before {
  content: "✧";
  position: absolute;
  left: 0;
  top: 0.1em;
  color: var(--accent-2);
  font-size: 0.8rem;
}

@media (max-width: 56rem) {
  .page-top__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.tut-card__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 教程分页 */
.tut-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.6rem;
}

.tut-pager button {
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink-2);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #fff;
  transition: color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.tut-pager button:hover:not(:disabled) {
  color: var(--accent);
}

.tut-pager button.is-active {
  border-color: rgba(10, 110, 140, 0.55);
  background: linear-gradient(180deg, #7fdcf5 0%, #23a5cb 48%, #0d86aa 100%);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 50, 70, 0.4);
}

.tut-pager button:disabled {
  opacity: 0.4;
  cursor: default;
}
/* --------------------------------------------------------------------------
   22 首页「最近更新」通栏
   -------------------------------------------------------------------------- */
.hub__rail {
  flex: 1;
  display: grid;
  gap: 0.6rem;
  padding: clamp(0.85rem, 1.8vw, 1.15rem) clamp(0.95rem, 2vw, 1.35rem) clamp(1rem, 2vw, 1.25rem);
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-top-color: var(--panel-gloss);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
  -webkit-backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
}

.hub__rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.hub__rail-title {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

@media (max-width: 56rem) {
}

@media (max-width: 56rem) {
  .hub {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: clamp(1rem, 2.4vw, 2rem);
  width: min(100% - 2 * var(--edge), var(--container));
  margin-inline: auto;
  padding-block: clamp(1rem, 3.5vh, 2.5rem);
}
}
.hub__col {
  flex: 1.08;
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 1.6vh, 1.1rem);
  min-width: 0;
}

.hub__feed {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0.6rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  list-style: none;
  color: var(--ink-2);
  font-size: 0.73rem;
  line-height: 1.45;
}

.hub__feed li {
  display: flex;
  gap: 0.45rem;
  align-items: baseline;
}

.hub__feed time {
  flex: none;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 56rem) {
  .hub {
    flex-direction: column;
  }

  .hub__col {
    flex: none;
  }
}
/* 入口列表撑满右侧高卡，避免中间出现大片空洞 */
.hub__panel .entry-list {
  flex: 1;
  grid-auto-rows: minmax(0, 1fr);
  align-content: stretch;
}

.hub__panel .entry-list li {
  display: flex;
}

.hub__panel .entry {
  flex: 1;
  min-height: 3.2rem;
}
.entry__text {
  display: grid;
  gap: 0.22rem;
}

.entry__label {
  font-weight: 700;
}

.entry__desc {
  color: var(--ink-3);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
}
/* 右下角的致敬署名 */
.hub__credit {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  margin: auto 0 0;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.75);
  color: var(--ink-3);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.hub__credit strong {
  color: var(--ink-2);
  font-weight: 700;
  letter-spacing: 0.12em;
}
/* --------------------------------------------------------------------------
   23 教程页置顶三连（只在「全部」第 1 页显示）
   -------------------------------------------------------------------------- */
.tut-featured {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.tut-featured__item {
  display: grid;
  gap: 0.45rem;
  text-decoration: none;
  transition: transform var(--dur) var(--ease);
}

.tut-featured__item:hover {
  transform: translateY(-2px);
}

.tut-featured__cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px -18px rgba(4, 60, 80, 0.9);
}

.tut-featured__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tut-featured__badge {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #0a6383;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.tut-featured__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 56rem) {
  .tut-featured {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 56rem) {
  /* 窄屏改成横滑，避免三张大图把宫格挤到屏幕外 */
  .tut-featured {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 82%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.4rem;
    scrollbar-width: none;
  }

  .tut-featured::-webkit-scrollbar {
    display: none;
  }

  .tut-featured__item {
    scroll-snap-align: start;
  }
}
/* hidden 属性必须压过 .tut-featured 的 display: grid */
.tut-featured[hidden] {
  display: none !important;
}
/* 不带底图的纯玻璃 TIPS（资源页用） */
.page-tips--plain {
  background-image: none;
}

.page-tips--plain > * {
  max-width: 100%;
}
/* --------------------------------------------------------------------------
   24 资源页表格
   -------------------------------------------------------------------------- */
.res-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--panel-line);
  border-top-color: var(--panel-gloss);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
  -webkit-backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
}

.res-table {
  width: 100%;
  min-width: 46rem;
  border-collapse: collapse;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.res-table__caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.res-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--ink-3);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: left;
  white-space: nowrap;
}

.res-table tbody td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  vertical-align: top;
  line-height: 1.55;
}

.res-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.28);
}

.res-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.5);
}

.res-table__num {
  width: 3rem;
  color: var(--ink-3);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.res-table__name {
  min-width: 12rem;
  color: var(--ink);
  font-weight: 600;
}

.res-table__name a {
  color: var(--accent);
  text-decoration: none;
}

.res-table__name a:hover {
  text-decoration: underline;
}

.res-table__tags {
  white-space: nowrap;
}

.res-tag {
  display: inline-block;
  margin: 0 0.3rem 0.25rem 0;
  padding: 0.1rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-2);
  font-size: 0.72rem;
  font-weight: 600;
}

.res-table__desc {
  min-width: 16rem;
  color: var(--ink-2);
}

.res-table__file {
  width: auto;
  text-align: right;
  white-space: nowrap;
}

.res-dl {
  display: inline-block;
  padding: 0.18rem 0.7rem;
  border: 1px solid rgba(10, 110, 140, 0.45);
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, #7fdcf5 0%, #23a5cb 48%, #0d86aa 100%);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.res-dl:hover {
  filter: brightness(1.06);
}

.res-dl--muted {
  border-color: rgba(140, 200, 220, 0.55);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink-3);
  box-shadow: none;
}

@media (max-width: 56rem) {
  .res-table {
    min-width: 40rem;
    font-size: 0.8rem;
  }
}
@media (max-width: 56rem) {
  .res-table {
    min-width: 34rem;
  }

  .res-table__num {
    display: none;
  }

  .res-table__desc {
    min-width: 10rem;
  }

  .res-table__name {
    min-width: 9rem;
  }
}
/* 手机：表格改成一列一条，避免横向滚动 */
@media (max-width: 40rem) {
  .res-table,
  .res-table thead,
  .res-table tbody,
  .res-table tr,
  .res-table td {
    display: block;
    width: auto;
  }

  .res-table {
    min-width: 0;
  }

  .res-table thead {
    display: none;
  }

  .res-table tbody tr {
    padding: 0.8rem 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  }

  .res-table tbody tr:nth-child(even) td {
    background: none;
  }

  .res-table tbody td {
    padding: 0;
    border: 0;
  }

  .res-table tbody td.res-table__num {
    display: block;
    margin-bottom: 0.1rem;
    font-size: 0.7rem;
  }

  .res-table__name {
    min-width: 0;
    font-size: 0.92rem;
  }

  .res-table__tags {
    margin-top: 0.35rem;
  }

  .res-table__desc {
    min-width: 0;
    margin-top: 0.3rem;
    font-size: 0.8rem;
  }

  .res-table__file {
    width: auto;
    margin-top: 0.45rem;
    text-align: left;
  }
}
/* 说明列里的链接 */
.res-link {
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
}

.res-link:hover {
  text-decoration: underline;
}
.res-hint {
  display: inline-block;
  margin-right: 0.45rem;
  color: var(--ink-3);
  font-size: 0.68rem;
  white-space: nowrap;
}
/* --------------------------------------------------------------------------
   25 图片灯箱
   -------------------------------------------------------------------------- */
.lightbox {
  position: relative;
  max-width: 92vw;
  max-height: 88vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(3, 26, 38, 0.68);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 30px 70px -34px rgba(1, 18, 28, 0.95);
}

.lightbox__close {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: linear-gradient(180deg, #7fdcf5 0%, #23a5cb 48%, #0d86aa 100%);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(2, 30, 44, 0.9);
}

.lightbox__close:hover {
  filter: brightness(1.08);
}

.lightbox__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
/* --------------------------------------------------------------------------
   26 资源表管理页（仅站长使用，不进导航）
   -------------------------------------------------------------------------- */
.admin {
  position: relative;
  z-index: 2;
  width: min(100% - 2 * var(--edge), 62rem);
  margin: clamp(1.2rem, 4vh, 2.4rem) auto 3rem;
  display: grid;
  gap: 1rem;
}

.admin__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: clamp(1.1rem, 2.4vw, 1.6rem);
  border: 1px solid var(--panel-line);
  border-top-color: var(--panel-gloss);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
}

.admin__kicker {
  margin: 0 0 0.2rem;
  color: var(--ink-3);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.admin__title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
}

.admin__hint {
  margin: 0.45rem 0 0;
  max-width: 42ch;
  color: var(--ink-2);
  font-size: 0.82rem;
  line-height: 1.6;
}

.admin__hint code {
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
}

.admin__back {
  color: var(--accent);
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
}

.admin__bar {
  display: grid;
  grid-template-columns: 1fr 8rem minmax(0, 2fr);
  gap: 0.7rem 0.9rem;
  padding: clamp(1rem, 2.2vw, 1.4rem);
  border: 1px solid var(--panel-line);
  border-top-color: var(--panel-gloss);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
}

.admin__field {
  display: grid;
  gap: 0.25rem;
  font-size: 0.76rem;
  color: var(--ink-3);
}

.admin__field--wide {
  grid-column: 1 / -1;
}

.admin__field input,
.admin__field textarea,
.admin__field select {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
}

.admin__field textarea {
  resize: vertical;
  min-height: 2.6rem;
}

.admin__field input:focus,
.admin__field textarea:focus,
.admin__field select:focus {
  outline: 2px solid rgba(35, 165, 203, 0.55);
  outline-offset: 1px;
}

.admin__bar-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin__btn {
  padding: 0.42rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-2);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.admin__btn--primary {
  border-color: rgba(10, 110, 140, 0.5);
  background: linear-gradient(180deg, #7fdcf5 0%, #23a5cb 48%, #0d86aa 100%);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 50, 70, 0.35);
}

.admin__status {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-3);
  font-size: 0.78rem;
  min-height: 1.1em;
}

.admin__list {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin__row {
  display: grid;
  gap: 0.55rem;
  padding: clamp(0.9rem, 2vw, 1.2rem);
  border: 1px solid var(--panel-line);
  border-top-color: var(--panel-gloss);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
}

.admin__row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin__row-num {
  color: var(--ink-3);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.admin__row-actions {
  display: flex;
  gap: 0.35rem;
}

.admin__row-actions button {
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-2);
  font-size: 0.9rem;
  cursor: pointer;
}

.admin__row-actions button:hover {
  color: var(--accent);
}

.admin__grid {
  display: grid;
  grid-template-columns: 8rem minmax(0, 2fr) minmax(0, 1fr);
  gap: 0.55rem 0.7rem;
}

.admin__empty {
  padding: 1.2rem;
  border: 1px dashed rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-sm);
  color: var(--ink-3);
  font-size: 0.84rem;
  text-align: center;
}

@media (max-width: 48rem) {
  .admin__bar {
    grid-template-columns: 1fr;
  }

  .admin__grid {
    grid-template-columns: 1fr;
  }
}
.admin__token-state {
  grid-column: 1 / -1;
  margin: -0.2rem 0 0;
  color: var(--ink-3);
  font-size: 0.76rem;
}

.admin__link {
  margin-left: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* 首页公告栏 */
.hub__notice-updated {
  color: var(--ink-3);
  font-size: 0.72rem;
  white-space: nowrap;
}

.hub__feed li span {
  flex: 1;
  min-width: 0;
}

.hub__feed-empty {
  color: var(--ink-3);
  font-size: 0.8rem;
}

/* 公告卡比原来的更新卡矮一些，内容更松 */
.hub__notice {
  align-content: start;
}

/* 后台：左菜单 + 右内容 */
.admin__layout {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.admin__side {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.3rem;
  padding: 0.55rem;
  border: 1px solid var(--panel-line);
  border-top-color: var(--panel-gloss);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
}

.admin__tab {
  padding: 0.55rem 0.8rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.admin__tab:hover {
  background: rgba(255, 255, 255, 0.55);
}

.admin__tab.is-active {
  background: linear-gradient(180deg, #7fdcf5 0%, #23a5cb 48%, #0d86aa 100%);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 50, 70, 0.35);
}

.admin__side-link {
  margin-top: 0.25rem;
  padding: 0.35rem 0.8rem;
  color: var(--ink-3);
  font-size: 0.76rem;
  text-decoration: none;
}

.admin__side-link:hover {
  color: var(--accent);
}

.admin__panes {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.admin__pane {
  display: grid;
  gap: 1rem;
}

.admin__pane[hidden] {
  display: none !important;
}

.admin__tips {
  padding: clamp(0.9rem, 2vw, 1.2rem);
  border: 1px solid var(--panel-line);
  border-top-color: var(--panel-gloss);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
}

.admin__tips-title {
  margin: 0 0 0.5rem;
  color: var(--ink-2);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.admin__tips ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-2);
  font-size: 0.82rem;
  line-height: 1.7;
}

@media (max-width: 48rem) {
  .admin__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin__side {
    position: static;
    grid-auto-flow: column;
    justify-content: start;
    overflow-x: auto;
  }

  .admin__tab {
    white-space: nowrap;
  }
}

.admin[hidden] {
  display: none !important;
}
/* 页脚右侧的一句小字 */
.site-footer__wish {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
/* 相关网站里的群号按钮 */
.link-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.post-item__link--static {
  cursor: default;
}
.chip.is-copied {
  border-color: rgba(10, 110, 140, 0.55);
  background: linear-gradient(180deg, #7fdcf5 0%, #23a5cb 48%, #0d86aa 100%);
  color: #fff;
}
/* 分类标签：贴在封面右上角 */
.tut-card__cats {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
  max-width: 70%;
}

.tut-card__cats .tut-card__tag {
  padding: 0.05rem 0.4rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.92);
  color: #0a6383;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px -4px rgba(3, 50, 68, 0.6);
}
/* 分类下没有内容时的提示 */
.tut-empty {
  margin: 1.6rem 0 0;
  padding: 1.4rem;
  border: 1px dashed rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-sm);
  color: var(--ink-3);
  font-size: 0.85rem;
  text-align: center;
}
/* 分类里的置顶大卡：只显示一张，比宫格明显大一点 */
.tut-featured.tut-featured--cat {
  grid-template-columns: minmax(0, 34rem);
  margin-bottom: 1.3rem;
}

.tut-featured--cat .tut-featured__title {
  font-size: 1.05rem;
}

@media (max-width: 56rem) {
  .tut-featured--cat {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    overflow: visible;
  }
}
/* hidden 必须压过 display: grid，否则分类置顶会两张一起露出来 */
.tut-featured__item[hidden] {
  display: none !important;
}
/* 「全部」置顶改成一行四个（仅桌面） */
@media (min-width: 56.01rem) {
  .tut-featured {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* 「其他」分类的置顶小 20% */
.tut-featured__item--sm {
  max-width: 80%;
}
/* 教程筛选栏 + 搜索 */
.tut-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tut-toolbar .tut-filters {
  margin-bottom: 0;
}

.tut-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
}

.tut-search input {
  width: 14rem;
  max-width: 100%;
  padding: 0.45rem 1.9rem 0.45rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  box-shadow: inset 0 1px 0 #fff;
}

.tut-search input::placeholder {
  color: var(--ink-3);
}

.tut-search input:focus {
  outline: 2px solid rgba(35, 165, 203, 0.5);
  outline-offset: 1px;
}

.tut-search__clear {
  position: absolute;
  right: 0.35rem;
  width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 127, 163, 0.12);
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.tut-search__clear:hover {
  background: rgba(10, 127, 163, 0.22);
}

@media (max-width: 56rem) {
  .tut-search {
    margin-left: 0;
    width: 100%;
  }

  .tut-search input {
    width: 100%;
  }
}
.tut-search__clear[hidden] {
  display: none !important;
}
/* 相关网站：右侧切一块单独放推荐 */
.links-split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 1.8rem);
  align-items: start;
}

.links-promo {
  border-left: 1px solid rgba(255, 255, 255, 0.7);
  padding-left: clamp(1rem, 2.5vw, 1.6rem);
}

.links-promo__card {
  display: grid;
  gap: 0.5rem;
}

.links-promo__cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 10px 22px -18px rgba(4, 60, 80, 0.9);
}

.links-promo__title {
  margin: 0.15rem 0 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
}

.links-promo__desc {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.8rem;
  line-height: 1.6;
}

@media (max-width: 56rem) {
  .links-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .links-promo {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.7);
    padding-left: 0;
    padding-top: 1rem;
  }
}
/* 相关网站：左右两块各自独立成卡片，不再共用一个大面板 */
.links-split-section {
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.links-split .links-list,
.links-split .links-promo {
  padding: clamp(1rem, 2.4vw, 1.6rem);
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-top-color: var(--panel-gloss);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
  -webkit-backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
}

.links-split .links-promo {
  border-left: 1px solid var(--panel-line);
  padding-left: clamp(1rem, 2.4vw, 1.6rem);
  align-self: start;
}

@media (max-width: 56rem) {
  .links-split .links-promo {
    border-top: 1px solid var(--panel-line);
  }
}
.links-promo__kicker {
  margin: 0 0 0.7rem;
  color: var(--ink-3);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.links-promo__card {
  text-decoration: none;
  transition: transform var(--dur) var(--ease);
}

.links-promo__card:hover {
  transform: translateY(-2px);
}

.links-promo__card:hover .links-promo__title {
  color: var(--accent);
}

.links-promo__card:hover .links-promo__cover {
  filter: brightness(1.04);
}

@media (max-width: 48rem) {
}
/* 后台教程编辑行 */
.tut-edit {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.tut-edit__cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.tut-edit__body {
  display: grid;
  gap: 0.4rem;
}

.tut-edit__title,
.tut-edit__link {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
}

.tut-edit__title {
  font-weight: 700;
}

.tut-edit__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  color: var(--ink-2);
  font-size: 0.76rem;
}

.tut-edit__cats input,
.tut-edit__pins input {
  accent-color: var(--accent);
}

.tut-edit__pins {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  color: var(--ink-2);
  font-size: 0.76rem;
}

.tut-edit__pins select {
  margin-left: 0.25rem;
  padding: 0.15rem 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font: inherit;
  font-size: 0.76rem;
}

.tut-edit__order {
  margin-left: auto;
  display: flex;
  gap: 0.3rem;
}

.admin__btn--tiny {
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
}

/* 新建教程那一块 */
.admin__field--new {
  margin-bottom: 0.9rem;
}

.admin__new-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin__new-row input[type="file"] {
  font-size: 0.76rem;
  color: var(--ink-2);
  max-width: 15rem;
}

.admin__new-row input[type="text"] {
  flex: 1;
  min-width: 10rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
}

.admin__hint {
  margin: 0.45rem 0 0;
  color: var(--ink-3);
  font-size: 0.74rem;
  line-height: 1.6;
}
/* 首页致谢条 */
.hub__thanks {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.95rem;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-top-color: var(--panel-gloss);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
  -webkit-backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
  overflow: hidden;
}

.hub__thanks-title {
  margin: 0;
  flex: none;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.hub__thanks-list {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.6rem;
  color: var(--ink-2);
  font-size: 0.72rem;
  line-height: 1.5;
}

.hub__thanks-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
}

.hub__thanks-item a {
  color: var(--accent);
  text-decoration: none;
}

.hub__thanks-item a:hover {
  text-decoration: underline;
}

.hub__thanks-item em {
  color: var(--ink-3);
  font-style: normal;
}

.hub__thanks-empty {
  color: var(--ink-3);
}
/* 后台致谢编辑行 */
.thanks-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1.4fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.thanks-edit input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
}

@media (max-width: 56rem) {
  .thanks-edit {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* 还没填链接的教程卡：不可点 */
.tut-card:not([href]) {
  cursor: default;
}

.tut-featured__item:not([href]) {
  cursor: default;
}
/* 首页左下：致谢（大）+ 公告（小）并排 */
.hub__duo {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  gap: clamp(0.75rem, 1.6vh, 1.1rem);
  min-height: 0;
}

/* 致谢卡：占左边较大一块 */
.hub__thanks {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-height: 0;
  padding: clamp(0.85rem, 1.8vw, 1.15rem) clamp(0.95rem, 2vw, 1.35rem) clamp(1rem, 2vw, 1.25rem);
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-top-color: var(--panel-gloss);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
  -webkit-backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
}

.hub__thanks-title {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hub__thanks-list {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0.6rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  list-style: none;
  color: var(--ink-2);
  font-size: 0.78rem;
  line-height: 1.5;
  overflow: auto;
  min-height: 0;
  scrollbar-width: thin;
}

.hub__thanks-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem;
}

.hub__thanks-item a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.hub__thanks-item a:hover {
  text-decoration: underline;
}

.hub__thanks-item em {
  color: var(--ink-3);
  font-style: normal;
  font-size: 0.74rem;
}

.hub__thanks-empty {
  color: var(--ink-3);
  font-size: 0.78rem;
}

/* 右边公告收窄，字号略收 */
.hub__duo .hub__notice {
  min-height: 0;
}

.hub__duo .hub__notice .hub__feed {
  font-size: 0.71rem;
}

@media (max-width: 56rem) {
  .hub__duo {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* 公告在左、更大；致谢在右、略小（仅桌面） */
@media (min-width: 56.01rem) {
  .hub__duo {
    grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
  }
}

.hub__duo .hub__notice .hub__feed {
  font-size: 0.73rem;
}

.hub__duo .hub__thanks .hub__thanks-list {
  font-size: 0.75rem;
}
/* ============================================================
   手机端（≤56rem）：修排版 + 收窄顶部横幅，让内容尽快露出
   ============================================================ */
@media (max-width: 56rem) {
  /* 首页：公告与致谢竖排 */
  .hub__duo {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
  }

  .hub__thanks {
    padding: 0.7rem 0.9rem 0.8rem;
  }

  .hub__thanks-title,
  .hub__rail-title {
    font-size: 0.85rem;
  }

  .hub__thanks-list {
    gap: 0.3rem;
    padding-top: 0.45rem;
    font-size: 0.76rem;
  }

  /* 教程：置顶改成 2×2，不再挤成一条 */
  .tut-featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.9rem;
  }

  .tut-featured__title {
    font-size: 0.8rem;
    line-height: 1.35;
    -webkit-line-clamp: 2;
  }

  /* 分类置顶：单列，别被桌面的 34rem 规则顶住 */
  .tut-featured.tut-featured--cat {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    overflow: visible;
  }

  .tut-featured__item--sm {
    max-width: 100%;
  }

  /* 顶部横幅：标题卡 + TIPS 都收紧 */
  .page-top {
    margin-top: 0.55rem;
  }

  .page-card {
    padding: 0.85rem 0.95rem 0.8rem;
  }
  .page-card .window-bar {
    margin-bottom: 0.35rem;
  }

  .page-card__title {
    font-size: 1.55rem;
  }

  .page-card__meta {
    margin-top: 0.25rem;
    font-size: 0.72rem;
  }

  .page-tips {
    padding: 0.7rem 0.9rem;
    min-height: 0;
  }

  .page-tips__title {
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
  }

  .page-tips__list {
    gap: 0.2rem;
    font-size: 0.75rem;
    line-height: 1.5;
  }

  /* 筛选栏与搜索框也矮一点 */
  .tut-toolbar {
    gap: 0.5rem;
    margin-bottom: 0.7rem;
  }

  .tut-search input {
    padding: 0.38rem 1.8rem 0.38rem 0.75rem;
    font-size: 0.78rem;
  }
}
/* 覆盖旧的「手机横滑」规则：置顶改成 2×2 网格 */
@media (max-width: 56rem) {
  .tut-featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }

  .tut-featured__item {
    scroll-snap-align: none;
  }

  .tut-featured__cover {
    aspect-ratio: 16 / 9;
  }
}
/* 手机端顶部横幅再收 30%（覆盖前面的移动端规则） */
@media (max-width: 56rem) {
  .page-top {
    margin-top: 0.4rem;
  }

  .page-top__grid {
    gap: 0.55rem;
  }

  .page-card {
    padding: 0.55rem 0.65rem 0.5rem;
  }

  .page-card__body {
    gap: 0.1rem;
  }

  .page-card .section__kicker {
    margin-bottom: 0.3rem;
    padding: 0.12rem 0.45rem;
    font-size: 0.55rem;
    letter-spacing: 0.14em;
  }

  .page-card__title {
    font-size: 1.08rem;
    line-height: 1.15;
  }

  .page-card__meta {
    margin-top: 0.15rem;
    font-size: 0.66rem;
  }

  .page-tips {
    padding: 0.5rem 0.62rem;
  }

  .page-tips__title {
    margin-bottom: 0.2rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }

  .page-tips__list {
    gap: 0.12rem;
    font-size: 0.66rem;
    line-height: 1.42;
  }
}
/* ============================================================
   手机端首页重排：上排「摄影手册 + 公告」，中间「内容入口」，最后「致谢」
   ============================================================ */
@media (max-width: 56rem) {
  .hub {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    grid-template-areas:
      "intro notice"
      "entry entry"
      "thanks thanks";
    align-items: start;
    gap: 0.55rem;
    padding-block: 0.6rem 1rem;
  }

  /* 让两层容器不参与布局，子块直接进网格 */
  .hub__col,
  .hub__duo {
    display: contents;
  }

  .hub__intro {
    grid-area: intro;
    padding: 0.7rem 0.75rem 0.75rem;
    gap: 0.28rem;
  }

  .hub__notice {
    grid-area: notice;
    padding: 0.6rem 0.65rem 0.7rem;
  }

  .hub__panel {
    grid-area: entry;
  }

  .hub__thanks {
    grid-area: thanks;
  }

  /* 摄影手册缩小，塞进半栏 */
  .hub__eyebrow {
    font-size: 0.62rem;
    padding: 0.1rem 0.4rem;
  }

  .hub__title {
    font-size: 1.42rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }

  .hub__sub {
    font-size: 0.72rem;
    line-height: 1.45;
  }

  .hub__meta {
    margin-top: 0.2rem;
    font-size: 0.66rem;
    letter-spacing: 0.04em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.3rem;
  }

  /* 公告在半栏里也要排得下 */
  .hub__notice .hub__rail-head {
    flex-wrap: wrap;
    gap: 0.15rem 0.4rem;
  }

  .hub__notice .hub__rail-title {
    font-size: 0.78rem;
  }

  .hub__notice-updated {
    font-size: 0.6rem;
  }

  .hub__notice .hub__feed {
    gap: 0.2rem;
    padding-top: 0.4rem;
    font-size: 0.64rem;
    line-height: 1.4;
  }

  .hub__notice .hub__feed li {
    gap: 0.3rem;
  }

  .hub__panel {
    padding: 0.8rem 0.85rem 0.9rem;
  }

  .hub__panel-title {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }
}
/* ============================================================
   玻璃质感：斜向高光 + 底部暗边（做出厚度）
   ============================================================ */
.hub__intro,
.hub__panel,
.hub__notice,
.hub__thanks,
.section,
.page-card,
.post,
.links-split .links-list,
.links-split .links-promo {
  background-image: linear-gradient(
    157deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.14) 18%,
    rgba(255, 255, 255, 0) 42%,
    rgba(6, 60, 80, 0.03) 100%
  );
  background-repeat: no-repeat;
}

/* 玻璃边：顶部更亮的一条内高光 */
.hub__intro::after,
.hub__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55) 0,
    rgba(255, 255, 255, 0) 14%
  );
  opacity: 0.7;
}

.hub__intro,
.hub__panel {
  position: relative;
}

/* 入口卡片 hover：一道高光扫过 */
.entry {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.entry::after {
  content: "";
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: -70%;
  width: 60%;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.62) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(0) skewX(-14deg);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.62s var(--ease), opacity 0.32s var(--ease);
}

.entry:hover::after,
.entry:focus-visible::after {
  transform: translateX(330%) skewX(-14deg);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .entry::after {
    display: none;
  }
}
/* 手机端把玻璃模糊降一档，省电也省 GPU */
@media (max-width: 56rem) {
  .hub__intro,
  .hub__panel,
  .hub__notice,
  .hub__thanks,
  .section,
  .page-card,
  .post,
  .site-header,
  .links-split .links-list,
  .links-split .links-promo {
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
  }
}
/* 后台「页面文案」 */
.site-block {
  margin-bottom: 1.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
}

.site-block:last-child {
  border-bottom: 0;
}

.site-block__title {
  margin: 0 0 0.7rem;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.site-sub {
  margin: 0.9rem 0 0.4rem;
  color: var(--ink-3);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.site-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.site-field {
  display: grid;
  gap: 0.2rem;
}

.site-field__label {
  color: var(--ink-3);
  font-size: 0.68rem;
}

.site-field__input,
.site-field__area {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  resize: vertical;
}

.site-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.site-row__input {
  flex: 1;
  min-width: 7rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font: inherit;
  font-size: 0.76rem;
}

@media (max-width: 56rem) {
  .site-grid,
  .site-grid--3,
  .site-grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* ============================================================
   手机端滚动闪烁修复
   1) 背景层单独提层，避免滚动时被反复重绘
   2) 关掉移动端的高开销效果：70px 动画模糊、混合模式
   3) 换更小的背景图，减少解码与显存
   4) 面板在移动端不用 backdrop-filter，改用更高不透明度
   ============================================================ */
.scene {
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

@media (max-width: 56rem) {
  .scene {
    background-image: url("../img/bg-water-mobile.jpg");
    background-attachment: scroll;
  }

  /* 动画 + 大半径模糊 = 移动端掉帧/闪烁的主因，直接停掉 */
  .scene__swell {
    animation: none;
    filter: none;
    opacity: 0.32;
    mix-blend-mode: normal;
  }

  .scene__vignette {
    mix-blend-mode: normal;
    opacity: 0.55;
  }

  /* 面板：移动端不模糊，用不透明一点的白蓝，滚动时不再逐帧重采样 */
  .hub__intro,
  .hub__panel,
  .hub__notice,
  .hub__thanks,
  .section,
  .page-card,
  .page-tips,
  .post,
  .site-header,
  .links-split .links-list,
  .links-split .links-promo {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background-color: rgba(244, 253, 255, 0.88);
  }

  /* 卡片内部的小元素本来就没有模糊，这里顺带禁掉过渡抖动 */
  .tut-card__cover,
  .entry {
    will-change: auto;
  }
}

/* 系统开了「减少动态效果」时也别再动 */
@media (prefers-reduced-motion: reduce) {
  .scene__swell {
    animation: none;
  }
}
/* 后台教程行：发布时间 */
.tut-edit__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.7rem;
}

.tut-edit__date {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-3);
  font-size: 0.74rem;
}

.tut-edit__date input {
  padding: 0.2rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font: inherit;
  font-size: 0.76rem;
}

.tut-edit__hint {
  color: var(--ink-3);
  font-size: 0.68rem;
}
/* ============================================================
   桌面端：滚动条出现/消失会让 fixed 背景随视口宽度重算 cover，
   表现为背景被「拉伸 + 闪一下」。这里固定预留滚动条槽位，
   让视口宽度在任何页面都一致。
   ============================================================ */
html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

.scene {
  background-attachment: scroll;
  /* 去掉 will-change，避免滚动时反复重建图层；translateZ 保留 */
  will-change: auto;
  contain: layout paint;
}
/* 手机端页脚：左边两行小字，愿望贴最右，整体更矮 */
@media (max-width: 56rem) {
  .site-footer {
    margin: 0.15rem auto 0.45rem;
    padding: 0.2rem 0.62rem;
    font-size: 0.52rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .site-footer__inner {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .site-footer__inner > p:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }

  .site-footer p {
    margin: 0;
    font-size: 0.52rem;
    line-height: 1.2;
    letter-spacing: 0;
  }

  .site-footer__note {
    display: block;
    margin-top: 0.02rem;
    font-size: 0.48rem;
    color: var(--ink-3);
  }

  .site-footer__wish {
    flex: none;
    margin: 0;
    font-size: 0.5rem;
    white-space: nowrap;
    text-align: right;
  }
}
/* 关掉移动端的文字自动放大（font boosting），否则小字号会被系统“抬大” */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* 相关网站：三个插件用大字 */
.post-item--big .post-item__title {
  font-size: 1.12rem;
  letter-spacing: 0.01em;
}

.post-item--big .post-item__date {
  color: var(--ink-3);
}

/* 右下角「小工具」小框，排在自制 mod 下面 */
.links-tools {
  margin-top: 0.75rem;
  padding: clamp(0.75rem, 1.8vw, 1.05rem) clamp(0.9rem, 2vw, 1.2rem);
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-top-color: var(--panel-gloss);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
  -webkit-backdrop-filter: blur(20px) saturate(168%) brightness(1.045);
}

.links-tools__kicker {
  margin: 0 0 0.45rem;
  color: var(--ink-3);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.links-tools__list {
  display: grid;
  gap: 0.45rem;
}

.links-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.1rem 0.5rem;
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-xs);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.links-tool:hover {
  background: rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
}

.links-tool__title {
  grid-row: 1;
  grid-column: 1;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
}

.links-tool__desc {
  grid-row: 2;
  grid-column: 1 / -1;
  color: var(--ink-3);
  font-size: 0.72rem;
  line-height: 1.45;
}

.links-tool__arrow {
  grid-row: 1;
  grid-column: 2;
  justify-self: end;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

@media (max-width: 56rem) {
  .post-item--big .post-item__title {
    font-size: 1rem;
  }

  .links-tools {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background-color: rgba(244, 253, 255, 0.88);
  }
}
/* 后台「大字」勾选 */
.site-row__big {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0 0.3rem;
  color: var(--ink-3);
  font-size: 0.72rem;
  white-space: nowrap;
}

.site-row__big input {
  accent-color: var(--accent);
}
/* 后台 token 输入下方的快捷链接 */
.admin__token-link {
  display: inline-block;
  margin-top: 0.3rem;
  color: var(--accent);
  font-size: 0.72rem;
  text-decoration: none;
}

.admin__token-link:hover {
  text-decoration: underline;
}
/* ============================================================
   低配 GPU / 国内套壳浏览器：关掉玻璃模糊，改成高不透明度纯色
   （滚动卡顿主要来自 backdrop-filter 每帧重算）
   ============================================================ */
.low-gpu .hub__intro,
.low-gpu .hub__panel,
.low-gpu .hub__notice,
.low-gpu .hub__thanks,
.low-gpu .section,
.low-gpu .page-card,
.low-gpu .page-tips,
.low-gpu .post,
.low-gpu .links-split .links-list,
.low-gpu .links-split .links-promo,
.low-gpu .links-tools,
.low-gpu .site-footer {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background-color: rgba(246, 253, 255, 0.94);
}

.low-gpu .page-tips {
  background-image: linear-gradient(
    100deg,
    rgba(246, 253, 255, 0.98) 0%,
    rgba(244, 252, 255, 0.95) 40%,
    rgba(238, 251, 255, 0.9) 62%,
    rgba(238, 251, 255, 0.86) 100%
  );
  background-size: auto, cover;
}

.low-gpu .scene {
  transform: none;
  contain: none;
}

.low-gpu .entry::after {
  display: none;
}

/* 顶部导航后面那层模糊也关掉（内层胶囊本身就是实色） */
.low-gpu .site-header::before {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.low-gpu .tut-card__cover,
.low-gpu .entry {
  transition-duration: 0.12s;
}
/* 低配模式：背景里的 70px 模糊 + 长时间动画也一起停掉（QQ 浏览器最吃这个） */
.low-gpu .scene__swell {
  animation: none !important;
  filter: none !important;
  opacity: 0.3;
  mix-blend-mode: normal;
}

.low-gpu .scene__vignette {
  mix-blend-mode: normal;
}

.low-gpu .scene::after {
  backdrop-filter: none;
}

/* 低配模式：卡片 hover 不再位移，减少重绘 */
.low-gpu .tut-card:hover .tut-card__cover,
.low-gpu .entry:hover,
.low-gpu .links-tool:hover {
  transform: none;
}

/* ============================================================
   fast2：连背景大图、标题投影、悬停过渡都关掉
   ============================================================ */
.fast2 .scene {
  background-image: linear-gradient(180deg, #bfeefb 0%, #9fe4f8 45%, #d9f6ff 100%);
  transform: none;
  contain: none;
}

.fast2 .scene::after {
  background: radial-gradient(
    120% 100% at 50% 50%,
    rgba(255, 255, 255, 0) 46%,
    rgba(255, 255, 255, 0.4) 74%,
    #ffffff 100%
  );
}

.fast2 .hub__title,
.fast2 .page-card__title {
  filter: none;
  text-shadow: none;
}

.fast2 .entry,
.fast2 .tut-card__cover,
.fast2 .links-tool {
  transition: none;
  box-shadow: 0 4px 10px -8px rgba(1, 45, 62, 0.5);
}

/* ============================================================
   fast3：最简模式，去掉所有阴影与圆角柔和层
   ============================================================ */
.fast3 .hub__intro,
.fast3 .hub__panel,
.fast3 .hub__notice,
.fast3 .hub__thanks,
.fast3 .section,
.fast3 .page-card,
.fast3 .page-tips,
.fast3 .post,
.fast3 .links-tools,
.fast3 .site-footer {
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.95);
}

.fast3 .scene__swell,
.fast3 .scene__vignette {
  display: none;
}