/* ═══════════════════════════════════════════════════════════════
   星码助手 · 官网（白板风格）
   白板底 + 马克笔手绘 + 便利贴 + 白板夜灯模式
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* 白板本体 */
  --board:        #f6f4ee;
  --board-2:      #efede5;
  --board-line:   rgba(74, 92, 118, .085);
  --board-grid:   32px;

  /* 页面左右留白 —— 负边距（跑马灯）和 padding 共用这一份，
     改一处就够，不然窄屏上会差几个像素撑出横向滚动条 */
  --gutter:       26px;

  /* 墨迹 */
  --ink:          #1e2733;
  --ink-2:        #48566a;
  --ink-3:        #606b79;      /* 4.9:1 on board —— 三级文字的底线 */
  --ink-line:     rgba(30, 39, 51, .12);
  --ink-line-2:   rgba(30, 39, 51, .22);

  /* 马克笔颜色 */
  --red:          #e5484d;
  --red-deep:     #b32d32;      /* 徽章底色 / 小字：白字压得住 */
  --red-edge:     #c2363b;      /* 标签描边：UI 图形要 ≥3:1，原来的 #e5484d 只有 2.97 */
  --red-soft:     rgba(229, 72, 77, .14);
  --blue:         #2f6fed;
  --blue-soft:    rgba(47, 111, 237, .13);
  --green:        #12a150;
  --green-deep:   #116b36;      /* 绿色价签上的字 / 徽章底色 */
  --green-soft:   rgba(18, 161, 80, .13);
  --yellow:       #f0b429;
  --yellow-soft:  rgba(240, 180, 41, .17);
  --pink:         #e8598a;
  --pink-soft:    rgba(232, 89, 138, .13);
  --violet:       #8250df;

  /* 便利贴 */
  --note-yellow:  #ffe9a8;
  --note-yellow-d:#f6d47a;
  --note-blue:    #cfe4ff;
  --note-blue-d:  #a9cbf5;
  --note-pink:    #ffd7e4;
  --note-pink-d:  #f4b5cb;
  --note-green:   #d3f0c8;
  --note-green-d: #b0dda1;

  --shadow-sm:    0 1px 2px rgba(30, 39, 51, .08), 0 3px 10px rgba(30, 39, 51, .05);
  --shadow:       0 2px 4px rgba(30, 39, 51, .07), 0 12px 28px -8px rgba(30, 39, 51, .16);
  --shadow-lg:    0 4px 8px rgba(30, 39, 51, .07), 0 28px 60px -14px rgba(30, 39, 51, .26);

  --radius:       14px;
  --radius-lg:    22px;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  /* 手写体栈：拉丁手写体在前（Bradley Hand / Segoe Print），
     中文手写体在后（macOS: Hannotate SC / HanziPen SC；Windows: KaiTi；
     Linux: 霞鹜文楷）。
     —— 纯拉丁字体没有 CJK 字形，只写 Bradley Hand 的话中文会静默回退成黑体，
     「手写感」就没了。实测：加栈之后中文命中 Hannotate SC。 */
  --hand: "Bradley Hand", "Segoe Print", "Comic Sans MS",
          "Hannotate SC", "HanziPen SC", "STKaiti", "Kaiti SC", "STXingkai", "STXingkai SC",
          "KaiTi", "楷体", "LXGW WenKai", "霞鹜文楷",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", cursive;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Consolas, monospace;
}

/* ══════════════ 墨板（夜间） ══════════════ */
html[data-board="night"] {
  --board:        #161b22;
  --board-2:      #10151c;
  --board-line:   rgba(200, 220, 255, .13);   /* 网格线：夜里要看得见 */
  --ink:          #e6edf3;
  --ink-2:        #a8b6c6;
  --ink-3:        #8b98a8;                    /* 5.9:1 */
  --ink-line:     rgba(230, 237, 243, .14);
  --ink-line-2:   rgba(230, 237, 243, .26);

  /* 夜里徽章底色变亮，字就得反过来用深色 */
  --red:          #ff6b70;
  --red-deep:     #ff8f93;
  --red-edge:     #ff8f93;
  --red-soft:     rgba(255, 107, 112, .16);
  --blue:         #6aa1ff;
  --blue-soft:    rgba(106, 161, 255, .16);
  --green:        #3ddc97;
  --green-deep:   #3ddc97;
  --green-soft:   rgba(61, 220, 151, .16);
  --yellow:       #f5c451;
  --yellow-soft:  rgba(245, 196, 81, .18);
  --pink:         #ff7aa8;
  --pink-soft:    rgba(255, 122, 168, .16);
  --violet:       #a78bfa;

  --note-yellow:  #4a4021;
  --note-yellow-d:#3b3319;
  --note-blue:    #1f2c44;
  --note-blue-d:  #1a2437;
  --note-pink:    #43222f;
  --note-pink-d:  #351b26;
  --note-green:   #1e3a26;
  --note-green-d: #182e1e;

  --shadow-sm:    0 1px 2px rgba(0, 0, 0, .4);
  --shadow:       0 2px 4px rgba(0, 0, 0, .4), 0 14px 32px -10px rgba(0, 0, 0, .6);
  --shadow-lg:    0 4px 10px rgba(0, 0, 0, .45), 0 30px 66px -16px rgba(0, 0, 0, .7);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  font-family: var(--sans);
  background: var(--board);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .35s ease, color .35s ease;
}

