/* Relink 手账 — 深色涂鸦。和客户端默认主题同一套颜色与线条（src/doodle-theme.css 第 20 节）：
   暖炭灰点阵纸、粉笔色描边、手绘圆角、落进纸里的阴影，只有雾蓝一种强调色。页面正常往下滚动。 */
@font-face {
  font-family: "Relink Hand";
  src: url("/homepage/doodle-hand.woff?v=5b75afd3f9ca") format("woff");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #1d1c1a;
  --panel: #252422;
  --raised: #2f2d2a;
  --text: #ebe6dc;
  --soft: #cdc7bb;
  --muted: #9e988c;
  --ink: #cbc4b7;
  --faint: #55514b;
  --accent: #8db3d6;
  --on-accent: #16202a;
  --danger: #e88a7e;
  --shadow-ink: rgb(0 0 0 / 42%);
  --shadow: 3px 4px 0 var(--shadow-ink);
  --shadow-s: 2px 3px 0 var(--shadow-ink);
  --line: 2px;
  --r-card: 22px 26px 20px 28px / 26px 20px 28px 22px;
  --r-mid: 14px 17px 12px 18px / 17px 12px 18px 14px;
  --r-small: 10px 13px 9px 14px / 13px 9px 14px 10px;
  --r-pill: 999px 900px 999px 950px;
  --hand: "Relink Hand", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  min-width: 320px;
  font: 16px/1.7 var(--body);
  color: var(--text);
  background: radial-gradient(circle, rgb(203 196 183 / 9%) 1px, transparent 1.5px) 0 0 / 22px 22px, var(--bg);
}
img, svg { display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 4px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hand { font-family: var(--hand); font-weight: 400; letter-spacing: 0; }
.mono { font-family: var(--mono); }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 8px 14px; border-radius: var(--r-small); background: var(--ink); color: var(--panel); }
.skip:focus { top: 12px; }

