/* 自托管字体。原来是 @import fonts.googleapis.com —— 国内连不上会超时，
   中文会掉成系统默认字体。文件在 /assets/fonts/。
   Noto Sans SC 用的是完整中文字库（1.1MB/字重），不用 fontsource 的 873 个分片。 */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/nunito-400.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/nunito-600.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/nunito-700.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/nunito-800.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/noto-sans-sc-400.woff2") format("woff2");
  unicode-range: U+2E80-2EFF, U+3000-303F, U+3040-30FF,
                 U+3100-312F, U+31C0-31EF, U+3200-32FF,
                 U+3300-33FF, U+3400-4DBF, U+4E00-9FFF,
                 U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/noto-sans-sc-500.woff2") format("woff2");
  unicode-range: U+2E80-2EFF, U+3000-303F, U+3040-30FF,
                 U+3100-312F, U+31C0-31EF, U+3200-32FF,
                 U+3300-33FF, U+3400-4DBF, U+4E00-9FFF,
                 U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/noto-sans-sc-700.woff2") format("woff2");
  unicode-range: U+2E80-2EFF, U+3000-303F, U+3040-30FF,
                 U+3100-312F, U+31C0-31EF, U+3200-32FF,
                 U+3300-33FF, U+3400-4DBF, U+4E00-9FFF,
                 U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}

@font-face {
  font-family: "Tusker Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fra/tusker.woff2") format("woff2"),
       url("/assets/fra/tusker.woff") format("woff");
}
@font-face {
  font-family: "Moderat Extended";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fra/moderat.woff2") format("woff2");
}

:root {
  --paper: #ffffff;
  --paper-2: #f4f1ea;
  --card: #fffdf8;
  --ink: #1d1d1b;
  --muted: #6b6660;
  --line: #ddd6cc;
  --yellow: #e4f359;
  --yellow-2: #d7e64a;
  --dark: #1d1d1b;
  --copper: #9a6240;
  --fail: #b04a4a;
  --display: "Tusker Grotesk", "Noto Sans SC", "Noto Sans JP", Helvetica, Arial, sans-serif;
  --sans: "Moderat Extended", "Noto Sans SC", "Noto Sans JP", Helvetica, Arial, sans-serif;
  --serif: "Moderat Extended", "Noto Sans SC", sans-serif;
}

/* ==========================================================================
   混排字体：拉丁走宽体，中文走窄体

   背景：Tusker Grotesk 是窄体展示字体，纯拉丁单词（API）在它下面会压成
   窄条；中文回退到 Noto Sans SC。两者笔画重量差得多，混在一行里很难看。

   做法：用 unicode-range 把两个语系拆成两个族名，写在同一个 font-family
   里就自动分流 —— 不需要给每个字包 span，也不用 JS 切分。

   注意 CJK 标点（U+3000-303F，顿号、引号、破折号）要算中文那一侧，
   否则它们会落到拉丁字体上，字距会不对。
   ========================================================================== */
@font-face {
  font-family: "VELIN Latin";
  src: url("/assets/fra/moderat.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-024F, U+0259, U+1E00-1EFF, U+2000-206F, U+20A0-20CF,
    U+2100-214F, U+2190-21FF, U+2200-22FF, U+FB00-FB06;
}
@font-face {
  font-family: "VELIN CJK";
  src: url("/assets/fonts/noto-sans-sc-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+2E80-2EFF, U+3000-303F, U+3040-30FF, U+3400-4DBF,
    U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}
@font-face {
  font-family: "VELIN CJK";
  src: url("/assets/fonts/noto-sans-sc-700.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+2E80-2EFF, U+3000-303F, U+3040-30FF, U+3400-4DBF,
    U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}

/* 混排时优先拉丁那个族名：它只声明了拉丁区段，中文自然落到 CJK 那个。
   两个都排在最前面，后面的 Helvetica/Arial 只是兜底。 */
:root {
  --display2: "VELIN Latin", "VELIN CJK", Helvetica, Arial, sans-serif;
  --sans2: "VELIN Latin", "VELIN CJK", "Nunito", Helvetica, Arial, sans-serif;
}

/* 内容页的标题：拉丁（VELIN / API）走宽体粗体，中文保持原来的窄体。
   宽体的 x-height 更大，所以拉丁那部分不用再放大就已经和中文齐平。

   只针对 .page > h1 —— 首页那个 .fra-hero-copy h1 是纯英文海报风，
   本来就该用窄体展示字体，不要动它。
   这里用 .page 限定的另一个原因：不靠「写在文件后面」压过 hero 的规则，
   那种依赖顺序的写法很容易在某次插入后被悄悄改掉。 */
.page > h1 {
  font-family: var(--display2);
  font-weight: 700;
  letter-spacing: 0;
}

/* 徽章里的 API：以前是 Tusker 21px + 负字距，比中文那档（28px）小一大截。
   换成宽体 bold 26px，和「订」「廊」并排时重量相当。 */
.fra-badge strong.api {
  font-family: var(--display2);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}


* { box-sizing: border-box; }
html { font-size: 18px; }
html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.has-cursor, body.has-cursor * { cursor: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
/* The class rules below set display:flex/grid, which would otherwise beat the
   browser default for [hidden]. Keep the attribute authoritative everywhere. */
[hidden] { display: none !important; }

.fra-top {
  position: fixed;
  top: 18px;
  left: 22px;
  right: 22px;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  pointer-events: none;
}
.fra-top > * { pointer-events: auto; }
.fra-mark { display: block; width: 92px; height: 92px; flex: none; }
.fra-bubble { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(3px 4px 0 rgba(29,29,27,.08)); }
.fra-badges { display: flex; gap: 10px; align-items: stretch; flex: none; }
.fra-badge {
  /* 不写死宽度：中文「订阅」两个字够，西语 SUSCRIPCIÓN 会挤出去。
     用 min-width 保底、内容决定实际宽度。 */
  min-width: 78px;
  width: auto;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 10px;
  text-align: center;
  padding: 8px 4px 10px;
  line-height: 1;
  box-shadow: 3px 4px 0 rgba(29,29,27,.12);
}
.fra-badge strong.cn {
  font-family: "Noto Sans SC", "Nunito", sans-serif;
  font-weight: 800;
  font-size: 28px;
  line-height: 1.1;
}
.fra-badge strong {
  display: block;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 400;
}
.fra-badge span {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  /* 字距原来 0.14em，长词（REPOSITORIO / SUSCRIPCIÓN）会撑爆；
     收到 0.04em，短的仍然清晰，长的放得下。 */
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 800;
  white-space: nowrap;
}
.fra-spacer { flex: 1; }
.fra-top .langs { margin: 8px 4px 0 auto; }
.fra-menu {
  border: 2.5px solid var(--ink);
  background: #fff;
  color: #1d1d1b;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(29,29,27,.1);
}
.fra-menu:hover { background: var(--yellow); }
body.menu-open { overflow: hidden; }

.fra-overlay-nav a:hover,
.fra-cursor svg { width: 100%; height: 100%; }

.langs { display: flex; gap: 10px; }
.lang-btn {
  border: 0;
  background: transparent;
  min-width: 0;
  height: auto;
  padding: 2px 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: #6b6660;
}
.lang-btn.on {
  color: #1d1d1b;
  background: var(--yellow);
  border-radius: 4px;
}

.fra-hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background: #fff;
}
#world {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.fra-hero-copy {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  pointer-events: none;
}
.fra-hero-copy h1 {
  font-family: var(--display);
  font-size: 15.5vw;
  line-height: 0.9;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: none;
  width: 100%;
}
.fra-hero-copy h1 span {
  display: block;
  line-height: 0.9;
}
.fra-hero-copy h1 span + span {
  margin-top: 0.14em;
}
.fra-scroll {
  position: relative;
  z-index: 1;
  margin-top: 3.2vw;
  font-family: var(--sans);
  font-size: clamp(22px, 2.4vw, 40px);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fra-blob {
  position: absolute;
  right: 7%;
  bottom: 12%;
  z-index: 3;
  width: 150px;
  animation: bob 3.4s ease-in-out infinite;
}
.fra-blob svg { width: 100%; overflow: visible; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}
@media (prefers-reduced-motion: reduce) {
  .fra-blob { animation: none; }
}

.fra-marquee {
  overflow: hidden;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: #fff;
  padding: 14px 0;
}
.fra-track {
  display: flex;
  gap: 28px;
  width: max-content;
  animation: marquee 28s linear infinite;
  align-items: center;
}
.fra-track span {
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 36px);
  text-transform: uppercase;
  white-space: nowrap;
}
.star {
  width: 22px;
  height: 22px;
  background: var(--yellow);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  flex: none;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.fra-marquee.reverse .fra-track { animation-direction: reverse; animation-duration: 36s; }
.fra-marquee.dark {
  background: var(--dark);
  color: #fff;
  border-color: #000;
}
.fra-marquee.dark .star { background: var(--yellow); }

.fra-dark {
  background: var(--dark);
  color: #fff;
  padding: 96px 24px 80px;
  position: relative;
}
.fra-dark h2 {
  font-family: var(--display);
  font-size: clamp(36px, 6vw, 80px);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--yellow);
  text-align: center;
  margin: 0 0 28px;
}
.fra-prose {
  max-width: 760px;
  margin: 0 auto 18px;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.55;
  text-align: center;
}
.fra-center { text-align: center; margin-top: 28px; }

.fra-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 2.5px solid var(--ink);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 12px 26px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fra-btn:hover { background: var(--yellow); }
.fra-btn.ghost {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.fra-btn.ghost:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.fra-btn .arrow {
  width: 28px;
  height: 28px;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
}

html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.reveal-stage {
  height: 360vh;
  background: #111;
}
.reveal-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #111;
}
.reveal-sky {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.sky-item {
  position: absolute;
  height: auto;
  will-change: transform;
}
.sky-item.rocket {
  left: 50%;
  top: 50%;
  width: min(280px, 32vw);
  transform: translate(-50%, -50%);
  z-index: 2;
}
.sky-item.cloud-eye {
  left: 12%;
  top: 14%;
  width: min(280px, 34vw);
}
.sky-item.cloud-yellow {
  right: 10%;
  top: 16%;
  width: min(220px, 26vw);
}
.sky-item.cloud-smile {
  left: 58%;
  bottom: 12%;
  width: min(190px, 24vw);
}
.sky-item.cloud-yellow-2 {
  left: 8%;
  bottom: 22%;
  width: min(160px, 18vw);
}
.reveal-clip {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  background: #fff;
  clip-path: circle(0px at 50% 50%);
  will-change: clip-path;
  pointer-events: none;
}
.reveal-clip img.world-line,
.reveal-clip img.world-color {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
}
.reveal-clip img.world-color { opacity: 0; }
.art-gate {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%) translateY(12px);
  z-index: 3;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.art-gate.on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.studio-on-art {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--yellow);
  color: #1d1d1b;
  border: 3px solid #1d1d1b;
  border-radius: 999px;
  padding: 14px 28px;
  font-family: var(--display);
  font-size: clamp(16px, 2vw, 28px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 4px 5px 0 rgba(29,29,27,.18);
  cursor: pointer;
}
.studio-on-art:hover { background: #fff; }
.studio-on-art[hidden],
.art-auth[hidden] { display: none !important; }
.studio-on-art .arrow {
  width: 30px;
  height: 30px;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.fra-clouds {
  background: var(--dark);
  min-height: 220px;
  position: relative;
  overflow: hidden;
}
.cloud {
  position: absolute;
  color: var(--yellow);
  opacity: 0.95;
}
.cloud.c1 { width: 160px; left: 8%; top: 20px; }
.cloud.c2 { width: 120px; right: 12%; top: 50px; color: #fff; }
.cloud.c3 { width: 90px; left: 42%; bottom: 20px; }

.fra-works-head {
  background: var(--dark);
  color: #fff;
  padding: 48px 24px 24px;
  text-align: center;
}
.fra-works-head h2 {
  font-family: var(--display);
  font-size: clamp(32px, 5.5vw, 72px);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--yellow);
  margin: 0 0 20px;
}

.fra-cards {
  background: var(--dark);
  padding: 20px 24px 80px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
}
.fra-card {
  background: #111;
  border: 3px solid #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.fra-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  background: #2a2a28;
}
.fra-card .info {
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fra-card h3 {
  font-family: var(--display);
  font-size: 22px;
  text-transform: uppercase;
  margin: 0;
  color: #fff;
}

.fra-cta {
  background: var(--yellow);
  padding: 88px 24px;
  text-align: center;
}
.fra-cta h3 {
  font-family: var(--display);
  font-size: clamp(36px, 6vw, 80px);
  line-height: 0.95;
  text-transform: uppercase;
  margin: 0 0 22px;
}

.page-inner {
  padding: 140px 40px 80px;
  max-width: 1080px;
  margin: 0 auto;
}
.page-inner.dark-page {
  background: var(--dark);
  color: #fff;
  max-width: none;
  padding: 140px 40px 80px;
}
.page-inner.dark-page .wrap { max-width: 1080px; margin: 0 auto; }
.kicker {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper);
}
.dark-page .kicker { color: var(--yellow); }
h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.95;
  text-transform: uppercase;
  margin: 8px 0 16px;
}
.lede { color: var(--muted); max-width: 38em; line-height: 1.65; font-size: 20px; }
.dark-page .lede { color: #ddd; }

.svc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 40px;
}
.svc article {
  border: 3px solid var(--ink);
  background: #fff;
  color: var(--ink);
  padding: 22px;
  border-radius: 18px;
}
.svc b {
  font-family: var(--display);
  font-size: 42px;
  color: var(--ink);
  background: var(--yellow);
  display: inline-block;
  padding: 0 10px;
  margin-bottom: 8px;
}
.svc h3 {
  font-family: var(--display);
  text-transform: uppercase;
  margin: 0 0 8px;
  font-size: 24px;
}
.svc p { margin: 0; color: var(--muted); }

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 36px 0 56px;
}
.works-grid a {
  display: block;
  border: 3px solid var(--ink);
  background: #111;
  overflow: hidden;
}
.works-grid img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}
.works-grid figcaption {
  font-family: var(--display);
  text-transform: uppercase;
  padding: 12px 12px 14px;
  color: #fff;
  background: var(--dark);
}

.btn {
  display: inline-block;
  border: 1px solid var(--ink);
  background: transparent;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 0;
}
.btn-copper {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  font-weight: 500;
}
.btn-copper:hover { background: #000; }

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 64px;
  padding: 0 32px;
  background: transparent;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--ink);
}
.logo { width: 22px; height: 22px; display: block; color: var(--ink); flex: none; }
.nav a { font-size: 13px; letter-spacing: 0.04em; color: var(--muted); }
.nav a.current { color: var(--ink); }
.nav-spacer { flex: 1; }

.page { max-width: 1180px; margin: 0 auto; padding: 40px 40px 64px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.price-card {
  border: 3px solid var(--ink);
  background: #fff;
  color: var(--ink);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  border-radius: 16px;
}
.price-card h3 { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 0 0 8px; text-transform: uppercase; }
.price-card p { color: var(--muted); font-size: 14px; line-height: 1.5; flex: 1; margin: 0 0 16px; }
.price-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.price-cell { border: 2px solid var(--ink); padding: 8px 6px; text-align: center; background: var(--yellow); }
.price-cell small { display: block; color: var(--ink); font-size: 11px; letter-spacing: 0.12em; }
.price-cell b { font-size: 16px; font-weight: 800; }
.price-card .btn, .price-card .fra-btn { width: 100%; text-align: center; justify-content: center; }
.price-card.selected { outline: 3px solid var(--yellow); outline-offset: 2px; }

.studio {
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 118px 18px 16px;
  overflow: hidden;
  background: #fff;
}
.studio-bar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 12px 16px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  flex-wrap: wrap;
}
.studio-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.studio-field > span,
.studio-kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
  margin: 0 0 8px;
}
.studio-field select {
  border: 2.5px solid var(--ink);
  background: var(--yellow);
  padding: 8px 14px;
  font-weight: 800;
  border-radius: 999px;
  min-width: 210px;
}
.studio-bar .spacer { flex: 1; }
.studio-price {
  font-weight: 800;
  font-size: 14px;
  padding-bottom: 8px;
}
.studio-main {
  flex: 1;
  min-height: 0;
  display: grid;
  /* image-only: chat-rail gone — two columns (write + still). */
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 12px;
}
.studio-main.two {
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
}
.studio-main.board-chat {
  grid-template-columns: minmax(0, 1fr) 340px;
}
.studio-write,
.studio-still,
.studio-bot {
  min-height: 0;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #fff;
}
.studio-write {
  display: flex;
  flex-direction: column;
  padding: 16px 16px 12px;
}
.studio-write textarea {
  flex: 1;
  min-height: 120px;
  border: 0;
  background: transparent;
  padding: 4px 2px;
  font-size: 17px;
  line-height: 1.55;
  resize: none;
  outline: none;
}
/* Nine equal rows. This must out-specify `.studio-write textarea` above,
   whose min-height:120px would otherwise inflate every slot to 120px and
   clip the lower ones inside the grid. */