/* 白板纹理：网格 + 边框 + 暗角 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(var(--board-line) 1px, transparent 1px) 0 0 / 100% var(--board-grid),
    linear-gradient(90deg, var(--board-line) 1px, transparent 1px) 0 0 / var(--board-grid) 100%,
    linear-gradient(var(--board), var(--board-2));
}

/* 白板铝合金外框 —— 渐变金属条，不是灰边。
   z-index 抬到最上（200），所以整页四边都在，不会被内容块盖掉。
   停靠色压得比真铝暗一档：米白板面上太亮的金属段会「消失」，
   现在每段最亮处对白板也有 3:1 以上。 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  border: 11px solid transparent;
  border-image: linear-gradient(135deg,
      #aab4c0 0%, #7c8894 20%, #c4ced8 42%,
      #6e7a86 60%, #a3aeba 80%, #7a8692 100%) 1;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .38),
    inset 0 0 90px rgba(30, 39, 51, .10);
}
html[data-board="night"] body::after {
  border-image: linear-gradient(135deg,
      #39414d 0%, #1d232c 24%, #4a5462 46%,
      #141920 64%, #363f4b 84%, #1f262f 100%) 1;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .10),
    inset 0 0 100px rgba(0, 0, 0, .55);
}

::selection { background: var(--yellow-soft); color: var(--ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-line-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* ══════════════ 通用零件 ══════════════ */

/* 马克笔下划波浪线 */
.squiggle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -.32em;
  width: 100%;
  height: .42em;
  overflow: visible;
  pointer-events: none;
}
.squiggle path {
  fill: none;
  stroke: var(--red);
  stroke-width: 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .35));
}
.squiggle--blue path { stroke: var(--blue); }
.squiggle--green path { stroke: var(--green); }
.squiggle--red path { stroke: var(--red); }

/* 马克笔高亮 */
.hl { font-style: normal; padding: 0 .12em; border-radius: 3px; }
.hl--blue { background: var(--blue-soft); box-shadow: inset 0 -.42em 0 rgba(47, 111, 237, .16); }
html[data-board="night"] .hl--blue { box-shadow: inset 0 -.42em 0 rgba(106, 161, 255, .22); }