/* ---------- 顶栏 ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgb(29 28 26 / 88%);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid rgb(203 196 183 / 18%);
}
.top__row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 26px; }
.brand:hover { color: var(--text); }
.brand__mark { width: 32px; height: 32px; rotate: -4deg; transition: rotate .2s; filter: drop-shadow(0 0 1px rgb(235 230 220 / 55%)); }
.brand:hover .brand__mark { rotate: 4deg; }
.top__nav { display: flex; gap: 4px; margin-left: 8px; }
.top__nav a { padding: 6px 12px; border-radius: var(--r-pill); color: var(--soft); text-decoration: none; font-size: 15px; }
.top__nav a:hover { background: var(--raised); color: var(--text); }
.top__actions { display: flex; gap: 10px; margin-left: auto; }

/* ---------- 按钮 ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 18px;
  border: var(--line) solid var(--ink); border-radius: var(--r-pill);
  font: 600 15px/1 var(--body); text-decoration: none; white-space: nowrap;
  transition: translate .12s, box-shadow .12s, background .15s;
}
.pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pill--ink { background: var(--ink); color: var(--panel); box-shadow: var(--shadow-s); }
.pill--ink:hover { background: var(--text); color: var(--panel); }
.pill--line { background: var(--panel); color: var(--text); }
.pill--line:hover { background: var(--raised); color: var(--text); }
.pill:active { translate: 2px 3px; box-shadow: none; }
.pill--big { min-height: 52px; padding: 0 26px; font-size: 17px; }
.pill--huge { min-height: 62px; padding: 0 34px; font-size: 20px; }
.textlink { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.textlink svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 28px; }
.actions--center { justify-content: center; }
.release { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.device-note { margin: 8px 0 0; padding: 10px 14px; max-width: 34em; border: 2px dashed rgb(141 179 214 / 55%); border-radius: var(--r-mid); color: var(--soft); font-size: 14px; }

/* ---------- 封面 ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; padding: 72px 0 88px; }
.hero__text { position: relative; }
.date-stamp {
  position: absolute; right: 0; top: -58px; rotate: 9deg;
  padding: 6px 12px; border: 2px solid var(--danger); border-radius: 10px;
  color: var(--danger); font-size: 14px; line-height: 1.2; text-align: center; opacity: .85;
}
.date-stamp b { font-size: 18px; font-weight: 400; }
.hero__title { position: relative; isolation: isolate; margin: 0; font-size: clamp(44px, 6.4vw, 82px); line-height: 1.08; }
.underline { position: relative; white-space: nowrap; }
.underline::after { content: ""; position: absolute; left: -2%; right: -4%; bottom: .04em; height: .16em; border-radius: 99px; background: var(--accent); opacity: .8; rotate: -1.5deg; z-index: -1; }
.lede { margin: 18px 0 0; max-width: 34em; color: var(--soft); font-size: 18px; }
.washi { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 0; padding: 0; list-style: none; }
.washi li {
  padding: 4px 14px; rotate: var(--t, 0deg);
  background: rgb(58 56 51 / 85%);
  border-left: 2px dashed rgb(203 196 183 / 25%); border-right: 2px dashed rgb(203 196 183 / 25%);
  color: var(--soft); font-size: 14px;
}

/* 邮票：锯齿边、粉笔内框、落进纸里的阴影。 */
.hero__desk { position: relative; min-height: 560px; }
.stamp { position: absolute; margin: 0; rotate: var(--r, 0deg); filter: drop-shadow(3px 4px 0 var(--shadow-ink)); transition: rotate .25s; }
.stamp:hover { rotate: calc(var(--r, 0deg) * -.4); }
.stamp__in {
  padding: 10px 10px 0;
  background: radial-gradient(circle at 0 0, transparent 5px, var(--panel) 5.5px) -7px -7px / 14px 14px;
}
.stamp__in img { width: 100%; height: auto; aspect-ratio: 5 / 6; object-fit: cover; border: 2px solid var(--ink); border-radius: 8px; background: var(--raised); }
.stamp figcaption { display: flex; align-items: center; gap: 6px; padding: 6px 4px 8px; font-size: 20px; color: var(--text); }
.hero__desk .stamp--big { left: 2%; top: 10px; width: 210px; z-index: 2; }
.hero__desk .stamp--grey { right: 2%; top: 0; width: 170px; }
.hero__desk .stamp--muted { right: 6%; top: 262px; width: 152px; }
.stamp--grey img { filter: grayscale(.55); }
.stamp--muted img { filter: grayscale(.85) brightness(.85); }
.icon-mute { width: 16px; height: 16px; fill: none; stroke: var(--danger); stroke-width: 2.2; stroke-linecap: round; }
.talk { position: absolute; right: -24px; top: 34%; display: grid; gap: 6px; }
.talk i { display: block; width: 14px; height: 3px; border-radius: 3px; background: var(--accent); animation: talk 1.2s ease-in-out infinite; }
.talk i:nth-child(2) { width: 20px; animation-delay: .15s; }
.talk i:nth-child(3) { animation-delay: .3s; }
.talk--small { right: -16px; }
@keyframes talk { 50% { opacity: .35; translate: 4px 0; } }
.sticker {
  position: absolute; left: -16px; bottom: 54px; rotate: -8deg;
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px;
  border: 2px solid var(--accent); border-radius: var(--r-pill);
  background: var(--panel); color: var(--accent); font-size: 13px; font-weight: 600;
}
.sticker svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; }

/* 便签与纸片 */
.note {
  position: relative; rotate: var(--r, 0deg);
  padding: 22px 24px 20px;
  background: var(--panel); border: var(--line) solid var(--ink); border-radius: var(--r-card);
  box-shadow: var(--shadow);
}
.note--list { position: absolute; left: 14%; bottom: 0; width: 250px; z-index: 3; }
.note__title { margin: 0 0 10px; font-size: 26px; line-height: 1.2; }
.pin { position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--danger); box-shadow: inset -3px -3px 0 rgb(0 0 0 / 25%), 2px 3px 0 var(--shadow-ink); }
.pin--corner { left: auto; right: 26px; }
.tape {
  position: absolute; width: 86px; height: 22px; rotate: var(--t, 0deg);
  background: rgb(58 56 51 / 85%);
  border-left: 2px dashed rgb(203 196 183 / 25%); border-right: 2px dashed rgb(203 196 183 / 25%);
}
.todo { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.todo label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.todo input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.todo .box { flex: none; width: 20px; height: 20px; margin-top: 4px; border: 2px solid var(--ink); border-radius: 5px 6px 4px 6px; }
.todo input:checked + .box { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--panel); }
.todo input:checked ~ span:last-child { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent); }
.todo input:focus-visible + .box { outline: 2px dashed var(--accent); outline-offset: 3px; }
.todo--big { gap: 14px; margin-top: 18px; font-size: 17px; }