.studio-write .prompt-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(9, minmax(0, 1fr));
  border: 2px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.studio-write .prompt-slot {
  flex: 0 0 auto;
  min-height: 0;
  height: auto;
  width: 100%;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  padding: 2px 10px;
  font-size: 13px;
  line-height: 1.3;
  resize: none;
  outline: none;
  background: #fff;
}
.studio-write .prompt-slot:last-child { border-bottom: 0; }
.studio-write .prompt-slot::placeholder { color: #bbb; }
.studio-still {
  /* Matched to the loading clip's own background (226,219,212): the clip is shown
     untouched, so the panel is what moves to make the two read as one surface. */
  background: #e2dbd4;
  display: flex;
  flex-direction: column;
  padding: 16px;
}
/* ---- still panel: frame, loading clip, progress veil, reveal --------------- */
.result-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: #ece8e0;
  border: 3px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.result-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.result-frame.still-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 6px;
  padding: 6px;
  align-items: stretch;
}
.still-cell {
  position: relative;
  min-height: 0;
  background: #e5e0d6;
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  cursor: pointer;
}
.still-cell img { width: 100%; height: 100%; object-fit: cover; }
.still-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.still-hint {
  flex: 1;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.still-dl {
  flex: none;
  padding: 8px 16px;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

/* The loading clip is a sibling of #frame, not a child: app code rewrites
   #frame's innerHTML (showStill / layoutStill), which would delete a nested
   <video>. The stack keeps the two exactly on top of each other. */
.frame-stack { position: relative; flex: 1; min-height: 0; display: flex; overflow: hidden; }
.frame-stack > .result-frame { flex: 1; min-height: 0; }
.loading-clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* The clip is shown exactly as supplied: no crop, no zoom, no colour grade.
     contain fits the whole frame inside the panel; the leftover band shows the
     panel background, which is set to the clip's own colour (#E2DBD4). */
  object-fit: contain;
  display: none;
  z-index: 3;
  /* Backing colour also matches, so no flash of a different tone before the
     first frame paints. */
  background: #e2dbd4;
  transition: opacity .5s ease;
}
.frame-stack.casting .loading-clip { display: block; }
.frame-stack.fading .loading-clip { opacity: 0; }

/* Progress veil: a randomised 0-90% readout over the clip, plus the reveal glow. */
.clip-veil {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  pointer-events: none;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
}
.frame-stack.casting .clip-veil { display: flex; }
.frame-stack.fading .clip-veil { opacity: 0; transition: opacity .35s ease; }
.clip-pct {
  font-family: var(--display);
  font-size: clamp(18px, 2.4vw, 30px);
  line-height: 1;
  letter-spacing: .02em;
  color: var(--ink);
  padding: 4px 14px 5px;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 4px 0 rgba(29,29,27,.14);
  font-variant-numeric: tabular-nums;
}
.clip-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, #fff 0 18%, rgba(228,243,89,.9) 45%, transparent 72%);
}
.frame-stack.revealing .clip-glow { animation: clip-reveal .72s ease-out both; }
@keyframes clip-reveal {
  0% { opacity: 0; transform: scale(.6); }
  28% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}
.frame-stack.revealing .result-frame { animation: still-arrive .6s ease-out both; }
@keyframes still-arrive {
  0% { opacity: 0; transform: scale(.985); filter: brightness(1.12); }
  100% { opacity: 1; transform: scale(1); filter: none; }
}
.status { font-size: 13px; color: var(--muted); margin-top: 12px; min-height: 1.4em; }

/* ---- chat rail ------------------------------------------------------------ */
.chat-rail {
  min-height: 0;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 10px;
}
.chat-thread {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-msg {
  max-width: 90%;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.5;
  background: var(--paper-2);
}
.chat-msg.user { align-self: flex-end; background: var(--yellow); }
.chat-msg.bot { align-self: flex-start; background: #fff; }
.chat-msg p { margin: 0; }
.chat-box {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip {
  font-size: 11px;
  font-weight: 700;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--yellow);
}
.chat-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 2px;
}
/* 三个圆按钮尺寸统一，视觉上才齐（原来 34/34/32 差 2px） */
.chat-bar .chat-plus,
.chat-bar .chat-at,
.chat-bar .chat-clip {
  width: 34px;
  height: 34px;
}
.chat-plus, .chat-at, .chat-send {
  width: 34px;
  height: 34px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
  display: grid;
  place-items: center;
}
.chat-send { background: var(--ink); color: #fff; }
.chat-pop {
  position: absolute;
  left: 0;
  bottom: 46px;
  z-index: 5;
  width: 100%;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 4px 5px 0 rgba(29,29,27,.14);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
}
.chat-pop button {
  border: 2px solid var(--ink);
  background: #fff;
  border-radius: 10px;
  padding: 7px 9px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.chat-pop button.on { background: var(--yellow); }
.chat-pop .empty { margin: 0; font-size: 12px; color: var(--muted); }
.chat-pop button img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 6px;
  vertical-align: middle;
  margin-right: 6px;
}
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
/* Reference-image drop zone. The native file input must be hidden or the browser
   paints its own "选择文件 / 未选择任何文件" control inside the label. */
.studio-write .drop {
  display: block;
  margin-top: 12px;
  padding: 12px 14px;
  border: 3px dashed var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.studio-write .drop:hover,
.studio-write .drop.over {
  border-color: var(--ink);
  background: #fbfaf6;
}
.studio-write .drop > span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--muted);
}
.studio-write .drop.over > span { color: var(--ink); }
.studio-write .drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.studio-write .drop .thumbs img {
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--paper-2);
}

/* 施法覆盖层（九宫格逐格） */
.magic {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(228,243,89,.55), rgba(29,29,27,.18) 70%);
  pointer-events: none;
  z-index: 2;
}
.magic .pct, .magic .cell-pct {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  text-shadow: 0 1px 0 #fff;
  z-index: 3;
}
.studio-bot {
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 16px 20px;
}
.bot-icon {
  width: 188px;
  height: 188px;
  object-fit: contain;
  background: transparent;
  display: block;
}

.site-pet {
  position: fixed;
  z-index: 70;
  width: 120px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.site-pet.dragging { cursor: grabbing; z-index: 80; }
.site-pet.dragging img { animation: none; }
.site-pet .pet-bubble {
  display: none !important; /* image-only: no speech bubble */
  margin: 0 auto 6px;
  width: fit-content;
  max-width: 140px;
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  font-weight: 700;
  box-shadow: 2px 3px 0 rgba(29,29,27,.12);
}
.site-pet .pet-body { position: relative; display: block; }
/* Talking is a frame swap on the single <img>, not a CSS deformation, so no
   extra mouth layer is needed here. */
.site-pet img {
  width: 100%;
  display: block;
  pointer-events: none;
  animation: pet-bob 2.8s ease-in-out infinite;
  filter: drop-shadow(0 8px 0 rgba(29,29,27,.08));
}
.site-pet.casting img {
  animation: none;
  filter: drop-shadow(0 0 10px rgba(228,243,89,.7)) drop-shadow(0 8px 0 rgba(29,29,27,.08));
}

/* ---- 入画 / 出画 ---------------------------------------------------------- */
/* While the pet is "inside the picture" it is off-screen entirely. */
.site-pet.gone {
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s linear;
}
/* The travelling light: bright core, soft halo, short tail. */
.pet-streak {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #fff 0 30%, var(--yellow) 34% 64%, rgba(228,243,89,0) 76%);
  box-shadow: 0 0 26px 10px rgba(228,243,89,.8), 0 0 60px 24px rgba(228,243,89,.4);
}
/* A bright horizontal tail behind the core, so the travel reads as a streak. */
.pet-streak b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 200%;
  height: 26%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(228,243,89,0) 0%, rgba(228,243,89,.85) 60%, #fff 100%);
  filter: blur(3px);
}
.pet-streak i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--yellow);
  opacity: .85;
  animation: streak-tail 700ms ease-out both;
}
.pet-streak i:nth-child(2) { animation-delay: 60ms; }
.pet-streak i:nth-child(3) { animation-delay: 120ms; }
@keyframes streak-tail {
  0% { transform: scale(1.1); opacity: .9; }
  100% { transform: scale(.2); opacity: 0; }
}
/* The panel "inhales" the light as the pet arrives. */
.frame-stack.absorbing::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  animation: panel-absorb .72s ease-out both;
  background: radial-gradient(circle at 50% 50%, #fff 0 22%, rgba(228,243,89,.85) 48%, transparent 74%);
}
@keyframes panel-absorb {
  0% { opacity: 0; transform: scale(.35); }
  30% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.25); }
}

/* ==========================================================================
   魔法工坊 — the casting effect on a still cell
   Layering (bottom to top):
     veil / runes / panel → fill (colour flooding in) → scan line → sparks
     → crew (workers) → plate + percentage + flash
   ========================================================================== */
.casting { --deep: 0s; }

@keyframes ws-veil {
  0%, 100% { opacity: .74; }
  50% { opacity: 1; }
}

/* three counter-rotating rune rings */
@keyframes ws-spin { to { transform: rotate(360deg); } }
@keyframes ws-charge {
  0%, 100% { transform: translate(-50%,-50%) scale(.92); opacity: .55; }
  55% { transform: translate(-50%,-50%) scale(1.04); opacity: .95; }
}

/* tool glyphs floating at the four corners of the rune ring */
@keyframes ws-rune-pop {
  0%, 100% { transform: translateY(0) rotate(-12deg) scale(.85); opacity: .5; }
  50% { transform: translateY(-9px) rotate(12deg) scale(1.15); opacity: 1; }
}

/* rune halo painted onto the panel itself */
@keyframes ws-panel-spin { to { transform: rotate(360deg); } }

/* colour flooding in from the bottom */

/* inspector scan line */
@keyframes ws-scan {
  0% { top: -22%; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: 104%; opacity: 0; }
}

/* floor sparks */
@keyframes ws-spark-fly {
  0%, 100% { transform: translateY(0) scale(.55) rotate(0deg); opacity: .35; }
  45% { transform: translateY(-20px) scale(1.2) rotate(140deg); opacity: 1; }
}