/* 勾 */
.tick {
  display: inline-block;
  width: 15px; height: 15px;
  margin-right: 8px;
  vertical-align: -2px;
  border-radius: 3px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px;
}
.tick--green { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312a150' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5.5 5.5L20 6'/%3E%3C/svg%3E"); }
.tick--blue  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f6fed' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5.5 5.5L20 6'/%3E%3C/svg%3E"); }
html[data-board="night"] .tick--green { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233ddc97' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5.5 5.5L20 6'/%3E%3C/svg%3E"); }
html[data-board="night"] .tick--blue { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236aa1ff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5.5 5.5L20 6'/%3E%3C/svg%3E"); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 2.2px solid var(--ink);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: .2px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s cubic-bezier(.34, 1.56, .64, 1), box-shadow .18s ease, background .18s ease;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn:hover { transform: translate(-1px, -2px); box-shadow: 5px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.btn--ink { background: var(--ink); color: var(--board); }
.btn--ink:hover { background: var(--ink); }

.btn--ghost {
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.btn--ghost:hover { transform: translate(-1px, -2px); box-shadow: 5px 6px 0 var(--ink); }

.btn--sm { padding: 7px 14px; font-size: 13px; border-radius: 10px; box-shadow: 2px 2px 0 var(--ink); }
.btn--lg { padding: 13px 26px; font-size: 16px; border-radius: 14px; }
.btn--block { display: flex; justify-content: center; width: 100%; }
.btn__ver {
  font-style: normal;
  font-family: var(--mono);
  font-size: 11.5px;
  opacity: .82;
  border-left: 1px solid currentColor;
  margin-left: 2px;
  padding-left: 10px;
}

/* 便利贴 */
.note {
  position: relative;
  display: block;
  padding: 18px 18px 20px;
  border-radius: 3px;
  background: var(--note-yellow);
  color: #2a2412;
  /* 接触影 + 短投影 + 长投影 —— 纸片是「贴」上去的，不是浮在板上的色块 */
  box-shadow:
    0 1px 1px rgba(30, 39, 51, .18),
    0 3px 5px rgba(30, 39, 51, .13),
    0 10px 18px -6px rgba(30, 39, 51, .22);
  transition: transform .2s cubic-bezier(.34, 1.4, .64, 1), box-shadow .2s ease;
}
.note::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .42), transparent 46%);
  pointer-events: none;
}
html[data-board="night"] .note::before {
  background: linear-gradient(150deg, rgba(255, 255, 255, .10), transparent 46%);
}
.note::after {
  content: "";
  position: absolute;
  right: 0; bottom: 0;
  width: 22px; height: 22px;
  background: linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, .07) 50%);
  border-radius: 0 0 3px 0;
}
html[data-board="night"] .note::after {
  background: linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, .35) 50%);
}
.note--yellow { background: var(--note-yellow); }
.note--blue   { background: var(--note-blue);   color: #17233a; }
.note--pink   { background: var(--note-pink);   color: #381c26; }
.note--green  { background: var(--note-green);  color: #172d19; }
html[data-board="night"] .note { color: #e8eef5; }
html[data-board="night"] .note--blue  { color: #dce9ff; }
html[data-board="night"] .note--pink  { color: #ffe0ea; }
html[data-board="night"] .note--green { color: #dcf3d4; }

.note--r1 { transform: rotate(-2.4deg); }
.note--r2 { transform: rotate(2.8deg); }
.note--r3 { transform: rotate(-2.2deg); }

/* 胶带 */
.tape {
  position: absolute;
  width: 92px; height: 26px;
  background: rgba(255, 232, 160, .78);
  border-left: 1px dashed rgba(0, 0, 0, .1);
  border-right: 1px dashed rgba(0, 0, 0, .1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}
html[data-board="night"] .tape { background: rgba(226, 209, 130, .3); }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 10px;
  border: 1.6px solid var(--red-edge);
  border-radius: 99px;
  color: var(--red-deep);
  font-size: 13px;
  font-weight: 640;
  letter-spacing: .3px;
  transform: rotate(-1deg);
  background: var(--red-soft);
}
html[data-board="night"] .tag { color: #ff8f93; }
.tag__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* 小圆片 */
.chip {
  display: inline-block;
  padding: 5px 13px;
  border: 1.5px solid var(--ink-2);
  border-radius: 99px;
  color: var(--ink-2);
  font-size: 13px;
  background: var(--board);
  transition: border-color .18s, color .18s, transform .18s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-2px); }

/* 代码 */
code {
  font-family: var(--mono);
  font-size: .88em;
  padding: .1em .38em;
  border-radius: 5px;
  background: var(--ink-line);
  color: var(--ink);
  overflow-wrap: anywhere;
}
html[data-board="night"] code { background: rgba(255, 255, 255, .07); }

/* ══════════════ 顶部导航 ══════════════ */
.bnav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--board) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1.5px solid var(--ink-line);
  padding-top: 11px;          /* 让开铝合金外框 */
}
.bnav__in {
  max-width: 1220px;
  margin: 0 auto;
  padding: 12px 26px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.bnav__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}
.bnav__brand img { border-radius: 9px; box-shadow: var(--shadow-sm); }
.bnav__name { font-size: 17px; font-weight: 800; letter-spacing: .4px; }
.bnav__hand {
  font-family: var(--hand);
  font-size: 12.5px;
  color: var(--ink-3);
  transform: rotate(-3deg);
  margin-left: -3px;
}
.bnav__links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.bnav__links a {
  padding: 7px 13px;
  border-radius: 9px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 560;
  transition: background .16s, color .16s;
}
.bnav__links a:hover { background: var(--ink-line); color: var(--ink); }
.bnav__acts { display: flex; align-items: center; gap: 9px; flex: none; }

/* 白板灯开关 */
.board-toggle {
  position: relative;
  width: 56px; height: 28px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--board);
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  line-height: 1;
  color: var(--ink);
  transition: background .25s, border-color .25s;
}
.board-toggle__sun,
.board-toggle__moon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity .2s, transform .25s;
}
.board-toggle__sun { left: 5px; }
.board-toggle__moon { right: 5px; opacity: .3; }
html[data-board="night"] .board-toggle__sun { opacity: .25; }
html[data-board="night"] .board-toggle__moon { opacity: 1; }

/* ══════════════ 英雄区 ══════════════ */
.hero {
  max-width: 1220px;
  margin: 0 auto;
  padding: 72px 26px 60px;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 60px;
  align-items: center;
}
.hero__title {
  margin: 20px 0 20px;
  font-size: clamp(34px, 5.1vw, 62px);
  line-height: 1.14;
  font-weight: 860;
  letter-spacing: -1.2px;
}
.hero__line { position: relative; display: inline-block; }
.hero__line:last-child { padding-bottom: .12em; }
.hero__sub {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 610px;
  margin-bottom: 30px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero__facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 14px;
  color: var(--ink-2);
}

/* ── 手绘示意图 ── */
.hero__art {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
}
.laptop {
  position: relative;
  width: min(430px, 92%);
  z-index: 2;
  filter: drop-shadow(0 24px 36px rgba(30, 39, 51, .2));
}
.laptop__screen {
  background: var(--board);
  border: 3px solid var(--ink);
  border-radius: 12px 12px 6px 6px;
  padding: 8px 8px 10px;
  transform: rotate(-2deg);
}
.laptop__bar {
  display: flex;
  gap: 5px;
  padding: 2px 3px 8px;
  border-bottom: 1.5px dashed var(--ink-line-2);
}
.laptop__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-line-2); }
.laptop__bar i:first-child { background: var(--red); }
.laptop__bar i:nth-child(2) { background: var(--yellow); }
.laptop__bar i:nth-child(3) { background: var(--green); }
.laptop__body { display: flex; gap: 10px; padding-top: 10px; }
.laptop__rail { display: flex; flex-direction: column; gap: 7px; width: 34px; }
.laptop__rail span {
  height: 8px; border-radius: 3px; background: var(--ink-line);
}
.laptop__rail span:first-child { background: var(--blue); }
.laptop__grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  align-content: start;
}
.laptop__card {
  height: 46px;
  border-radius: 5px;
  background: var(--ink-line);
  border: 1.5px solid var(--ink-line-2);
}
.laptop__card--w2 { background: var(--blue-soft); border-color: var(--blue); }
.laptop__card--w3 { background: var(--green-soft); border-color: var(--green); }
.laptop__card--w4 { background: var(--yellow-soft); border-color: var(--yellow); }
.laptop__line { grid-column: span 3; height: 6px; border-radius: 3px; background: var(--ink-line); }
.laptop__line--2 { width: 62%; }
.laptop__pill {
  grid-column: span 3;
  justify-self: start;
  height: 13px;
  width: 92px;
  border-radius: 99px;
  background: var(--ink);
  opacity: .82;
}
.laptop__base {
  height: 12px;
  margin: -2px auto 0;
  width: 116%;
  max-width: calc(100% + 18px);
  border-radius: 0 0 16px 16px;
  background: var(--ink);
  opacity: .9;
  transform: rotate(-2deg);
}

