:root {
  --deep: #07080d;
  --bg: #0b0d14;
  --card: #11141c;
  --raised: #1a1e28;
  --tile: #151a24;
  --line: rgba(238, 240, 245, 0.08);
  --line-2: rgba(238, 240, 245, 0.14);
  --t1: #eef0f5;
  --t2: #a3a9b8;
  --t3: #7a8296;
  --accent: #ffcd1a;
  --on-accent: #0b0d14;
  --pos: #4cc38a;
  --neg: #e5484d;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, 'PingFang SC', monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--t1); font: 400 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
i, em { font-style: normal; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ic { flex-shrink: 0; }
.nb { display: inline-block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 719px) { .wrap { padding: 0 16px; } }

/* 顶栏 */
.top { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color 160ms var(--ease); }
.top.solid { border-bottom-color: var(--line); }
.top-in { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; }
.logo { display: block; border-radius: 6px; }
.top-nav { margin-left: auto; display: flex; gap: 24px; font-size: 14px; color: var(--t2); }
.top-nav a { transition: color 160ms var(--ease); }
.top-nav a:hover { color: var(--t1); }
@media (max-width: 719px) {
  .top-in { padding: 0 16px; height: 56px; }
  .top-nav .desk { display: none; }
}

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 8px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); color: var(--t1); font-size: 15px; font-weight: 500; white-space: nowrap; transition: background-color 160ms var(--ease), transform 160ms var(--ease); }
.btn:hover { background: #222736; }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn.primary:hover { background: #ffd84d; }
.btn.small { height: 28px; padding: 0 12px; gap: 4px; border-radius: 6px; font-size: 13px; }

/* 翻牌字 */
.flap { display: inline-flex; gap: 2px; font: 500 16px/28px var(--mono); color: var(--accent); }
.flap i { position: relative; display: inline-block; min-width: 20px; height: 28px; padding: 0 2px; border-radius: 4px; background: var(--tile); text-align: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.flap i::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, 0.6); }
.flap i.tick { animation: flip 80ms var(--ease); }
@keyframes flip { from { transform: perspective(80px) rotateX(-60deg); } to { transform: none; } }

/* 首屏 */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; padding-top: 96px; padding-bottom: 96px; }
.hero h1 { font-size: 56px; line-height: 1.08; font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; }
.lead { margin-top: 20px; max-width: 36rem; font-size: 18px; line-height: 28px; color: var(--t2); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (max-width: 959px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 48px; padding-bottom: 64px; }
  .hero h1 { font-size: 40px; }
}
@media (max-width: 479px) { .hero h1 { font-size: 36px; } .lead { font-size: 16px; line-height: 26px; } }

