/* GGBot 官网。颜色、纸票、收据、眼睛照 design/v5 的深色那一套：黑、纸、两只黄眼睛，黄只给眼睛。
   数值都在 4 的格子上。方法照 unslop（Damir Sokolovsky，@heydamir，CC BY 4.0）。 */

:root {
  color-scheme: dark;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* 夜里的后屋：一条略暖的黑灰 */
  --bg: #0B0B0A;
  --card: #141413;
  --raised: #1D1C1A;
  --line: rgba(239, 237, 231, .08);
  --line-2: rgba(239, 237, 231, .14);
  --ink: #EFEDE7;
  --ink-2: #A8A59D;
  --ink-3: #8A877F;

  /* 台灯下的纸：票、收据、主按钮 */
  --paper: #E4D9C4;
  --paper-ink: #2A2016;
  --paper-ink-2: #6E5C46;
  --paper-line: rgba(42, 32, 22, .2);
  --paper-shadow: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)) drop-shadow(0 20px 40px rgba(0, 0, 0, .55));

  --eye: #F2C14E;
  --stamp-ok: #2B7A4E;
  --stamp-no: #B4302A;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.6; overflow-x: hidden; }
p, h1, h2 { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1168px; margin: 0 auto; padding: 0 24px; }

svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
svg.i .fill { fill: currentColor; stroke: none; }

/* ---------------------------------------------------------------- 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px;
  border-radius: 12px; font-size: 16px; font-weight: 500; white-space: nowrap;
  transition: background-color 140ms var(--ease), transform 120ms var(--ease); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--paper); color: var(--paper-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.primary:hover { background: #EEE4D1; }
.btn.quiet { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.quiet:hover { background: #262522; }
.btn.sm { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 14px; }
.btn svg.i { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- 招牌：两只黄眼睛 */
.eyes { --w: 8px; display: inline-flex; align-items: center; gap: calc(var(--w) * .7); }
.eyes i { position: relative; display: block; width: var(--w); height: calc(var(--w) * 1.375); transition: transform 360ms var(--ease); }
.eyes b { position: absolute; inset: 0; transform-origin: 50% 55%; }
.eyes s { position: absolute; inset: 0; border-radius: 50%; background: var(--eye); }
.eyes.blink b { animation: blink 160ms var(--ease); }
@keyframes blink { 50% { transform: scaleY(.08); } }
.eyes.big { --w: 24px; }