.board-sheet {
  position: absolute;
  width: 300px;          /* 够两张便利贴错开摆，不重叠 */
  min-height: 132px;
  background: var(--board);
  border: 1.5px dashed var(--ink-line-2);
  border-radius: 4px;
  z-index: 3;
  box-shadow: var(--shadow);
}
.board-sheet--back { top: 2px; right: -2%; transform: rotate(4deg); }
.board-sheet--front { bottom: 2px; left: -4%; transform: rotate(-4deg); }
.board-sheet--back .note { position: absolute; inset: 14px 14px auto; padding: 12px 13px 14px; font-size: 13px; font-weight: 700; line-height: 1.45; box-shadow: var(--shadow-sm); }
/* 两张便利贴分居对角：粉在左上、蓝在右下，中间留白不压字 */
.board-sheet--front .note { position: absolute; padding: 12px 14px 14px; font-size: 13px; font-weight: 700; line-height: 1.45; width: 128px; }
.board-sheet--front .note--pink { top: 14px; left: 14px; }
.board-sheet--front .note--blue { bottom: 14px; right: 14px; }
.board-sheet--front .note b { font-family: var(--mono); font-size: 11.5px; opacity: .8; }

/* 马克笔箭头：从前纸张右上角往右上方指出，
   指的是后面那张「联机补丁」黄贴纸 —— 语义上说得通，
   而且整条都落在内容列里，不再出血到 gutter。 */
