/* ==========================================================================
   苍匣 CangXia · 首页
   白底、软蓝光、原 Logo 与一只会眨眼的小匣灵。
   ========================================================================== */

:root {
  --bg: #ffffff;
  --ink: #141a26;
  --ink-soft: #364156;
  --muted: #707b90;
  --muted-2: #9aa4b6;
  --line: #e8edf5;
  --line-strong: #d5deec;
  --blue: #2f6bff;
  --blue-dark: #1f55e0;
  --blue-soft: #edf5ff;
  --sky: #f2f9ff;
  --sky-deep: #e3f1ff;
  /* 全站三族色：Logo 墨蓝(--ink) + 蜜金(--peach/--yellow) + 电蓝(--blue)。
     别再加第四族（曾经加过薄荷绿 / 粉），页面上任何一块颜色都回到这三支里取 */
  --peach: #ffb86b;
  --yellow: #ffd46b;
  --container: 1180px;
  --radius: 28px;
  /* 全站字体只留两支：正文用系统 UI 字体（中文优先苹方 / 微软雅黑），
     等宽字体只给代码、结果与工具标记，别再拿它写英文小标题 */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.sheet-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
h1, h2, h3, p { margin: 0; }
/* 中文标题不要负字距：字面本来就方，收紧了会挤成一团 */
h1, h2, h3 { font-weight: 700; letter-spacing: 0; }

::selection {
  background: #cfe3ff;
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid rgba(47, 107, 255, 0.36);
  outline-offset: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 36px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 2000;
  padding: 10px 15px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* 头部：透明磨砂玻璃 ────────────────────────────────────────────────────────
   以前是一条接近纯白的实心条（0.94），压在舞台视频上像贴了一张纸，
   镜头一摇就和背景断开。现在只留一层很薄的白 + 背景模糊：
   视频/画面从页头底下透上来，滚动时下面的内容也会糊在玻璃后面，
   磨砂质感靠 backdrop-filter（模糊 + 提饱和），不靠加白。 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.24));
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 1px 0 rgba(20, 26, 38, 0.05), 0 10px 30px rgba(20, 26, 38, 0.05);
}

/* 老浏览器没有 backdrop-filter：退回接近原来的一块浅色，字照样读得清 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    border-bottom-color: var(--line);
    background: rgba(255, 255, 255, 0.9);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 30px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
}
.brand-logo {
  width: auto;
  height: 41px;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.brand:hover .brand-logo { transform: translateY(-2px) rotate(-1deg); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}
.site-nav a {
  position: relative;
  padding: 8px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* 页头搜索：一颗磨砂小药丸，输入即出结果浮层 ------------------------------- */

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 1 208px;
  min-width: 0;
  margin: 0 2px 0 0;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  transition: border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}
.nav-search:focus-within {
  border-color: rgba(47, 107, 255, 0.42);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 26px rgba(23, 38, 80, 0.12);
}
.nav-search-icon {
  flex: none;
  color: var(--muted-2);
  font-size: 14px;
  line-height: 1;
}
.nav-search-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.nav-search-input::placeholder { color: var(--muted-2); }
.nav-search-input::-webkit-search-cancel-button,
.nav-search-input::-webkit-search-decoration { display: none; }
.nav-search-clear {
  flex: none;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 26, 38, 0.08);
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  cursor: pointer;
}
.nav-search-clear:hover { background: rgba(20, 26, 38, 0.16); color: var(--ink); }

