/* 参照 TapeOut 官网的朴素风格：暖白底、白色卡片、细边框、深色字；主按钮用深色底，不用渐变和阴影 */
:root {
  --bg: #faf9f7; --fg: #1c1b19; --muted: #77746d; --line: #e8e6e1; --line-strong: #d9d6cf; --card: #ffffff;
  --accent: #1c1b19; --link: #2f5bd3; --ok: #1a7f37; --bad: #c62828; --on-accent: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1a1918; --fg: #ecebe8; --muted: #9a968e; --line: #33312e; --line-strong: #44413c; --card: #232220; --accent: #ecebe8; --link: #8fb0ff; --ok: #3fb950; --bad: #f85149; --on-accent: #1a1918; }
}
* { box-sizing: border-box; }
/* .btn 之类设了 display 的元素也要能用 hidden 藏起来 */
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
a { color: var(--link); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }

.skip { position: absolute; left: -9999px; }
/* 只给屏幕阅读器和搜索引擎看的文字 */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { left: 16px; top: 16px; background: var(--bg); padding: 8px 12px; z-index: 10; }

header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--fg); text-decoration: none; }
.brand img { width: 28px; height: 28px; }
nav ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--fg); }
/* 中英切换：导航后面一个小按钮，窄屏导航藏起来时它还在 */
header.site nav { margin-left: auto; }
.lang { flex: none; font-size: 14px; color: var(--muted); text-decoration: none; padding: 3px 10px; border: 1px solid var(--line); border-radius: 6px; }
.lang:hover { color: var(--fg); border-color: var(--line-strong); }

.hero { padding: 72px 0 48px; text-align: center; }
.hero img { width: 96px; height: 96px; }
.hero h1 { font-size: 36px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; margin: 16px 0 12px; }
.hero p { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 auto 28px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 9px 18px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--card); color: var(--fg); text-decoration: none; font-weight: 500; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { opacity: .88; }
.hero .version { color: var(--muted); font-size: 14px; margin: 24px auto 0; }

