/* =========================================================
   Miao · 个人主页
   macOS 式的灰白：灰色画布 + 白色大面，内容收进分组列表
   左栏角色常驻，右栏按路由切换
   ========================================================= */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text",
          "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --spring: cubic-bezier(.34, 1.3, .46, 1);
  /* 换页动画：退场短、进场长，同一条缓动曲线，布局跟着一起走 */
  --e-out: cubic-bezier(.22, .9, .24, 1);
  --d-out: .15s;
  --d-in: .42s;
  --d-layout: .52s;

  /* 文字 */
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #a1a1a8;

  /* 面 */
  --canvas: #f0f0f3;                 /* 灰色画布 */
  --surface: #fff;                   /* 白色大面 */
  --tint: #f5f5f7;
  --hover: #f7f7f9;
  --line: rgba(0, 0, 0, .09);
  --line-2: rgba(0, 0, 0, .065);
  --sh-1: 0 1px 2px rgba(0, 0, 0, .04);
  --sh-2: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .05);
  --sh-3: 0 2px 8px rgba(0, 0, 0, .05), 0 22px 60px rgba(0, 0, 0, .09);
  /* 卡片不描边：灰底 + 白面本来就分得清，1px 线只会把每块「框」起来。
     改成近一层 + 远一层的柔影，靠浮起来区分层次 */
  --sh-card:   0 1px 1.5px rgba(0, 0, 0, .03), 0 5px 12px -5px rgba(0, 0, 0, .055);
  --sh-card-h: 0 2px 4px rgba(0, 0, 0, .04), 0 16px 34px -12px rgba(0, 0, 0, .11);

  --accent: #0071e3;                 /* 只用在极少数强调上 */
  --green: #1f9e58;

  /* 尺寸 */
  --wrap: 1080px;
  --avatar: 300px;
  --r-lg: 28px;
  --r-md: 20px;
  --r-pill: 999px;
  --rail: 14px;                      /* 分隔线相对图标的缩进基准 */

  --cat-shadow: rgba(30, 26, 45, .14);   /* 角色组件读这个变量 */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.6;
  overflow: hidden;                 /* 桌面端是 app 外壳，滚动交给右栏 */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: rgba(0, 113, 227, .16); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 12px; }

/* ---------- 背景 ----------
   body 上的 data-bg 三选一：
   plain  mac 灰白（默认）
   field  旷野（天青 + 阳光 + 草绿）
   aurora 彩色柔光
   ------------------------------------------------------------ */
.aurora { display: none; }
body[data-bg="aurora"], body[data-bg="field"] { background: #fff; }
body[data-bg="aurora"] .aurora,
body[data-bg="field"] .aurora { display: block; position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); animation: drift 34s ease-in-out infinite; }