/* the crew */
@keyframes ws-arrive {
  0% { opacity: 0; transform: translate(-50%, -140%) scale(.35) rotate(-22deg); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

/* the tool arm swings, and a spark pops where it lands */
@keyframes ws-strike {
  0%, 46%, 100% { transform: rotate(0deg); }
  62% { transform: rotate(-34deg); }
  76% { transform: rotate(16deg); }
}
@keyframes ws-hit {
  0%, 55% { opacity: 0; transform: scale(.3); }
  62% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(2.1); }
}
/* the whole frame takes the hit */
@keyframes ws-shake {
  0%, 3% { translate: 0 0; }
  1% { translate: -1.5px 1px; }
  2% { translate: 1.5px -1px; }
}

/* the crew has eyes and blinks; they look busy, not asleep */
@keyframes ws-blink { 0%, 94%, 100% { transform: scaleY(1); } 96%, 98% { transform: scaleY(.12); } }

/* plate, stamina meter, percentage */
@keyframes ws-plate-drop {
  0% { opacity: 0; transform: translate(-50%, -18px) rotate(-6deg) scale(.8); }
  100% { opacity: 1; transform: translate(-50%, 0) rotate(-2deg) scale(1); }
}

/* the "ding" */
@keyframes ws-ding {
  0% { opacity: 0; transform: scale(.5); }
  22% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.35); }
}
@keyframes ws-bow {
  0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  45% { transform: translate(-50%, -62%) scale(1.14) rotate(-8deg); }
  100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .pet-streak, .pet-streak i { animation: none !important; }
  .frame-stack.absorbing::after { animation: none !important; opacity: 0; }
}

.status { font-size: 13px; color: var(--muted); margin-top: 12px; min-height: 1.4em; }
.model-item {
  border: 0;
  background: transparent;
  padding: 6px 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}
.model-item.on { color: var(--ink); box-shadow: inset 0 -3px 0 var(--ink); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills button { border: 2px solid var(--ink); background: #fff; padding: 6px 10px; cursor: pointer; font-weight: 700; }
.pills button.on { background: var(--yellow); }

textarea, input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  background: #fff;
  border: 2.5px solid var(--ink);
  padding: 12px 14px;
}

.auth {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 100vh;
  overflow: hidden;
}
.auth-still {
  background: var(--paper-2) center/cover no-repeat;
  display: flex;
  align-items: end;
  padding: 24px;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
  font-family: var(--display);
  font-size: 42px;
}
.auth-card { padding: 140px 40px 72px; background: var(--paper); overflow: auto; }
input[type="email"], input[type="password"], input[type="text"], .auth-key input { margin-bottom: 12px; }
.auth-way {
  font-family: "Noto Sans SC", "Nunito", sans-serif;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
}
.auth-or {
  margin: 28px 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  opacity: 0.55;
}
.auth-note { font-size: 13px; opacity: 0.65; margin-top: 10px; }
.auth-err { color: #b42318; font-size: 14px; margin: 0 0 16px; }
.auth-pop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(29,29,27,.42);
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-pop[hidden] { display: none; }
.auth-pop-card {
  width: min(440px, 100%);
  background: var(--paper);
  border: 3px solid var(--ink);
  padding: 32px 28px 28px;
  position: relative;
  box-shadow: 8px 10px 0 rgba(29,29,27,.16);
}
.auth-pop-card h2 {
  font-family: "Noto Sans SC", "Nunito", sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  margin: 0 0 10px;
}
.auth-pop-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.auth-pop-card .fra-btn { margin-top: 8px; text-transform: none; letter-spacing: 0; }
.auth-pop-card input { width: 100%; font-size: 16px; }
.auth-pop-card .lede { font-size: 15px; line-height: 1.6; text-align: left; margin: 0 0 18px; }

html.desk-page,
html.desk-page body.desk-body {
  width: 100%;
  margin: 0;
  /* 原来是 height:100% + overflow:hidden，把后台锁在视口里。
     矮窗口下下面的面板够不着，整页也拖不动。
     改成正常文档流 + 整页滚动 —— 后台该有的行为。 */
  min-height: 100dvh;
  background: var(--paper);
}
.desk-body { background: var(--paper); min-height: 100dvh; }
.desk-gate[hidden], .desk-app[hidden] { display: none !important; }
.desk-gate {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  overflow: hidden;
}
.desk-gate-art {
  background: #111 center / cover no-repeat;
  min-height: 0;
  height: 100%;
  width: 100%;
}
.desk-gate-card {
  background: var(--paper);
  padding: 0 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: "Noto Sans SC", "Nunito", sans-serif;
  height: 100%;
  min-height: 0;
}
.desk-mark { width: 64px; height: 64px; margin-bottom: 28px; }
.desk-brand {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.08em;
  margin: 0 0 18px;
  text-transform: uppercase;
}
.desk-gate-card h1,
.desk-bar-copy h1,
.desk-panel-head h2 {
  font-family: "Noto Sans SC", "Nunito", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.desk-gate-card h1 {
  font-size: 28px;
  line-height: 1.35;
  margin: 0 0 10px;
}
.desk-note {
  margin: 0 0 32px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 340px;
}
.desk-gate-card form { display: grid; gap: 8px; max-width: 340px; }
.desk-gate-card label {
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
  opacity: 1;
}
.desk-gate-card input {
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  font-size: 16px;
  line-height: 1.4;
}
.desk-gate-card .fra-btn {
  justify-content: center;
  margin-top: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 16px;
  font-weight: 700;
}
.desk-app {
  position: fixed;
  inset: 0;
  height: 100dvh;
  background: #f6f3ec;
  display: flex;
  flex-direction: column;
  /* 原来是 overflow: hidden，把整个后台锁在视口里 —— 矮窗口下
     下面的面板够不着，整页也拖不动。改成自动：
     内容放得下不出现滚动条，放不下就整页滚。 */
  overflow: auto;
}
.desk-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 28px 8px;
  /* 不固定。试过 position:sticky，但 sticky 头 + 滚动内容会在交界处
     把下面面板的标题切成两半 —— 那正是用户看到的「白色一层」。
     整页已经能滚，让 header 跟着滚走最干净。 */
}
.desk-bar .fra-mark { width: 72px; height: 72px; }
.desk-bar-copy h1 {
  font-size: 24px;
  line-height: 1.3;
  margin: 4px 0 0;
}
.desk-pills { display: flex; gap: 10px; }
.desk-pill {
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 8px 14px;
  line-height: 1.1;
  box-shadow: 3px 4px 0 rgba(29,29,27,.1);
}
.desk-pill b {
  font-family: "Noto Sans SC", "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 800;
  display: block;
  line-height: 1.2;
}
.desk-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  padding: 12px 28px 24px;
  /* 不再用 flex:1 抢剩余高度 —— 那会让收款台吃光空间、
     把下面两栏压成一条缝（实测 grid 只剩 36px，密钥表单够不着）。 */
  align-items: start;
}
.desk-panel {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 6px 8px 0 rgba(29,29,27,.08);
  /* 面板各自按内容长，不强制撑满 */
  min-height: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
}
/* 收款台订单多的时候别把页面拉太长，给它一个受控高度、自己内部滚 */
.desk-orders {
  max-height: 60vh;
  overflow: auto;
}
.desk-panel-head h2 {
  font-size: 20px;
  line-height: 1.35;
  margin: 0 0 8px;
}
.desk-panel-head .lede { text-align: left; margin: 0 0 18px; font-size: 16px; }
.desk-add {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.desk-add input {
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 12px 16px;
}
.desk-add .fra-btn { justify-content: center; }
.person, .key-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #fffdf8;
}
.person-av {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: none;
}
.person-body, .key-row div { flex: 1; min-width: 0; }
.person-body strong, .key-row strong { display: block; }
.person-body p, .key-row p { margin: 4px 0 0; font-size: 13px; opacity: 0.7; }
.key-full {
  opacity: 1 !important;
  margin: 6px 0 4px !important;
}
.key-full code {
  display: block;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
  white-space: pre-wrap;
  color: var(--ink);
}
.key-quota {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px !important;
  opacity: 1 !important;
}
.key-quota input {
  width: 88px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 4px 8px;
}
.key-quota button {
  border: 2px solid var(--ink);
  background: var(--yellow);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  cursor: pointer;
}
.person-meta { text-align: right; flex: none; }
.person-meta small { display: block; margin-top: 6px; font-size: 12px; opacity: 0.55; }
.desk-tag {
  display: inline-block;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
}
.desk-tag.on { background: var(--yellow); }
.key-row.off { opacity: 0.45; }
.kill {
  border: 2.5px solid var(--ink);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
  flex: none;
}
.kill:hover { background: #ffd0c8; }
.desk-empty {
  border: 2px dashed var(--ink);
  border-radius: 16px;
  padding: 28px 16px;
  text-align: center;
  opacity: 0.65;
}
@media (max-width: 980px) {
  .desk-gate { grid-template-columns: 1fr; }
  .desk-gate-art { min-height: 36vh; height: 36vh; }
  .desk-grid, .desk-bar { grid-template-columns: 1fr; display: flex; flex-direction: column; }
  .desk-bar { padding: 16px; }
}
.auth-google { margin: 18px 0 8px; }
#googleBtn { min-height: 44px; }
.studio-credits {
  font-weight: 800;
  letter-spacing: 0.04em;
  opacity: 0.7;
}
.me-email { margin: 0 0 8px; opacity: 0.7; }
.fra-btn.ghost-ink {
  background: transparent;
  margin-top: 12px;
}

.gal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.gal-card {
  display: block;
  border: 3px solid var(--ink);
  background: #fff;
  overflow: hidden;
}
.gal-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.gal-card span {
  display: block;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
}

.docs pre, .docs code {
  font-family: "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
  font-size: 13px;
}
.docs pre {
  background: #fff;
  border: 3px solid var(--ink);
  padding: 16px 18px;
  overflow: auto;
  line-height: 1.5;
}
.docs h2 { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 28px 0 10px; text-transform: uppercase; }

.balance {
  font-family: var(--display);
  font-size: 72px;
  line-height: 1;
  margin: 8px 0 8px;
}
.me-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 24px; }
.me-grid img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; background: var(--paper-2); border: 3px solid var(--ink); }

.page.pad-top, .docs.pad-top { padding-top: 140px; }
body:has(.dark-page) { background: var(--dark); color: #fff; }

@media (max-width: 960px) {
  .fra-cards, .works-grid, .svc, .desk-body, .studio-main, .auth { grid-template-columns: 1fr; }
  .studio { height: auto; overflow: auto; }
  .studio-bot { min-height: 220px; }
  .studio-main.board-chat { grid-template-columns: 1fr; }
  .pet-shell { height: auto; min-height: 100vh; }
  .pet-dialog { max-height: none; }
  #pet { min-height: 280px; }
  .fra-mark { width: 68px; height: 68px; }
  .fra-badge { min-width: 60px; width: auto; }
  .fra-badge strong { font-size: 24px; }
  .fra-hero { min-height: 100svh; }
  .fra-hero-copy h1 { font-size: 15vw; }
  .fra-blob { width: 110px; right: 4%; bottom: 8%; }
  .desk { height: auto; }
  .auth { min-height: auto; }
  .fra-top { left: 12px; right: 12px; top: 12px; }
  
}
/* ==========================================================================
   订阅 / USDT 充值页
   ========================================================================== */
.pay-wrap { max-width: 1080px; }
.pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 26px;
  /* 不写 align-items:start —— 默认 stretch，左右两张卡才一样长 */
}
.pay-card {
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  padding: 18px;
}
.pay-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pay-pill {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  padding: 5px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
}
.pay-pill.on { background: var(--yellow); }
.pay-pill.off { background: #fff; color: var(--muted); }
.pay-sub { margin: 8px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.pay-plan {
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: var(--yellow);
  padding: 14px;
}
.pay-plan-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pay-plan-row strong { font-size: 15px; }
.pay-price { font-family: var(--display); font-size: 22px; line-height: 1; }
.pay-plan .pay-sub { color: #4a4a44; }
.pay-steps { margin: 8px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.75; color: var(--muted); }
.pay-steps li { margin-bottom: 4px; }
.pay-steps strong { color: var(--ink); }

.pay-chains { display: flex; flex-direction: column; gap: 10px; }
.pay-chain {
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--paper-2);
}
.pay-chain.off { border-style: dashed; border-color: var(--line); background: #fff; }
.pay-chain-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pay-chain-head strong { font-size: 13px; }
.pay-addr {
  display: block;
  margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
  color: var(--ink);
}
.pay-copy {
  font-size: 11px;
  font-weight: 700;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  padding: 3px 12px;
  cursor: pointer;
}
.pay-copy:disabled { opacity: .4; cursor: not-allowed; }

.pay-verify { display: flex; flex-direction: column; gap: 6px; }
.pay-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.pay-input {
  width: 100%;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
.pay-go { margin-top: 12px; width: 100%; }
.pay-go:disabled { opacity: .55; cursor: wait; }
.pay-msg { margin: 10px 0 0; font-size: 12.5px; line-height: 1.6; min-height: 1.4em; color: var(--muted); }
.pay-msg.good { color: #2f6b2f; font-weight: 700; }
.pay-msg.bad { color: var(--fail); font-weight: 700; }

.pay-history { display: flex; flex-direction: column; gap: 8px; }
.pay-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "chain amt time" "tx tx tx";
  gap: 4px 10px;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
}
.pay-row.on { border-color: var(--ink); background: #fbfff0; }
.pay-row-chain { grid-area: chain; font-weight: 800; text-transform: uppercase; }
.pay-row-amt { grid-area: amt; color: var(--muted); }
.pay-row-time { grid-area: time; color: var(--muted); font-size: 11px; }
.pay-row-tx {
  grid-area: tx;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  word-break: break-all;
  color: var(--muted);
}

@media (max-width: 960px) {
  .pay-grid { grid-template-columns: 1fr; }
}

/* VELIN BOT 正在回复：三个跳动的点，让等待可见。 */
.chat-typing { display: inline-flex; align-items: center; gap: 4px; height: 18px; }
.chat-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  display: block;
  animation: chat-dot 1.05s ease-in-out infinite;
}
.chat-typing i:nth-child(2) { animation-delay: .16s; }
.chat-typing i:nth-child(3) { animation-delay: .32s; }
@keyframes chat-dot {
  0%, 70%, 100% { transform: translateY(0); opacity: .45; }
  35% { transform: translateY(-4px); opacity: 1; }
}
.chat-msg .chat-fail { color: var(--fail); }
.chat-msg a { color: inherit; font-weight: 800; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  .chat-typing i { animation: none; opacity: .7; }
}

/* 等待秒数：让"它还在想"这件事看得见。 */
.chat-clock { font-size: 11px; color: var(--muted); margin-left: 6px; }
.chat-msg .chat-note { color: var(--muted); font-size: 12px; }


/* @ 面板：技能与图片分两组 */
.at-head {
  margin: 6px 0 2px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: .04em;
}
.at-head:first-child { margin-top: 0; }
.chat-pop .at-skill-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--yellow);
  font-size: 11px;
  font-weight: 800;
}
.chip-skill { cursor: pointer; background: var(--yellow); }
.chip-skill:hover { background: #d8e84f; }
/* ==========================================================================
   技能市场 · 刊头
   ========================================================================== */
/* 技能市场铺满：.page 本身有 1180px 上限，必须一起放开 */
body[data-title="titleSkills"] .page {
  max-width: none;
  width: 100%;
  /* 导航高约 92px，再留一点就够；站点通用的 140px 太大 */
  padding: 104px 28px 64px;
}
body[data-title="titleSkills"] .page-inner {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}
.skx-wrap { max-width: 1680px; margin: 0 auto; }

/* 刊头：一张黑框卡片，左标题组 + 右统计 */
.skx-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  gap: 0;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
  margin: 0 0 20px;
}
.skx-hero-copy {
  min-width: 0;
  padding: 28px 32px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.skx-kicker {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--muted);
  text-transform: uppercase;
}
.skx-hero h1 {
  font-family: var(--display);
  font-size: clamp(34px, 3.4vw, 54px);
  line-height: 1.12;
  letter-spacing: -.005em;
  margin: 0 0 14px;
}
.skx-hero-lede {
  margin: 0;
  max-width: 620px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
.skx-hero-lede strong { color: var(--ink); }

/* 统计：右侧一栏，荧光黄底，内部用竖线分隔 */
.skx-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, auto));
  background: var(--yellow);
  border-left: 3px solid var(--ink);
}
.skx-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 26px 22px;
  border-right: 2.5px solid rgba(29,29,27,.22);
}
.skx-stat:last-child { border-right: 0; }
.skx-stat strong {
  font-family: var(--display);
  font-size: 36px;
  line-height: 1;
}
.skx-stat span {
  font-size: 11px;
  font-weight: 700;
  color: #4a4a44;
  white-space: nowrap;
}

