@charset "utf-8";
/* ==========================================================================
   方块集 · Blocky Portfolio —— 样式表
   视觉关键词：粉色像素 / 复古窗口 (Win95 + Y2K 博客) / 低饱和马卡龙
   --------------------------------------------------------------------------
   目录
   01 变量与主题
   02 基础重置
   03 公共装饰（像素爱心 / 点阵 / 图标 sprite）
   04 像素按钮 / 表单 / 表格 / 窗口
   05 开机画面
   06 桌面布局与壁纸
   07 顶栏与主导航
   08 左栏卡片
   09 首页视图
   10 作品卡片与详情窗口
   11 存档 / 关于 / 友链 / 留言
   12 右栏与状态栏
   13 运行对话框 / 右键菜单 / 提示条
   14 动效与响应式
   ========================================================================== */

/* ── 01 变量与主题 ─────────────────────────────────────────────── */
:root {
  /* 主题色（壁纸相关，可由 JS 切换） */
  --paper:      #ffeaf3;
  --grid-line:  rgba(255, 158, 203, .28);
  --desk-2:     #ffd9ea;
  --desk-3:     #e6f6ff;

  /* 粉色系 */
  --pink-50:  #fff7fb;
  --pink-100: #ffe9f3;
  --pink-200: #ffd0e6;
  --pink-300: #ffb3d9;
  --pink-400: #ff9ecb;
  --pink-500: #f773b0;
  --pink-600: #e04f96;
  --pink-700: #b83b78;

  /* 中性色（窗口 / 文字） */
  --ink:      #4a3340;
  --ink-2:    #7c6070;
  --ink-3:    #a98d9c;
  --line:     #6b4a5c;
  --paper-w:  #fffdfe;
  --face:     #ffeaf3;
  --face-2:   #ffe0ee;

  /* 点缀色 */
  --mint:   #8fe3c4;
  --sky:    #a9d5ff;
  --butter: #ffe3a3;

  /* 窗口 3D 立体效果：内高光跟着主题走，暗色下才不会白得刺眼 */
  --sh-out:  inset -3px -3px 0 var(--pink-300), inset  3px  3px 0 var(--white);
  --sh-in:   inset  3px  3px 0 var(--pink-300), inset -3px -3px 0 var(--white);
  --sh-out2: inset -2px -2px 0 var(--pink-300), inset  2px  2px 0 var(--white);

  --radius: 10px;
  --shadow-hard: 5px 5px 0 rgba(184, 59, 120, .18);

  --font-cn: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  --font-px: ui-monospace, "Cascadia Mono", Consolas, "Courier New", var(--font-cn);

  /* 表面白：所有"近白"表面都用它，暗色模式下统一变深 */
  --white:      #ffffff;
  --white-2:    #f7f7fa;      /* 比 --white 略暗一档，用于渐变末端 / 棋盘格 */
  --chip-label: rgba(255, 255, 255, .82);   /* 叠在任意色块上的标签底，永远偏白 */
  --on-accent:  #ffffff;      /* 彩色底上的文字，必须纯白 */

  /* 主题切换时颜色平滑过渡（不影响动效本身的时长） */
  --theme-ease: .28s ease;
}

/* ── 01b 暗色模式 ───────────────────────────────────────────────
   只覆盖这一组变量，整站配色跟着变：壁纸、卡片、窗口、状态栏全都走变量。
   （工具箱里的 170 张方块贴图是真实材质，不做处理。） */