/* ---------- 区块 ---------- */
.band { padding: 84px 0; border-top: 2px dashed rgb(203 196 183 / 14%); }
.section-head { text-align: center; }
.section-head .lede { margin-inline: auto; }
.h2 { margin: 0; font-size: clamp(34px, 4vw, 50px); line-height: 1.15; }
.squiggle { width: 220px; height: 16px; margin: 10px auto 0; fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.section-head .squiggle { margin-inline: auto; }

/* 翻面便签 */
.flips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 48px; perspective: 1200px; }
.flip { rotate: var(--r, 0deg); }
.flip__card {
  position: relative; display: block; width: 100%; height: 230px; padding: 0;
  border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
  transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3,.7,.2,1);
}
.flip__card[aria-pressed="true"] { transform: rotateY(180deg); }
.flip__face {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px;
  padding: 22px; backface-visibility: hidden;
  background: var(--panel); border: var(--line) solid var(--ink); border-radius: var(--r-card); box-shadow: var(--shadow);
  text-align: center; font-size: 16px; color: var(--soft);
}
.flip__front b { font-size: 40px; color: var(--text); line-height: 1.1; }
.flip--ink .flip__front { background: var(--ink); color: var(--panel); }
.flip--ink .flip__front b { color: var(--panel); }
.flip__back { transform: rotateY(180deg); line-height: 1.75; color: var(--text); }
.flip__hint { position: absolute; right: 16px; bottom: 14px; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; opacity: .6; }

/* 客户端界面 */
.split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.split__text .note { margin-top: 32px; }
.note--room p { margin: 0; color: var(--soft); }
.tabs { display: inline-flex; gap: 6px; padding: 4px; margin-bottom: 22px; border: 2px solid rgb(203 196 183 / 35%); border-radius: var(--r-pill); }
.tabs [role="tab"] { min-height: 36px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: none; color: var(--soft); font: 600 14px var(--body); cursor: pointer; }
.tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--panel); }
.polaroid { position: relative; padding: 14px; background: var(--panel); border: var(--line) solid var(--ink); border-radius: var(--r-card); box-shadow: var(--shadow); rotate: .8deg; }
.window { overflow: hidden; border: 2px solid rgb(203 196 183 / 30%); border-radius: var(--r-mid); background: var(--bg); }
.window__bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 2px solid rgb(203 196 183 / 16%); font-size: 18px; }
.window__logo { width: 22px; height: 22px; filter: drop-shadow(0 0 1px rgb(235 230 220 / 55%)); }
.window__tab { margin-left: 6px; padding: 2px 10px; border-radius: var(--r-pill); color: var(--muted); font-size: 13px; }
.window__tab.is-on { outline: 2px solid var(--accent); color: var(--text); }
.window__main { min-height: 300px; }
.panel { padding: 26px 22px 20px; }
.mini-stamps { display: flex; justify-content: center; gap: 22px; }
.mini-stamps .stamp { position: relative; width: 120px; }
.mini-stamps figcaption { font-size: 16px; }
.dock { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
.dock__btn { display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid rgb(203 196 183 / 45%); border-radius: 50%; color: var(--soft); }
.dock__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dock__btn--on { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.dock__btn--leave { background: var(--danger); color: var(--panel); border-color: var(--danger); }
.panel--text { display: grid; gap: 14px; }
.panel--text[hidden] { display: none; }
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; }
.msg b { font-size: 14px; }
.msg p { margin: 2px 0 0; color: var(--soft); }
.msg--mine { justify-content: flex-end; }
.msg--mine p { padding: 6px 14px; border-radius: var(--r-mid); background: var(--raised); color: var(--text); }
.composer { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding: 8px 8px 8px 16px; border: 2px solid rgb(203 196 183 / 35%); border-radius: var(--r-pill); color: var(--muted); font-size: 14px; }
.composer i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--raised); }
.composer svg { width: 16px; height: 16px; fill: none; stroke: var(--soft); stroke-width: 2; }