/* 跳转条 */
.skx-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 34px;
  padding: 0;
}
.skx-jump-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  padding: 5px 14px 5px 5px;
  font-size: 13px;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  transition: background .14s ease, transform .14s ease;
}
.skx-jump-item:hover { background: var(--yellow); transform: translate(-1px, -1px); }
.skx-jump-no {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  flex: none;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-family: var(--display);
  font-size: 11px;
}
.skx-jump-count { font-size: 11px; font-weight: 800; color: var(--muted); }

@media (max-width: 1000px) {
  .skx-hero { grid-template-columns: 1fr; }
  .skx-hero-stats {
    border-left: 0;
    border-top: 3px solid var(--ink);
    grid-template-columns: repeat(3, 1fr);
  }
  .skx-stat { padding: 18px 12px; }
  .skx-stat strong { font-size: 28px; }
}

/* ==========================================================================
   技能市场 · 通栏横幅版块
   封面按原始 16:9 铺满整行，不裁不放大；品牌元素贴在封面与信息条上。
   ========================================================================== */
.skx-wrap { max-width: 1180px; }
.skx-title { margin-bottom: 6px; }

/* 快速跳转：黑框胶囊 + 荧光黄序号 */
.skx-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 34px; padding: 0; }
.skx-jump-item {
  display: inline-flex; align-items: center; gap: 8px;
  border: 2.5px solid var(--ink); border-radius: 999px; background: #fff;
  padding: 5px 14px 5px 5px;
  font-size: 13px; font-weight: 700; color: inherit; text-decoration: none;
  transition: background .14s ease, transform .14s ease;
}
.skx-jump-item:hover { background: var(--yellow); transform: translate(-1px, -1px); }
.skx-jump-no {
  display: grid; place-items: center;
  width: 22px; height: 22px; flex: none;
  border: 2px solid var(--ink); border-radius: 50%;
  background: var(--yellow);
  font-family: var(--display); font-size: 11px;
}
.skx-jump-count { font-size: 11px; font-weight: 800; color: var(--muted); }

/* 版块 */
.skx-section {
  padding: 0 0 54px;
  margin-bottom: 46px;
  border-bottom: 3px solid var(--ink);
  text-align: center;
}
.skx-section .skx-list { text-align: left; }
.skx-section:last-of-type { border-bottom: 0; }

/* 封面：整行横幅，原始比例 */
/* 封面：整行居中，按 21:9 限高，不裁画面 */
.skx-cover {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 1240px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  background: #f6f4f0;
  aspect-ratio: 21 / 9;
}
.skx-cover .skx-shot { width: 100%; height: 100%; object-fit: cover; display: block; }

/* VELIN 元素：封面四角的黑色定位角标，像取景框 */
.skx-cover::before,
.skx-cover::after {
  content: "";
  position: absolute;
  width: 26px; height: 26px;
  border: 3px solid var(--ink);
  pointer-events: none;
}
.skx-cover::before { left: 14px; top: 14px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.skx-cover::after { right: 14px; bottom: 14px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }

/* 序号徽章：压在封面左下，荧光黄 */
.skx-no {
  position: absolute;
  left: 22px; bottom: 22px;
  z-index: 2;
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border: 3px solid var(--ink); border-radius: 14px;
  background: var(--yellow);
  font-family: var(--display); font-size: 22px; line-height: 1;
  box-shadow: 4px 5px 0 rgba(29,29,27,.16);
}

/* 信息条：压在封面右下 */
/* 信息条：放在封面下方，整块居中 */
.skx-plate {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: -34px auto 0;
  position: relative;
  z-index: 4;
  text-align: center;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  padding: 16px 30px 18px;
  box-shadow: 5px 6px 0 rgba(29,29,27,.16);
}
.skx-name { font-family: var(--display); font-size: 26px; line-height: 1.1; margin: 0 0 5px; }
.skx-note { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.skx-count {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px; font-weight: 800;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--yellow);
  padding: 2px 10px;
}

/* 技能列表：三列 */
.skx-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}
.skx-skill {
  border: 2.5px solid var(--line); border-radius: 14px; background: #fff;
  padding: 13px 14px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .14s ease, transform .14s ease;
}
.skx-skill:hover { border-color: var(--ink); transform: translate(-1px, -1px); }
.skx-skill.on { border-color: var(--ink); background: #fbfff0; }
.skx-skill-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.skx-skill h3 { margin: 0; font-size: 13.5px; }
.skx-skill code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px; color: var(--muted);
  background: var(--paper-2); padding: 1px 6px; border-radius: 5px;
}
.skx-skill p { margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted); flex: 1; }
.skx-skill-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 2px;
}
.skx-from { font-size: 10.5px; color: var(--muted); }
.skx-add {
  flex: none;
  border: 2.5px solid var(--ink); border-radius: 9px;
  background: var(--ink); color: #fff;
  font: inherit; font-size: 11.5px; font-weight: 800;
  padding: 5px 11px; cursor: pointer;
}
.skx-add:disabled { background: #fff; color: var(--muted); border-color: var(--line); cursor: default; }

/* 本地仓库 */
.skx-repo { padding-top: 10px; }
.skx-repo-inner {
  border: 3px solid var(--ink); border-radius: 18px; background: #fff; padding: 20px;
}
.skx-sub { margin: 6px 0 14px; font-size: 13px; line-height: 1.65; color: var(--muted); }
.skx-sub code, .skx-inst code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; background: var(--paper-2); padding: 1px 5px; border-radius: 5px;
}
.skx-repo-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.skx-repo-row .pay-input { flex: 1; min-width: 260px; }
.skx-repo-row .fra-btn { margin: 0; }
.skx-rescan {
  flex: none; font-size: 12px; font-weight: 700;
  border: 2.5px solid var(--ink); border-radius: 999px;
  background: #fff; padding: 0 16px; cursor: pointer;
}
.skx-installed { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.skx-inst {
  display: flex; align-items: flex-start; gap: 12px;
  border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.skx-inst > div { flex: 1; min-width: 0; }
.skx-inst strong { display: block; font-size: 13px; margin-bottom: 3px; }
.skx-inst span { font-size: 12px; line-height: 1.55; color: var(--muted); }
.skx-del {
  flex: none; font-size: 11px; font-weight: 700;
  border: 2px solid var(--ink); border-radius: 999px;
  background: #fff; padding: 3px 10px; cursor: pointer;
}
.skx-del:hover { background: var(--fail); color: #fff; border-color: var(--fail); }

@media (max-width: 1080px) {
  .skx-list { grid-template-columns: repeat(2, 1fr); }
  .skx-plate { position: static; max-width: none; margin: 14px; box-shadow: none; }
  .skx-cover { aspect-ratio: auto; }
}
@media (max-width: 700px) {
  .skx-list { grid-template-columns: 1fr; }
}

/* VELIN 元素：宠物贴纸。必须用 .skx-cover .skx-pet 提高优先级，
   否则会被 .skx-cover img 的 width:100% 拉满整张封面。 */
.skx-cover .skx-pet {
  position: absolute;
  right: 22px;
  top: 18px;
  z-index: 3;
  width: 78px;
  height: auto;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--yellow);
  padding: 5px 5px 0;
  box-shadow: 4px 5px 0 rgba(29,29,27,.16);
  pointer-events: none;
  object-fit: contain;
}
@media (max-width: 1080px) {
  .skx-cover .skx-pet { width: 58px; right: 14px; top: 12px; }
}

/* ==========================================================================
   技能市场 · 头版与铺满
   ========================================================================== */
/* 技能市场不跟随站点的窄栏，铺满可用宽度 */
/* 技能市场铺满：.page 本身有 1180px 上限，必须一起放开 */
body[data-title="titleSkills"] .page {
  max-width: none;
  width: 100%;
  padding: 40px 28px 64px;
}
body[data-title="titleSkills"] .page-inner {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}
.skx-wrap { max-width: 1680px; margin: 0 auto; }

.skx-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  padding: 10px 0 24px;
  border-bottom: 3px solid var(--ink);
  margin-bottom: 26px;
}
.skx-hero-copy { padding-bottom: 4px; }
.skx-hero-copy { min-width: 0; }
.skx-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--muted);
  text-transform: uppercase;
}
.skx-hero h1 {
  font-family: var(--display);
  /* 中文用字体自带行高，行高系数太紧会和下面的说明叠在一起 */
  font-size: clamp(38px, 4.6vw, 76px);
  line-height: 1.06;
  letter-spacing: -.01em;
  margin: 0 0 20px;
  overflow-wrap: anywhere;
}
.skx-hero-lede {
  margin: 0;
  max-width: 680px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}