/* 马克笔箭头：放在手绘图右下角的空白处（笔记本右下方），
   朝左指向「创意工坊 / 云存档转工坊」那张蓝贴。
   —— 原来它压在笔记本上、还伸出内容列 16px，现在两样都避开了。 */
.doodle-arrow {
  position: absolute;
  right: 1.5%;
  bottom: 1%;
  width: 140px;
  z-index: 4;              /* 压在笔记本之上，否则整条被挡住 */
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .72;
}
.doodle-arrow path:last-child { stroke: var(--ink); stroke-width: 3.4; }

/* 红手写批注 —— 落在手绘图左上角的空白处（笔记本左上方）。
   原来放在 left:50%/bottom:-6px，正好压在「创意工坊」蓝贴的右下角上，
   把贴纸最后一行字盖住了 72 个像素。 */
.scribble {
  position: absolute;
  top: 2%;
  left: 3%;
  transform: rotate(-3.5deg);
  font-family: var(--hand);
  font-size: 17px;
  color: var(--red);
  z-index: 4;
}

/* ══════════════ 数据条 ══════════════ */
.stats {
  border-top: 1.5px solid var(--ink-line);
  border-bottom: 1.5px solid var(--ink-line);
  /* 自己带网格层 —— 不透明底色会把 body::before 那层盖掉，
     少了网格这块就变成一条「稍灰的横条」，不像白板了。
     background-attachment:fixed 让这层网格跟 body::before 的固定网格同相，
     否则两套网格会随着滚动越错越开。 */
  background:
    linear-gradient(var(--board-line) 1px, transparent 1px) 0 0 / 100% var(--board-grid),
    linear-gradient(90deg, var(--board-line) 1px, transparent 1px) 0 0 / var(--board-grid) 100%,
    var(--board-2);
  background-attachment: fixed, fixed, scroll;
}
.stats__in {
  max-width: 1220px;
  margin: 0 auto;
  padding: 34px 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.stat {
  position: relative;
  padding-left: 16px;
  border-left: 3px solid var(--ink-line-2);
}
.stat:nth-child(1) { border-left-color: var(--blue); }
.stat:nth-child(2) { border-left-color: var(--green); }
.stat:nth-child(3) { border-left-color: var(--red); }
.stat:nth-child(4) { border-left-color: var(--violet); }
.stat__num {
  display: block;
  font-size: clamp(26px, 3.1vw, 38px);
  font-weight: 860;
  letter-spacing: -1px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  display: block;
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 600;
}
.stat__label em {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 450;
  margin-top: 2px;
}

/* ══════════════ 区块通用 ══════════════ */
.sec {
  max-width: 1220px;
  margin: 0 auto;
  padding: 88px var(--gutter);
}
.sec__head { margin-bottom: 42px; max-width: 760px; }
.sec__title {
  position: relative;
  display: inline-block;
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 840;
  letter-spacing: -.8px;
  margin-bottom: 12px;
  padding-bottom: .1em;
}
.sec__hl { position: relative; color: var(--red); }
.sec__lead { font-size: 16px; color: var(--ink-2); }

/* ══════════════ 原理 ══════════════ */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}
.flow__step { position: relative; }
.flow__box {
  position: relative;
  background: var(--board);
  border: 2.2px solid var(--ink);
  border-radius: var(--radius);
  padding: 26px 22px 22px;
  box-shadow: 4px 5px 0 var(--ink);
  transition: transform .2s cubic-bezier(.34, 1.5, .64, 1), box-shadow .2s;
}
.flow__step:nth-child(1) .flow__box { transform: rotate(-1.1deg); }
.flow__step:nth-child(3) .flow__box { transform: rotate(.9deg); }
.flow__step:hover .flow__box { transform: rotate(0) translateY(-4px); box-shadow: 6px 8px 0 var(--ink); }
.flow__num {
  position: absolute;
  top: -16px; left: 18px;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red-deep);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  border: 2.2px solid var(--ink);
}
html[data-board="night"] .flow__num { color: #10151c; }
.flow__step:nth-child(3) .flow__num { background: var(--blue); }
html[data-board="night"] .flow__step:nth-child(3) .flow__num { color: #10151c; }
.flow__step:nth-child(5) .flow__num { background: var(--green); }
html[data-board="night"] .flow__step:nth-child(5) .flow__num { color: #10151c; }
.flow__box h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.flow__box p { font-size: 14.2px; color: var(--ink-2); }
.flow__arrow {
  width: 84px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .55;
}
.flow__proto {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  background: var(--board);
  padding: 0 6px;
  white-space: nowrap;
}
.flow__note {
  margin-top: 34px;
  padding: 16px 20px;
  border: 1.8px dashed var(--ink-line-2);
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 14.5px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: color-mix(in srgb, var(--blue-soft) 40%, transparent);
}
.flow__note-mark {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-deep);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
html[data-board="night"] .flow__note-mark { color: #10151c; }

/* ══════════════ 便利贴墙 ══════════════ */
.notes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.note--feat { transform: rotate(var(--rot, 0deg)); }
.note--feat:nth-child(1) { --rot: -2.6deg; }
.note--feat:nth-child(2) { --rot: 2.1deg; }
.note--feat:nth-child(3) { --rot: -1.6deg; }
.note--feat:nth-child(4) { --rot: 3deg; }
.note--feat:nth-child(5) { --rot: 2.4deg; }
.note--feat:nth-child(6) { --rot: -2.2deg; }
.note--feat:nth-child(7) { --rot: 1.7deg; }
.note--feat:nth-child(8) { --rot: -2.8deg; }
.note--feat:hover { transform: rotate(0deg) translateY(-6px) scale(1.02); box-shadow: var(--shadow-lg); z-index: 2; }
.note--feat h3 {
  font-size: 18px;
  font-weight: 820;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px dashed rgba(0, 0, 0, .16);
}
html[data-board="night"] .note--feat h3 { border-bottom-color: rgba(255, 255, 255, .16); }
.note--feat p { font-size: 13.6px; line-height: 1.68; opacity: .9; }

.feats-extra {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ══════════════ 入库模式 ══════════════ */
.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}
.mode {
  background: var(--board);
  border: 2px solid var(--ink-line-2);
  border-radius: var(--radius);
  padding: 20px 18px 18px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.mode:hover { border-color: var(--ink); transform: translateY(-4px); box-shadow: var(--shadow); }
.mode--hl {
  border-color: var(--ink);
  box-shadow: 4px 5px 0 var(--ink);
  background: color-mix(in srgb, var(--blue-soft) 45%, var(--board));
}
.mode--hl:hover { box-shadow: 6px 8px 0 var(--ink); }
.mode__head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.mode__head h3 { font-size: 17px; font-weight: 820; }
.mode__badge {
  font-size: 11px;
  font-weight: 750;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--red-deep);
  color: #fff;
  transform: rotate(-2deg);
}
html[data-board="night"] .mode__badge { color: #10151c; }
.mode p { font-size: 13.5px; color: var(--ink-2); }
.mode p code { font-size: 12px; line-height: 1.5; }
.mode__who { margin-top: 9px; font-size: 13px; color: var(--ink-3); }
.mode__who strong { color: var(--ink); }
.modes__foot {
  margin-top: 26px;
  font-size: 14px;
  color: var(--ink-3);
  border-left: 3px solid var(--yellow);
  padding-left: 14px;
}

/* ══════════════ 目录 ══════════════ */
.marquee {
  position: relative;
  overflow: hidden;
  margin: 0 calc(var(--gutter) * -1);
  padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.marquee__row {
  display: flex;
  gap: 16px;
  width: max-content;
  padding-bottom: 18px;
  animation: slide 46s linear infinite;
}
.marquee__row[data-dir="-1"] { animation-direction: reverse; animation-duration: 54s; }
.marquee:hover .marquee__row { animation-play-state: paused; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.card {
  width: 210px;
  flex: none;
  background: var(--board);
  border: 2px solid var(--ink-line-2);
  border-radius: 10px;
  overflow: hidden;
  transition: transform .2s cubic-bezier(.34, 1.5, .64, 1), border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-6px) rotate(-.6deg); border-color: var(--ink); box-shadow: var(--shadow); }
.card img { display: block; width: 100%; aspect-ratio: 231 / 87; object-fit: cover; background: var(--ink-line); }
.card__meta { padding: 11px 12px 13px; }
.card__meta b {
  display: block;
  font-size: 14px;
  font-weight: 720;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card__meta span { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__meta em {
  display: inline-block;
  margin-top: 7px;
  font-style: normal;
  font-size: 12.5px;
  font-weight: 750;
  color: var(--green-deep);
  background: var(--green-soft);
  padding: 1px 8px;
  border-radius: 99px;
}
.catalog__foot {
  margin-top: 26px;
  text-align: center;
  font-size: 14.5px;
  color: var(--ink-2);
}
.catalog__foot b { color: var(--ink); }

/* ══════════════ 下载 ══════════════ */
.sec--dl { padding-top: 40px; }
.dl {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 56px;
  align-items: center;
}
.dl__title { font-size: clamp(26px, 3.4vw, 38px); font-weight: 840; letter-spacing: -.7px; margin-bottom: 14px; }
.dl__lead { font-size: 16px; color: var(--ink-2); margin-bottom: 22px; }
.dl__list { list-style: none; display: grid; gap: 11px; }
.dl__list li { font-size: 14.6px; color: var(--ink-2); }
.dl__right { position: relative; }
.dl__card {
  position: relative;
  z-index: 2;
  background: var(--board);
  border: 2.4px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 26px 24px 24px;
  box-shadow: 6px 7px 0 var(--ink);
  transform: rotate(1.2deg);
  transition: transform .2s cubic-bezier(.34, 1.5, .64, 1), box-shadow .2s;
}
.dl__right:hover .dl__card { transform: rotate(0) translateY(-4px); box-shadow: 9px 11px 0 var(--ink); }
.dl__card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dl__plat {
  font-size: 11.5px;
  font-weight: 780;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 5px;
  background: var(--blue);
  color: #fff;
}
.dl__ver { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); }
.dl__name { font-size: 24px; font-weight: 850; letter-spacing: -.5px; margin-bottom: 8px; }
.dl__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.dl__meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }
.dl__hint { margin-top: 14px; font-size: 13px; color: var(--ink-3); text-align: center; }
.dl__hint a { color: var(--blue); text-decoration: none; border-bottom: 1px dashed currentColor; }
.tape--dl { top: -12px; left: 50%; transform: translateX(-50%) rotate(-2.6deg); z-index: 3; }

/* ══════════════ FAQ ══════════════ */
.faq { max-width: 880px; margin: 0 auto; display: grid; gap: 12px; }
.faq__item {
  background: var(--board);
  border: 2px solid var(--ink-line-2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.faq__item[open] { border-color: var(--ink); box-shadow: 4px 5px 0 var(--ink); }
.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 720;
  font-size: 15.6px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::before {
  content: "?";
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--ink);
  font-family: var(--hand);
  font-size: 15px;
  color: var(--red);
  transition: transform .2s, background .2s;
}
.faq__item[open] summary::before { background: var(--red); color: #fff; transform: rotate(180deg); }
.faq__body {
  padding: 0 20px 18px 56px;
  font-size: 14.6px;
  color: var(--ink-2);
}

/* ══════════════ 页脚 ══════════════ */
.bfoot {
  border-top: 1.5px solid var(--ink-line);
  /* 同上：这块也得自带网格（fixed 附件保证跟 body 网格同相） */
  background:
    linear-gradient(var(--board-line) 1px, transparent 1px) 0 0 / 100% var(--board-grid),
    linear-gradient(90deg, var(--board-line) 1px, transparent 1px) 0 0 / var(--board-grid) 100%,
    var(--board-2);
  background-attachment: fixed, fixed, scroll;
  padding: 42px var(--gutter) 30px;
}
.bfoot__in {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}
.bfoot__brand { display: flex; align-items: center; gap: 11px; }
.bfoot__brand img { border-radius: 8px; }
.bfoot__brand b { display: block; font-size: 15.5px; font-weight: 800; }
.bfoot__brand span { display: block; font-size: 13px; color: var(--ink-3); }
.bfoot__links { display: flex; gap: 6px; flex-wrap: wrap; }
.bfoot__links a {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  transition: background .16s, color .16s;
}
.bfoot__links a:hover { background: var(--ink-line); color: var(--ink); }
.bfoot__note {
  max-width: 1220px;
  margin: 26px auto 0;
  font-size: 12.6px;
  color: var(--ink-3);
  line-height: 1.7;
}

/* 回到顶部 */
.to-top {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2.2px solid var(--ink);
  background: var(--board);
  color: var(--ink);
  font-size: 19px;
  cursor: pointer;
  box-shadow: 3px 4px 0 var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s;
  z-index: 50;
}
.to-top.is-on { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { transform: translateY(-3px); box-shadow: 4px 6px 0 var(--ink); }

/* ══════════════ 进场动画 ══════════════ */
/* 用独立的 translate 属性做位移，不动 transform ——
   transform 被 .reveal.is-in { transform: none } 覆盖的话，
   便利贴自己的 rotate(--rot) 会被抹平（贴纸就变成一排死板的长方形）。 */
.reveal {
  opacity: 0;
  translate: 0 22px;
  transition: opacity .6s ease, translate .6s cubic-bezier(.2, .8, .3, 1);
}
.reveal.is-in { opacity: 1; translate: 0 0; }
/* 便利贴另有两套自己的过渡（抬起 + 阴影），跟进场动画合到一起 */
.note.reveal {
  transition: opacity .6s ease, translate .6s cubic-bezier(.2, .8, .3, 1),
              transform .2s cubic-bezier(.34, 1.4, .64, 1), box-shadow .2s ease;
}

/* ══════════════ 响应式 ══════════════ */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__art { min-height: 380px; order: -1; }
  /* 单列以后手绘图变宽，贴纸要收一档，不然撑破视口 */
  .laptop { width: 78%; }
  .laptop__base { width: 92%; max-width: calc(100% + 14px); }
  .board-sheet { width: 250px; min-height: 116px; }
  .board-sheet--back { right: 2%; }
  .board-sheet--front { left: 2%; }
  .board-sheet--front .note { width: 112px; font-size: 12px; }
  .board-sheet--back .note { inset: 12px 12px auto; font-size: 12px; }
  .doodle-arrow { width: 170px; right: 1%; bottom: 4%; }
  .flow { grid-template-columns: 1fr; gap: 30px; }
  .flow__arrow { display: none; }
  .flow__proto { position: static; transform: none; display: block; text-align: right; margin-top: 6px; }
  .notes { grid-template-columns: repeat(2, 1fr); }
  .dl { grid-template-columns: 1fr; gap: 36px; }
  .stats__in { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .bnav__in { padding: 10px var(--gutter); gap: 12px; }
  .bnav__links { display: none; }
  .bnav__acts { margin-left: auto; gap: 7px; }
  .bnav__acts .btn { padding: 8px 13px; font-size: 13px; }
  .hero { padding: 44px var(--gutter) 40px; }
  .sec { padding: 56px var(--gutter); }
  .stats__in { padding: 26px var(--gutter); grid-template-columns: 1fr 1fr; gap: 18px; }
  .notes { grid-template-columns: 1fr; }
  .card { width: 170px; }
  .hero__title { font-size: clamp(28px, 8vw, 40px); }
  .faq__body { padding-left: 20px; }
  .bfoot { padding: 32px var(--gutter) 24px; }
  .to-top { right: 14px; bottom: 14px; }
  body::after { border-width: 6px; }
  /* 手绘图整体缩一档，别把屏幕撑破 */
  .hero__art { min-height: 330px; }
  .laptop { width: 88%; }
  .laptop__base { width: 100%; max-width: calc(100% + 10px); }
  .board-sheet { width: 220px; min-height: 104px; }
  .board-sheet--back { right: 0; }
  .board-sheet--front .note { width: 100px; font-size: 11.5px; padding: 9px 10px 11px; }
  .board-sheet--front .note--pink { top: 10px; left: 10px; }
  .board-sheet--front .note--blue { bottom: 10px; right: 10px; }
  .board-sheet--back .note { inset: 10px 10px auto; font-size: 11.5px; }
  .doodle-arrow { width: 130px; right: 0; bottom: 0; }
  .scribble { font-size: 14px; }
}

/* 超窄屏（<= 400px）：导航只留开关和下载，登录挪走 */
@media (max-width: 400px) {
  :root { --gutter: 12px; }
  .bnav__in { padding: 9px var(--gutter); gap: 8px; }
  .bnav__acts .btn--ghost { display: none; }
  .bnav__hand { display: none; }
  .board-toggle { width: 50px; height: 26px; }
  .hero { padding: 36px var(--gutter) 34px; }
  .sec { padding: 48px var(--gutter); }
  .stats__in { padding: 24px var(--gutter); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