.cap { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 16px 0 14px; border-radius: 18px;
  background: #000; color: var(--ink); font-size: 14px; font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color 140ms var(--ease); }
.cap:hover { background: #111110; }
.cap .sep { color: var(--ink-3); margin: 0 -4px; }

/* ---------------------------------------------------------------- 顶栏 */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(11, 11, 10, .82); -webkit-backdrop-filter: saturate(1.2) blur(12px);
  backdrop-filter: saturate(1.2) blur(12px); border-bottom: 1px solid transparent; transition: border-color 200ms var(--ease); }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; gap: 32px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.logo img { border-radius: 7px; }
.links { display: flex; gap: 28px; margin-left: auto; font-size: 14px; color: var(--ink-2); }
.links a { transition: color 140ms var(--ease); }
.links a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- 首屏 */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 80px; }
.hero h1 { margin-top: 28px; font-size: 76px; line-height: 1.06; font-weight: 600; letter-spacing: -.03em; }
.lede { max-width: 34em; margin-top: 24px; font-size: 19px; line-height: 32px; color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }
.shot { width: 100%; max-width: 1176px; margin: 56px auto 0; }
.shot .phone { display: none; }
.hero > * { animation: rise 500ms var(--ease) both; }
.hero > :nth-child(2) { animation-delay: 50ms; }
.hero > :nth-child(3) { animation-delay: 100ms; }
.hero > :nth-child(4) { animation-delay: 150ms; }
.hero > :nth-child(5) { animation-delay: 200ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------------------------------------------------------------- 段落 */
.sec { padding-top: 128px; }
.sec-head { max-width: 640px; }
h2 { font-size: 44px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
.sec-head p, .copy > p { margin-top: 16px; font-size: 17px; line-height: 28px; color: var(--ink-2); }

.checks { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 24px; font-size: 15px; color: var(--ink-2); }
.checks li { display: flex; align-items: center; gap: 8px; }
.checks svg.i { color: var(--ink-3); }
.checks.col { flex-direction: column; margin-top: 28px; }

/* 能接的几家：一张格子，像一排键帽 */
.agents { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 40px; border-radius: 16px; overflow: hidden;
  background: var(--line); gap: 1px; box-shadow: inset 0 0 0 1px var(--line); }
.agents li { display: flex; flex-direction: column; gap: 4px; padding: 20px; background: var(--card); }
.agents b { font-size: 15px; font-weight: 500; }
.agents span { font: 12px/16px var(--mono); color: var(--ink-3); }
.agents .lead { background: var(--raised); }
.agents .lead span { font-family: var(--font); color: var(--ink-2); }

/* 左右两半：一边是纸，一边是字 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split .copy { max-width: 480px; }
.split.flip .copy { justify-self: end; }
.desk-pad { display: grid; place-items: center; gap: 20px; padding: 64px 40px; border-radius: 20px; background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line); }

/* ---------------------------------------------------------------- 纸票 */
.tk-wrap { position: relative; width: 100%; max-width: 380px; filter: var(--paper-shadow); touch-action: pan-y; user-select: none;
  -webkit-user-select: none; cursor: grab; }
.tk-wrap.dragging { cursor: grabbing; }
.tk-wrap.settle { transition: transform 400ms var(--ease); }
.tk { --cut: 64px; position: relative; padding: 16px 20px 0; border-radius: 18px; background: var(--paper); color: var(--paper-ink);
  text-align: left;
  -webkit-mask: radial-gradient(circle at 0 calc(100% - var(--cut)), #0000 8px, #000 8.5px), radial-gradient(circle at 100% calc(100% - var(--cut)), #0000 8px, #000 8.5px);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(circle at 0 calc(100% - var(--cut)), #0000 8px, #000 8.5px), radial-gradient(circle at 100% calc(100% - var(--cut)), #0000 8px, #000 8.5px);
  mask-composite: intersect; }
.tk-head { display: flex; gap: 8px; font-size: 12px; line-height: 16px; color: var(--paper-ink-2); }
.tk-head .no { font-family: var(--mono); }
.tk-head time { margin-left: auto; }
.tk-title { margin-top: 8px; font-size: 18px; line-height: 26px; font-weight: 500; }
.tk-note { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--paper-ink-2); }
.tk-code { margin-top: 12px; padding: 8px 12px; border-radius: 6px; background: rgba(42, 32, 22, .08); font: 12px/18px var(--mono);
  white-space: pre; overflow: hidden; -webkit-mask: linear-gradient(90deg, #000 80%, #0000); mask: linear-gradient(90deg, #000 80%, #0000); }
.tk-perf { position: absolute; left: 20px; right: 20px; bottom: var(--cut); border-top: 1.5px dashed var(--paper-line); }
.tk-stub { display: flex; gap: 8px; align-items: center; height: var(--cut); margin-top: 16px; }
.tk-stub button { flex: 1; height: 40px; border-radius: 8px; font-size: 15px; font-weight: 500;
  transition: background-color 140ms var(--ease), transform 120ms var(--ease); }
.tk-stub button:active { transform: scale(.97); }
.tk-stub .no { background: rgba(42, 32, 22, .1); }
.tk-stub .no:hover { background: rgba(42, 32, 22, .16); }
.tk-stub .yes { flex: 1.4; background: var(--paper-ink); color: var(--paper); }
.stamp { position: absolute; top: 40px; padding: 0 12px; border: 3px solid currentColor; border-radius: 8px; pointer-events: none;
  font-size: 24px; line-height: 36px; font-weight: 600; letter-spacing: .16em; opacity: 0; mix-blend-mode: multiply; }
.stamp.yes { left: 20px; color: var(--stamp-ok); transform: rotate(-12deg); }
.stamp.no { right: 20px; color: var(--stamp-no); transform: rotate(10deg); }
.stamp.thunk { animation: thunk 300ms var(--ease) forwards; }
@keyframes thunk { 0% { scale: 1.5; opacity: .2; } 60% { scale: .96; opacity: 1; } 100% { scale: 1; opacity: 1; } }
.tk-wrap.done .tk-stub button { pointer-events: none; opacity: .4; }
.tk-after { min-height: 20px; font-size: 13px; line-height: 20px; color: var(--ink-3); }
.tk-after button { margin-left: 8px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }

/* ---------------------------------------------------------------- 收据 */
.receipt { position: relative; width: 100%; max-width: 360px; padding: 24px 24px 20px; margin-bottom: 12px; border-radius: 6px 6px 0 0;
  background: var(--paper); color: var(--paper-ink); filter: var(--paper-shadow); }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px;
  background: linear-gradient(135deg, var(--paper) 50%, #0000 50%) 0 0 / 14px 10px repeat-x,
              linear-gradient(-135deg, var(--paper) 50%, #0000 50%) 0 0 / 14px 10px repeat-x; }
.r-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--paper-ink-2); }
.r-rows { display: grid; gap: 6px; margin-top: 16px; padding-top: 16px; border-top: 1.5px dashed var(--paper-line); }
.r-rows div, .r-foot { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; line-height: 20px; }
.r-rows div span:last-child { color: var(--paper-ink-2); }
.r-foot { margin-top: 16px; padding-top: 12px; border-top: 1.5px solid var(--paper-ink); font-weight: 500; }

/* ---------------------------------------------------------------- 不只是聊天 */
.phone-pad { display: grid; place-items: center; padding: 40px 0; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.phone-pad img { width: 300px; }
.feats { display: grid; gap: 28px; margin-top: 32px; }
.feats li { display: flex; gap: 16px; }
.feats svg.i { margin-top: 3px; color: var(--ink-3); }
.feats b { font-size: 17px; font-weight: 500; }
.feats p { margin-top: 4px; font-size: 15px; line-height: 24px; color: var(--ink-2); }

/* ---------------------------------------------------------------- 下载 */
.dl { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; margin-top: 40px; }
.dl-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px; border-radius: 16px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.dl-card.main { background: var(--raised); }
.dl-top { display: flex; align-items: baseline; justify-content: space-between; width: 100%; }
.dl-top b { font-size: 20px; font-weight: 600; }
.dl-top .mono { font-size: 13px; color: var(--ink-3); }
.dl-card p { font-size: 15px; line-height: 24px; color: var(--ink-2); }
.dl-card .btn { margin-top: 4px; height: 40px; padding: 0 16px; border-radius: 10px; font-size: 15px; }
.dl-card .fine { font-size: 13px; line-height: 20px; color: var(--ink-3); }

/* ---------------------------------------------------------------- 结尾 */
.end { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 160px; padding-bottom: 160px; }
.end h2 { margin-top: 32px; font-size: 56px; line-height: 1.1; letter-spacing: -.03em; }
.end .actions { margin-top: 32px; }

.foot { border-top: 1px solid var(--line); }
.foot-in { display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; padding-top: 32px; padding-bottom: 40px; font-size: 13px; color: var(--ink-3); }
.foot-brand { display: flex; align-items: center; gap: 16px; }
.foot-brand .logo { font-size: 15px; color: var(--ink); }
.foot-brand .logo img { border-radius: 6px; }
.foot-links { display: flex; gap: 24px; align-items: center; }
.foot-legal { grid-column: 1 / -1; display: flex; gap: 16px; }
.foot a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- 窄屏 */
@media (max-width: 960px) {
  .agents { grid-template-columns: repeat(2, 1fr); }
  .split, .split.flip { grid-template-columns: 1fr; gap: 40px; }
  .split .copy { order: -1; }
  .split.flip .copy { justify-self: start; }
  .split .copy { max-width: 560px; }
  .dl { grid-template-columns: 1fr 1fr; }
  .dl-card.main { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .links { display: none; }
  .nav-in { justify-content: space-between; height: 56px; }
  .hero { padding-top: 48px; }
  .hero h1 { margin-top: 24px; font-size: 42px; line-height: 1.12; letter-spacing: -.02em; }
  .lede { font-size: 16px; line-height: 26px; }
  .actions { margin-top: 32px; width: 100%; }
  .actions .btn { flex: 1; }
  .shot { margin-top: 40px; }
  .shot .desk { display: none; }
  .shot .phone { display: block; width: 300px; margin: 0 auto; }
  .sec { padding-top: 96px; }
  h2 { font-size: 32px; }
  .sec-head p, .copy > p { font-size: 16px; line-height: 26px; }
  .agents li { padding: 16px; }
  .checks.col { margin-top: 24px; }
  .desk-pad { padding: 40px 16px; }
  .phone-pad img { width: 240px; }
  .dl { grid-template-columns: 1fr; }
  .end { padding-top: 120px; padding-bottom: 120px; }
  .end h2 { font-size: 36px; }
  .foot-in { grid-template-columns: 1fr; }
  .foot-legal { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .stamp.thunk { opacity: 1; }
}

/* 下载：版本、大小从服务器上的 latest.json 来，没拿到之前按钮是灰的 */
.btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.btn .size { margin-left: 8px; font: 400 13px/1 var(--mono); opacity: .64; }
.fine-note { margin-top: 16px; font-size: 13px; line-height: 20px; color: var(--ink-3); }

/* 用户协议、隐私政策（legal.mjs 生成） */
.legal { max-width: 768px; padding-top: 56px; padding-bottom: 96px; }
.legal h1 { font-size: 40px; line-height: 48px; font-weight: 600; letter-spacing: -.02em; }
.legal h2 { margin-top: 40px; font-size: 20px; line-height: 28px; font-weight: 600; }
.legal p, .legal li { font-size: 16px; line-height: 28px; color: var(--ink-2); }
.legal p { margin-top: 12px; }
.legal ul { margin-top: 12px; display: grid; gap: 8px; }
.legal li { position: relative; padding-left: 20px; }
.legal li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 8px; height: 1.5px; background: var(--ink-3); }
.legal b { color: var(--ink); font-weight: 600; }
@media (max-width: 640px) { .legal { padding-top: 32px; } .legal h1 { font-size: 32px; line-height: 40px; } }