.skx-hero-stats {
  display: flex;
  gap: 10px;
  flex: none;
}
.skx-stat {
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  padding: 12px 18px;
  text-align: center;
  min-width: 96px;
}
.skx-stat strong {
  display: block;
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  margin-bottom: 4px;
}
.skx-stat span { font-size: 11px; font-weight: 700; color: var(--muted); }
.skx-stat.accent { background: var(--yellow); }
.skx-stat.accent span { color: #4a4a44; }

@media (max-width: 900px) {
  .skx-hero { grid-template-columns: 1fr; align-items: start; }
  .skx-hero-stats { flex-wrap: wrap; }
}

/* ==========================================================================
   技能仓库
   ========================================================================== */
body[data-title="titleSkillsRepo"] .page {
  max-width: none;
  width: 100%;
  /* 导航高约 92px，再留一点就够 */
  padding: 104px 28px 64px;
}
body[data-title="titleSkillsRepo"] .page-inner {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}
.rp-wrap { max-width: 1080px; margin: 0 auto; }

/* 刊头 */
.rp-hero {
  position: relative;
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 30px 34px 32px;
  margin-bottom: 22px;
  overflow: hidden;
  /* 底图：线稿本身带米色底，和卡片同色，右半部分让插画露出来 */
  background-color: #f7f4ee;
  background-image: url("/assets/skills-repo-art.png?v=1");
  background-repeat: no-repeat;
  background-position: right -40px center;
  background-size: min(72%, 980px) auto;
}
/* 左侧白色渐隐，压住底图，保证标题与说明读得清 */
.rp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    100deg,
    #fff 0%,
    #fff 38%,
    rgba(255, 255, 255, .92) 52%,
    rgba(255, 255, 255, 0) 74%
  );
  pointer-events: none;
}
.rp-hero > * { position: relative; z-index: 1; }
.rp-hero-copy { max-width: 620px; }
.rp-kicker {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--muted);
  text-transform: uppercase;
}
.rp-hero h1 {
  font-family: var(--display);
  font-size: clamp(32px, 3.2vw, 50px);
  line-height: 1.12;
  margin: 0 0 14px;
}
.rp-lede { margin: 0; max-width: 560px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.rp-lede strong { color: var(--ink); }
.rp-hero-art { display: grid; place-items: center; }
.rp-hero-art svg { width: 100%; max-width: 200px; height: auto; }

/* 版块 */
.rp-block {
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  padding: 22px 24px 24px;
  margin-bottom: 18px;
}
.rp-block-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.rp-no {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  flex: none;
  border: 2.5px solid var(--ink);
  border-radius: 9px;
  background: var(--yellow);
  font-family: var(--display);
  font-size: 13px;
}
.rp-block-head h2 { margin: 0; font-size: 19px; }
.rp-block-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.rp-rescan {
  margin-left: auto;
  font-size: 12px; font-weight: 700;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  padding: 5px 14px;
  cursor: pointer;
}
.rp-rescan:hover { background: var(--yellow); }

/* 拖入区：虚线框 + 手绘图标 */
.rp-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 30px 20px 26px;
  border: 3px dashed var(--line);
  border-radius: 18px;
  background: #fbfaf6;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.rp-drop:hover, .rp-drop.over {
  border-color: var(--ink);
  background: var(--yellow);
  transform: translateY(-2px);
}
.rp-drop-art { width: 96px; height: auto; margin-bottom: 6px; }
.rp-drop-title { font-size: 15px; }
.rp-drop-sub { font-size: 12px; color: var(--muted); }
.rp-drop.over .rp-drop-sub { color: #4a4a44; }

.rp-name-row { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.rp-name-row label { font-size: 12px; font-weight: 700; color: var(--muted); }
.rp-input {
  width: 100%;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  padding: 10px 13px;
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: var(--ink);
}
.rp-msg { margin: 10px 0 0; font-size: 12.5px; line-height: 1.6; min-height: 1.4em; color: var(--muted); }
.rp-msg.good { color: #2f6b2f; font-weight: 700; }
.rp-msg.bad { color: var(--fail); font-weight: 700; }

/* 已装技能列表 */
.rp-list { display: flex; flex-direction: column; gap: 10px; }
.rp-skill {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 2.5px solid var(--line);
  border-radius: 14px;
  padding: 13px 15px;
  transition: border-color .14s ease, transform .14s ease;
}
.rp-skill:hover { border-color: var(--ink); transform: translate(-1px, -1px); }
.rp-skill-icon {
  flex: none;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  background: var(--yellow);
}
.rp-skill-icon svg { width: 20px; height: 20px; }
.rp-skill-main { flex: 1; min-width: 0; }
.rp-skill-top { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.rp-skill-top strong { font-size: 14px; }
.rp-skill-top code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  color: var(--muted);
  background: var(--paper-2);
  padding: 1px 6px;
  border-radius: 5px;
}
.rp-skill-main p { margin: 5px 0 6px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.rp-skill-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  color: #9a958d;
  word-break: break-all;
}
.rp-del {
  flex: none;
  font-size: 11px; font-weight: 700;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  padding: 4px 12px;
  cursor: pointer;
}
.rp-del:hover { background: var(--fail); color: #fff; border-color: var(--fail); }

.rp-empty {
  border: 2.5px dashed var(--line);
  border-radius: 14px;
  padding: 26px;
  text-align: center;
}
.rp-empty p { margin: 0 0 5px; font-size: 13.5px; font-weight: 700; }
.rp-empty span { font-size: 12.5px; color: var(--muted); }

/* 仓库目录 */
.rp-repo-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.rp-repo-row .rp-input { flex: 1; min-width: 280px; }
.rp-repo-row .fra-btn { margin: 0; }

@media (max-width: 860px) {
  .rp-hero { grid-template-columns: 1fr; }
  .rp-hero-art { display: none; }
}

/* 刊头里的仓库位置行 */
.rp-repo-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.rp-repo-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
}
.rp-repo-line code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  background: var(--paper-2);
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 4px 10px;
  word-break: break-all;
}
.rp-repo-edit {
  font-size: 11px;
  font-weight: 700;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  padding: 3px 12px;
  cursor: pointer;
}
.rp-repo-edit:hover { background: var(--yellow); }
.rp-repo-form {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
  margin-top: 10px;
}
.rp-repo-form .rp-input { flex: 1; min-width: 260px; }
.rp-repo-form .fra-btn { margin: 0; }

/* ==========================================================================
   两个自定义页面：清掉 .page-inner 自带的 140px padding-top
   .page-inner 的站点默认值是 padding: 140px 40px 80px，
   漏清上下就会在导航和刊头之间多出 140px 空白。
   ========================================================================== */
body[data-title="titleSkills"] .page-inner,
body[data-title="titleSkillsRepo"] .page-inner {
  padding-top: 0;
  padding-bottom: 0;
}
/* 顶部留白统一交给 .page。导航是 fixed，占 18~110px，
   所以内容必须从 110 之后开始，留 16px 呼吸 → 126px。 */
body[data-title="titleSkills"] .page,
body[data-title="titleSkillsRepo"] .page {
  padding-top: 126px;
}

/* 技能仓库：刊头插画 + 通栏垫图 */

/* ==========================================================================
   订购页 · 与技能市场/仓库统一的刊头
   ========================================================================== */
body[data-title="titlePay"] .page {
  max-width: none;
  width: 100%;
  padding: 126px 28px 64px;
}
body[data-title="titlePay"] .page-inner {
  padding-top: 0;
  padding-bottom: 0;
}
.pay-wrap { max-width: 1180px; margin: 0 auto; }

.pay-hero {
  position: relative;
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 30px 34px 32px;
  margin-bottom: 18px;
  overflow: hidden;
  background-color: #f7f4ee;
  background-image: url("/assets/billing-art-web.png?v=1");
  background-repeat: no-repeat;
  background-position: right 0 center;
  background-size: min(66%, 860px) auto;
}
.pay-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    100deg,
    #fff 0%,
    #fff 40%,
    rgba(255, 255, 255, .92) 54%,
    rgba(255, 255, 255, 0) 76%
  );
  pointer-events: none;
}
.pay-hero > * { position: relative; z-index: 1; }
.pay-hero-copy { max-width: 620px; }
.pay-kicker {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--muted);
  text-transform: uppercase;
}
.pay-hero h1 {
  font-family: var(--display);
  font-size: clamp(32px, 3.2vw, 50px);
  line-height: 1.12;
  margin: 0 0 14px;
}
.pay-lede { margin: 0; font-size: 13px; line-height: 1.8; color: var(--muted); }

/* 导航：当前页徽章保持荧光黄，其余白底，一眼知道在哪 */
.fra-badge.is-here {
  background: var(--yellow);
  box-shadow: 3px 4px 0 rgba(29,29,27,.16);
}
.fra-badge.is-here span { color: #4a4a44; }

/* 工作台：空白模式开关 */
.chat-modes {
  /* 开关 + 文字上下排，别和开关挤一行 */
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 4px 2px 8px;
}
.chat-modes .chat-switch {
  align-items: flex-start;
  gap: 9px;
  width: 100%;
}
/* 文字块：标签一行，提示一行，都在开关右边 */
.chat-switch-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.chat-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.chat-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.chat-switch-track {
  position: relative; width: 38px; height: 22px; flex: none;
  border: 2.5px solid var(--ink); border-radius: 999px; background: #fff;
  transition: background .16s ease;
}
.chat-switch-knob {
  position: absolute; left: 2px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  border-radius: 50%; background: var(--ink);
  transition: transform .16s ease, background .16s ease;
}
.chat-switch input:checked + .chat-switch-track { background: var(--yellow); }
.chat-switch input:checked + .chat-switch-track .chat-switch-knob { transform: translateX(16px); }
.chat-switch input:focus-visible + .chat-switch-track { outline: 3px solid var(--yellow); outline-offset: 2px; }
.chat-switch-label { font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.chat-switch-hint {
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

/* @ 面板：预设技能的标记 */
.chat-pop .at-skill-mark.preset { background: var(--yellow); }
.chat-pop .at-preset-tag {
  margin-left: 6px; font-size: 10px; font-weight: 800;
  border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--yellow); padding: 0 6px; vertical-align: middle;
}

/* 付款方式切换 */
.pay-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.pay-method {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  padding: 14px 18px;
  cursor: pointer;
  font: inherit;
  transition: background .14s ease, transform .14s ease;
}
.pay-method:hover { transform: translate(-1px, -1px); }
.pay-method.on { background: var(--yellow); }
.pay-method strong { font-size: 15px; }
.pay-method span { font-size: 11.5px; color: var(--muted); }
.pay-method.on span { color: #4a4a44; }

/* 人民币付款面板 */
.pay-rmb {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: start;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  padding: 24px 26px;
}
.pay-rmb-art {
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #f7f4ee;
  padding: 16px;
}
.pay-rmb-art svg { width: 100%; max-width: 96px; height: auto; }
.pay-rmb-main h2 {
  font-family: var(--display);
  font-size: 24px;
  margin: 0 0 8px;
}
.pay-rmb-lede { margin: 0 0 10px; font-size: 13px; line-height: 1.75; color: var(--muted); }
.pay-rmb-lede strong { color: var(--ink); font-size: 15px; }
.pay-rmb .pay-steps { margin: 0 0 16px; }
.pay-rmb-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pay-rmb-go { margin: 0; }
.pay-rmb-go.off { opacity: .5; cursor: not-allowed; }
.pay-rmb-state { font-size: 12px; color: var(--muted); }

@media (max-width: 700px) {
  .pay-methods { grid-template-columns: 1fr; }
  .pay-rmb { grid-template-columns: 1fr; }
}

/* 订购页：右列卡片不再留空档 */
/* 两张卡都纵向铺满，内容在卡内自然分布，底部不留半截空白 */
.pay-grid .pay-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.pay-grid .pay-card > .pay-verify { flex: none; }
.pay-grid .pay-card > .pay-history { flex: 1; }
/* 左卡的「怎么付款」列表吃掉剩余高度，避免底部空一截 */
.pay-grid .pay-card > .pay-steps { flex: 1; }

/* VELIN BOT 介绍 */
.bot-about {
  margin-top: 18px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  padding: 26px 30px 28px;
}
.bot-about-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--ink);
  margin-bottom: 18px;
}
.bot-about-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--muted);
  text-transform: uppercase;
}
.bot-about-head h2 {
  font-family: var(--display);
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.2;
  margin: 0;
}
.bot-about-price {
  flex: none;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.bot-about-lede {
  margin: 0 0 20px;
  max-width: 780px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--muted);
}
.bot-about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.bot-about-item {
  border: 2.5px solid var(--line);
  border-radius: 14px;
  padding: 15px 17px;
  transition: border-color .14s ease, transform .14s ease;
}
.bot-about-item:hover { border-color: var(--ink); transform: translate(-1px, -1px); }
.bot-about-item h3 { margin: 0 0 7px; font-size: 14px; }
.bot-about-item p { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }

.bot-about-flow {
  margin-top: 20px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #f7f4ee;
  padding: 16px 18px;
}
.bot-about-flow-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.bot-about-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: flow;
}
.bot-about-steps li {
  position: relative;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  padding: 5px 14px 5px 30px;
  font-size: 12.5px;
  font-weight: 700;
}
.bot-about-steps li::before {
  counter-increment: flow;
  content: counter(flow);
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-size: 10px;
}
.bot-about-facts {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 22px;
}
.bot-about-facts li {
  position: relative;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}
.bot-about-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 8px;
  height: 8px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--yellow);
}
.bot-about-facts strong { color: var(--ink); }

@media (max-width: 860px) {
  .bot-about-grid, .bot-about-facts { grid-template-columns: 1fr; }
}

/* ==========================================================================
   订购页 · 两个产品
   ========================================================================== */
.prod {
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  padding: 22px 24px 24px;
  margin-top: 18px;
}
.prod-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--ink);
  margin-bottom: 18px;
}
.prod-no {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--yellow);
  font-family: var(--display);
  font-size: 16px;
}
.prod-title { flex: 1; min-width: 0; }
.prod-title h2 { margin: 0 0 4px; font-size: 21px; }
.prod-title p { margin: 0; font-size: 12.5px; color: var(--muted); }
.prod-pay-tag {
  flex: none;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.prod-pay-tag.rmb { background: #fff; }

.prod-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.prod-grid .pay-card { display: flex; flex-direction: column; height: 100%; }
.prod-grid .pay-card > .pay-steps { flex: 1; }
.prod-grid .pay-card > .pay-history { flex: 1; }

/* 生图充值 */
.topup-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items: start;
}
.topup-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.topup-tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  padding: 26px 14px;
  cursor: pointer;
  font: inherit;
  transition: background .14s ease, transform .14s ease;
}
.topup-tier:hover { transform: translate(-1px, -1px); }
.topup-tier.on { background: var(--yellow); }
.topup-tier-stills { font-family: var(--display); font-size: 30px; line-height: 1; }
.topup-tier-price { font-size: 13px; font-weight: 800; color: var(--muted); }
.topup-tier.on .topup-tier-price { color: #4a4a44; }

.topup-side {
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #f7f4ee;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.topup-balance { display: flex; flex-direction: column; gap: 4px; }
.topup-balance-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
}
.topup-balance-value { font-family: var(--display); font-size: 30px; line-height: 1; }
.topup-balance-hint { font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.topup-go { margin: 0; width: 100%; }
.topup-go.off { opacity: .5; cursor: not-allowed; }
.topup-note { margin: 0; font-size: 11.5px; line-height: 1.6; color: var(--muted); }

@media (max-width: 1000px) {
  .prod-grid, .topup-body { grid-template-columns: 1fr; }
  .topup-tiers { grid-template-columns: 1fr; }
}

/* ==========================================================================
   充值二维码弹窗
   ========================================================================== */
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(29, 29, 27, .55);
  padding: 24px;
}
.qr-sheet {
  position: relative;
  width: min(680px, 100%);
  max-height: 92vh;
  overflow: auto;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: #fff;
  padding: 26px 30px 28px;
  box-shadow: 8px 10px 0 rgba(29, 29, 27, .2);
}
.qr-close {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 34px;
  height: 34px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.qr-close:hover { background: var(--yellow); }
.qr-head { margin-bottom: 18px; }
.qr-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--muted);
  text-transform: uppercase;
}
.qr-head h2 { font-family: var(--display); font-size: 26px; margin: 0 0 6px; }
.qr-sub { margin: 0; font-size: 12.5px; color: var(--muted); }