body[data-bg="field"] .aurora i:nth-child(1) { width: 150vw; height: 78vh; left: -25vw; top: -30vh;    background: #a9daf0; opacity: .5; }
body[data-bg="field"] .aurora i:nth-child(2) { width: 62vw;  height: 62vw; right: -12vw; top: -20vh;   background: #ffe6a8; opacity: .52; animation-delay: -9s; }
body[data-bg="field"] .aurora i:nth-child(3) { width: 160vw; height: 62vh; left: -30vw; bottom: -26vh; background: #c6dd8c; opacity: .55; animation-delay: -17s; }
body[data-bg="field"] .aurora i:nth-child(4) { width: 80vw;  height: 40vh; left: 4vw;   bottom: -12vh; background: #93c4ab; opacity: .42; animation-delay: -25s; }

body[data-bg="aurora"] .aurora i:nth-child(1) { width: 46vw; height: 46vw; left: -8vw;  top: -12vh;    background: #ffb5a7; opacity: .5; }
body[data-bg="aurora"] .aurora i:nth-child(2) { width: 40vw; height: 40vw; left: 26vw;  bottom: -18vh; background: #b9c7ff; opacity: .42; animation-delay: -8s; }
body[data-bg="aurora"] .aurora i:nth-child(3) { width: 38vw; height: 38vw; right: -6vw; top: 8vh;      background: #e3c6ff; opacity: .38; animation-delay: -16s; }
body[data-bg="aurora"] .aurora i:nth-child(4) { width: 34vw; height: 34vw; right: 8vw;  bottom: -12vh; background: #a6e7c9; opacity: .4;  animation-delay: -23s; }

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(3vw, 4vh, 0) scale(1.14); }
}

/* ---------- 顶部悬浮导航 ---------- */
.topnav {
  position: fixed;
  z-index: 40;
  top: 22px; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(1240px, 100% - 56px);
  margin: 0 auto;
  pointer-events: none;
}
.topnav > * { pointer-events: auto; }

.glass {
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 0 0 1px var(--line-2), var(--sh-2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  font-weight: 650;
  font-size: 14.5px;
  letter-spacing: -.01em;
  transition: transform .25s var(--spring);
}
.brand:hover { transform: translateY(-1px); }
.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff6f52; }

.tabs {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 42px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  margin: 0 auto;
}
.tabs a {
  position: relative;
  z-index: 1;
  padding: 0 18px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  color: var(--ink-2);
  transition: color .3s;
  white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: #fff; }
.ink {
  position: absolute;
  left: 0;               /* 不写 left 的话静态位置已含父内边距，会整体偏移 */
  top: 4px;
  height: 34px;
  border-radius: var(--r-pill);
  background: var(--ink);
  transition: transform .5s var(--spring), width .5s var(--spring);
  will-change: transform, width;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-2);
}
.status i { width: 7px; height: 7px; border-radius: 50%; background: #34c759; animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- 外壳 ---------- */
.shell {
  position: relative;
  z-index: 1;
  height: 100svh;
  display: grid;
  /* 必须写 minmax(0, 1fr)：1fr 的最小值是内容高度，内容一高会把备案号顶出屏幕 */
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  align-items: center;
  row-gap: 14px;
  padding: 96px 28px 22px;
}
.stage {
  width: min(var(--wrap), 100%);
  max-height: 100%;
  min-height: 0;                     /* 让里面的滚动列能真正收缩 */
  display: flex;
  align-items: center;
  gap: 56px;
  transition: gap var(--d-layout) var(--e-out),
              padding var(--d-layout) var(--e-out),
              background-color var(--d-layout) var(--e-out),
              border-radius var(--d-layout) var(--e-out),
              box-shadow var(--d-layout) var(--e-out);
}

/* 首页：整块收进一张白色大卡，压得住场 */
body[data-route="/"] .stage {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 56px 60px;
  box-shadow: 0 0 0 1px var(--line-2), var(--sh-3);
}

/* —— 左栏：圆形角色头像 —— */
.cat-col {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.avatar {
  position: relative;
  width: var(--avatar);
  height: var(--avatar);
  border-radius: 50%;
  overflow: hidden;
  background: var(--tint);
  /* 位移和缩放由 JS 的 FLIP 统一补间 —— 只动宽高的话位置会瞬移 */
}
/* 静态头像。想微调构图只改这两个变量：
   --av-zoom 放大倍数，--av-pos 取景位置（左右 % / 上下 %） */
.avatar-img {
  position: absolute;
  top: 3%;
  left: -10.5%;
  width: 110%;
  height: auto;
}
.cat-card { display: none; flex-direction: column; gap: 2px; text-align: center; }
.cat-card b { font-size: 14.5px; letter-spacing: -.01em; }
.cat-card span { font-size: 12px; color: var(--ink-2); }

/* 头衔悬停互换：a 占位撑高度，b 压在上面，交叉淡入淡出。
   首页和左栏共用这一套 —— inline-block 让首页的热区只包住文字本身，
   在左栏里它是 flex 子项，会被块级化成整行居中 */
.role-swap { position: relative; display: inline-block; cursor: default; }
.role-swap i {
  font-style: normal;
  display: block;
  white-space: nowrap;
  transition: opacity .28s var(--e-out), transform .28s var(--e-out);
}
.role-swap .b {
  position: absolute;
  left: 0; right: 0; top: 0;
  opacity: 0;
  transform: translateY(6px);
}
/* 左栏整张名字卡都是热区；首页则是那行字自己 */
.cat-card:hover .role-swap .a,
.role-swap:hover .a { opacity: 0; transform: translateY(-6px); }
.cat-card:hover .role-swap .b,
.role-swap:hover .b { opacity: 1; transform: none; color: var(--ink); }

/* 左栏的简介块：只在内页出现，用来填住那块空白 */
.rail { display: none; width: 100%; margin-top: 6px; }
.rail-kv { padding-top: 18px; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 9px; font-size: 12.5px; }
.rail-kv div { display: flex; justify-content: space-between; gap: 10px; }
.rail-kv dt { color: var(--ink-3); }
.love { color: #e5457a; font-weight: 550; }
.rail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.rail-tags .tag { padding: 4px 10px; font-size: 11.5px; }

/* 侧栏里的联系方式 */
.rail-t {
  margin: 20px 0 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.rail-links { display: flex; flex-direction: column; gap: 1px; }
.rl {
  display: flex;
  transition: background .2s, transform .25s var(--spring);
  align-items: center;
  gap: 10px;
  width: calc(100% + 16px);
  margin: 0 -8px;
  padding: 7px 8px;
  border-radius: 10px;
  text-align: left;
  appearance: none;
  transition: background .2s;
}
.rl:hover { background: var(--hover); }
.rl .tile { flex: none; width: 30px; height: 30px; border-radius: 9px; }
.rl .tile .ico { width: 15px; height: 15px; }
.rl-in { min-width: 0; flex: 1; }
.rl-n { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: -.01em; }
.rl-v {
  display: block;
  font-style: normal;
  font-size: 10.5px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rl .chev { width: 14px; height: 14px; opacity: .7; }
.rl .chev::before { left: 2px; top: 3.5px; width: 6px; height: 6px; }
.rl .chev.mark::before { content: none; }       /* 复制型的行放图标，不放箭头 */
.chev.mark .ico { width: 14px; height: 14px; }
.rl:hover .chev { transform: translateX(2px); }

/* 内页：头像缩小到侧边导轨，名字浮出来 */
/* 内页放宽：首页那张卡保持 1080 好看，但内页要放网格，窄了文字会被挤成好几行 */
body:not([data-route="/"]) { --avatar: 104px; --wrap: 1400px; }
/* height:100% 不能省 —— 右栏的 max-height:100% 只有在父元素高度确定时才生效，
   否则右栏不限高、不滚动，内容会溢出到网格行外面压住备案号 */
body:not([data-route="/"]) .stage { height: 100%; align-items: flex-start; gap: 40px; }
body:not([data-route="/"]) .cat-col { position: sticky; top: 0; width: 224px; }
body:not([data-route="/"]) .cat-card { display: flex; animation: riseIn var(--d-in) var(--e-out) both .1s; }
body:not([data-route="/"]) .rail { display: block; animation: riseIn var(--d-in) var(--e-out) both .16s; }

/* —— 右栏 —— */
.view-col {
  flex: 1;
  min-width: 0;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;              /* 滚动条藏掉，滚轮照常 */
  -ms-overflow-style: none;
}
.view-col::-webkit-scrollbar { width: 0; height: 0; }
/* 滚动条藏了，就得有别的提示：下面还有内容时，底部柔和渐隐 */
.view-col.more {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 46px), transparent);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 46px), transparent);
}
/* —— 换页动画 ——
   退场：整块轻微上移淡出；进场：分块依次落位（父层不再整体淡入，避免透明度叠加） */
/* 四个页面都写在 HTML 里，路由只切换显示哪一个 */
.view { display: none; will-change: opacity, transform; }
.view.active { display: block; }
.view.out { animation: viewOut var(--d-out) var(--e-out) forwards; }
@keyframes viewOut {
  to { opacity: 0; transform: translateY(-8px); }
}
.view.in > * { animation: riseIn var(--d-in) var(--e-out) both; }
.view.in > *:nth-child(2) { animation-delay: .05s; }
.view.in > *:nth-child(3) { animation-delay: .1s; }
.view.in > *:nth-child(4) { animation-delay: .145s; }
.view.in > *:nth-child(n+5) { animation-delay: .18s; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 首页 ---------- */
.home h1 {
  font-size: clamp(40px, 4.4vw, 66px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.04em;
}
.home .role { margin-top: 16px; font-size: 17px; font-weight: 500; color: var(--ink-2); }
.home .line { margin-top: 10px; font-size: 15px; color: var(--ink-3); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tag { padding: 6px 14px; border-radius: var(--r-pill); font-size: 12.5px; color: var(--ink-2); background: var(--tint); }

.home .intro { margin-top: 22px; font-size: 14.5px; line-height: 1.85; color: var(--ink-2); }
.home .intro em { font-style: normal; font-weight: 650; color: var(--ink); }
.acts { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }

/* 白卡底部的站点条：同一张面上的一行，不是一排小卡 */
.home-links { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.hl-t { display: block; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
/* 用网格不用 flex —— 换行后两列才对得齐 */
/* 260px 起跳：首页那条宽度下正好排成 2×2，网址不用截断 */
.hl-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }

/* 首页这条是从侧栏克隆来的，把侧栏那套负边距改回正常盒子 */
.hl-row .rl {
  width: auto;
  margin: 0;
  padding: 9px 12px;
  border-radius: 13px;
  background: var(--tint);            /* 白卡上用浅灰填充，不用描边 */
}
.hl-row .rl:hover { background: #eaeaef; transform: translateY(-1px); }
.hl { display: flex; align-items: center; gap: 10px; font-size: 13.5px; min-width: 0; transition: transform .25s var(--spring); }
.hl:hover { transform: translateY(-2px); }
.hl .tile { width: 36px; height: 36px; border-radius: 11px; }
.hl-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl .chev { flex: none; color: var(--ink-3); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 26px;
  border-radius: var(--r-pill);
  font-size: 14.5px;
  font-weight: 550;
  transition: transform .25s var(--spring), box-shadow .25s, background .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.solid { background: var(--ink); color: #fff; box-shadow: var(--sh-2); }
.btn.solid:hover { box-shadow: var(--sh-3); }
.btn.ghost { background: var(--tint); }
.btn.ghost:hover { background: #ebebef; }

/* ---------- 区块标题（在灰画布上） ---------- */
.view-head { margin-bottom: 14px; padding-left: 2px; }
.view-head h2 { font-size: 30px; font-weight: 700; letter-spacing: -.035em; }
.view-head p { margin-top: 5px; font-size: 13.5px; color: var(--ink-2); }
.view-head .ln { color: var(--accent); }
.view-head .ln:hover { text-decoration: underline; }
.panel .tags { margin-top: 0; }

.tile {
  flex: none;
  width: 54px; height: 54px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--c1, #c9c9d1), var(--c2, #9a9aa3));
}
.tile img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform .35s var(--ease); }
.card:hover .tile img { transform: scale(1.12); }

/* 图标雪碧图：HTML 里写 <svg class="ico"><use href="#i-xxx"/></svg> */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico {
  width: 24px; height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hl .ico { width: 18px; height: 18px; }

/* 右侧箭头用 CSS 画，省掉每一行里那段重复的 SVG */
.chev {
  position: relative;
  flex: none;
  width: 16px; height: 16px;
  color: var(--ink-3);
  transition: transform .25s var(--spring);
}
.chev::before {
  content: "";
  position: absolute;
  left: 3px; top: 4.5px;
  width: 7px; height: 7px;
  border-right: 1.7px solid currentColor;
  border-top: 1.7px solid currentColor;
  transform: rotate(45deg);
}
.chev.mark .ico { width: 16px; height: 16px; }

/* ---------- 站点：大小不一的方块 ----------
   四列网格，big 占 2×2、wide 占 2×1、其余 1×1 —— 7 个正好填满 4×3 */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.card {
  position: relative;
  min-width: 0;                      /* 同上 */
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-card);
  transition: transform .28s var(--spring), box-shadow .28s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-card-h); }

/* 每块带一点自己图标的颜色：左上角一层很淡的光晕。
   不是实心色块 —— 色块会跟正文抢注意力，光晕只负责让人一眼记住「哪块是哪个站」。
   浓淡按块的分量走：大块最重，小块最轻，悬停时再亮一档 */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: .42;
  transition: opacity .28s var(--ease);
  background: radial-gradient(118% 88% at 3% 0%,
              color-mix(in srgb, var(--c2, #8e8e96) 22%, transparent), transparent 62%);
}
.card.wide::before { opacity: .55; }
.card.big::before  { opacity: .8; }
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }   /* 光晕是绝对定位的，不压这一下会盖住文字 */
.card:hover .chev { transform: translateX(3px); }
.card .tile { width: 44px; height: 44px; border-radius: 13px; }
.card .tile .ico { width: 21px; height: 21px; }

.card-in { min-width: 0; }
.card-t { display: flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; }
.card-url { display: block; margin-top: 2px; font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-d { display: block; margin-top: 8px; font-size: 12.3px; line-height: 1.6; color: var(--ink-2); }
.card-stat {
  margin-top: auto;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .02em;
}

/* 主角：占 2×2，立绘放大当主视觉 */
.card.big { grid-column: span 2; grid-row: span 2; padding: 26px 28px; gap: 16px; }
.card.big .tile { width: 96px; height: 96px; border-radius: 27px; }
.card.big .card-t { font-size: 22px; letter-spacing: -.025em; }
.card.big .card-url { margin-top: 4px; font-size: 12.5px; }
.card.big .card-in { max-width: 47%; }        /* 右下角让给截图，文字不压上去 */
.card.big .card-d { margin-top: 12px; font-size: 13.5px; line-height: 1.8; }
.card.big .card-stat { font-size: 12px; }

/* 右下角斜插一个真截图的小窗口，只露左上那一角。
   七块里只有这一块有图 —— 有图的那块自动成了主角，其余六块靠光晕就够了 */
.card.big { overflow: hidden; }
.card.big .shot {
  position: absolute;
  z-index: 0;                        /* 压在文字底下，怎么缩都不会盖住正文 */
  right: -7%;
  bottom: -54px;
  width: 53%;
  min-width: 210px;
  border-radius: 11px;
  overflow: hidden;
  background: #fff;
  transform: rotate(-8deg);
  transform-origin: 100% 100%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 20px 46px -16px rgba(0, 0, 0, .3);
  transition: transform .5s var(--spring);
}
.card.big:hover .shot { transform: rotate(-6.5deg) translate(-10px, -13px); }
.shot-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 17px;
  padding-left: 7px;
  background: #f6f6f8;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.shot-bar i { width: 5px; height: 5px; border-radius: 50%; background: #ff5f57; }
.shot-bar i:nth-child(2) { background: #febc2e; }
.shot-bar i:nth-child(3) { background: #28c840; }
.shot img { display: block; width: 100%; height: auto; }

/* 次主角：占 2×1，横着排 */
.card.wide { grid-column: span 2; flex-direction: row; align-items: center; gap: 14px; }
.card.wide .tile { width: 54px; height: 54px; border-radius: 16px; }
.card.wide .card-in { flex: 1; }
.card.wide .card-d { margin-top: 6px; }
.card.wide .card-stat { margin: 0 0 0 auto; flex: none; white-space: nowrap; }

/* 还没上线的（会员卡包，备案中）：不是链接，就别做出能点的样子 */
.card.soon { cursor: default; }
.card.soon:hover { transform: none; box-shadow: var(--sh-card); }
.card.soon:hover::before { opacity: .42; }
.card.soon .card-stat { color: #c2408a; }

/* ---------- 开源：仓库卡 ----------
   和站点页共用一套材质（灰底 + 白卡 + 柔影），但节奏换掉：
   没有彩色图标、没有大小之分，改成等宽的仓库路径 + GitHub 那套语言色点。
   站点靠图标认，作品靠代码认 —— 两页扫过去不会看成同一张 */
.repos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.repo {
  position: relative;
  min-width: 0;                      /* 网格项默认 min-width:auto，会把网格撑破 */
  display: flex;
  flex-direction: column;
  padding: 16px 18px 15px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-card);
}

.repo-path {
  display: block;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.repo-path b { font-weight: 500; color: var(--ink-2); }
.repo-t { display: block; margin-top: 8px; font-size: 15.5px; font-weight: 650; letter-spacing: -.015em; }
.repo-d { display: block; margin-top: 7px; font-size: 12.8px; line-height: 1.65; color: var(--ink-2); }

/* 底部这行对齐到卡片底边，各张卡的色点连成一条线 */
.repo-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 10px;
  margin-top: auto;
  padding-top: 14px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.lang { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.lang::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--lang, #c3c3cb);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);   /* JavaScript 那个浅黄在白底上没有边界 */
}

/* 卡片头：左边路径 + 名字，右边一个「用起来长什么样」的小画面。
   小画面高度跟左边两行差不多，放在原本空着的右上角，卡片不会因此变高 */
.repo-head { display: flex; align-items: flex-start; gap: 12px; }
.repo-id { flex: 1; min-width: 0; }

.viz {
  flex: none;
  width: 124px; height: 50px;
  margin: -2px -4px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 8%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 16%, transparent);
  font: 500 9.5px/1.2 ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color: color-mix(in srgb, var(--c) 72%, var(--ink));
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
}
.viz i, .viz em, .viz b { font-style: normal; }

/* Miao API：一个小终端 */
.viz.term { background: #1d2130; box-shadow: none; color: #aeb6c6; }
.viz.term b { color: #8fc2ff; font-weight: 600; }
.viz.term em { margin-right: 3px; padding: 0 4px; border-radius: 4px; color: #11271b; background: #5fd38d; font-weight: 700; }
.caret { display: inline-block; width: 5px; height: 10px; margin-left: 3px; vertical-align: -1px; background: #aeb6c6; animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* 积木 UI：一排组件 —— 开关、按钮、复选框 */
.viz.kit { flex-direction: row; align-items: center; justify-content: center; gap: 9px; }
.k-toggle { position: relative; width: 24px; height: 14px; border-radius: 99px; background: var(--c); }
.k-toggle::after { content: ""; position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.k-btn { padding: 3px 7px; border-radius: 6px; font: 600 9.5px/1.2 var(--font); color: #fff; background: var(--ink); }
.k-check { position: relative; width: 13px; height: 13px; border-radius: 4px; background: var(--c); }
.k-check::after { content: ""; position: absolute; left: 4.5px; top: 2px; width: 3px; height: 6px; border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }

/* theme-x：一条推文 —— 头像 + 三行字 */
.viz.tweet { flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
.viz.tweet img { flex: none; width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.tw { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.tw i { display: block; height: 4px; border-radius: 3px; background: color-mix(in srgb, var(--c) 28%, #fff); }
.tw i:nth-child(1) { width: 52%; background: color-mix(in srgb, var(--c) 75%, var(--ink)); }
.tw i:nth-child(3) { width: 72%; }

/* 美区地址：一张地址标签 */
.viz.addr span { display: flex; align-items: center; gap: 4px; }
.viz.addr .ico { width: 11px; height: 11px; stroke-width: 2.2; }
.viz.addr em { margin-left: auto; padding: 1px 5px; border-radius: 4px; font: 600 9px/1.3 var(--font); color: #fff; background: var(--c); }

/* Miao Console：两条解析记录，都生效了 */
.viz.dns span { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; }
.viz.dns b { font-weight: 600; color: var(--ink); }
.viz.dns em { width: 6px; height: 6px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 2px rgba(52, 199, 89, .18); }

/* 喵面板：一句话建站 */
.viz.chat { gap: 4px; padding: 0 8px; font: 500 9.5px/1.3 var(--font); }
.viz.chat span { max-width: max-content; padding: 2px 7px; border-radius: 8px; }
.viz.chat .me { align-self: flex-end; color: #fff; background: var(--c); border-bottom-right-radius: 3px; }
.viz.chat .ai { align-self: flex-start; color: var(--ink-2); background: #fff; box-shadow: 0 0 0 1px var(--line-2); border-bottom-left-radius: 3px; }

/* 电脑小药箱：一个药箱十字 + 几个常见症状 */
.viz.rx { width: auto; flex-direction: row; align-items: center; gap: 5px; font: 500 10px/1.2 var(--font); }
.viz.rx b { position: relative; flex: none; width: 20px; height: 20px; margin-right: 2px; border-radius: 50%; background: var(--c); }
.viz.rx b::before, .viz.rx b::after { content: ""; position: absolute; left: 50%; top: 50%; background: #fff; border-radius: 1px; transform: translate(-50%, -50%); }
.viz.rx b::before { width: 10px; height: 3px; }
.viz.rx b::after { width: 3px; height: 10px; }
.viz.rx i { padding: 3px 8px; border-radius: 99px; background: #fff; box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent); }

/* 底部按钮：产品介绍 + GitHub。卡片不再整张可点 —— 两个去处，得分开给 */
.repo-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ra {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 550;
  color: var(--ink);
  background: var(--tint);
  transition: background .2s, color .2s;
}
.ra:hover { background: #e9e9ee; }
.ra .ico { width: 12px; height: 12px; stroke-width: 2; color: var(--ink-3); transition: transform .3s var(--spring); }
.ra:hover .ico { transform: translate(1px, -1px); }
.ra:not(.gh) { color: #fff; background: var(--ink); }       /* 产品介绍是主按钮 */
.ra:not(.gh):hover { background: #3a3a3f; }
.ra:not([href]) { display: none; }                           /* 介绍页还没做：没填 href 就不出现 */

/* 电脑小药箱：还在早期，放最后一行、横着排，占整行但压得矮 */
.repo.early { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 28px; }
.repo-main { flex: 1; min-width: 0; }
.repo-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.repo-side .repo-foot { margin-top: 0; padding-top: 0; }
.repo-side .repo-acts { margin-top: 0; }

/* ---------- 简介 ---------- */
.panel { padding: 26px 28px; }
.bio p { font-size: 15px; line-height: 1.95; }
.bio p + p { margin-top: 13px; }
.bio em { font-style: normal; font-weight: 650; color: var(--accent); }

.timeline { list-style: none; padding-left: 17px; border-left: 1px solid var(--line-2); }
.timeline li { position: relative; padding: 0 0 20px 20px; font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -23.5px; top: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ink-3);
  box-shadow: 0 0 0 4px var(--surface);
}
.timeline li:first-child::before { background: var(--ink); }
.timeline b { display: block; font-size: 12px; color: var(--ink); letter-spacing: .03em; margin-bottom: 3px; }

.kv { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 20px; font-size: 14px; }
.kv + .kv { box-shadow: inset 0 1px 0 var(--line-2); }
.kv dt { color: var(--ink-2); }
.kv .live { color: var(--green); font-weight: 550; }

.skill { padding: 14px 20px; }
.skill + .skill { box-shadow: inset 0 1px 0 var(--line-2); }
.skill-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 9px; }
.skill-bar { height: 6px; border-radius: 3px; background: var(--tint); overflow: hidden; }
.skill-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--ink); transition: width 1.1s var(--ease); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }

/* ---------- 备案号 ---------- */
.beian {
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-3);
}
.beian a { transition: color .2s; }
.beian a:hover { color: var(--ink-2); }
.beian .sep { margin: 0 8px; opacity: .5; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(14px);
  z-index: 60;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--sh-3);
  opacity: 0;
  transition: opacity .3s, transform .4s var(--spring);
}
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- 响应式 ---------- */
/* 大屏再放大一档，别显得小气 */
@media (min-width: 1580px) {
  :root { --wrap: 1200px; --avatar: 340px; }
  body[data-route="/"] .stage { padding: 64px 68px; }
  .stage { gap: 64px; }
}

/* 窗口不够宽时降列：三列太挤，文字会被压成一长条 */
@media (max-width: 1400px) {
  .repos { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card.big { grid-column: span 2; grid-row: span 1; }
  .card.wide { grid-column: span 1; flex-direction: column; align-items: flex-start; }
  .card.soon { grid-column: span 2; }        /* 两列时它落单，干脆占整行 */
  .card.wide .card-stat { margin: auto 0 0; }
  /* 大块在这儿变成整行的横幅：矮而宽，窗口得按新比例缩回去，否则会占掉大半张卡 */
  .card.big .card-in { max-width: 56%; }
  .card.big .shot { right: -4%; bottom: -50px; width: 33%; }
}

@media (max-width: 1100px) {
  :root { --avatar: 230px; }
  .stage { gap: 40px; }
  body[data-route="/"] .stage { padding: 40px 42px; }
  .two-col { grid-template-columns: 1fr; gap: 20px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card.big { grid-row: span 1; }
}

@media (max-width: 800px) {
  body { overflow: auto; }
  .topnav { top: 12px; width: min(1240px, 100% - 24px); }
  .brand, .status { display: none; }          /* 只留居中的标签页 */

  .shell { height: auto; min-height: 100svh; padding: 86px 18px 44px; place-items: start center; }
  .stage {
    max-height: none;
    flex-direction: column;
    align-items: stretch;
    gap: 26px;
  }
  body[data-route="/"] .stage { padding: 34px 26px; align-items: center; text-align: center; }
  body[data-route="/"] .tags, body[data-route="/"] .acts { justify-content: center; }
  body:not([data-route="/"]) .cat-col { position: static; width: auto; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; }
  body:not([data-route="/"]) .cat-card { text-align: left; justify-content: center; }
  .rail { max-width: 460px; margin: 0 auto; text-align: center; }
  .rail-links { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px; }
  .rl { width: auto; margin: 0; padding: 7px 12px 7px 8px; box-shadow: 0 0 0 1px var(--line-2); }
  .rl .chev { display: none; }
  .rl .rl-v { display: none; }
  .rail-kv { align-items: center; }
  .rail-kv div { width: min(280px, 100%); margin: 0 auto; }
  .rail-tags { justify-content: center; }
  .view-col { max-height: none; overflow: visible; }
  .repos { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .card.big, .card.wide, .card.soon { grid-column: span 1; grid-row: span 1; }
  .repo.early { flex-direction: column; align-items: stretch; gap: 0; }
  .repo.early .repo-head { flex-direction: column; gap: 10px; }
  .repo.early .viz { margin: 0; }
  .repo-side { align-items: flex-start; }
  .repo-side .repo-foot { padding-top: 14px; }
  .repo-side .repo-acts { margin-top: 12px; }
  .card.big { padding: 20px; }
  .card.big .shot { display: none; }          /* 这个断点下大块只有一行高，放不进窗口 */
  .card.big .card-in { max-width: none; }
  .card.big .tile { width: 64px; height: 64px; border-radius: 19px; }
  .card.big .card-t { font-size: 18px; }
  .card.wide { flex-direction: column; align-items: flex-start; }
  .card.wide .card-stat { margin: auto 0 0; }
  .hl-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .beian { margin-top: 10px; }
}

/* 很窄的屏（<400px）上把标签页收紧，四个标签才排得下 */
@media (max-width: 420px) {
  .tabs a { padding: 0 12px; font-size: 13px; }
  .hl-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 纯链接行：图标小一号 */