/* 航班屏 */
.board { background: var(--deep); border-radius: 16px; padding: 20px; box-shadow: inset 0 0 0 1px var(--line); }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.board-head h2 { font-size: 15px; font-weight: 500; }
.board-head h2 span { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--t3); }
.board-head p { font-size: 12px; color: var(--t3); }
.board-cols, .board-row { display: grid; grid-template-columns: 116px minmax(0, 1fr) 88px 64px 56px; gap: 16px; align-items: center; }
.board-cols { padding: 0 8px 8px; font-size: 12px; color: var(--t3); border-bottom: 1px solid var(--line); }
.board-cols .r { text-align: right; }
.board-row { min-height: 52px; padding: 8px; border-radius: 8px; transition: background-color 160ms var(--ease); }
.board-row + .board-row { margin-top: 4px; }
.board-row:hover { background: rgba(238, 240, 245, 0.04); }
.b-title { font-size: 15px; }
.b-prize { text-align: right; font-size: 14px; color: var(--t2); }
.b-days { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.b-days em { font-size: 13px; color: var(--t3); }
.board-row:not(.soon) .flap.days { color: var(--t1); }
.b-state { text-align: right; font-size: 13px; color: var(--t3); white-space: nowrap; }
.soon .b-state { color: var(--accent); }
@media (max-width: 719px) {
  .board { padding: 16px 12px; }
  .board-head { flex-direction: column; gap: 4px; }
  .board-cols, .board-row { grid-template-columns: 112px minmax(0, 1fr) 64px; gap: 12px; }
  .board-cols span:nth-child(3), .board-cols span:nth-child(5), .b-prize, .b-state { display: none; }
  .board-cols, .board-row { grid-template-columns: 92px minmax(0, 1fr) 56px; }
  .board .flap { font-size: 14px; line-height: 24px; }
  .board .flap i { min-width: 16px; height: 24px; padding: 0 1px; }
  .b-title { font-size: 14px; line-height: 20px; }
  .board-row .b-title .t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* 列表 */
.list { padding-top: 32px; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.list-head h2 { font-size: 24px; line-height: 32px; font-weight: 500; }
.list-head h2 span { margin-left: 8px; font-size: 14px; font-weight: 400; color: var(--t3); }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 10px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.seg a { height: 32px; padding: 0 12px; border-radius: 6px; display: inline-flex; align-items: center; font-size: 14px; color: var(--t2); transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.seg a:hover { color: var(--t1); }
.seg a.on { background: var(--raised); color: var(--t1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }

.row { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr) 112px 104px 88px; gap: 20px; align-items: center; padding: 16px 12px; margin: 0 -12px; border-radius: 12px; transition: background-color 160ms var(--ease); }
.row + .row::before { content: ''; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: var(--line); transition: opacity 160ms var(--ease); }
.row:hover { background: var(--card); }
.row:hover::before, .row:hover + .row::before { opacity: 0; }
.thumb { width: 112px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--raised); display: flex; align-items: center; justify-content: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb b { font-size: 20px; font-weight: 500; color: var(--t3); }
.r-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.r-title { font-size: 16px; line-height: 24px; font-weight: 500; }
/* 标题文字单独截断，后面的「已参加」图标不会被挤掉 */
.r-title, .b-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.r-title .t, .b-title .t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.joined { flex-shrink: 0; display: inline-flex; color: var(--accent); }
.r-sum { font-size: 14px; line-height: 20px; color: var(--t2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.r-meta { font-size: 12px; line-height: 16px; color: var(--t3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.r-meta .ic { color: var(--t2); vertical-align: -3px; margin-left: 4px; }
.cn { margin-left: 8px; }
.cn.no { color: var(--neg); }
.cn.unknown { color: var(--t2); }
.r-num { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.r-num b { font-size: 15px; line-height: 20px; font-weight: 500; white-space: nowrap; }
/* 非现金奖励是一串字（「5,000 Zindi points」），放不下就换行，不压到左边的标题上 */
.r-prize b { white-space: normal; overflow-wrap: anywhere; }
.r-num i { font-size: 12px; line-height: 16px; color: var(--t3); }
.r-days.closing b { color: var(--accent); }
.r-days.ended b { color: var(--t3); }
.row.ended .thumb { filter: grayscale(1); opacity: 0.5; }
.row.ended .r-title, .row.ended .r-prize b { color: var(--t3); }
@media (max-width: 959px) {
  .row { grid-template-columns: 88px minmax(0, 1fr) auto; grid-template-areas: 'thumb main main' 'thumb prize days'; column-gap: 16px; row-gap: 8px; }
  .thumb { width: 88px; grid-area: thumb; align-self: start; }
  .r-main { grid-area: main; }
  .r-prize { grid-area: prize; flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 8px; }
  .r-dl { display: none; }
  .r-days { grid-area: days; }
}
/* 详情页左栏窄（右边有登机牌），推荐列表一直用两行的紧凑排法 */
.d-body .row { grid-template-columns: 88px minmax(0, 1fr) auto; grid-template-areas: 'thumb main main' 'thumb prize days'; column-gap: 16px; row-gap: 8px; }
.d-body .thumb { width: 88px; grid-area: thumb; align-self: start; }
.d-body .r-main { grid-area: main; }
.d-body .r-prize { grid-area: prize; flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 8px; }
.d-body .r-dl { display: none; }
.d-body .r-days { grid-area: days; }
.list.loading .rows { opacity: 0.5; transition: opacity 160ms var(--ease); }
.more { display: flex; width: fit-content; margin: 32px auto 0; }
.topics { display: flex; gap: 8px; padding: 16px 0 4px; overflow-x: auto; scrollbar-width: none; }
.topics::-webkit-scrollbar { display: none; }
@media (min-width: 960px) { .topics { flex-wrap: wrap; overflow: visible; } }
.topics a { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; color: var(--t2); transition: color 160ms var(--ease); }
.topics a:hover { color: var(--t1); }
.topics a b { font-weight: 400; color: var(--t3); }
.topics a.on { background: var(--raised); color: var(--t1); box-shadow: inset 0 0 0 1px var(--line-2); }
.more.loading { opacity: 0.5; pointer-events: none; }
.empty { padding: 80px 0; text-align: center; color: var(--t3); }

/* 页脚 */
.foot-site { margin-top: 96px; padding: 32px 0 48px; border-top: 1px solid var(--line); font-size: 12px; line-height: 20px; color: var(--t3); }
.foot-site p + p { margin-top: 4px; }
.foot-site a { transition: color 160ms var(--ease); }
.foot-site a:hover { color: var(--t1); }
.foot-nav { display: grid; gap: 8px; margin-bottom: 24px; }
.foot-nav p { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 !important; }
.foot-nav span { width: 28px; flex-shrink: 0; }
.foot-nav a { color: var(--t2); }

/* 落地页 */
.hero.topic { padding-top: 40px; padding-bottom: 64px; }
.hero.topic.solo { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .hero.topic h1 { font-size: 48px; } .hero.topic { padding-top: 48px; padding-bottom: 80px; } }
.list + .list { padding-top: 64px; }

/* 详情页 */
.back { display: inline-flex; align-items: center; gap: 4px; margin-top: 24px; font-size: 14px; color: var(--t2); transition: color 160ms var(--ease); }
.back:hover { color: var(--t1); }
.d-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: 'head ticket' 'body ticket'; column-gap: 48px; margin-top: 24px; }
.d-head { grid-area: head; }
.ticket { grid-area: ticket; align-self: start; position: sticky; top: 88px; }
.d-body { grid-area: body; min-width: 0; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 13px; color: var(--t3); }
.meta .ic { color: var(--t2); }
.meta a { transition: color 160ms var(--ease); }
.meta a:hover { color: var(--t1); }
.views { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.views b { font-weight: 400; }
.d-head h1 { margin-top: 12px; font-size: 40px; line-height: 1.15; font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; }
.d-sum { margin-top: 12px; font-size: 17px; line-height: 28px; color: var(--t2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tags span { height: 24px; padding: 0 8px; border-radius: 6px; display: inline-flex; align-items: center; font-size: 12px; color: var(--t2); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }

/* 登机牌 */
.ticket { background: var(--card); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.t-top { padding: 20px 20px 16px; }
.t-label { font-size: 12px; line-height: 16px; color: var(--t3); }
.t-label + .t-when { margin-top: 8px; }
.t-when + .t-label, .cal + .t-label { margin-top: 16px; }
.cal { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--t2); transition: color 160ms var(--ease); }
.cal:hover { color: var(--t1); }
.t-when { display: flex; align-items: center; gap: 12px; }
.t-when .flap { font-size: 20px; line-height: 36px; }
.t-when .flap i { min-width: 26px; height: 36px; }
.t-when > .mono { font-size: 14px; color: var(--t2); }
/* 撕口：一条虚线，两端两个半圆缺口，缺口颜色跟页面底色一致 */
.t-tear { position: relative; height: 1px; margin: 0 20px; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 12px); }
.t-tear::before, .t-tear::after { content: ''; position: absolute; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.t-tear::before { left: -28px; clip-path: inset(0 0 0 50%); }
.t-tear::after { right: -28px; clip-path: inset(0 50% 0 0); }
.t-bottom { padding: 16px 20px 20px; }
.t-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.t-facts > div:first-child { grid-column: 1 / -1; }
.t-facts dt { font-size: 12px; line-height: 16px; color: var(--t3); }
.t-facts dd { margin-top: 4px; font-size: 15px; line-height: 20px; }
.t-facts dd.big { font-size: 28px; line-height: 32px; font-weight: 500; }
.t-facts dd.sub { font-size: 13px; color: var(--t3); }
.elig { display: flex; gap: 12px; margin-top: 20px; padding: 12px; border-radius: 10px; background: var(--raised); }
.elig .ic { margin-top: 2px; }
.elig.yes .ic { color: var(--pos); }
.elig.no .ic { color: var(--neg); }
.elig.unknown .ic { color: var(--t3); }
.elig b { display: block; font-size: 14px; line-height: 22px; font-weight: 500; }
.elig p { margin-top: 4px; font-size: 13px; line-height: 20px; color: var(--t2); }
.dock { display: grid; gap: 8px; margin-top: 20px; }
.join { width: 100%; margin-top: 8px; }
.join.on { color: var(--accent); }
.d-head h1 .joined { margin-left: 12px; vertical-align: -3px; }
.d-head h1 .joined .ic { width: 32px; height: 32px; }
@media (max-width: 959px) {
  .d-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'head' 'ticket' 'body'; }
  .ticket { position: static; margin-top: 24px; }
  .d-head h1 { font-size: 28px; }
  .d-sum { font-size: 16px; line-height: 26px; }
  .dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; grid-template-columns: 1.4fr 1fr; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
  .dock .btn.primary { order: 2; }
  .join { margin-top: 16px; }
  .d-head h1 .joined .ic { width: 24px; height: 24px; }
  .page-detail .foot-site { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

.gallery { position: relative; margin-top: 32px; border-radius: 16px; overflow: hidden; background: var(--card); }
.slides { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; object-position: center top; scroll-snap-align: start; }
.gallery .count { position: absolute; right: 12px; bottom: 12px; height: 24px; padding: 0 8px; border-radius: 6px; display: flex; align-items: center; font-size: 12px; color: var(--t1); background: rgba(7, 8, 13, 0.72); }

.sec { margin-top: 48px; }
.sec h2 { font-size: 20px; line-height: 28px; font-weight: 500; }
.sec-sub { margin-top: 4px; font-size: 13px; line-height: 20px; color: var(--t3); }
.sec h2 + .content, .sec h2 + .lines, .sec-sub + .lines, .sec-sub + .prompt, .sec h2 + .rows { margin-top: 16px; }
.all-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 16px; font-size: 14px; color: var(--t2); transition: color 160ms var(--ease); }
.all-link:hover { color: var(--t1); }

.prompt { border-radius: 14px; background: var(--deep); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.prompt-top { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--t2); }
.prompt-body { position: relative; margin: 0; max-height: 320px; overflow: hidden; padding: 16px; white-space: pre-wrap; word-break: break-word; font: 13px/22px var(--mono); color: var(--t2); }
.prompt-body::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 96px; background: linear-gradient(180deg, rgba(7, 8, 13, 0) 0%, var(--deep) 100%); }
.prompt.open .prompt-body { max-height: none; }
.prompt.open .prompt-body::after { display: none; }
.prompt-more { display: block; width: 100%; height: 44px; border-top: 1px solid var(--line); font-size: 13px; color: var(--t2); transition: color 160ms var(--ease); }
.prompt-more:hover { color: var(--t1); }

.lines li { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.lines li:last-child { border-bottom: 1px solid var(--line); }
.lines li > :last-child { margin-left: auto; text-align: right; }
.lines time, .lines b { font-size: 14px; font-weight: 500; color: var(--t1); white-space: nowrap; }
.lines small { margin-left: 8px; font-size: 12px; color: var(--t3); }
.lines li.past span, .lines li.past time { color: var(--t3); }
.lines li.key time { color: var(--accent); }

.content { font-size: 15px; line-height: 26px; color: var(--t2); max-width: 70ch; }
.content h3 { margin: 24px 0 8px; font-size: 16px; line-height: 24px; font-weight: 500; color: var(--t1); }
.content h3:first-child { margin-top: 0; }
.content p { margin: 0 0 8px; }
.content ul, .content ol { margin: 0 0 8px; padding-left: 20px; list-style: disc; }
.content a { color: var(--t1); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 40; transform: translate(-50%, 8px); opacity: 0; pointer-events: none; min-width: 240px; padding: 12px 16px; border-radius: 10px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2), 0 8px 24px rgba(0, 0, 0, 0.4); display: flex; flex-direction: column; align-items: center; text-align: center; transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast b { font-size: 14px; font-weight: 500; }
.toast span { margin-top: 4px; font-size: 12px; color: var(--t2); }
.toast span:empty { display: none; }
@media (min-width: 960px) { .toast { bottom: 40px; } }

/* MCP 说明页 */
.demo-q { margin: -4px 0 20px; padding: 12px; border-radius: 8px; background: var(--card); font-size: 14px; line-height: 22px; }
.demo .board-row { grid-template-columns: 116px minmax(0, 1fr) 96px 64px 56px; }
@media (max-width: 719px) { .demo .board-row { grid-template-columns: 92px minmax(0, 1fr) 56px; } }
.step { margin-top: 64px; }
.step h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-size: 24px; line-height: 32px; font-weight: 500; }
.step h2 b { width: 28px; height: 28px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 500; background: var(--accent); color: var(--on-accent); }
.key-box { display: flex; flex-wrap: wrap; gap: 24px; padding: 24px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.qr { display: flex; flex-direction: column; align-items: center; width: 200px; }
.qr img { width: 160px; height: 160px; padding: 8px; border-radius: 12px; background: #fff; }
.qr figcaption { margin-top: 12px; font-size: 12px; line-height: 18px; color: var(--t3); text-align: center; }
.key-form { flex: 1; min-width: 260px; display: flex; flex-direction: column; justify-content: center; }
.key-form label { font-size: 13px; color: var(--t2); }
.key-row { display: flex; gap: 8px; margin-top: 8px; }
.key-row input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: 8px; border: 0; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); font-size: 18px; letter-spacing: 0.2em; color: var(--t1); outline: none; transition: box-shadow 160ms var(--ease); }
.key-row input::placeholder { letter-spacing: 0; font: 400 15px var(--sans); color: var(--t3); }
.key-row input:focus { box-shadow: inset 0 0 0 1px var(--accent); }
.key-tip { margin-top: 12px; font-size: 13px; line-height: 20px; color: var(--t3); }
:root:not(.has-key) .key-mine, .has-key .key-new { display: none !important; }
.mine { flex-direction: column; gap: 12px; }
.mine-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mine-row code { flex: 0 1 auto; min-width: 0; max-width: 100%; height: 44px; padding: 0 16px; border-radius: 8px; display: block; line-height: 44px; background: var(--deep); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; color: var(--t1); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mine-row .btn { height: 44px; }
@media (max-width: 599px) {
  .mine-row code { flex: 1 1 100%; height: auto; min-height: 44px; padding: 12px 16px; line-height: 20px; white-space: normal; overflow-wrap: anywhere; }
  .mine-row .btn { flex: 1; }
}
.mine .key-tip { margin-top: 0; }
.connect { margin: 0; padding: 16px; border-radius: 10px; background: var(--deep); box-shadow: inset 0 0 0 1px var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/24px var(--sans); color: var(--t2); }
.link { color: var(--t1); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; transition: text-decoration-color 160ms var(--ease); }
.link:hover { text-decoration-color: var(--t1); }
@media (max-width: 599px) { .qr { width: 100%; } }
.snips { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 960px) { .snips { grid-template-columns: 1fr 1fr; } }
.ways { margin-top: 16px; }
.ways summary { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--t2); cursor: pointer; list-style: none; transition: color 160ms var(--ease); }
.ways summary::-webkit-details-marker { display: none; }
.ways summary:hover { color: var(--t1); }
.ways summary .ic { transition: transform 160ms var(--ease); }
.ways[open] summary .ic { transform: rotate(90deg); }
.ways .snips { margin-top: 12px; }
.snip { border-radius: 14px; background: var(--deep); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.snip-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 48px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--t2); }
.snip-h span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.snip pre { margin: 0; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 22px; color: var(--t2); }
.snip p { padding: 0 16px 16px; font-size: 13px; line-height: 20px; color: var(--t3); }
.k { color: var(--accent); }
.tools li { flex-direction: column; align-items: flex-start; gap: 4px; }
.tools li > :last-child { margin-left: 0; text-align: left; }
.tools code { font-size: 14px; color: var(--t1); }
.tools span { font-size: 14px; line-height: 22px; color: var(--t2); }

/* 404 */
.nf { padding-top: 128px; text-align: center; }
.nf-code .flap { font-size: 28px; line-height: 48px; }
.nf-code .flap i { min-width: 36px; height: 48px; }
.nf h1 { margin-top: 24px; font-size: 28px; font-weight: 500; }
.nf p { margin-top: 8px; color: var(--t2); }
.nf .btn { margin-top: 32px; }

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