.qr-stage {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 3px solid var(--ink);
  margin-bottom: 16px;
}
.qr-box {
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  padding: 10px;
  display: grid;
  place-items: center;
  min-height: 240px;
}
.qr-box svg { width: 100%; height: auto; display: block; }
.qr-side { display: flex; flex-direction: column; gap: 14px; }
.qr-amount { display: flex; flex-direction: column; gap: 2px; }
.qr-amount-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
}
.qr-amount-value { font-family: var(--display); font-size: 34px; line-height: 1; }
.qr-amount-stills { font-size: 12.5px; color: var(--muted); }
.qr-addr { display: flex; flex-direction: column; gap: 5px; }
.qr-addr-label { font-size: 11px; font-weight: 800; color: var(--muted); }
.qr-addr code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  background: var(--paper-2);
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  word-break: break-all;
}
.qr-copy {
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 700;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  padding: 4px 14px;
  cursor: pointer;
}
.qr-copy:hover { background: var(--yellow); }
.qr-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
.qr-dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--muted);
  animation: qr-pulse 1.4s ease-in-out infinite;
}
@keyframes qr-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.qr-status.found { color: #2f6b2f; }
.qr-status.found .qr-dot { background: #2f6b2f; animation: none; }
.qr-status.warn { color: var(--fail); }
.qr-status.warn .qr-dot { background: var(--fail); animation: none; }

.qr-steps { margin: 0; padding-left: 20px; font-size: 12.5px; line-height: 1.8; color: var(--muted); }
.qr-steps strong { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { .qr-dot { animation: none; } }
@media (max-width: 640px) {
  .qr-stage { grid-template-columns: 1fr; }
}

/* 生图充值：付款方式切换 */
.topup-methods {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.topup-methods-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-right: 4px;
}
.topup-method {
  font-size: 12.5px;
  font-weight: 700;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  padding: 6px 15px;
  cursor: pointer;
  font-family: inherit;
  transition: background .14s ease;
}
.topup-method:hover { background: var(--paper-2); }
.topup-method.on { background: var(--yellow); }

/* 技能市场：来源可在新标签打开 */
a.skx-from {
  text-decoration: none;
  color: var(--muted);
  border-bottom: 1.5px dashed var(--line);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: color .14s ease, border-color .14s ease;
}
a.skx-from:hover { color: var(--ink); border-bottom-color: var(--ink); }
.skx-out { font-size: 10px; opacity: .7; }
.skx-add.done {
  background: var(--yellow);
  cursor: default;
}
.skx-add:disabled { opacity: .6; cursor: progress; }

/* 管理员标识（role=admin 的号） */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}
.role-badge[hidden] { display: none; }

/* @ 技能菜单读取失败时的重试按钮 */
.at-retry {
  margin-left: 6px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  padding: 1px 8px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.at-retry:hover { border-color: var(--ink); }

/* 工作台：回复上方标出本轮自动选用的技能 */
.chat-used {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  border-left: 3px solid var(--yellow);
  padding-left: 8px;
}

/* 工作台：给 BOT 发图片的附件按钮 */
.chat-clip {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.chat-clip:hover { background: var(--yellow); }
.chat-clip.has-files { background: var(--yellow); }

/* 消息里附带的图片 */
.chat-shots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 6px 0 4px;
}
.chat-shots img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  background: var(--paper-2);
}
.chat-shots .chat-shot-more {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 2.5px dashed var(--line);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

/* 待发送的附件预览条 */
.chat-attach {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 2px 8px;
}
.chat-attach-item {
  position: relative;
  width: 52px;
  height: 52px;
}
.chat-attach-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 2.5px solid var(--ink);
  border-radius: 9px;
}
.chat-attach-item button {
  position: absolute;
  right: -5px;
  top: -5px;
  width: 17px;
  height: 17px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.chat-attach-item button:hover { background: var(--yellow); }

/* 余额不足时状态栏里的充值入口 */
.studio-topup {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}
.studio-topup:hover { background: #fff; }

/* ==========================================================================
   菜单抽屉
   原来 11 项同一个 64px 字号堆成一列，主次不分。现在分左右两栏：
   左边六个主入口大字带编号，右边五个常用入口小字。
   ========================================================================== */
.fra-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--yellow);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 20px 42px 24px;
  overflow: auto;
}
.fra-overlay[hidden] { display: none; }

.fra-overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--ink);
}
.fra-overlay-brand {
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: .16em;
  line-height: 1;
}
.fra-overlay-close {
  width: 38px;
  height: 38px;
  flex: none;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.fra-overlay-close:hover { background: var(--ink); color: var(--yellow); }

.fra-overlay-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 240px);
  gap: 20px 44px;
  align-content: center;
  padding: 20px 0;
}

.fra-overlay-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.fra-overlay-nav a {
  display: flex;
  align-items: baseline;
  gap: 13px;
  font-family: var(--display);
  font-size: clamp(25px, 4.2vw, 46px);
  line-height: 1.16;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  width: fit-content;
  max-width: 100%;
  padding: 1px 12px 1px 0;
  transition: transform .12s ease, background .12s ease;
}
.fra-overlay-no {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  opacity: .5;
  flex: none;
}
.fra-overlay-nav a:hover { transform: translateX(7px); }
.fra-overlay-nav a.on {
  background: #fff;
  padding: 1px 12px;
  border-radius: 6px;
  box-shadow: 3px 3px 0 rgba(29,29,27,.14);
}

.fra-overlay-side {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-self: center;
  min-width: 0;
}
.fra-overlay-side-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .55;
  padding-bottom: 7px;
  border-bottom: 2px solid rgba(29,29,27,.22);
  margin-bottom: 3px;
}
.fra-overlay-side a {
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  padding: 4px 9px;
  margin-left: -9px;
  border-radius: 7px;
  width: fit-content;
  transition: background .12s ease, transform .12s ease;
}
.fra-overlay-side a:hover { background: #fff; transform: translateX(4px); }
.fra-overlay-side a.on { background: #fff; }

.fra-overlay-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 3px solid var(--ink);
}
.fra-overlay-note { font-size: 11.5px; font-weight: 700; opacity: .6; }
.fra-overlay-copy { font-family: var(--display); font-size: 12px; letter-spacing: .1em; opacity: .5; }

@media (max-width: 860px) {
  .fra-overlay { padding: 14px 20px 16px; }
  .fra-overlay-body { grid-template-columns: 1fr; gap: 16px; }
  .fra-overlay-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; align-self: start; }
  .fra-overlay-side-label { width: 100%; border-bottom: none; padding-bottom: 0; }
  .fra-overlay-nav a { font-size: clamp(23px, 6.6vw, 32px); }
}

/* 鼠标跟随的小星星。
   注意 position: fixed 不能少 —— 少了它会变成普通块元素占满一行高度，
   把整页撑出一大截空白（实测撑出 1446px）。 */
.fra-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  z-index: 90;
  pointer-events: none;
}

/* 订阅页的售后入口。做成一行低调的条，不抢付款流程的注意力。 */
.support-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 1080px;
  margin: 18px auto 0;
  padding: 13px 18px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  box-shadow: 3px 4px 0 rgba(29,29,27,.1);
}
.support-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
}
.support-text { font-size: 13.5px; font-weight: 700; }
.support-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .12s ease, background .12s ease;
}
.support-link:hover { background: var(--ink); color: var(--yellow); transform: translateY(-1px); }
.support-link strong { font-weight: 800; }
@media (max-width: 640px) {
  .support-link { margin-left: 0; }
}

/* ==========================================================================
   后台收款台：订单列表
   admin.js 一直在输出这些类，但之前一条样式都没有，五个字段挤成一竖列。
   现在做成表格状：订单号 / 用户 / 金额 / 状态 / 时间 / 哈希 各占一列。
   ========================================================================== */
.orders { margin-top: 14px; }

/* 表头：只在宽屏显示，窄屏靠每格的 data-label */
.order-head {
  display: grid;
  grid-template-columns: 62px minmax(0, 2.4fr) 118px 78px 132px minmax(0, 1fr);
  gap: 12px;
  padding: 0 14px 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
}