section { padding: 48px 0; border-top: 1px solid var(--line); }
section h2 { font-size: 24px; font-weight: 600; margin: 0 0 8px; }
section > .wrap > p.lead { color: var(--muted); margin: 0 0 28px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.card h3 { font-size: 17px; margin: 0 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.note { margin-top: 20px; padding: 14px 18px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; color: var(--muted); font-size: 15px; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
.downloads td:last-child { white-space: nowrap; }
.hint { color: var(--muted); font-size: 14px; }
.hint ul { margin: 8px 0 0; padding-left: 20px; }



/* 分享链接落地页 open/ */
.open-page { padding: 72px 0 80px; }
.open-page h1 { font-size: 36px; line-height: 1.2; margin: 4px 0 10px; font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; }
.open-page { padding: 56px 0 72px; }
.open-page .wrap > div { max-width: 600px; margin: 0 auto; padding: 32px 36px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.open-page h1 { font-size: 28px; font-weight: 600; margin: 4px 0 8px; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: -.01em; word-break: break-all; }
.open-page .eyebrow { color: var(--muted); font-size: 14px; margin: 0; }
.open-page .chain { margin: 0; }
.open-page .status { font-size: 16px; margin: 20px 0; }
.open-page .addr { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); word-break: break-all; }
.cta.left { justify-content: flex-start; }
.chain-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--fg); }
.chain-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.chain-pill.bnb::before { background: #f0b90b; }
.chain-pill.xlayer::before { background: #1c1b19; }
.chain-pill.base::before { background: #0052ff; }
@media (prefers-color-scheme: dark) { .chain-pill.xlayer::before { background: #ecebe8; } }
/* 身份卡落地页 open/?xlayer23331：和 TapeDeck 个人中心里的身份卡一个样子，X Layer 黑卡、BNB Chain 金卡 */
.open-page .idcard { min-width: 0; margin: 16px 0 4px; position: relative; overflow: hidden; padding: 22px 24px 18px; border-radius: 16px; color: #f4f4f5; display: grid; gap: 14px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255,255,255,.14), transparent 55%), linear-gradient(135deg, #18181b, #27272a 60%, #3f3f46);
  box-shadow: 0 1px 2px rgba(0,0,0,.15), 0 10px 28px rgba(0,0,0,.13); }
.open-page .idcard.net-bnb { color: #1c1917; background: radial-gradient(120% 140% at 100% 0%, rgba(255,255,255,.45), transparent 55%), linear-gradient(135deg, #f0b90b, #f8d12f 60%, #fde68a); }
/* 背景里一圈淡淡的走线，像电路板 */
.open-page .idcard::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: linear-gradient(currentColor 1px, transparent 1px), linear-gradient(90deg, currentColor 1px, transparent 1px); background-size: 18px 18px;
  mask-image: linear-gradient(110deg, transparent 45%, #000); }
.open-page .idcard > * { position: relative; z-index: 1; }
.open-page .ic-head { display: flex; justify-content: space-between; align-items: center; }
.open-page .ic-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.open-page .ic-chip { flex: none; width: 26px; height: 19px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
  background-image: linear-gradient(90deg, transparent 32%, rgba(0,0,0,.25) 32% 36%, transparent 36% 64%, rgba(0,0,0,.25) 64% 68%, transparent 68%), linear-gradient(transparent 46%, rgba(0,0,0,.25) 46% 54%, transparent 54%), linear-gradient(135deg, #e8d18a, #b8923a); }
.open-page .ic-net { padding: 1px 10px; border: 1px solid color-mix(in srgb, currentColor 45%, transparent); border-radius: 999px; font-size: 12px; opacity: .85; }
/* 主体：左边 ID 和字段，右边二维码，上沿对齐 */
.open-page .ic-body { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.open-page .ic-info { flex: 1; min-width: 0; display: grid; gap: 14px; }
.open-page .ic-id { margin: 0; font: 700 30px/1.15 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: .01em; font-variant-numeric: tabular-nums; color: inherit; overflow-wrap: anywhere; }
.open-page .ic-fields { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.open-page .ic-f { display: grid; gap: 2px; min-width: 0; }
.open-page .ic-lb { font-size: 12px; letter-spacing: .04em; opacity: .6; }
.open-page .ic-v { min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.open-page .idcard .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
/* 二维码放白底，深色卡上也能扫 */
.open-page .ic-qr { flex: none; width: 112px; height: 112px; padding: 4px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
/* 身份卡头像：头像和身份 ID 同一行，头像在左；没有头像时元素是 hidden，不占位 */
.open-page .ic-idline { display: flex; align-items: center; gap: 14px; min-width: 0; }
.open-page .ic-avatar { flex: none; width: 60px; height: 60px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.12); background: rgba(127,127,127,.12); }
.open-page .ic-addr { padding-top: 14px; border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent); }
.open-page .ic-warn { margin-top: 6px; font-size: 12px; font-weight: 600; color: #fbbf24; }
.open-page .ic-warn:empty { display: none; }
.open-page .idcard.net-bnb .ic-warn { color: #7c2d12; }
.open-page .ic-line { display: flex; align-items: center; gap: 12px; min-width: 0; }
.open-page .ic-line .mono { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.open-page .idcard .ic-copy { flex: none; padding: 1px 12px; border: 1px solid color-mix(in srgb, currentColor 45%, transparent); border-radius: 999px; background: transparent; color: inherit; font-size: 12px; cursor: pointer; }
.open-page .idcard .ic-copy:hover { border-color: currentColor; }
.open-page .status.ok { color: var(--ok); }
.open-page .status.bad { color: var(--bad); }
@media (max-width: 520px) {
  .open-page .wrap > div { padding: 24px 18px; }
  .open-page .ic-body { flex-direction: column-reverse; }
  .open-page .ic-id { font-size: 26px; }
}

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 860px) {
  .wrap { padding: 0 20px; }
}
@media (max-width: 640px) {
  nav { display: none; }
  .hero h1 { font-size: 30px; }
  .downloads td:last-child { white-space: normal; }
}

/* 功能按左侧菜单分组 */
h3.group { font-size: 15px; font-weight: 600; color: var(--muted); margin: 32px 0 12px; }
h3.group:first-of-type { margin-top: 8px; }

/* 操作手册 manual/：左边目录，右边正文 */
.manual { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-top: 40px; padding-bottom: 64px; }
.manual .toc { position: sticky; top: 24px; align-self: start; font-size: 14px; }
.manual .toc p { font-weight: 600; margin: 0 0 8px; }
.manual .toc ol { list-style: none; margin: 0; padding: 0; }
.manual .toc li { margin: 4px 0; }
.manual .toc a { color: var(--muted); text-decoration: none; }
.manual .toc a:hover { color: var(--fg); }
.manual article { max-width: 760px; }
.manual h1 { font-size: 32px; font-weight: 600; line-height: 1.2; margin: 0 0 8px; }
.manual article > p.lead { color: var(--muted); margin: 0 0 8px; }
.manual article section { padding: 32px 0 0; border-top: 0; scroll-margin-top: 16px; }
.manual article h2 { font-size: 22px; margin: 0 0 10px; }
.manual article h3 { font-size: 17px; margin: 22px 0 6px; }
.manual article ul, .manual article ol { padding-left: 22px; }
.manual article li { margin: 4px 0; }
.manual table { margin: 12px 0; }
kbd { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85em; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--card); }
@media (max-width: 860px) {
  .manual { grid-template-columns: 1fr; gap: 16px; }
  .manual .toc { position: static; display: block; }
}

/* 产品截图：整个窗口带标题栏，圆角细边框 */
.shot { margin: 24px 0 8px; }
.shot img, .shot video {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 10px;
}
.shot video { background: #fff; aspect-ratio: 16 / 9; }
/* 介绍区放视频时：标题贴近顶部，视频紧跟标题 */
.hero.with-video { padding-top: 28px; }
.hero .shot.top { margin: 0 auto 32px; }
/* 视频封面中间的播放按钮：黑色圆底白三角，放在文字下方的空白处 */
.shot.video { position: relative; }
.shot .play {
  /* 按钮跟着视频宽度缩放，窄屏上不压住文字；三角用 em 跟着按钮大小走 */
  --d: clamp(48px, 9vw, 88px);
  position: absolute; left: 50%; top: 77%; width: var(--d); height: var(--d);
  margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2); font-size: var(--d);
  border: 0; border-radius: 50%; background: rgba(28, 27, 25, .88); cursor: pointer;
  transition: transform .15s, background .15s;
}
.shot .play::before {
  content: ""; position: absolute; left: .4em; top: .3em;
  border-style: solid; border-width: .2em 0 .2em .34em; border-color: transparent transparent transparent #fff;
}
.shot .play:hover { transform: scale(1.06); background: #1c1b19; }
.shot .play:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
.shot .play[hidden] { display: none; }
.shot figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
.hero .shot { max-width: 960px; margin: 40px auto 0; }
/* 两张并排，窄屏叠起来 */
.shots-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .shots-2 { grid-template-columns: 1fr; } }