:root[data-theme="dark"] {
  --paper:      #1b1622;
  --grid-line:  rgba(255, 158, 203, .10);
  --desk-2:     #241d2e;
  --desk-3:     #1e2230;

  --pink-50:  #241d2e;
  --pink-100: #2c2338;
  --pink-200: #3d2f4d;
  --pink-300: #55395f;
  --pink-400: #8a5f9e;
  --pink-500: #e07fc0;
  --pink-600: #ff9ed4;
  --pink-700: #ffc2e4;

  --ink:      #ece3ef;
  --ink-2:    #c3b3cd;
  --ink-3:    #a495b0;      /* 原来是 #8b7c99，对比度只有 4.4，暗色下偏灰看不清 */
  --line:     #7a5588;
  --paper-w:  #241d2e;
  --face:     #2c2338;
  --face-2:   #332844;

  /* 暗色下的"白"：面板/按钮/输入框都用这几个，避免被写死的纯白刺到 */
  --white:      #332a40;
  --white-2:    #2a2334;
  --chip-label: rgba(28, 22, 34, .86);
  --on-accent:  #ffffff;    /* 彩色底上的文字仍然是纯白 */

  --shadow-hard: 5px 5px 0 rgba(0, 0, 0, .42);
}
:root[data-theme="dark"] body::before { opacity: .35; }
:root[data-theme="dark"] .hero,
暗色下的 .friend 引用:root[data-theme="dark"] .card,
:root[data-theme="dark"] .win,
:root[data-theme="dark"] .window,
:root[data-theme="dark"] .comment,
:root[data-theme="dark"] .work { box-shadow: 6px 6px 0 rgba(0, 0, 0, .38); }
:root[data-theme="dark"] .gallery-empty,
:root[data-theme="dark"] .empty { color: var(--ink-2); }
/* 暗色下这些"纯白"装饰会显得脏：改成主题色或直接去掉 */
:root[data-theme="dark"] .hero__title { text-shadow: 2px 2px 0 var(--paper-w), 4px 4px 0 var(--pink-300); }
:root[data-theme="dark"] .pixel-pal__chip.is-blocked::after { text-shadow: 0 0 3px #000; }
:root[data-theme="dark"] .hero { background: linear-gradient(135deg, var(--paper-w) 0%, var(--pink-50) 45%, var(--pink-100) 100%); }
/* 缩略图底部的渐隐：暗色下用深色，否则会糊成一片浅粉 */
:root[data-theme="dark"] .work__thumb::after {
  background: linear-gradient(180deg, rgba(36, 29, 46, .05) 40%, rgba(36, 29, 46, .55));
}
/* 状态灯在原色下对比度只有 3.1，暗色里换成亮一档 */
:root[data-theme="dark"] .online { color: #57d99a; }
/* 贴图是深色材质，深色背景下给个亮边保证看得清 */
:root[data-theme="dark"] .pixel-pal__chip,
:root[data-theme="dark"] .quick__item img,
:root[data-theme="dark"] .matlist img,
:root[data-theme="dark"] .pixel-stage {
  background: repeating-conic-gradient(#2a2334 0% 25%, #332b3f 0% 50%) 50% / 16px 16px;
}

/* ── 02 基础重置 ───────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.75 var(--font-cn);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {                       /* 极淡的格子纹理，铺满整页 */
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: .5;
  pointer-events: none;
  z-index: 0;
}
img { image-rendering: pixelated; -ms-interpolation-mode: nearest-neighbor; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--pink-600); text-decoration: none; }
a:hover { color: var(--pink-700); text-decoration: underline; }
[hidden] { display: none !important; }
::selection { background: var(--pink-300); color: #fff; }

/* 滚动条也做成粉色像素感 */
* { scrollbar-width: thin; scrollbar-color: var(--pink-400) transparent; }
*::-webkit-scrollbar { width: 12px; height: 12px; }
*::-webkit-scrollbar-track { background: var(--pink-100); }
*::-webkit-scrollbar-thumb {
  background: var(--pink-300);
  border: 2px solid var(--pink-100);
}
*::-webkit-scrollbar-thumb:hover { background: var(--pink-400); }

/* ── 03 公共装饰 ───────────────────────────────────────────────── */
/* 纯 CSS 像素爱心（用 box-shadow 画点阵） */
.px-heart {
  display: inline-block; position: relative;
  width: 2px; height: 2px; margin: 0 4px;
  background: var(--pink-500);
  box-shadow:
    2px -2px 0 var(--pink-500),  4px -4px 0 var(--pink-500),  6px -2px 0 var(--pink-500),  8px -2px 0 var(--pink-500), 10px -4px 0 var(--pink-500), 12px -2px 0 var(--pink-500),
    0 0 0 var(--pink-500),       2px 0 0 var(--pink-500),     4px 0 0 var(--pink-500),     6px 0 0 var(--pink-500),    8px 0 0 var(--pink-500),    10px 0 0 var(--pink-500),   12px 0 0 var(--pink-500), 14px 0 0 var(--pink-500),
    0 2px 0 var(--pink-500),     2px 2px 0 var(--pink-500),   4px 2px 0 var(--pink-500),   6px 2px 0 var(--pink-500),  8px 2px 0 var(--pink-500),  10px 2px 0 var(--pink-500), 12px 2px 0 var(--pink-500), 14px 2px 0 var(--pink-500),
    2px 4px 0 var(--pink-500),   4px 4px 0 var(--pink-500),   6px 4px 0 var(--pink-500),   8px 4px 0 var(--pink-500),  10px 4px 0 var(--pink-500), 12px 4px 0 var(--pink-500),
    4px 6px 0 var(--pink-500),   6px 6px 0 var(--pink-500),   8px 6px 0 var(--pink-500),  10px 6px 0 var(--pink-500),
    6px 8px 0 var(--pink-500),   8px 8px 0 var(--pink-500);
  transform: scale(.62);
  transform-origin: 0 0;
  vertical-align: -3px;
}
.px-heart--sm { transform: scale(.5); vertical-align: -2px; }
.px-heart--big { transform: scale(1.5); margin: 0 10px; }

/* 图标：形状与 mask 写在 assets/css/icons.css（由 tools/gen-icons.js 生成） */

.dot {
  display: inline-block; width: 8px; height: 8px; margin-right: 6px;
  background: var(--pink-400); box-shadow: inset -2px -2px 0 var(--pink-600);
  vertical-align: 1px;
}

/* ── 04 像素按钮 / 表单 / 表格 / 窗口 ──────────────────────────── */
.pixbtn {
  position: relative;
  padding: 8px 16px;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(var(--white), var(--face));
  box-shadow: var(--sh-out), 3px 3px 0 rgba(107, 74, 92, .18);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: .02em;
  transition: transform .06s ease, box-shadow .06s ease, background .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.pixbtn:hover { background: linear-gradient(var(--white), var(--pink-100)); }
.pixbtn:active {
  transform: translate(2px, 2px);
  box-shadow: var(--sh-in), 1px 1px 0 rgba(107, 74, 92, .18);
}
.pixbtn--primary {
  background: linear-gradient(var(--pink-200), var(--pink-400));
  color: #fff;
  text-shadow: 1px 1px 0 rgba(184, 59, 120, .5);
  box-shadow: inset -3px -3px 0 var(--pink-600), inset 3px 3px 0 var(--pink-100), 3px 3px 0 rgba(184, 59, 120, .25);
}
.pixbtn--primary:hover { background: linear-gradient(var(--pink-300), var(--pink-500)); }
.pixbtn--block { width: 100%; justify-content: center; }

.chipbtn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border: 2px solid var(--line); border-radius: 4px;
  background: linear-gradient(var(--white), var(--face));
  box-shadow: var(--sh-out2);
  font-weight: 700; font-size: 12px;
}
.chipbtn:active { box-shadow: var(--sh-in); }
.chipbtn b { font-family: var(--font-px); }

/* 输入控件 */
input[type="text"], input[type="search"], input[type="url"], input[type="email"],
input:not([type]), textarea, select {
  width: 100%;
  padding: 9px 12px;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  box-shadow: var(--sh-in);
  outline: none;
  transition: background .15s;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, textarea:focus, select:focus { background: var(--pink-50); }
textarea { resize: vertical; min-height: 90px; }
select { appearance: none; padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, var(--pink-600) 50%),
                    linear-gradient(135deg, var(--pink-600) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* 表单布局 */
.form { display: grid; gap: 14px; max-width: 620px; }
.form__row { display: grid; gap: 6px; }
.form__row--inline { grid-template-columns: 1fr 160px; gap: 14px; }
.form__row--foot { grid-auto-flow: column; justify-content: start; align-items: center; gap: 14px; }
.form label { font-weight: 700; font-size: 13px; }
.form label i { color: var(--pink-500); font-style: normal; }
.form__note { color: var(--ink-2); font-size: 12px; margin: 0; }
.err { min-height: 0; margin: 0; color: #d63b6a; font-size: 12px; font-weight: 700; }
.err:empty { display: none; }
.counter { font-family: var(--font-px); font-size: 12px; color: var(--ink-2); }

/* 表格 */
.tablewrap { padding: 14px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.table th, .table td { padding: 9px 12px; border-bottom: 2px dotted var(--pink-200); text-align: left; }
.table th { background: var(--pink-100); font-family: var(--font-px); font-size: 12px; letter-spacing: .04em; }
.table tbody tr:hover { background: var(--pink-50); }
.table td b { font-weight: 700; }
.table .mini { display: inline-flex; align-items: center; gap: 6px; }
.table .mini img { width: 20px; height: 20px; border: 1px solid var(--line); }
.tagpill {
  display: inline-block; padding: 1px 8px; margin: 0 4px 4px 0;
  border: 1px solid var(--pink-400); border-radius: 999px;
  background: var(--pink-50); font-size: 11px; color: var(--pink-600);
  font-family: var(--font-cn);
}
button.tagpill { transition: background .15s, color .15s; }
button.tagpill:hover { background: var(--pink-200); }
button.tagpill.is-on {
  background: var(--pink-400); border-color: var(--pink-600); color: #fff; font-weight: 700;
}
.tags { display: flex; flex-wrap: wrap; gap: 2px; }

/* 复古窗口 */
.win, .window {
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--paper-w);
  box-shadow: 6px 6px 0 rgba(184, 59, 120, .16);
  overflow: hidden;
}
.win__bar, .window__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 5px 8px;
  background: linear-gradient(90deg, var(--pink-400), var(--pink-200) 70%, var(--pink-100));
  border-bottom: 2px solid var(--line);
  color: #fff; font-weight: 700; font-size: 13px;
  text-shadow: 1px 1px 0 rgba(184, 59, 120, .45);
}
.win__title, .window__title { display: inline-flex; align-items: center; gap: 7px; }
.win__ctl, .window__ctl { display: inline-flex; gap: 3px; }
.win__ctl i, .window__ctl button {
  width: 20px; height: 18px; display: grid; place-items: center;
  border: 2px solid var(--line); border-radius: 3px;
  background: linear-gradient(var(--white), var(--face));
  box-shadow: var(--sh-out2);
  color: var(--ink); font-style: normal; font-size: 11px; line-height: 1;
  text-shadow: none; padding: 0;
}
.win__ctl i:active, .window__ctl button:active { box-shadow: var(--sh-in); }
.win__body { padding: 16px; }
.win--panel { margin-bottom: 18px; }

/* 键值表 */
.kv { margin: 0; display: grid; gap: 6px; }
.kv > div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: baseline; }
.kv dt {
  font-family: var(--font-px); font-size: 11px; letter-spacing: .06em;
  color: var(--ink-2); text-transform: uppercase;
}
.kv dd { margin: 0; font-size: 13px; }
.kv--sys > div { grid-template-columns: 88px 1fr; }
.kv--sys dd { font-family: var(--font-px); font-size: 12px; }

/* ── 05 开机画面 ───────────────────────────────────────────────── */
.boot {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--pink-100), var(--desk-3) 60%, var(--pink-200));
  transition: opacity .45s ease;
}
.boot.is-off { opacity: 0; pointer-events: none; }
.boot__box {
  width: min(440px, 86vw);
  padding: 30px 26px 22px;
  text-align: center;
  border: 3px solid var(--line); border-radius: 10px;
  background: var(--paper-w);
  box-shadow: 8px 8px 0 rgba(184, 59, 120, .2);
}
.boot__logo { display: grid; place-items: center; margin-bottom: 16px; }
.boot__title {
  font-family: var(--font-px); font-size: 20px; letter-spacing: .12em;
  color: var(--pink-600); margin: 0 0 6px;
}
.boot__sub { margin: 0 0 18px; color: var(--ink-2); font-size: 13px; }
.boot__bar {
  height: 22px; border: 2px solid var(--line); border-radius: 4px;
  background: var(--white); box-shadow: var(--sh-in); padding: 3px;
}
.boot__bar i {
  display: block; height: 100%; width: 0;
  background: repeating-linear-gradient(90deg, var(--pink-400) 0 10px, var(--pink-300) 10px 14px);
  transition: width .25s ease;
}
.boot__log, .boot__hint { font-family: var(--font-px); font-size: 11px; color: var(--ink-2); margin: 10px 0 0; }
.boot__hint { color: var(--ink-3); }

/* ── 06 桌面布局 ───────────────────────────────────────────────── */
.desktop {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 232px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "top top top"
    "side main rail"
    "status status status";
  gap: 14px;
  padding: 10px 14px 12px;
}
.topbar  { grid-area: top; }
.sidebar { grid-area: side; }
.main    { grid-area: main; min-width: 0; }
.rail    { grid-area: rail; }
.statusbar { grid-area: status; }

/* ── 07 顶栏与主导航 ───────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 6px 10px;
  border: 2px solid var(--line); border-radius: 8px;
  background: linear-gradient(var(--white), var(--face));
  box-shadow: var(--sh-out), var(--shadow-hard);
}
.topbar__brand { display: inline-flex; align-items: center; gap: 7px; }
.topbar__brand img { width: 20px; height: 20px; border: 1px solid var(--line); }
.topbar__name { font-family: var(--font-px); font-size: 12px; color: var(--pink-700); }

.nav { display: flex; flex-wrap: wrap; gap: 6px; margin-inline: auto; }
.nav__btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(var(--white), var(--pink-100));
  box-shadow: var(--sh-out2), 2px 2px 0 rgba(184, 59, 120, .14);
  font-weight: 700; font-size: 13px;
  transition: transform .08s ease, background .18s, box-shadow .08s;
}
.nav__btn .ico { color: var(--pink-600); }
.nav__btn:hover { background: linear-gradient(var(--white), var(--pink-200)); transform: translateY(-2px); }
.nav__btn:active { transform: translateY(0); box-shadow: var(--sh-in); }
.nav__btn.is-active {
  background: linear-gradient(var(--pink-300), var(--pink-500));
  color: #fff;
  text-shadow: 1px 1px 0 rgba(184, 59, 120, .5);
  box-shadow: inset -3px -3px 0 var(--pink-600), inset 3px 3px 0 var(--pink-100);
}
.nav__btn.is-active .ico { color: #fff; }

.topbar__right { display: inline-flex; align-items: center; gap: 8px; }
.stamp {
  font-family: var(--font-px); font-size: 12px;
  padding: 4px 10px;
  border: 2px solid var(--line); border-radius: 4px;
  background: var(--white); box-shadow: var(--sh-in);
  color: var(--pink-700);
}

/* ── 08 左栏卡片 ───────────────────────────────────────────────── */
.sidebar, .rail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card {
  border: 2px solid var(--line); border-radius: 6px;
  background: linear-gradient(var(--paper-w), var(--pink-50));
  box-shadow: var(--sh-out), 4px 4px 0 rgba(184, 59, 120, .14);
  overflow: hidden;
}
.card__title {
  display: flex; align-items: center;
  padding: 5px 9px;
  background: linear-gradient(90deg, var(--pink-300), var(--pink-100));
  border-bottom: 2px solid var(--line);
  font-family: var(--font-px); font-size: 11.5px; letter-spacing: .04em;
  color: var(--pink-700);
}
.card__title .px-heart { margin-left: auto; }

.profile { display: flex; gap: 11px; padding: 12px 12px 6px; align-items: flex-start; }
.avatar {
  position: relative; flex: none;
  width: 80px; height: 80px;
  border: 2px solid var(--line); border-radius: 4px;
  background: linear-gradient(160deg, var(--pink-100), var(--pink-300));
  box-shadow: var(--sh-out2);
  display: grid; place-items: center;
  overflow: hidden;
}
/* 真人头像：铺满整个方格，底部叠一层渐变让角落的心形更清楚 */
.avatar__img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 32%;
  display: block;
}
.avatar::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 34%; z-index: 2;
  background: linear-gradient(180deg, rgba(255, 158, 203, 0), rgba(255, 158, 203, .35));
  pointer-events: none;
}
.avatar__sparkle { z-index: 3; }
/* 旧的手绘像素脸样式保留在这里，想换回来只要把 HTML 里的 <img> 换回那几个 span */
.avatar__face {
  position: relative; width: 46px; height: 40px;
  background: #fff5ef; border: 2px solid var(--line); border-radius: 8px 8px 10px 10px;
  box-shadow: inset -3px -3px 0 #ffd9c9;
}
.avatar__eye { position: absolute; top: 12px; width: 6px; height: 8px; background: #6b4a5c; border-radius: 2px; }
.avatar__eye--l { left: 8px; } .avatar__eye--r { right: 8px; }
.avatar__eye::after { content: ""; position: absolute; top: 1px; left: 1px; width: 2px; height: 2px; background: var(--white); }
.avatar__blush { position: absolute; top: 22px; width: 8px; height: 4px; background: var(--pink-300); border-radius: 2px; }
.avatar__blush--l { left: 5px; } .avatar__blush--r { right: 5px; }
.avatar__mouth { position: absolute; top: 24px; left: 50%; margin-left: -4px; width: 8px; height: 4px;
  border-bottom: 2px solid #6b4a5c; border-radius: 0 0 4px 4px; }
.avatar__deco { position: absolute; right: -6px; top: -6px; width: 26px; height: 26px; opacity: .95; }
.avatar__sparkle { position: absolute; left: 4px; top: 2px; color: #fff; font-size: 12px; text-shadow: 0 0 4px var(--pink-500); }
.profile__info { min-width: 0; }
.profile__say { margin: 0; font-family: var(--font-px); font-size: 11px; color: var(--pink-600); }
.profile__role { margin: 2px 0 0; font-size: 11px; color: var(--ink-2); line-height: 1.5; }
.profile__bio {
  margin: 4px 12px 12px; padding: 9px 10px;
  border: 2px dashed var(--pink-300); border-radius: 4px;
  background: var(--white);
  font-size: 12px; line-height: 1.8; color: var(--ink-2);
}

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px; }
.quick__item {
  display: grid; place-items: center; gap: 3px;
  padding: 6px 2px 4px;
  border: 2px solid var(--line); border-radius: 4px;
  background: linear-gradient(var(--white), var(--pink-100));
  box-shadow: var(--sh-out2);
  font-size: 10px; font-weight: 700; color: var(--ink-2);
  transition: transform .08s;
}
.quick__item img { width: 24px; height: 24px; border: 1px solid var(--line); }
.quick__item:hover { transform: translateY(-2px); background: linear-gradient(var(--white), var(--pink-200)); color: var(--pink-700); }
.quick__item:active { box-shadow: var(--sh-in); transform: translateY(0); }


.notice { display: flex; gap: 8px; align-items: center; margin: 8px 10px 12px; }
.notice__pic { width: 42px; height: 42px; border: 2px solid var(--line); }
.notice p { margin: 0; font-size: 11px; line-height: 1.6; color: var(--ink-2); }

/* 左栏工具箱入口 */
.toolgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 10px 6px; }
.toolgrid__item {
  display: grid; place-items: center; gap: 3px;
  padding: 6px 2px 4px;
  border: 2px solid var(--line); border-radius: 4px;
  background: linear-gradient(var(--white), var(--white-2));
  box-shadow: var(--sh-out2);
  font-size: 10px; font-weight: 700; color: var(--ink-2);
  transition: transform .08s;
}
.toolgrid__item:hover { transform: translateY(-2px); color: var(--pink-700); background: linear-gradient(var(--white), var(--pink-100)); }
.toolgrid__item:active { box-shadow: var(--sh-in); transform: translateY(0); }
.toolgrid__ico {
  width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 3px;
  display: block; image-rendering: pixelated;
  background-image:
    linear-gradient(rgba(107, 74, 92, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107, 74, 92, .18) 1px, transparent 1px);
  background-size: 25% 25%;
}
.toolgrid__ico--color   { background-color: #ff9ecb; }
.toolgrid__ico--palette { background-color: #b8a2ff; }
.toolgrid__ico--picker  { background-color: #8fe3c4; }
.toolgrid__ico--coord   { background-color: #a9d5ff; }
.toolgrid__ico--mat     { background-color: #ffcf8f; }
.toolgrid__ico--ore     { background-color: #4aedd9; }
.toolgrid__ico--ench    { background-color: #ffe3a3; }
.toolgrid__ico--all     { background-color: #e0d0d8; }
.toolbox-tip {
  margin: 0 10px 12px; padding: 6px 8px;
  border: 2px dashed var(--pink-300); border-radius: 4px;
  font-size: 11px; line-height: 1.65; color: var(--ink-2);
}

/* ── 工具箱窗口 ─────────────────────────────────────────────────── */
.window--tools { width: min(940px, 95vw); }
/* 注意：这里用 .window__body.tools-body 提高优先级，
   否则会被后面通用 .window__body 的 padding 规则按源码顺序覆盖，
   导致左栏工具列表和右栏内容都塌成 0 宽。 */
.window__body.tools-body {
  display: grid; grid-template-columns: 152px minmax(0, 1fr);
  gap: 0; padding: 0;
}
/* 窄屏：工具列表转为顶部横向条 */
@media (max-width: 860px) {
  .window__body.tools-body { grid-template-columns: minmax(0, 1fr); }
}
.tools-nav {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 8px;
  background: linear-gradient(180deg, var(--pink-100), var(--pink-50));
  border-right: 2px solid var(--line);
}
.tools-nav__item {
  padding: 8px 10px; text-align: left;
  border: 2px solid transparent; border-radius: 4px;
  background: none; font-size: 12.5px; font-weight: 700; color: var(--ink-2);
}
.tools-nav__item:hover { background: var(--white); border-color: var(--pink-200); }
.tools-nav__item.is-active {
  background: linear-gradient(var(--white), var(--pink-100));
  border-color: var(--line); color: var(--pink-700);
  box-shadow: var(--sh-out2);
}
.tools-panes { padding: 16px; }
.tool-pane { display: none; animation: viewIn .22s ease both; }
.tool-pane.is-active { display: block; }
/* 工具多、信息长：让整条内容区一起滚，避免底部内容被窗口裁掉。
   选择器写成 .window.window--tools 是为了盖过通用 .window 的 width（源码顺序在后面）。 */
.window.window--tools { width: min(940px, 95vw); max-height: 88vh; display: flex; flex-direction: column; }
.window--tools .tools-body { flex: 1; min-height: 0; }
.tools-panes { overflow: auto; }
.kv--work--two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 18px; }
.tool-pane__title { margin: 0 0 6px; font-size: 16px; color: var(--pink-700); }
.tool-pane__desc { margin: 0 0 14px; font-size: 12.5px; line-height: 1.8; color: var(--ink-2); }
.tool-note { font-size: 11.5px; color: var(--ink-3); }
.tool-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 12px; }
.tool-row .field--grow { flex: 1 1 200px; }
.tool-row .field--act { flex: none; }
.field { display: grid; gap: 5px; }
.field label { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.field input, .field select { width: 100%; }
.coord-grid, .mat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kv--work { margin-top: 4px; }
.kv--work > div { grid-template-columns: 104px 1fr; padding: 5px 0; border-bottom: 2px dotted var(--pink-200); }
.kv--work dt { font-family: var(--font-cn); font-size: 12px; text-transform: none; letter-spacing: 0; }
.kv--work dd { font-family: var(--font-px); font-size: 12.5px; color: var(--pink-700); }

/* 颜色转换 */
.color-out { display: flex; gap: 14px; align-items: stretch; margin-bottom: 12px; }
.swatch {
  flex: none; width: 108px; border: 2px solid var(--line); border-radius: 4px;
  box-shadow: var(--sh-out2); background: var(--pink-400);
  position: relative; min-height: 108px;
}
.swatch::after {
  content: attr(data-hex); position: absolute; left: 0; right: 0; bottom: 0;
  padding: 3px 0; text-align: center;
  background: var(--chip-label);
  font-family: var(--font-px); font-size: 10.5px; color: var(--ink);
}
.color-out .kv { flex: 1; }
.mc-match { display: flex; flex-wrap: wrap; gap: 8px; }
.mc-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px;
  border: 2px solid var(--line); border-radius: 999px;
  background: var(--white); box-shadow: var(--sh-out2);
  font-size: 12px;
}
.mc-chip i {
  width: 16px; height: 16px; border: 1px solid var(--line); border-radius: 2px; display: block;
}
.mc-chip b { font-family: var(--font-px); color: var(--pink-600); }
.mc-chip em { font-style: normal; color: var(--ink-3); font-size: 11px; }

/* 调色板 */
.palette { display: flex; flex-wrap: wrap; gap: 8px; }
.pal {
  width: 96px; border: 2px solid var(--line); border-radius: 4px; overflow: hidden;
  background: var(--white); box-shadow: var(--sh-out2);
  padding: 0; cursor: pointer; transition: transform .1s;
}
.pal:hover { transform: translateY(-3px); }
.pal__chip { display: block; height: 54px; }
.pal__meta { display: block; padding: 4px 6px; font-family: var(--font-px); font-size: 10px; color: var(--ink-2); text-align: center; }
.pal__name { display: block; font-family: var(--font-cn); font-size: 10.5px; color: var(--ink-3); }

/* 图片取色 */
.pick-view { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; align-items: start; }
#pickCanvas {
  width: 200px; height: 150px; border: 2px solid var(--line); border-radius: 4px;
  background: var(--pink-50); box-shadow: var(--sh-in); image-rendering: pixelated;
}
.pick-result { display: grid; gap: 12px; }
.ore-canvas {
  width: 100%; max-width: 320px; height: auto; display: block;
  border: 2px solid var(--line); border-radius: 4px; background: #2b2431;
  image-rendering: pixelated; margin-bottom: 12px;
}

/* 像素图纸 */
.pixel-view { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; margin-bottom: 10px; }
.pixel-stage {
  border: 2px solid var(--line); border-radius: 4px; overflow: auto;
  background: repeating-conic-gradient(var(--white-2) 0% 25%, var(--white) 0% 50%) 50% / 16px 16px;
  box-shadow: var(--sh-in);
  max-height: 46vh;
}
#pxCanvas {
  display: block; width: 100%; height: auto; max-width: 512px;
  image-rendering: pixelated; cursor: crosshair;
}
.pixel-right { display: grid; gap: 10px; align-content: start; }
/* 系列开关：一眼看出哪些材质被排除了 */
.series-bar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.series-bar--act { align-items: center; gap: 6px; padding-bottom: 6px; border-bottom: 2px dotted var(--pink-200); }
.series-toggle {
  padding: 2px 8px; border: 2px solid var(--line); border-radius: 999px;
  background: linear-gradient(var(--white), var(--pink-100));
  box-shadow: var(--sh-out2);
  font-size: 11px; font-weight: 700; color: var(--ink-2);
}
.series-toggle em { font-style: normal; font-family: var(--font-px); font-size: 10px; color: var(--ink-3); margin-left: 4px; }
.series-toggle:hover { background: linear-gradient(var(--white), var(--pink-200)); }
.series-toggle.is-off {
  background: repeating-linear-gradient(45deg, #efe6ec 0 4px, #e2d6de 4px 8px);
  color: var(--ink-3); text-decoration: line-through;
  box-shadow: var(--sh-in);
}
.pixel-pal { display: flex; flex-wrap: wrap; gap: 5px; max-height: 240px; overflow: auto; padding: 2px; }
.pixel-pal__chip {
  width: 34px; height: 34px; padding: 0;
  border: 2px solid var(--line); border-radius: 3px;
  box-shadow: var(--sh-out2);
  /* 贴图未就绪时先用方块的纯色顶着，贴图加载后由 JS 覆盖 background-image */
  background-color: var(--chip, #ccc);
  background-size: cover;
  background-position: center;
  image-rendering: pixelated;
}
.pixel-pal__chip.is-on { outline: 3px solid var(--pink-500); outline-offset: 1px; }
/* 被排除的方块：打叉 + 降透明度，但仍然可以右键恢复 */
.pixel-pal__chip.is-blocked { opacity: .38; position: relative; }
.pixel-pal__chip.is-blocked::after {
  content: "✕"; position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #d63b6a; font-size: 14px; font-weight: 900;
  text-shadow: 0 0 3px #fff;
}
/* 快捷键提示条 */
.kbd-hint {
  margin: 0 0 8px; padding: 6px 8px;
  border: 2px dashed var(--pink-300); border-radius: 4px;
  background: var(--pink-50);
  font-size: 11px; line-height: 1.9; color: var(--ink-2);
}
.kbd-hint kbd {
  display: inline-block; padding: 0 5px; margin: 0 1px;
  border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 3px;
  background: var(--white); font-family: var(--font-px); font-size: 10px; color: var(--ink);
}
.pixel-stats { display: grid; gap: 4px; max-height: 190px; overflow: auto; padding-right: 4px; }
.pixel-stat {
  display: grid; grid-template-columns: 16px 1fr auto; gap: 7px; align-items: center;
  font-size: 12px; color: var(--ink-2);
  padding: 3px 4px; border-bottom: 2px dotted var(--pink-200);
}
.pixel-stat i { width: 16px; height: 16px; border: 1px solid var(--line); border-radius: 2px; display: block; }
.pixel-stat b { font-family: var(--font-px); color: var(--pink-700); }
.pixel-actions { margin-top: 0; margin-bottom: 6px; gap: 8px; }
@media (max-width: 860px) {
  .pixel-view { grid-template-columns: minmax(0, 1fr); }
  .pixel-stage { max-height: 40vh; }
}

@media (max-width: 860px) {
  .tools-body { grid-template-columns: minmax(0, 1fr); }
  .tools-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 2px solid var(--line); }
  .tools-nav__item { white-space: nowrap; }
  .pick-view { grid-template-columns: minmax(0, 1fr); }
  .color-out { flex-direction: column; }
  .swatch { width: 100%; min-height: 84px; }
  /* 窄屏下信息表强制单列，双列会把 280px 的最小列宽顶出容器 */
  .kv--work--two { grid-template-columns: minmax(0, 1fr); }
  .kv--work > div { grid-template-columns: 92px minmax(0, 1fr); }
}

/* ── 09 首页视图 ───────────────────────────────────────────────── */
.view { display: none; }
.view.is-active { display: block; animation: viewIn .34s cubic-bezier(.22, .8, .3, 1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* 卡片错落淡入：每张依次晚 45ms（--i 由 JS 写在卡片上） */
.view.is-active .grid > .work {
  animation: viewIn .36s cubic-bezier(.22, .8, .3, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@media (max-width: 860px) {
  .view.is-active .grid > .work { animation-delay: calc(var(--i, 0) * 25ms); }
}
/* 数据胶囊里的滚动数字 */
.hero__stats .num { font-style: normal; }

/* 区块标题的像素装饰线：原来的虚线换成方块状点阵 */
.sec::after {
  height: 6px;
  background:
    repeating-linear-gradient(90deg,
      var(--pink-300) 0 6px, transparent 6px 10px,
      var(--pink-200) 10px 13px, transparent 13px 20px);
}
/* 视图大标题下改用 SVG 笔触（见第 16 节），这条像素装饰线就不再显示 */
.viewhead { position: relative; padding-bottom: 10px; }

/* 樱花开启时给页面加一层极淡的粉雾，氛围更足 */
body.is-sakura .desktop::before {
  content: ""; position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(120% 80% at 50% -10%, rgba(255, 158, 203, .12), transparent 60%);
}

.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr);
  gap: 18px; align-items: center;
  margin-bottom: 22px; padding: 20px;
  border: 2px solid var(--line); border-radius: 8px;
  background:
    linear-gradient(135deg, #fff 0%, var(--pink-50) 45%, var(--pink-100) 100%);
  box-shadow: var(--sh-out), 6px 6px 0 rgba(184, 59, 120, .14);
}
.hero__eyebrow { margin: 0 0 6px; font-family: var(--font-px); font-size: 11px; letter-spacing: .16em; color: var(--pink-500); }
.hero__title {
  margin: 0 0 10px;
  font-size: 38px; line-height: 1.1; letter-spacing: .04em;
  color: var(--pink-700);
  text-shadow: 2px 2px 0 #fff, 4px 4px 0 var(--pink-200);
}
.hero__cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__desc { margin: 0 0 16px; color: var(--ink-2); max-width: 46ch; }
.hero__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.hero__stats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.hero__stats li {
  padding: 5px 12px;
  border: 2px solid var(--line); border-radius: 999px;
  background: var(--white); box-shadow: var(--sh-out2);
  font-size: 12px;
}
.hero__stats b { font-family: var(--font-px); color: var(--pink-600); }

/* 纯 CSS 方块浮岛 */
.hero__right { display: grid; gap: 10px; justify-items: center; }
.island { position: relative; width: 100%; max-width: 300px; height: 220px; }
.island__sky { position: absolute; inset: 0 0 auto 0; height: 96px; }
.sun {
  position: absolute; right: 6px; top: 4px; width: 22px; height: 22px;
  background: var(--butter); box-shadow: 0 0 0 4px rgba(255, 227, 163, .45);
}
.cloud { position: absolute; height: 10px; background: var(--white); box-shadow: 0 0 0 2px rgba(107, 74, 92, .12); }
.cloud--1 { width: 46px; left: 6px;  top: 12px; animation: drift 18s linear infinite; }
.cloud--2 { width: 30px; left: 96px; top: 34px; animation: drift 26s linear infinite reverse; }
.cloud--3 { width: 38px; left: 40px; top: 58px; animation: drift 22s linear infinite; }
@keyframes drift { from { transform: translateX(-12px); } to { transform: translateX(40px); } }
.island__layer { position: absolute; left: 50%; transform: translateX(-50%); }
.island__layer--1 { top: 96px;  width: 240px; height: 26px; background: #7fbf5a; box-shadow: inset -6px -8px 0 #5d9640; }
.island__layer--2 { top: 122px; width: 190px; height: 22px; background: #8b6547; box-shadow: inset -6px -6px 0 #6f4d34; }
.island__layer--3 { top: 144px; width: 120px; height: 26px; background: #7a5740; box-shadow: inset -6px -8px 0 #5c4030;
  clip-path: polygon(0 0, 100% 0, 82% 100%, 18% 100%); }
.island__house { position: absolute; left: 50%; top: 46px; transform: translateX(-50%); width: 74px; height: 54px; }
.island__roof { position: absolute; inset: 0 0 auto 0; height: 24px; background: var(--pink-400);
  clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.island__wall { position: absolute; left: 6px; right: 6px; top: 24px; bottom: 0; background: linear-gradient(#fff, #ffe8d6);
  box-shadow: inset -4px -4px 0 #f0cdb6; }
.island__door { position: absolute; left: 50%; margin-left: -9px; bottom: 0; width: 18px; height: 22px; background: #a9714a; }
.island__win  { position: absolute; left: 12px; top: 30px; width: 12px; height: 12px; background: var(--sky); box-shadow: inset -2px -2px 0 #7fb3e0; }
.island__win::after { content: ""; position: absolute; right: 10px; top: 0; width: 12px; height: 12px; background: var(--sky); box-shadow: inset -2px -2px 0 #7fb3e0; }
.island__tree { position: absolute; right: 74px; top: 62px; width: 8px; height: 34px; background: #7a5740; }
.island__tree span { position: absolute; left: -18px; top: -26px; width: 44px; height: 30px; background: #6fb154;
  box-shadow: inset -5px -5px 0 #55923e; border-radius: 4px; }
.island__tree span::after { content: ""; position: absolute; left: 8px; top: -8px; width: 28px; height: 12px; background: #f7b6cf; border-radius: 3px; }
.hero__tip { margin: 0; font-size: 12px; color: var(--ink-3); font-family: var(--font-px); }

.sec {
  display: flex; align-items: center; gap: 8px;
  margin: 26px 0 12px; font-size: 17px; color: var(--pink-700);
}
.sec::after { content: ""; flex: 1; height: 4px;
  background: repeating-linear-gradient(90deg, var(--pink-200) 0 8px, transparent 8px 14px); }

.marquee {
  margin-top: 22px; padding: 8px 0;
  border: 2px solid var(--line); border-radius: 6px;
  background: linear-gradient(var(--white), var(--pink-50));
  overflow: hidden; white-space: nowrap;
  box-shadow: var(--sh-out2);
}
.marquee__track { display: inline-flex; gap: 32px; animation: marquee 26s linear infinite; font-family: var(--font-px); font-size: 12px; color: var(--pink-600); }
.marquee__track span { flex: none; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── 10 作品卡片 ───────────────────────────────────────────────── */
.viewhead { margin-bottom: 14px; }
.viewhead__title { display: flex; align-items: center; gap: 9px; margin: 0 0 4px; font-size: 22px; color: var(--pink-700); }
.viewhead__sub { margin: 0; color: var(--ink-2); font-size: 13px; }
.viewhead__sub b { font-family: var(--font-px); color: var(--pink-600); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }

.work {
  display: block; padding: 0;
  border: 2px solid var(--line); border-radius: 6px;
  background: var(--paper-w);
  box-shadow: var(--sh-out), 4px 4px 0 rgba(184, 59, 120, .14);
  overflow: hidden; text-align: left;
  transition: transform .12s ease, box-shadow .12s ease;
  animation: viewIn .3s ease both;
  perspective: 1000px;              /* 3D 翻面 */
  cursor: pointer;
}
.work__inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .52s cubic-bezier(.4, .1, .2, 1);
}
.work.is-flipped .work__inner { transform: rotateY(180deg); }
.work__face {
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: grid; grid-template-rows: auto 1fr auto;
  background: var(--paper-w);
}
.work__front { position: relative; }
.work__back {
  position: absolute; inset: 0;
  transform: rotateY(180deg);
  grid-template-rows: auto auto 1fr auto auto;
  align-content: start;
}
.work__kv { padding: 9px 10px 4px; gap: 3px; }
.work__kv > div { grid-template-columns: 46px 1fr; gap: 6px; }
.work__kv dt { font-family: var(--font-cn); font-size: 11.5px; text-transform: none; letter-spacing: 0; }
.work__kv dd { font-size: 12px; }
.work__tags { padding: 4px 10px 0; }
.work__tags .tagpill { font-size: 10px; padding: 0 6px; margin: 0 3px 3px 0; }
.work__mats { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 6px 10px 10px; }
.work__mats span { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--ink-2); }
.work__mats img { width: 18px; height: 18px; border: 1px solid var(--line); }
/* 悬停轻微弹跳：用 keyframes 做"跳一下"，比单纯的 transform 更有生气。
   .work 本身带入场动画 viewIn，这里在 hover 时用 animation 覆盖，动画结束后停在抬起的位置。 */
@keyframes cardBounce {
  0%   { transform: translateY(0)      scale(1); }
  38%  { transform: translateY(-8px)   scale(1.016); }
  62%  { transform: translateY(-3px)   scale(1.008); }
  82%  { transform: translateY(-6px)   scale(1.012); }
  100% { transform: translateY(-5px)   scale(1.01); }
}
@keyframes cardBounceSmall {
  0%   { transform: translateY(0); }
  45%  { transform: translateY(-5px); }
  75%  { transform: translateY(-2px); }
  100% { transform: translateY(-4px); }
}
.work:hover,
.work:focus-visible {
  animation: cardBounce .42s cubic-bezier(.34, 1.56, .64, 1) forwards;
  border-color: var(--pink-500);
  box-shadow: 8px 10px 0 rgba(224, 79, 150, .22);
  z-index: 2;
}
.work:active { animation: none; transform: translateY(-1px) scale(.995); }
/* 其余卡片做成更轻的版本，保持清爽 */
弹跳动画里的 .friend.quick__item:hover,
.toolgrid__item:hover,
.pal:hover { animation: cardBounceSmall .34s cubic-bezier(.34, 1.5, .64, 1) forwards; }
.work__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 4px 8px;
  background: linear-gradient(90deg, var(--pink-200), var(--pink-50));
  border-bottom: 2px solid var(--line);
  font-family: var(--font-px); font-size: 11px; color: var(--pink-700);
}
/* 放大后的方块纹理会加一层像素网格，避免糊成一片色块 */
.work__thumb {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background-color: #fbf1f6;
  background-image:
    linear-gradient(rgba(107, 74, 92, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107, 74, 92, .16) 1px, transparent 1px),
    var(--thumb);
  background-repeat: repeat;
  background-size: 32px 32px, 32px 32px, 32px 32px;
  image-rendering: pixelated;
}
.work__thumb::after {                 /* 底部渐隐，保证小方块不抢标题 */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06) 40%, rgba(255, 233, 243, .55));
}
.work__thumb img { width: 100%; height: 100%; object-fit: cover; }
.work__badge {
  position: absolute; left: 6px; top: 6px;
  padding: 1px 8px; border: 2px solid var(--line); border-radius: 999px;
  background: var(--white); font-size: 10px; font-weight: 700; color: var(--pink-600);
}
.work__fav { position: absolute; right: 6px; top: 4px; color: var(--pink-500); }
.work__info { padding: 9px 10px; }
.work__name { margin: 0 0 4px; font-size: 14px; color: var(--ink); }
.work__desc {
  margin: 0; font-size: 12px; line-height: 1.6; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.work__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 10px; border-top: 2px dotted var(--pink-200);
  font-family: var(--font-px); font-size: 11px; color: var(--ink-2);
}
.work__foot .likes { display: inline-flex; align-items: center; gap: 3px; color: var(--pink-600); }
.miniico { width: 14px; height: 14px; border: 1px solid var(--line); vertical-align: -3px; }

.empty { padding: 36px; text-align: center; color: var(--ink-2); }
.empty img { width: 48px; height: 48px; }

/* 详情窗口：可拖动浮窗 */
.window {
  position: fixed; z-index: 60;
  width: min(880px, 94vw);
  background: var(--paper-w);
  box-shadow: 10px 10px 0 rgba(184, 59, 120, .22);
  animation: winIn .2s ease both;
}
@keyframes winIn { from { opacity: 0; transform: scale(.97) translateY(10px); } to { opacity: 1; transform: none; } }
.window__bar { cursor: move; user-select: none; }
.window.is-max { border-radius: 0; }
.window.is-max .ww__shot { aspect-ratio: 21 / 9; }
.window__body { padding: 16px; }
.ww { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; }
.ww__shot {
  border: 2px solid var(--line); border-radius: 4px; overflow: hidden;
  background-color: #fbf1f6;
  background-image:
    linear-gradient(rgba(107, 74, 92, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107, 74, 92, .14) 1px, transparent 1px),
    var(--shot);
  background-size: 40px 40px, 40px 40px, 40px 40px;
  background-repeat: repeat;
  image-rendering: pixelated;
  aspect-ratio: 4 / 3;
}
.ww__shot img { display: none; }
.ww__thumbs { display: flex; gap: 8px; margin-top: 10px; }
.ww__thumb {
  width: 54px; height: 54px; padding: 0;
  border: 2px solid var(--line); border-radius: 4px; overflow: hidden;
  background: var(--white); box-shadow: var(--sh-out2);
}
.ww__thumb.is-active { border-color: var(--pink-500); box-shadow: 0 0 0 2px var(--pink-300); }
.ww__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ww__name { margin: 0 0 8px; font-size: 20px; color: var(--pink-700); }
.ww__desc { margin: 0 0 10px; font-size: 13px; line-height: 1.85; color: var(--ink-2); }
.ww__tags { margin-bottom: 10px; }
.ww__mat { margin-top: 12px; border-top: 2px dotted var(--pink-200); padding-top: 10px; }
.ww__mat h4 { margin: 0 0 8px; font-size: 13px; color: var(--ink); }
.matlist { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; }
.matlist li { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.matlist img { width: 22px; height: 22px; border: 1px solid var(--line); }
.window__foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px; border-top: 2px solid var(--line);
}
/* 工具箱底部：常态显示，不额外撑开间距 */
.window__foot.tools-foot {
  justify-content: space-between;
  margin: 0; padding: 10px 16px;
  background: var(--pink-50);
  position: relative; z-index: 2;
}
.window__foot-note { margin-left: auto; font-family: var(--font-px); font-size: 11px; color: var(--ink-3); }

/* ── 11 存档 / 关于 / 友链 / 留言 ──────────────────────────────── */
.tips {
  padding: 14px 16px;
  border: 2px dashed var(--pink-300); border-radius: 6px;
  background: var(--pink-50); font-size: 13px; color: var(--ink-2);
}
.tips p { margin: 0 0 8px; } .tips p:last-child { margin: 0; }
.tips code {
  font-family: var(--font-px); font-size: 12px;
  padding: 1px 6px; border: 1px solid var(--pink-300); border-radius: 3px;
  background: var(--white); color: var(--pink-700);
}

.about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.about .win--wide { grid-column: 1 / -1; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 92px 1fr 34px; align-items: center; gap: 10px; font-size: 12px; }
.bar {
  display: block; height: 14px; padding: 2px;
  border: 2px solid var(--line); border-radius: 3px;
  background: var(--white); box-shadow: var(--sh-in);
}
.bar b { display: block; height: 100%; width: var(--v, 0);
  background: repeating-linear-gradient(90deg, var(--pink-400) 0 6px, var(--pink-300) 6px 8px); }
.bar--mini { display: inline-block; width: 78px; height: 12px; vertical-align: -2px; padding: 1px; }
.bars em { font-family: var(--font-px); font-style: normal; color: var(--pink-600); text-align: right; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 3px dotted var(--pink-300); display: grid; gap: 12px; }
.timeline li { position: relative; font-size: 13px; color: var(--ink-2); }
.timeline li::before {
  content: ""; position: absolute; left: -22px; top: 7px;
  width: 8px; height: 8px; background: var(--pink-400); box-shadow: inset -2px -2px 0 var(--pink-600);
}
.timeline b { display: inline-block; margin-right: 8px; font-family: var(--font-px); color: var(--pink-700); }



/* 留言板 */
.signin {
  display: grid; justify-items: center; gap: 8px; padding: 18px;
  border: 2px dashed var(--pink-300); border-radius: 6px; background: var(--pink-50);
}
.ghbtn {
  padding: 11px 26px;
  border: 2px solid #2b2431; border-radius: 6px;
  background: #2b2431; color: #fff; font-weight: 700;
  box-shadow: 4px 4px 0 rgba(43, 36, 49, .28);
  display: inline-flex; align-items: center; gap: 8px;
}
.ghbtn::before { content: "◉"; }
.ghbtn:hover { background: #3b3143; }
.signin__or { font-family: var(--font-px); font-size: 11px; color: var(--ink-3); }
.ghostbtn {
  padding: 8px 22px;
  border: 2px dashed var(--pink-400); border-radius: 4px;
  background: var(--white); color: var(--pink-600); font-weight: 700;
}
.ghostbtn:hover { background: var(--pink-100); }
.signin__tip { margin: 4px 0 0; font-size: 11px; color: var(--ink-3); }

.comments { display: grid; gap: 12px; }
.comment {
  padding: 12px 14px;
  border: 2px solid var(--line); border-radius: 6px;
  background: var(--paper-w);
  box-shadow: var(--sh-out2), 3px 3px 0 rgba(184, 59, 120, .12);
}
.comment__head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.comment__ava {
  width: 28px; height: 28px; display: grid; place-items: center; font-size: 14px;
  border: 2px solid var(--line); border-radius: 4px; background: var(--pink-100);
}
.comment__name { font-weight: 700; color: var(--pink-700); }
.comment__meta { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-px); font-size: 11px; color: var(--ink-3); }
.comment__body { margin: 0; font-size: 13px; color: var(--ink-2); white-space: pre-wrap; }
.comment__foot { display: flex; gap: 12px; align-items: center; margin-top: 8px; font-size: 12px; }
.comment__act { border: 0; background: none; padding: 0; color: var(--pink-600); font-weight: 700; }
.comment__act:hover { text-decoration: underline; }
.comment__replies { margin-top: 10px; padding-left: 12px; border-left: 3px dotted var(--pink-300); display: grid; gap: 6px; }
.comment__reply { font-size: 12px; color: var(--ink-2); }
.comment__reply b { color: var(--pink-600); }
.pin { color: var(--pink-500); }

/* ── 12 右栏与状态栏 ───────────────────────────────────────────── */
.card--sys .kv, .sysbox, .mood { padding: 10px 12px; }
.sysbox {
  margin: 0 12px 12px; padding: 10px;
  border: 2px solid var(--line); border-radius: 4px;
  background: var(--white); box-shadow: var(--sh-in);
  font-size: 12px; color: var(--ink-2); min-height: 62px;
}
.online { color: #2fa86a; font-weight: 700; }

.mood { display: flex; gap: 10px; align-items: center; }
.mood img { width: 44px; height: 44px; border: 2px solid var(--line); }
.mood p { margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.7; }
.card--mood .pixbtn { width: calc(100% - 24px); margin: 0 12px 12px; justify-content: center; }

.statusbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 4px 12px;
  border: 2px solid var(--line); border-radius: 6px;
  background: linear-gradient(var(--white), var(--face));
  box-shadow: var(--sh-out2);
  font-family: var(--font-px); font-size: 11px; color: var(--ink-2);
}
.statusbar b { color: var(--pink-700); }
.statusbar__cpu { display: inline-flex; align-items: center; gap: 6px; }
.statusbar__cpu em { font-style: normal; }
.statusbar__right { margin-left: auto; }

/* ── 13 运行对话框 / 右键菜单 / 提示条 ─────────────────────────── */
.rundlg {
  position: fixed; left: 50%; top: 22%; transform: translateX(-50%);
  z-index: 70; width: min(420px, 92vw);
  border: 2px solid var(--line); border-radius: 6px;
  background: var(--paper-w); box-shadow: 8px 8px 0 rgba(184, 59, 120, .22);
}
.rundlg__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 8px;
  background: linear-gradient(90deg, var(--pink-400), var(--pink-200));
  border-bottom: 2px solid var(--line);
  color: #fff; font-weight: 700; font-size: 12px;
  text-shadow: 1px 1px 0 rgba(184, 59, 120, .45);
}
.rundlg__bar button {
  width: 20px; height: 18px; border: 2px solid var(--line); border-radius: 3px;
  background: linear-gradient(var(--white), var(--face)); box-shadow: var(--sh-out2);
  padding: 0; font-size: 10px; line-height: 1;
}
.rundlg__body { padding: 14px; display: grid; gap: 10px; }
.rundlg__body p { margin: 0; font-size: 12px; color: var(--ink-2); }
.rundlg__body pre {
  margin: 0; padding: 10px;
  border: 2px solid var(--line); border-radius: 4px; background: var(--white); box-shadow: var(--sh-in);
  font-family: var(--font-px); font-size: 11px; color: var(--ink-2); white-space: pre-wrap;
}
.rundlg__foot { display: flex; justify-content: flex-end; }

.ctxmenu {
  position: fixed; z-index: 80; min-width: 176px; padding: 4px;
  border: 2px solid var(--line); border-radius: 4px;
  background: var(--paper-w); box-shadow: 6px 6px 0 rgba(184, 59, 120, .22);
  display: grid;
}
.ctxmenu button {
  padding: 7px 12px; border: 0; border-radius: 3px; background: none;
  text-align: left; font-size: 12.5px; color: var(--ink);
}
.ctxmenu button:hover { background: var(--pink-400); color: #fff; }
.ctxmenu__sep { height: 2px; margin: 4px 6px; background: var(--pink-200); }

.toast {
  position: fixed; left: 50%; bottom: 64px; transform: translateX(-50%);
  z-index: 85;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border: 2px solid var(--line); border-radius: 999px;
  background: var(--paper-w); box-shadow: 5px 5px 0 rgba(184, 59, 120, .2);
  font-size: 13px; font-weight: 700; color: var(--pink-700);
  animation: toastIn .24s ease both;
  max-width: min(92vw, 460px);
}
/* 工具箱打开时把提示条移到顶部，免得挡住「关闭工具箱」按钮 */
body:has(#toolWindow:not([hidden])) .toast { bottom: auto; top: 12px; }
body:has(#runDlg:not([hidden])) .toast { bottom: auto; top: 12px; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast .ico { color: var(--pink-500); }

/* ── 15 加载粒子 + 角落小技巧 ──────────────────────────────────── */
.dust {
  position: fixed; inset: 0; z-index: 3;
  pointer-events: none; display: none;
}
.dust.is-on { display: block; }

/* 桌面贴纸：可拖拽的像素小挂件 */
.desk-stickers { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.desk-sticker {
  position: absolute; width: 48px; height: 48px;
  padding: 3px;
  border: 2px solid var(--line); border-radius: 4px;
  background: var(--paper-w);
  box-shadow: 3px 4px 0 rgba(184, 59, 120, .22);
  transform: rotate(var(--rot, 0deg));
  pointer-events: auto; cursor: grab;
  transition: transform .12s ease, box-shadow .12s ease;
  touch-action: none;              /* 触屏拖拽不触发页面滚动 */
}
.desk-sticker:hover { transform: rotate(var(--rot, 0deg)) scale(1.08); box-shadow: 4px 6px 0 rgba(184, 59, 120, .3); }
.desk-sticker.is-drag { cursor: grabbing; transform: rotate(0deg) scale(1.12); box-shadow: 6px 8px 0 rgba(184, 59, 120, .34); }
.desk-sticker img {
  width: 100%; height: 100%; display: block;
  image-rendering: pixelated; object-fit: contain;
  pointer-events: none;
}
@media (max-width: 860px) { .desk-sticker { width: 40px; height: 40px; } }

.tip {
  position: fixed; right: 18px; bottom: 46px; z-index: 62;
  width: 288px; max-width: calc(100vw - 32px);
  border: 2px solid var(--line); border-radius: 6px;
  background: var(--paper-w);
  box-shadow: 5px 5px 0 rgba(184, 59, 120, .2);
  animation: tipIn .4s cubic-bezier(.34, 1.4, .64, 1) both;
}
@keyframes tipIn {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.tip.is-off { animation: tipOut .28s ease both; }
@keyframes tipOut { to { opacity: 0; transform: translateY(10px) scale(.98); } }
.tip__head {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  background: linear-gradient(90deg, var(--pink-300), var(--pink-100));
  border-bottom: 2px solid var(--line);
  font-family: var(--font-px); font-size: 11px; color: var(--pink-700);
}
.tip__close {
  position: absolute; right: 5px; top: 3px;
  width: 20px; height: 18px; padding: 0;
  border: 2px solid var(--line); border-radius: 3px;
  background: linear-gradient(var(--white), var(--face));
  box-shadow: var(--sh-out2);
  font-size: 10px; line-height: 1; color: var(--ink);
}
.tip__body { display: flex; gap: 9px; align-items: flex-start; padding: 10px; }
.tip__body img { width: 32px; height: 32px; flex: none; border: 2px solid var(--line); }
.tip__body p { margin: 0; font-size: 12.5px; line-height: 1.75; color: var(--ink-2); }
.tip__body b { color: var(--pink-600); }
@media (max-width: 860px) {
  .tip { right: 10px; left: 10px; width: auto; bottom: 40px; }
}

/* ── 15 桌面小装饰：便签 / 史莱姆 / 彩点 / 卡片花边 ────────────── */
/* 手绘像素便签（右栏底部） */
.sticky {
  position: relative;
  margin-top: 2px; padding: 16px 13px 12px;
  border: 2px solid var(--line);
  border-radius: 3px 3px 14px 3px;         /* 右下角翘起的感觉 */
  background: linear-gradient(160deg, #fffbe6, #ffeec2 70%, #ffe3a3);
  box-shadow: 4px 5px 0 rgba(184, 59, 120, .16);
  transform: rotate(-1.2deg);
  color: #6b5330;
}
.sticky::before {                          /* 便签横线 */
  content: ""; position: absolute; inset: 34px 0 26px 0;
  background: repeating-linear-gradient(180deg, transparent 0 15px, rgba(184, 59, 120, .13) 15px 16px);
  pointer-events: none;
}
.sticky__tape {                            /* 顶部胶带 */
  position: absolute; left: 50%; top: -9px; transform: translateX(-50%) rotate(2deg);
  width: 58px; height: 16px;
  background: rgba(255, 158, 203, .55);
  border-left: 1px dashed rgba(255, 255, 255, .7);
  border-right: 1px dashed rgba(255, 255, 255, .7);
}
.sticky__title {
  position: relative; margin: 0 0 8px;
  font-family: var(--font-px); font-size: 11px; letter-spacing: .04em;
  color: #a86a2e;
}
.sticky__text { position: relative; margin: 0; font-size: 12px; line-height: 2.1; }
.sticky__sign { position: relative; margin: 6px 0 0; text-align: right; font-size: 11px; color: #a86a2e; }
:root[data-theme="dark"] .sticky {
  background: linear-gradient(160deg, #3a3324, #2e2a1d);
  color: #e8d9b8; border-color: var(--line);
}
:root[data-theme="dark"] .sticky__title,
:root[data-theme="dark"] .sticky__sign { color: #d9b06a; }

/* 状态栏像素史莱姆 */
.statusbar { position: relative; }
.slime { display: inline-flex; align-items: flex-end; width: 20px; height: 16px; flex: none; }
.slime__body {
  position: relative; display: block;
  width: 18px; height: 14px;
  background: #8fe3c4;
  box-shadow: inset -3px -2px 0 #5fbf9c, inset 2px 2px 0 #c8f7e4;
  animation: slimeHop 2.8s ease-in-out infinite;
}
.slime__eye {
  position: absolute; top: 4px; width: 3px; height: 4px; background: #2f5f4c;
  animation: slimeBlink 4.6s steps(1) infinite;
}
.slime__eye--l { left: 3px; } .slime__eye--r { right: 3px; }
.slime__mouth { position: absolute; left: 7px; top: 9px; width: 4px; height: 2px; background: #2f5f4c; }
@keyframes slimeHop {
  0%, 62%, 100% { transform: translateY(0) scaleY(1); }
  14%           { transform: translateY(-4px) scaleY(1.12); }
  26%           { transform: translateY(0) scaleY(.88); }
  40%           { transform: translateY(0) scaleY(1); }
}
@keyframes slimeBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.15); } }

/* 状态栏彩色点阵 */
.statusbar__dots { display: inline-flex; gap: 3px; }
.statusbar__dots i {
  width: 7px; height: 7px; background: var(--c);
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .18);
  animation: dotPulse 3s ease-in-out infinite;
}
.statusbar__dots i:nth-child(2) { animation-delay: .35s; }
.statusbar__dots i:nth-child(3) { animation-delay: .7s; }
.statusbar__dots i:nth-child(4) { animation-delay: 1.05s; }
.statusbar__dots i:nth-child(5) { animation-delay: 1.4s; }
.statusbar__dots i:nth-child(6) { animation-delay: 1.75s; }
@keyframes dotPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* 卡片标题栏的像素点阵花边 */
.card__title::after {
  content: ""; margin-left: auto; width: 26px; height: 6px;
  background-image: radial-gradient(circle, currentColor 1.4px, transparent 1.6px);
  background-size: 6px 6px;
  opacity: .5;
}
/* 标题里已经有心形做右端装饰时，就不再画花边，免得挤成一团 */
.card__title:has(.px-heart)::after { display: none; }
/* 顶部导航两端的小装饰 */
.topbar__brand::after {
  content: ""; width: 6px; height: 6px; margin-left: 6px; flex: none;
  background: var(--pink-400);
  box-shadow: 6px 0 0 var(--mint), 12px 0 0 var(--sky);
  animation: dotPulse 2.6s ease-in-out infinite;
}

/* 图标配色方案：给承载图标的容器加整层滤镜（纯 mask 元素本身吃不到 filter） */
:root[data-icons="mint"]  .nav, :root[data-icons="mint"]  .topbar__brand, :root[data-icons="mint"]  .card__title { filter: hue-rotate(112deg) saturate(.9); }
:root[data-icons="sky"]   .nav, :root[data-icons="sky"]   .topbar__brand, :root[data-icons="sky"]   .card__title { filter: hue-rotate(-68deg) saturate(.95); }
:root[data-icons="butter"] .nav, :root[data-icons="butter"] .topbar__brand, :root[data-icons="butter"] .card__title { filter: hue-rotate(38deg) saturate(1.15); }
:root[data-icons="rainbow"] .nav { animation: iconHue 14s linear infinite; }
@keyframes iconHue { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }

/* ── 天气联动：下雨时卡片像被打湿，下雪时顶上积一层雪 ─────────── */
body.is-rain .work::before,
body.is-rain .win::before {
  content: ""; position: absolute; inset: 0; z-index: 5;
  pointer-events: none; border-radius: inherit;
  background:
    linear-gradient(163deg, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, .3) 45%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, rgba(110, 160, 220, .14), rgba(110, 160, 220, .05));
  animation: rainSheen 3.8s ease-in-out infinite;
}
body.is-rain .win { position: relative; }
@keyframes rainSheen {
  0%, 100% { background-position: -30% 0, 0 0; }
  50%      { background-position: 130% 0, 0 0; }
}

body.is-snow .work::before,
body.is-snow .win::before {
  content: ""; position: absolute; left: -2px; right: -2px; top: -3px; height: 7px;
  z-index: 5; pointer-events: none;
  background: #f4faff;
  border-radius: 3px 3px 40% 40%;
  box-shadow: 0 2px 0 rgba(150, 190, 230, .45), inset 0 -2px 0 rgba(214, 235, 250, .9);
}
body.is-snow .win { position: relative; }
/* 内层卡片顶上再补一小撮雪 */
body.is-snow .work__front::after {
  content: ""; position: absolute; left: 10%; right: 22%; top: -2px; height: 4px;
  background: #f8fcff; border-radius: 3px; pointer-events: none; z-index: 6;
}

/* ── 16 阅读进度 / 卡片扫光 / 像素光标 / 标题笔触 ───────────────── */
.readbar {
  position: fixed; left: 0; right: 0; top: 0; height: 4px; z-index: 88;
  pointer-events: none; background: transparent;
}
.readbar i {
  display: block; height: 100%; width: 0;
  background: repeating-linear-gradient(90deg,
    var(--pink-500) 0 8px, var(--pink-400) 8px 12px, var(--pink-300) 12px 16px);
  box-shadow: 0 1px 0 rgba(184, 59, 120, .25);
  transition: width .08s linear;
}

/* 卡片扫光：悬停时一道斜向高光扫过，增加材质感 */
.work__front { position: relative; overflow: hidden; }
.work__front::before {
  content: ""; position: absolute; inset: 0; z-index: 4;
  pointer-events: none;
  background: linear-gradient(105deg,
    transparent 35%, rgba(255, 255, 255, .5) 48%, rgba(255, 255, 255, .18) 55%, transparent 68%);
  transform: translateX(-130%);
}
.work:hover .work__front::before { animation: cardSweep .85s ease-out; }
@keyframes cardSweep {
  0%   { transform: translateX(-130%); }
  100% { transform: translateX(130%); }
}
:root[data-theme="dark"] .work__front::before {
  background: linear-gradient(105deg,
    transparent 35%, rgba(255, 220, 240, .22) 48%, rgba(255, 220, 240, .08) 55%, transparent 68%);
}

/* 像素光标：用 SVG data URI 画，输入框/可点控件保留系统光标以保证可用性 */
body {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M3 2h2v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h-1v1h-1v1h-1v-1h-1v-1h-1v-1h-1v-1h-2v1h-1v1h-1v1h-1v1h-1v1h-1v-1h-1v-1h-1v-1h-1v-1h-1z' fill='%23e04f96' stroke='%23ffffff' stroke-width='1'/%3E%3C/svg%3E") 3 2, auto;
}
button, a, .work, .desk-sticker, .series-toggle, .pixel-pal__chip, .pal, .quick__item, .toolgrid__item, .nav__btn, .chipbtn, .pixbtn {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M8 1h2v1h1v1h1v1h1v2h2v1h2v-1h2v1h1v2h-1v2h-1v1h-2v-1h-1v3h-1v1h-2v-1h-1v1h-1v-1h-1v-2h-1v-1h-1v-1h-1v-6h1z' fill='%23ff9ecb' stroke='%23ffffff' stroke-width='1'/%3E%3C/svg%3E") 9 1, pointer;
}
input, textarea, select { cursor: text; }
/* 关掉光标的装饰性偏移，保持精确定位手感：给指针类元素留系统默认作为兜底 */
@media (prefers-reduced-motion: reduce) { body, button, a { cursor: auto; } }

/* 标题下的小笔触装饰（SVG 波浪墨点） */
.viewhead__title::after {
  content: ""; display: block; width: 128px; height: 7px; margin-top: 5px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='7' viewBox='0 0 128 7'%3E%3Cpath d='M1 5c8-4 14-4 22-1s16 3 24-1 16-3 24 1 16 3 24-1 16-3 22 1' fill='none' stroke='%23ff9ecb' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left center;
  background-size: contain;
}
/* 已经有像素装饰线的视图，就不再叠笔触，避免重复 */
.viewhead::after { display: none; }
:root[data-theme="dark"] .viewhead__title::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='7' viewBox='0 0 128 7'%3E%3Cpath d='M1 5c8-4 14-4 22-1s16 3 24-1 16-3 24 1 16 3 24-1 16-3 22 1' fill='none' stroke='%23ffb3d9' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ── 14 响应式 ─────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .desktop {
    grid-template-columns: 248px minmax(0, 1fr);
    grid-template-areas:
      "top top"
      "side main"
      "rail main"
      "status status";
  }
  .rail { flex-direction: row; flex-wrap: wrap; }
  .rail .card { flex: 1 1 220px; }
}
@media (max-width: 860px) {
  .desktop {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "top" "side" "main" "rail" "status";
    padding: 8px 10px 10px; gap: 10px;
  }
  /* 手机端：导航条横向滚动，不换行，省掉两行高度 */
  .topbar { padding: 6px 8px; gap: 8px; }
  .nav {
    order: 3; flex: 1 0 100%; margin-inline: 0;
    flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav__btn { padding: 5px 11px; font-size: 12.5px; white-space: nowrap; }
  .topbar__right { margin-left: auto; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero__title { font-size: 30px; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .ww { grid-template-columns: minmax(0, 1fr); }
  .window { left: 3vw !important; top: 4vh !important; width: 94vw; }
  .form__row--inline { grid-template-columns: minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
  .work__desc { -webkit-line-clamp: 3; }
  .statusbar { gap: 10px; font-size: 10px; }
  .statusbar__right { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