/* 插件与自建节点 */
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px; align-items: stretch; }
/* Grid cells may shrink below their content: long commands scroll inside the terminal instead of widening the page. */
.hero > *, .split > *, .pair > * { min-width: 0; }
.sheet {
  position: relative; padding: 34px 34px 30px;
  background: var(--panel); border: var(--line) solid var(--ink); border-radius: var(--r-card); box-shadow: var(--shadow);
}
.sheet--lined { background: repeating-linear-gradient(transparent 0 33px, rgb(203 196 183 / 8%) 33px 35px), var(--panel); rotate: -.6deg; }
.sheet .h2 { font-size: clamp(30px, 3.2vw, 40px); }
.sheet .lede { font-size: 16px; }
.terminal { position: relative; margin-top: 22px; padding: 20px 20px 16px; border-radius: var(--r-mid); background: #141312; border: 2px solid rgb(203 196 183 / 25%); font-size: 13.5px; line-height: 1.7; overflow-x: auto; }
.terminal p { margin: 0; color: var(--text); white-space: pre; }
.terminal p::before { content: "$ "; color: var(--accent); }
.terminal .c { color: var(--muted); }
.terminal .c::before { content: ""; }

/* 收尾 */
.band--final { text-align: center; }
.final { position: relative; }
.final__title { margin: 0; font-size: clamp(44px, 6vw, 76px); line-height: 1.1; }
.final .release { margin-top: 18px; }
.final .device-note { margin-inline: auto; }
.doodle { position: absolute; pointer-events: none; }
.doodle--star { left: 12%; top: 0; width: 44px; height: 44px; fill: none; stroke: var(--accent); stroke-width: 2; animation: wiggle 2.4s steps(2) infinite; }
.doodle--ring { right: 14%; top: 30px; width: 46px; height: 46px; border: 2px solid var(--faint); border-radius: 50%; }
@keyframes wiggle { 50% { rotate: 12deg; } }
.quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 44px; }
.quick a {
  padding: 10px 20px; rotate: -1deg;
  background: var(--panel); border: 2px dashed rgb(203 196 183 / 45%); border-radius: var(--r-small);
  color: var(--text); text-decoration: none; font-size: 18px;
  transition: rotate .15s, border-color .15s;
}
.quick a:nth-child(even) { rotate: 1.5deg; }
.quick a:hover { rotate: 0deg; border-color: var(--accent); color: var(--text); }

/* 赞助：两个标志本身是深色字，放在一张米白纸片上。 */
.sponsors { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; padding: 34px 0 50px; color: var(--muted); font-size: 14px; }
.sponsors a { display: grid; place-items: center; height: 52px; padding: 0 20px; border-radius: var(--r-small); background: var(--text); box-shadow: var(--shadow-s); }
.sponsors img { height: 28px; width: auto; }

/* ---------- 页脚 ---------- */
.foot { border-top: 2px solid rgb(203 196 183 / 18%); padding: 26px 0 34px; color: var(--muted); font-size: 14px; }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 28px; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot a { color: var(--soft); text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; }
.foot__legal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.stats summary { cursor: pointer; color: var(--soft); }
.stats p { max-width: 36em; margin: 8px 0 0; }

/* ---------- 窄屏 ---------- */
@media (max-width: 960px) {
  .hero, .split { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 48px; gap: 30px; }
  .hero__desk { min-height: 540px; max-width: 560px; width: 100%; margin-inline: auto; }
  .flips { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 64px; }
  .top__nav { display: none; }
  .top__row { gap: 12px; min-height: 58px; }
  .pill { padding: 0 14px; }
  .date-stamp { display: none; }
  .lede { font-size: 16px; }
  .band { padding: 60px 0; }
  .hero__desk { min-height: 470px; }
  .hero__desk .stamp--big { width: 160px; left: 0; }
  .hero__desk .stamp--grey { width: 128px; }
  .hero__desk .stamp--muted { width: 118px; top: 200px; right: 2%; }
  .note--list { width: 210px; left: 0; }
  .mini-stamps { gap: 12px; }
  .mini-stamps .stamp { width: 92px; }
  .sheet { padding: 28px 22px 24px; }
  .flip__card { height: 200px; }
  .actions .pill--big, .actions .pill--huge { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