.order-row {
  display: grid;
  /* 列宽实测调过：用户列要最宽（邮箱长，之前被截成 blarelewi…），
     金额列给足 116px 免得 "3.01 USDT" 折行，时间列内容固定不需要太宽。 */
  grid-template-columns: 62px minmax(0, 2.4fr) 118px 78px 132px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  margin-top: 8px;
}
/* 已到账的用黄底标出来，一眼能扫到 */
.order-row.on { background: #fbfce8; box-shadow: 3px 3px 0 rgba(29,29,27,.1); }

.order-no {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12.5px;
  font-weight: 700;
  opacity: .72;
  user-select: all;   /* 点一下就能整段选中复制，对账要用 */
}

.order-main { min-width: 0; }
.order-main strong {
  display: block;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-main span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.order-amount {
  font-family: var(--display);
  font-size: 15px;
  white-space: nowrap;
  /* 字号大、字面贴边，加一点左内距免得左边缘被列边界压住 */
  padding-left: 2px;
}

.order-state {
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  white-space: nowrap;
}
.order-state.ok { background: var(--yellow); }
.order-state.wait { background: #fff; color: var(--muted); border-color: var(--line); }

.order-time { font-size: 11.5px; line-height: 1.45; }
.order-time .order-paid-at {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.order-tx {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 10.5px;
  opacity: .6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
}

@media (max-width: 900px) {
  .order-head { display: none; }
  .order-row {
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    align-items: start;
  }
  .order-no { grid-column: 1; font-size: 11.5px; }
  .order-main { grid-column: 1 / -1; }
  .order-amount { grid-column: 1; }
  .order-state { grid-column: 2; justify-self: end; }
  .order-time { grid-column: 1 / -1; }
  .order-tx { grid-column: 1 / -1; }
}

/* ==========================================================================
   后台「全部用户」里的完整密钥
   64 字符放不下整行（会压到右边的徽章），所以截断显示、悬停用 title 看全，
   但元素里存的仍是完整值 —— 点一下整段选中复制拿到的是全文。
   ========================================================================== */
.person-key {
  display: block;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink);
  opacity: .8;
  margin-top: 3px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
  cursor: text;
}
.person-body { min-width: 0; }

/* ==========================================================================
   BOT 说「需要订阅」时的提示
   以前只有一行小字，用户看不出该干什么。现在拆成三行：
   原因 / 说明 / 可点的入口。
   ========================================================================== */
.chat-need-sub {
  background: #fffdf0;
  border: 2.5px solid var(--ink);
  border-left-width: 6px;
  border-radius: 10px;
  padding: 11px 13px;
  line-height: 1.6;
}
.chat-need-sub strong { display: block; font-size: 13.5px; }
.chat-sub-hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.chat-sub-go {
  display: inline-block;
  margin-top: 9px;
  padding: 6px 15px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
}
.chat-sub-go:hover { background: var(--ink); color: var(--yellow); }

/* 拖拽文件到对话框时的提示态 */
.chat-drop {
  outline: 3px dashed var(--ink);
  outline-offset: -6px;
  border-radius: 14px;
  background: #fffdf0;
}

/* ==========================================================================
   九宫格每格的下载按钮
   原来只能「点格子」下载，格子里没有任何按钮、也没有 title，
   用户根本不知道能点。现在每格右上角一个明确的小按钮。
   ========================================================================== */
.still-cell { position: relative; }
.cell-dl {
  position: absolute;
  right: 6px;
  top: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  transition: opacity .14s ease, background .14s ease, transform .14s ease;
}
.still-cell:hover .cell-dl,
.cell-dl:focus-visible { opacity: 1; }
.cell-dl:hover { background: var(--yellow); transform: translateY(-1px); }
/* 触屏没有悬停，常显 */
@media (hover: none) {
  .cell-dl { opacity: 1; }
}

/* ==========================================================================
   密钥池：后台造 key / 账号页领 key
   ========================================================================== */
.desk-warn {
  border-left: 5px solid var(--ink);
  background: #fffdf0;
  padding: 9px 12px;
  border-radius: 8px;
}
.desk-mint { margin-top: 12px; }
.desk-mini-label {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.desk-mint-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.desk-mint-row input {
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 7px 10px;
  font: inherit;
  min-width: 0;
  flex: 1 1 84px;
}
.mint-out { margin-top: 10px; }
.mint-note { font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.mint-keys {
  width: 100%;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 9px 11px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  resize: vertical;
  background: #fff;
}
.desk-rule { border: 0; border-top: 2px dashed var(--line); margin: 16px 0; }

.me-apikey {
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 16px 18px;
  background: #fff;
  margin: 18px 0;
}
.me-apikey h3 {
  font-family: var(--display);
  font-size: 18px;
  margin: 0 0 6px;
  font-weight: 400;
}
.me-apikey-note { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.me-apikey-out { margin-top: 12px; }

/* ==========================================================================
   API 文档页
   原文只有端点列表，没有目录、没有表格、没有步骤说明。
   ========================================================================== */
.docs-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 10px;
  padding: 14px 16px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #fff;
}
.docs-toc a {
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
  padding: 5px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
}
.docs-toc a:hover { background: var(--yellow); }

.docs-list { margin: 10px 0 18px; padding-left: 20px; line-height: 1.75; }
.docs-list li { margin-bottom: 6px; }

.docs-table {
  border: 3px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  margin: 14px 0 20px;
  background: #fff;
}
.docs-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 2px solid var(--line);
  font-size: 13.5px;
  line-height: 1.6;
}
.docs-row:last-child { border-bottom: 0; }
.docs-head {
  background: var(--yellow);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.docs-row span:first-child { font-weight: 700; }
.docs-foot { margin-top: 26px; opacity: .75; font-size: 13px; }

@media (max-width: 640px) {
  .docs-row { grid-template-columns: 1fr; gap: 2px; }
}

/* 徽章里的 API 是三个拉丁字母，用中文那套 28px 会撑破，
   单字符那套又太小。单独一档。 */
/* API 徽章用哪套字体，规则在上面（跟混排字体族放一起）。
   这里原本有一条 Tusker 21px 的旧规则 —— 它在文件后面，
   把上面那条覆盖掉了，所以「API」一直还是窄体。删掉。 */

/* ==========================================================================
   BOT 写提示词时，静帧面板里的等待提示
   BOT 写词要 60–90 秒，那段时间面板原本一动不动，看着就像卡住。
   ========================================================================== */
.studio-still .result-frame.bot-waiting {
  display: grid;
  place-items: center;
  background: var(--paper-2);
}
.bot-wait-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.bot-wait-dots { display: flex; gap: 7px; }
.bot-wait-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  opacity: .25;
  animation: botWait 1.25s ease-in-out infinite;
}
.bot-wait-dots i:nth-child(2) { animation-delay: .16s; }
.bot-wait-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes botWait {
  0%, 100% { opacity: .22; transform: translateY(0); }
  45% { opacity: 1; transform: translateY(-5px); }
}
.bot-wait-text { font-size: 14px; font-weight: 700; }
.bot-wait-secs {
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: .02em;
  opacity: .55;
}

/* 「我的」页面的密钥行：输入框 + 复制 + 换一把 */
.me-key-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.me-key-row input {
  flex: 1 1 260px;
  min-width: 0;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 9px 12px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12.5px;
  background: var(--paper);
  color: var(--ink);
}
.me-apikey-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 0;
  line-height: 1.55;
}

/* 「换一把」的二次确认态：按钮自己变色提示，不用原生 confirm
   （原生弹窗会阻塞整页，自动化测试里没人点就永远卡住） */
.fra-btn.armed {
  background: var(--ink);
  color: var(--yellow);
}

/* 注册 / 用密钥登录 两个面板之间的切换入口。
   以前是硬流程：注册后必弹「用钥匙登录」，用户手上根本没钥匙。
   现在改成并列的两个入口，用户自己选。 */
.auth-switch {
  margin: 16px 0 0;
  text-align: center;
}
.auth-link {
  background: none;
  border: 0;
  padding: 4px 6px;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.auth-link:hover { color: var(--ink); }

/* 「我的」页面密钥区下面的新手引导：
   新用户注册完落到这里，得让他知道接下来该干什么。 */
.me-key-next {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}
.me-key-link {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  font-size: 11.5px;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
}
.me-key-link:hover { background: var(--yellow); }

/* ==========================================================================
   后台密钥池：两栏（无额度 / 有额度）
   ========================================================================== */
.pool-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.pool-col {
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px 14px;
  min-width: 0;
}
.pool-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.pool-title { font-weight: 800; font-size: 13.5px; }
.pool-count {
  font-family: var(--display);
  font-size: 20px;
  line-height: 1;
  padding: 2px 9px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
}
.pool-head .desk-mini { margin-left: auto; }
.pool-note {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 10px;
}
.pool-list {
  max-height: 240px;
  overflow: auto;
  border-top: 2px dashed var(--line);
  padding-top: 8px;
}
.pool-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 11.5px;
  min-width: 0;
}
.pool-row code {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 1 auto;
}
.pool-tag {
  flex: none;
  font-weight: 800;
  font-size: 10.5px;
  padding: 1px 7px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
}
.pool-tag.paid { background: var(--yellow); }
.pool-label {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pool-empty {
  font-size: 11.5px;
  color: var(--muted);
  margin: 2px 0;
}

/* ==========================================================================
   宽屏适配

   原来整个文件没有一条 min-width 媒体查询：.page 锁 1180、.page-inner 锁
   1080，所以 1920 的屏上内容只占一半多，两边各空近 400px，
   billing 页要滚 2339px（视口才 900）。

   只放宽容器和栅格，不动字号 —— 字号放大反而让长段落难读。
   ========================================================================== */
@media (min-width: 1440px) {
  /* 内容页容器逐级放宽。用各页自己的 wrapper 类限定，
     不直接改 .page-inner 基类，免得影响没考虑过宽屏的页面。 */
  .pay-wrap { max-width: 1340px; }
  .skx-wrap { max-width: 1240px; }
  .rp-wrap { max-width: 1240px; }
  .page { max-width: 1340px; }

  /* 订阅区固定两列 —— 它只有 2 张卡（状态 / 付款方式）。
     试过 auto-fit，但卡片少时它不会缩列，1920 下会变成 3 列、空 1 列。
     所以列数写死，容器跟着列数定上限，两边都不留空。 */
  .prod-grid { grid-template-columns: 1fr 1fr; max-width: 1160px; }
  /* 充值套餐是窄卡，可以多铺几列 */
  .topup-tiers { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

@media (min-width: 1800px) {
  .pay-wrap { max-width: 1560px; }
  .page { max-width: 1560px; }

  .prod-grid { grid-template-columns: 1fr 1fr; max-width: 1320px; }
  .topup-tiers { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

  /* 宽屏下首屏文案可以大一点，撑住版面 */
  .pay-hero-copy h1,
  .pay-hero h1 { font-size: clamp(44px, 3.4vw, 76px); }
}

/* 支付页底部那条「付款遇到问题」跟着支付内容的宽度走。
   .support-row 原来写死 1080px，而宽屏适配后 .pay-wrap 是 1340/1560，
   外面宽里面窄，视觉上就错位了。 */
/* 它本身在 .page-inner 里（那层已有 40px 内边距），
   再 auto 居中一次就会内缩 40px，和上面的内容对不齐。
   所以 margin 左边距归零、宽度吃满容器。 */
.support-row.pay-support {
  /* 这一条本身在 .page-inner 里（那层左右各 40px 内边距），
     而 .support-row 基类带 margin: ... auto，会被再居中一次、
     比上面的卡片窄。它在宽屏下跟 .prod（卡片区）差 40px 就是这么来的。
     所以：去掉自动居中、让它像 .prod 一样撑满容器。 */
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* 支付倒计时：15 分钟有效期 */
.qr-countdown {
  margin-top: 10px;
  padding: 8px 12px;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  background: var(--yellow);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
}
.qr-countdown strong {
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: .02em;
}
.qr-countdown.urgent { background: #ffe9e9; }
.qr-countdown.dead { background: #f0f0f0; color: var(--muted); }

/* 过期后的重新下单按钮 */
.qr-again {
  margin-top: 10px;
  padding: 9px 18px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.qr-again:hover { background: var(--ink); color: var(--yellow); }

/* 「任意金额」的输入框。选中那张卡才展开。 */
.topup-custom {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 14px 16px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #fff;
}
.topup-custom-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.topup-custom-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.topup-custom-row input {
  flex: 0 1 200px;
  min-width: 140px;
  padding: 10px 12px;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  background: var(--paper);
}
.topup-custom-eq {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.topup-custom-eq.bad { color: var(--fail); font-weight: 700; }

/* 「付款方式」这一块的对齐。

   原来是一整行 flex + wrap：标签和「USDT（链上，自动到账）」占满 320px
   侧栏后，人民币按钮被挤到第二行，看着像三个东西没对齐。
   改成：标签独占一行，两个按钮在下面并排。 */
.topup-methods {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.topup-methods-label {
  flex: 0 0 100%;      /* 独占一行 */
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
}
/* 两个按钮等宽，视觉上成对 */
.topup-methods .topup-method {
  flex: 1 1 0;
  min-width: 0;
  padding: 7px 10px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   隐藏滚动条（全站）

   用户要求：窗口旁边不要有那根滚动条，边缘干净。
   只隐藏滚动条的**外观**，不禁止滚动 —— 鼠标滚轮、触控板、键盘照样
   能滑到下面（内容还是全长，没有裁掉）。

   Firefox 用 scrollbar-width，Chrome/Edge/Safari 用 ::-webkit-scrollbar。
   ========================================================================== */
html {
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* 老 Edge */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;                /* Chrome / Safari */
}

/* 对话区那两个清空/重置按钮挨在一起，给点间距 */
.chat-clear + .chat-clear { margin-left: 6px; }

/* ==========================================================================
   Homepage API announce modal + docs API Connect card
   Visual language mirrors .auth-pop (paper, ink border, yellow accent).
   Announce z-index 70; auth-pop stays at 80 so login can sit on top.
   ========================================================================== */
.announce-pop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(29,29,27,.42);
  display: grid;
  place-items: center;
  padding: 24px;
}
.announce-pop[hidden] { display: none; }
.announce-pop-card {
  width: min(460px, 100%);
  background: var(--paper);
  border: 3px solid var(--ink);
  padding: 32px 28px 28px;
  position: relative;
  box-shadow: 8px 10px 0 rgba(29,29,27,.16);
}
.announce-pop-card h2 {
  font-family: "Noto Sans SC", "Nunito", sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  margin: 0 0 10px;
}
.announce-pop-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}
.announce-pop-card .lede {
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
  margin: 0 0 14px;
}
.announce-list {
  margin: 0 0 20px;
  padding-left: 18px;
  line-height: 1.7;
  font-size: 14.5px;
}
.announce-list a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.announce-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.announce-actions .fra-btn {
  text-transform: none;
  letter-spacing: 0;
  margin-top: 0;
}

.api-connect-card {
  margin: 0 0 36px;
  padding: 28px 26px 26px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 8px 10px 0 rgba(29,29,27,.12);
  border-radius: 4px;
}
.api-connect-card > .kicker {
  color: var(--ink);
  background: var(--yellow);
  display: inline-block;
  padding: 3px 10px;
  border: 2px solid var(--ink);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.api-connect-card > h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 10px;
  line-height: 1.15;
}
.api-connect-card > .lede { margin-bottom: 18px; }

.connect-row { margin-bottom: 14px; }
.connect-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.75;
}
.connect-value-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.connect-value-row code {
  flex: 1 1 200px;
  display: block;
  padding: 10px 12px;
  border: 2.5px solid var(--ink);
  background: var(--paper-2);
  font-size: 13.5px;
  word-break: break-all;
}
.connect-value-row input {
  flex: 1 1 200px;
  font-size: 15px;
  padding: 10px 12px;
  border: 2.5px solid var(--ink);
  background: #fff;
  min-width: 0;
}
.connect-copy,
.connect-actions .fra-btn,
.connect-verify .fra-btn {
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}
.connect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 20px;
}
.connect-verify {
  padding-top: 16px;
  border-top: 2px dashed rgba(29,29,27,.25);
}
.connect-status {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 700;
}
.connect-status.is-ok { color: #1a7a3a; }
.connect-status.is-err { color: #b42318; }

.docs-host-note {
  margin-top: -6px;
  font-size: 14px;
}
.docs-host-note code {
  background: var(--yellow);
  border: 1.5px solid var(--ink);
  padding: 1px 6px;
  font-size: 13px;
}

/* ==========================================================================
   AI Connect wizard (/ai-connect.html) — two-column layout,
   VELIN ink/yellow paper look
   ========================================================================== */
.ai-connect-page {
  max-width: 1080px;
}
.ai-connect-hero {
  text-align: center;
  margin: 0 auto 28px;
  max-width: 720px;
}
.ai-connect-pill {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 14px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.ai-connect-hero h1 {
  font-family: var(--display);
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--ink);
}
.ai-connect-tagline {
  font-family: var(--display);
  font-size: clamp(18px, 2.6vw, 26px);
  line-height: 1.35;
  margin: 0 0 14px;
  color: var(--ink);
}
.ai-connect-accent {
  background: var(--yellow);
  border: 2px solid var(--ink);
  padding: 0 8px 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.ai-connect-lede {
  margin: 0 auto 14px;
  text-align: center;
  font-size: 16px;
}
.ai-connect-steps {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.ai-connect-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.15fr);
  gap: 18px;
  align-items: start;
}
.ai-connect-card {
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  padding: 22px 20px 20px;
  box-shadow: 4px 5px 0 rgba(29, 29, 27, 0.12);
}
.ai-connect-card h2 {
  font-size: 18px;
  margin: 0 0 16px;
  line-height: 1.3;
}
.ai-connect-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.ai-connect-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: 2.5px solid var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231d1d1b' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
  padding: 12px 40px 12px 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  border-radius: 10px;
  margin-bottom: 18px;
  cursor: pointer;
}
.ai-connect-select:focus {
  outline: 3px solid var(--yellow);
  outline-offset: 1px;
}

.ai-connect-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.ai-connect-mode-btn {
  display: inline-block;
  border: 2.5px solid var(--ink);
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  cursor: default;
  user-select: none;
}
.ai-connect-mode-btn.is-on {
  background: var(--yellow);
  box-shadow: 2px 3px 0 rgba(29, 29, 27, 0.14);
}

.ai-connect-info {
  background: color-mix(in srgb, var(--yellow) 28%, #fff);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 14px 14px 12px;
}
.ai-connect-info h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
}
.ai-connect-info ul {
  margin: 0;
  padding-left: 1.15em;
  font-size: 13px;
  line-height: 1.65;
  color: #3a3a36;
}
.ai-connect-info code {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(29, 29, 27, 0.25);
  padding: 0 4px;
  border-radius: 4px;
}

.ai-connect-right-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
.ai-connect-right-sub {
  margin: -8px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.ai-connect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ai-connect-actions .fra-btn {
  text-transform: none;
  letter-spacing: 0.02em;
  padding: 10px 16px;
  font-size: 13px;
}
.ai-connect-btn-secondary {
  background: #fff;
}
.ai-connect-btn-secondary:hover {
  background: var(--paper-2);
}

.ai-connect-package {
  margin: 0 0 14px;
  padding: 14px 16px;
  max-height: min(52vh, 520px);
  overflow: auto;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background: #1d1d1b;
  color: #f4f1ea;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-connect-tip {
  background: color-mix(in srgb, var(--yellow) 22%, #fff);
  border: 2px dashed rgba(29, 29, 27, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
}
.ai-connect-tip p { margin: 0 0 6px; color: #3a3a36; }
.ai-connect-tip a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ai-connect-tip a:hover { background: var(--yellow); }

@media (max-width: 860px) {
  .ai-connect-grid { grid-template-columns: 1fr; }
  .ai-connect-package { max-height: 42vh; }
}


.ai-connect-docs {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 3px solid var(--ink);
}
.ai-connect-docs-heading {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 34px);
  margin: 0 0 18px;
  line-height: 1.25;
  color: var(--ink);
}
.ai-connect-docs-body {
  max-width: none;
}
.ai-connect-docs-body .kicker { display: none; }
html { scroll-behavior: smooth; }

/* ==========================================================================
   2026-09-29 首页产品说明（hero 下方小卡片）+ 联系方式区块（首页 / 文档页）
   只新增类名，不改已有规则。
   ========================================================================== */
.fra-intro {
  position: relative;
  z-index: 1;
  margin-top: 2.4vw;
  max-width: 780px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  font-family: var(--sans);
  color: var(--ink);
  pointer-events: auto;
}
.fra-intro p { margin: 0; }
.fra-intro p + p { margin-top: 6px; }
.fra-intro-lead { font-weight: 800; font-size: clamp(17px, 1.6vw, 24px); letter-spacing: 0.02em; }
.fra-intro-models { font-weight: 700; font-size: clamp(14px, 1.2vw, 18px); }
.fra-intro-facts { font-size: clamp(13px, 1.05vw, 16px); line-height: 1.55; color: var(--muted); }

.velin-contact {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 40px 64px;
  border-top: 3px solid var(--ink);
  font-family: var(--sans);
  color: var(--ink);
}
.velin-contact.in-page { max-width: none; margin-top: 48px; padding: 36px 0 0; }
.velin-contact h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.2;
  text-transform: uppercase;
  margin: 6px 0 10px;
}
.velin-contact-lede { color: var(--muted); margin: 0 0 18px; font-size: 16px; line-height: 1.6; max-width: 38em; }
.velin-contact-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px 48px; }
.velin-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 17px; }
.velin-contact-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.velin-contact-label {
  min-width: 92px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
}
.velin-contact-list a { color: var(--ink); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
.velin-contact-list a:hover { background: var(--yellow); }
.velin-contact-qr { margin: 0; width: 140px; text-align: center; }
.velin-contact-qr img { width: 140px; height: auto; border: 2px solid var(--ink); border-radius: 10px; background: #fff; }
.velin-contact-qr figcaption { margin-top: 6px; font-size: 13px; font-weight: 700; }
@media (max-width: 640px) {
  .velin-contact { padding: 40px 20px 56px; }
  .velin-contact.in-page { padding: 32px 0 0; }
}


/* ==========================================================================
   2026-09-29 (h) 联系区块换成站点语言：荧光黄绿圆角粗描边按钮 + 展示字体标题 + 描边卡片
   覆盖上面 .velin-contact* 旧规则（写在后面）；首页移除产品说明卡片。
   回滚：/opt/velin/tmp/bak-20260929-h/README.txt
   ========================================================================== */
.velin-contact {
  position: relative;
  max-width: 1080px;
  margin: 56px auto 72px;
  padding: 36px 40px 40px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 6px 7px 0 rgba(29,29,27,.12);
}
.velin-contact.in-page { max-width: none; margin: 56px 0 24px; padding: 32px 36px 36px; }
.velin-contact h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
/* 手绘感的小下划波浪线 */
.velin-contact h2::after {
  content: "";
  display: block;
  width: 96px;
  height: 10px;
  margin-top: 10px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 10'><path d='M2 6 C12 -1 20 -1 30 5 S48 11 58 5 S78 -1 94 5' fill='none' stroke='%231d1d1b' stroke-width='3' stroke-linecap='round'/></svg>") no-repeat left center / contain;
}
.velin-contact-lede { margin: 16px 0 24px; max-width: 36em; font-size: 16px; line-height: 1.6; color: var(--muted); }
.velin-contact-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 44px; }
.velin-contact-btns { display: flex; flex-direction: column; gap: 14px; flex: 1 1 320px; min-width: 0; max-width: 460px; }
.velin-cbtn {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 20px;
  background: var(--yellow);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 4px 0 rgba(29,29,27,.14);
  text-decoration: none;
  min-width: 0;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
a.velin-cbtn:hover { transform: translate(-1px, -2px); box-shadow: 5px 6px 0 rgba(29,29,27,.18); background: var(--yellow-2); }
a.velin-cbtn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.velin-cbtn.is-static { cursor: default; }
.velin-cbtn-k {
  flex: none;
  min-width: 76px;
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.1;
  text-transform: uppercase;
}
.velin-cbtn-v {
  min-width: 0;
  font-weight: 800;
  font-size: 17px;
  overflow-wrap: anywhere;
}
.velin-contact-qr { margin: 0; text-align: center; flex: none; }
.velin-qr-frame {
  display: inline-block;
  padding: 10px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 5px 0 var(--yellow);
}
.velin-qr-frame img { width: 150px; height: auto; border: 0; border-radius: 8px; background: #fff; }
.velin-contact-qr figcaption {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
@media (max-width: 640px) {
  .velin-contact { margin: 40px 16px 48px; padding: 26px 20px 30px; border-radius: 18px; }
  .velin-contact.in-page { margin: 40px 0 16px; padding: 26px 18px 28px; }
  .velin-contact-grid { flex-direction: column; align-items: stretch; gap: 24px; }
  .velin-contact-btns { flex: none; max-width: none; width: 100%; }
  .velin-cbtn { flex-wrap: wrap; gap: 4px 12px; padding: 12px 16px; }
  .velin-contact-qr { align-self: center; }
}

/* 矮屏保护（首页 hero）：内容比视口高时让 hero 长高，标题不再被顶部导航压住；字号只在矮屏上封顶 */
.fra-hero { height: auto; min-height: max(100vh, 640px); }
.fra-hero-copy { height: auto; min-height: max(100vh, 640px); }
@media (max-height: 760px) and (min-width: 641px) {
  .fra-hero-copy h1 { font-size: min(15.5vw, calc((100vh - 300px) / 1.94)); }
}

/* ==========================================================================
   2026-09-29 (i) 联系区块再收紧：更小的外边距/内边距/间距，二维码 ~160px，按钮略矮，卡片上下留白减少。
   覆盖上面 (h) 块（写在后面）。回滚：/opt/velin/tmp/bak-20260929-i/README.txt
   ========================================================================== */
.velin-contact { margin: 28px auto 32px; padding: 22px 28px 24px; }
.velin-contact.in-page { margin: 28px 0 0; padding: 22px 28px 24px; }
.velin-contact h2 { font-size: clamp(30px, 4.2vw, 44px); margin: 0 0 4px; }
.velin-contact h2::after { height: 8px; margin-top: 6px; width: 84px; }
.velin-contact-lede { margin: 10px 0 16px; line-height: 1.5; }
.velin-contact-grid { gap: 16px 36px; }
.velin-contact-btns { gap: 10px; }
.velin-cbtn { padding: 8px 18px; border-radius: 12px; }
.velin-cbtn-k { font-size: 20px; min-width: 72px; }
.velin-cbtn-v { font-size: 16px; }
.velin-contact-qr { width: auto; }
.velin-qr-frame { padding: 7px; border-radius: 14px; box-shadow: 3px 4px 0 var(--yellow); line-height: 0; }
.velin-qr-frame img { width: 160px; max-width: none; border-radius: 7px; }
.velin-contact-qr figcaption { margin-top: 8px; }
/* 页面底部留白（联系区块是这两页的最后一个元素） */
.page.docs.pad-top, .page.ai-connect-page.pad-top { padding-bottom: 24px; }
@media (max-width: 640px) {
  .velin-contact { margin: 20px 14px 24px; padding: 16px 14px 18px; border-radius: 16px; }
  .velin-contact.in-page { margin: 20px 0 0; padding: 16px 14px 18px; }
  .velin-contact h2 { font-size: clamp(28px, 8vw, 34px); }
  .velin-contact-lede { margin: 8px 0 12px; font-size: 15px; }
  .velin-contact-grid { gap: 14px; }
  .velin-contact-btns { gap: 8px; }
  .velin-cbtn { gap: 2px 10px; padding: 7px 14px; }
  .velin-cbtn-k { font-size: 18px; min-width: 64px; }
  .velin-cbtn-v { font-size: 15px; }
  .page.docs.pad-top, .page.ai-connect-page.pad-top { padding-bottom: 16px; }
}

/* ==========================================================================
   2026-09-29 (j) 联系卡片第三轮：裁切后的二维码图 + 紧凑内部布局（按钮列与二维码并排、同高，卡片贴合内容）。
   覆盖 (h)/(i) 块（写在后面）。回滚：/opt/velin/tmp/bak-20260929-j/README.txt
   ========================================================================== */
.velin-contact,
.velin-contact.in-page {
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 22px 24px 24px;
}
.velin-contact-lede { max-width: 34em; }
/* figure 用 display:contents，让边框和说明文字直接参与网格：左列按钮，右列二维码框（同一行、同高） */
.velin-contact-grid {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  align-items: stretch;
  gap: 8px 28px;
}
.velin-contact-btns { grid-column: 1; grid-row: 1; flex: none; max-width: none; width: auto; display: flex; flex-direction: column; gap: 10px; }
.velin-contact-btns > .velin-cbtn { flex: 1 1 0; align-items: center; }
.velin-contact-qr { display: contents; }
.velin-qr-frame { grid-column: 2; grid-row: 1; justify-self: start; padding: 6px; }
.velin-qr-frame img { width: 164px; height: auto; display: block; }
.velin-contact-qr figcaption { grid-column: 2; grid-row: 2; justify-self: center; margin: 0; }
@media (max-width: 640px) {
  .velin-contact,
  .velin-contact.in-page { width: auto; margin-left: 14px; margin-right: 14px; padding: 16px 14px 16px; }
  .velin-contact.in-page { margin-left: 0; margin-right: 0; }
  .velin-contact-grid { grid-template-columns: 100%; gap: 12px; justify-content: stretch; }
  .velin-contact-btns { grid-column: 1; grid-row: 1; width: 100%; }
  .velin-contact-btns > .velin-cbtn { flex: none; }
  .velin-qr-frame { grid-column: 1; grid-row: 2; justify-self: center; }
  .velin-contact-qr figcaption { grid-column: 1; grid-row: 3; }
}

/* ==========================================================================
   2026-09-29 (k) 联系区块背景涂鸦：全宽舞台 + 卡片后面的手绘涂鸦（与首页 hero 同风格：黑线稿 + 荧光黄绿点缀）
   涂鸦是一个 aria-hidden 的 span 背景图（SVG，pointer-events:none），卡片 z-index 更高。
   回滚：/opt/velin/tmp/bak-20260929-k/README.txt
   ========================================================================== */
body:has(.velin-contact-stage) { overflow-x: clip; }
.velin-contact-stage {
  position: relative;
  width: 100vw;
  margin: 8px 0 0 calc(50% - 50vw);
  min-height: 580px;
  padding: 50px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.velin-doodles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("/assets/contact-doodles-d.svg") center center / 1280px 580px no-repeat;
}
.velin-contact-stage > .velin-contact,
.velin-contact-stage > .velin-contact.in-page {
  position: relative;
  z-index: 1;
  margin-top: 0;
  margin-bottom: 0;
  margin-left: 0;
  margin-right: 0;
  flex: none;
}
@media (max-width: 640px) {
  .velin-contact-stage { min-height: 0; padding: 62px 0; margin-top: 0; }
  .velin-doodles {
    background:
      url("/assets/contact-doodles-m-top.svg") center top / 390px 80px no-repeat,
      url("/assets/contact-doodles-m-bot.svg") center bottom / 390px 80px no-repeat;
  }
  .velin-contact-stage > .velin-contact,
  .velin-contact-stage > .velin-contact.in-page { width: calc(100% - 28px); max-width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .velin-doodles { animation: velinDoodleIn .6s ease-out both; }
}
@keyframes velinDoodleIn { from { opacity: 0; } to { opacity: 1; } }

/* 2026-09-29 listed-on footer strip */
.velin-listed { max-width: 1180px; margin: 0 auto; padding: 14px 40px 28px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; font-family: var(--sans); font-size: 13px; color: var(--muted); }
.velin-listed a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.velin-listed a:hover { color: var(--ink); }
@media (max-width: 640px) { .velin-listed { padding: 12px 20px 24px; } }
.velin-listed .listed-badge img { display: block; height: 27px; width: auto; max-width: 100%; }