/* 结果浮层：同样是一块磨砂玻璃，压在舞台上也认得出是同一套语言 */
.nav-search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: -2px;
  z-index: 60;
  width: 330px;
  max-width: calc(100vw - 40px);
  max-height: min(58vh, 360px);
  padding: 7px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 24px 48px rgba(23, 38, 80, 0.16);
}
.nav-search-panel[hidden] { display: none; }
.nav-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--ink);
}
.nav-search-item.is-active,
.nav-search-item:hover { background: rgba(47, 107, 255, 0.09); }
.nav-search-mark {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(20, 26, 38, 0.06);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.nav-search-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}
.nav-search-title {
  overflow: hidden;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-search-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-search-kind {
  flex: none;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.nav-search-empty {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.mobile-nav { display: none; position: relative; margin-left: auto; }
.mobile-nav summary {
  list-style: none;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav nav {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 190px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(23, 38, 80, 0.12);
}
.mobile-nav nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
}
.mobile-nav nav a:hover { background: var(--blue-soft); color: var(--blue-dark); }

/* ==========================================================================
   按钮
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 21px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}
.btn span { font-size: 14px; transition: transform 0.24s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:hover span { transform: translateX(3px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(47, 107, 255, 0.22);
}
.btn-primary:hover {
  background: var(--blue-dark);
  box-shadow: 0 14px 28px rgba(47, 107, 255, 0.28);
}
.btn-secondary {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--ink-soft);
}
.btn-secondary:hover {
  border-color: #b9c9e4;
  background: var(--sky);
  color: var(--ink);
}

/* 舞台装饰层：轨道、星点、飘浮小图标 */

.stage-deco { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1.5px dashed rgba(47, 107, 255, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.orbit-a { width: 72%; height: 72%; animation: spin-slow 42s linear infinite; }
.orbit-b { width: 91%; height: 91%; border-color: rgba(47, 107, 255, 0.1); animation: spin-slow 62s linear infinite reverse; }

.spark {
  position: absolute;
  color: var(--yellow);
  font-size: 20px;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.8);
  animation: twinkle 3.8s ease-in-out infinite;
}
.spark-a { top: 18%; right: 18%; }
.spark-b { bottom: 26%; left: 14%; color: var(--peach); font-size: 13px; animation-delay: 1.2s; }
.spark-c { top: 37%; left: 11%; color: var(--blue); font-size: 11px; animation-delay: 2.1s; }

.float-chip {
  position: absolute;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(47, 107, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue-dark);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(47, 107, 255, 0.1);
  animation: chip-bob 4.6s ease-in-out infinite;
}
.chip-a { top: 24%; left: 8%; rotate: -8deg; }
.chip-b { top: 14%; right: 9%; color: #a25b2b; border-color: rgba(255, 184, 107, 0.32); rotate: 7deg; animation-delay: 0.7s; }
.chip-c { right: 7%; bottom: 29%; color: var(--blue-dark); border-color: rgba(47, 107, 255, 0.28); rotate: -5deg; animation-delay: 1.4s; }
.chip-d { bottom: 18%; left: 6%; color: #c2571d; border-color: rgba(255, 138, 61, 0.34); rotate: 6deg; animation-delay: 2s; }

/* 图标换成线稿 SVG（手柄 / 骰子 / 奖杯 / 应用格子），跟 chip 的文字色走 */
.float-chip svg {
  display: block;
  width: 62%;
  height: 62%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.float-chip svg .pip { fill: currentColor; stroke: none; }

/* ==========================================================================
   游戏 / 应用页（铺满整页的抽屉）
   从开匣卡片点进来后不再是居中的白面板：一层铺满视口的透明页面，
   内容用卡片网格装起来；底部留出和开匣卡片同一条「走廊」(--hub-lane)，
   匣灵一直露在走廊里，不会被页面盖住。收起时开匣卡片淡回来，就回到开匣界面。
   这一层不是模态（main.js 用 show()），只接管卡片区：页头导航和走廊里的匣灵
   始终点得动，所以它排在页头（50）与全览库（45）下面，压在舞台（1）上面。
   ========================================================================== */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 44;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  margin: 0;
  padding: clamp(96px, 11vh, 128px) clamp(16px, 4vw, 64px) var(--hub-lane, max(150px, 24vh));
  border: 0;
  background: transparent;
  overflow: hidden;
  overscroll-behavior: contain;
  /* 和开匣层同一个做法：整层不拦鼠标，点空白 / 点匣子都交给页面自己处理 */
  pointer-events: none;
}
.sheet::backdrop {
  /* 不压暗也不模糊：背景的舞台和匣灵要一直看得见 */
  background: transparent;
  animation: none;
}

.sheet-card {
  display: flex;
  flex-direction: column;
  width: min(1520px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
  /* 只有卡片这块（标题 + 网格）接鼠标；它止步于走廊上沿，匣灵那块继续空着 */
  pointer-events: auto;
}
.sheet[open] .sheet-card { animation: sheet-in 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.sheet-head-copy { min-width: 0; }
.sheet-head h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 700;
  line-height: 1.3;
}
.sheet-note {
  max-width: 62ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* 舞台背景视频当底时，抽屉页标题与说明压一层白色柔光，别被画面吃掉 */
body.has-bg-video .sheet-head h2,
body.has-bg-video .sheet-note {
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.92);
}
body.has-bg-video .sheet-note { color: var(--ink-soft); }

@media (max-width: 760px) {
  /* 竖屏时画面里的树冠正好落在抬头后面，给抬头垫一层玻璃纸底 */
  body.has-bg-video .sheet-head-copy {
    padding: 10px 14px 12px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 30px rgba(20, 38, 80, 0.08);
  }
  body.has-bg-video .sheet-head-copy .sheet-note { color: var(--muted); }
}

.sheet-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.sheet-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #ffffff;
  color: var(--muted);
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}
.sheet-close:hover {
  background: var(--ink);
  color: #ffffff;
  transform: rotate(90deg);
}

.sheet-grid {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(170px, 1fr);
  align-content: stretch;
  gap: clamp(12px, 1.4vw, 20px);
  margin-top: clamp(18px, 2.6vh, 34px);
  /* 卡片自己滚，页面底部那条走廊永远不占：匣灵一直露在外面 */
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* 应用页沿用游戏页的卡片；条目少，两张卡并排占满一行（手机宽度回落成单列） */
.sheet-grid-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* 一张卡片 = 顶部海报 + 名字 / 一句话 */
.sheet-item {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: clamp(9px, 0.9vw, 13px);
  border: 1px solid var(--line);
  border-radius: clamp(16px, 1.4vw, 22px);
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(20, 38, 80, 0.08);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.24s ease, box-shadow 0.24s ease;
}
.sheet-item:hover,
.sheet-item:focus-visible {
  border-color: #bfd2ef;
  box-shadow: 0 24px 48px rgba(20, 38, 80, 0.15);
  transform: translateY(-3px);
}

/* 没有 url 的条目（规划中）不是链接：别抬起，别让人以为点得动 */
.sheet-item.is-soon { cursor: default; }
.sheet-item.is-soon:hover {
  border-color: var(--line);
  box-shadow: 0 16px 36px rgba(20, 38, 80, 0.08);
  transform: none;
}

/* 海报占位：和开匣 banner 同一套随机渐变，作品接上 promo 字段就能换成真图 */
.sheet-poster {
  position: relative;
  flex: 1 1 auto;
  min-height: 92px;
  border-radius: clamp(11px, 1vw, 16px);
  overflow: hidden;
  background-image:
    repeating-linear-gradient(var(--ang, 135deg), rgba(255, 255, 255, 0.12) 0 2px, rgba(255, 255, 255, 0) 2px 18px),
    radial-gradient(circle at 78% 14%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 58%),
    linear-gradient(var(--ang, 135deg), var(--c1, #8ab6ff), var(--c2, #3d63ff));
}
/* 底部压暗，换成真图也用同一层，文字永远压得住 */
.sheet-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 22, 42, 0.42), rgba(14, 22, 42, 0) 58%);
  pointer-events: none;
}
.sheet-poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sheet-poster-ghost {
  position: absolute;
  right: clamp(8px, 1vw, 14px);
  bottom: clamp(6px, 0.9vw, 12px);
  z-index: 3;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: clamp(28px, 2.6vw, 46px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  opacity: 0.26;
  pointer-events: none;
  user-select: none;
}

.sheet-mark {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 26px;
  padding: 0 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--tone, var(--blue-dark));
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(16, 26, 52, 0.16);
}

.sheet-item-arrow {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: var(--tone, var(--blue-dark));
  font-size: 11px;
  transition: transform 0.24s ease, background-color 0.24s ease;
}
.sheet-item:hover .sheet-item-arrow {
  background: #ffffff;
  transform: rotate(45deg);
}

.sheet-item-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 11px 3px 3px;
}
.sheet-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.sheet-item-title {
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(14px, 1.05vw, 17px);
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sheet-item-state {
  flex: none;
  padding: 2px 8px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--tone, var(--blue)) 12%, #ffffff);
  color: var(--tone, var(--blue-dark));
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.sheet-item-desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sheet-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 600;
}
.sheet-more span { transition: transform 0.2s ease; }
.sheet-more:hover span { transform: translate(2px, -2px); }

.studio-works {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

/* 「全览库」工作室区的紧凑卡片；整页的应用卡已改用 .sheet-item */
.studio-work {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
}
.studio-work-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #dce8fa;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.studio-work:nth-child(2) .studio-work-mark {
  border-color: #ffe1cc;
  background: #fff4ee;
  color: #a25b2b;
}
.studio-work-copy { min-width: 0; }
.studio-work-title {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.studio-work-meta {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.studio-work-state {
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.studio-work:nth-child(2) .studio-work-state {
  background: #fff4ee;
  color: #a25b2b;
}

.noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  max-width: 360px;
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(20, 38, 80, 0.12);
}
.noscript a { color: var(--blue); font-weight: 700; }

/* ==========================================================================
   动效
   ========================================================================== */

@keyframes chip-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes spin-slow {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.8) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(24deg); }
}
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(26px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 小屏 */

@media (max-width: 1260px) {
  .sheet-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .container { padding: 0 26px; }
  .site-nav { gap: 20px; }
  .nav-search { flex-basis: 166px; }
  .sheet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .site-nav { display: none; }
  .mobile-nav { display: block; }
  /* 导航项收进「菜单」后，搜索接管页头中间那段空隙。
     这时它不在最右边，浮层改成贴着页头两侧铺开：`position: static` 再加上撤掉自身
     的 backdrop-filter（它也会给绝对定位元素当包含块），浮层才会以 sticky 的页头为
     参照铺满，否则 330px 宽的结果面板会从屏幕左边溢出去 */
  .nav-search {
    position: static;
    flex: 1 1 120px;
    margin: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .nav-search-panel {
    top: calc(100% + 8px);
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
  }
}

@media (max-width: 620px) {
  .container { padding: 0 20px; }
  .header-inner { min-height: 66px; }
  .brand-logo { height: 33px; }
  /* 页头一行要塞下 logo + 搜索 + 账户 + 菜单：把间距和账户点位收掉一点，
     否则「菜单」按钮会被挤到换行（两个字上下叠）。这里的特异性要压过 auth.css */
  header.site-header .header-inner { gap: 10px; }
  .site-header .account-dot { display: none; }
  .mobile-nav { flex: none; }
  .mobile-nav summary { padding: 7px 10px; font-size: 12.5px; white-space: nowrap; }
  .nav-search { gap: 0; padding: 0 10px; }
  .nav-search-icon { display: none; }
  .nav-search-input { font-size: 13px; }
  .btn { min-height: 44px; padding: 0 17px; font-size: 13px; }
  .float-chip { width: 30px; height: 30px; border-radius: 9px; font-size: 10px; }
  .chip-a { top: 23%; left: 6%; }
  .chip-b { top: 13%; right: 7%; }
  .chip-c { right: 5%; bottom: 28%; }
  .chip-d { bottom: 17%; left: 5%; }
  .spark-a { right: 14%; }
  .sheet { padding: calc(var(--header-h) + 22px) 12px var(--hub-lane); }
  /* 手机上一列排下来，7 张卡片比视口（减去走廊）高得多：给卡片一个高度上限，
     .sheet-grid 自己的 overflow-y: auto 才会接管滚动。只写 min-height: 100%
     的话卡片会跟着内容一起长，超出 .sheet 的 overflow: hidden 被裁掉 —— 底下的
     卡片既滚不到，还会一路盖住底部走廊和匣灵 */
  .sheet-card { min-height: 0; max-height: 100%; }
  .sheet-head { flex-direction: column; gap: 12px; }
  .sheet-head-actions { align-self: flex-start; }
  .sheet-close { width: 34px; height: 34px; font-size: 20px; }
  .sheet-head h2 { font-size: 22px; }
  .sheet-note { margin-top: 7px; font-size: 13px; }
  .sheet-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: minmax(0, auto);
    gap: 10px;
    margin-top: 14px;
  }
  .sheet-item { padding: 9px; }
  .sheet-poster { min-height: 118px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
