/* ============================================================
   摸鱼塔防 · 平台站点样式 v2「管道工坊」
   默认浅色（与游戏本体一致），深色一键切换（跟随游戏 ptd_theme）
   微交互四件套：按压 scale(0.96) / CTA 流光 / 可领取脉冲呼吸 / 过渡
   多页顺滑切换：@view-transition 让同域整页跳转走默认交叉淡入淡出
   ============================================================ */
@view-transition { navigation: auto; }   /* 渐进增强：支持的浏览器(Chromium 系)整页跳转更顺滑 */
:root {
  --bg: #0b0f1a; --panel: #141b2d; --panel2: #1a2438;
  --ink: #e9eef8; --ink2: #8fa0b8; --line: #24314c;
  --pipe: #2dd4a7; --gold: #f5b301; --accent: #4c9aff; --danger: #ff6b6b; --purple: #8b5cf6;
  --good: var(--pipe); --warn: var(--gold);            /* 旧类名别名 */
  --shadow: 0 12px 32px rgba(0,0,0,.35);
  --radius: 16px; --r2: 12px;
}
:root.light {
  --bg: #f6f7f9; --panel: #ffffff; --panel2: #eef1f7;   /* --bg 与游戏 style.css 统一为 #f6f7f9，消除 iframe 边缘色差 */
  --ink: #1c2634; --ink2: #5f6f85; --line: #e3e8f0;
  --pipe: #0ca678; --gold: #e8a000; --accent: #1c7ed6; --danger: #e03131;
  --shadow: 0 10px 26px rgba(28,38,52,.10);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
button, a, input, .claim-btn { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg); color: var(--ink); min-height: 100vh;
  transition: background .25s, color .25s;
}
/* 多页顺滑兜底：不支持 @view-transition 的浏览器(FF / Safari 旧版)用整页淡入，
   消灭硬切；Chromium 走 @view-transition 交叉淡出，两者不叠加。尊重「减少动态」偏好。 */
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
@supports not (view-transition-name: none) {
  body { animation: pageIn .2s ease both; }
}
@media (prefers-reduced-motion: reduce) {
  body { animation: none !important; }
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 16px;
  padding: 0 22px; height: 60px;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.nav .logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; flex: none; }
.nav .logo span { white-space: nowrap; }
.nav .logo svg, .nav .logo img { display: block; border-radius: 6px; }
.nav .logo .sub { font-size: 10.5px; color: var(--ink2); font-weight: 600; letter-spacing: 1px; }
.nav .dot { width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, var(--pipe), var(--gold)); }
.nav .links { display: flex; gap: 4px; flex: 1 1 0%; margin-left: 12px; min-width: 0; overflow: hidden; }
.nav .links a {
  padding: 9px 16px; border-radius: 11px; font-size: 14px; font-weight: 600; color: var(--ink2);
  transition: .15s; white-space: nowrap;
}
.nav .links a:hover { background: var(--panel2); color: var(--ink); }
.nav .links a.on { color: var(--pipe); background: color-mix(in srgb, var(--pipe) 12%, transparent); }
.nav .right { display: flex; align-items: center; gap: 10px; flex: none; }
.nav .user-chip {
  display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600;
  padding: 5px 13px 5px 5px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line);
  transition: .15s;
}
.nav .user-chip:active { transform: scale(.96); }
.nav .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pipe), #1fa886); color: #04241a;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800;
}
#btn-nav-toggle { display: none; color: var(--ink); padding: 6px 10px; }
#btn-nav-toggle svg { display: block; }

/* ---------- 导航栏自动折叠（JS 溢出检测触发，非纯媒体查询） ----------
   当导航子项总宽超出容器时，JS 给 <nav> 加 .nav--collapsed：
   - 隐藏 .links 横向链接、显示 ☰ 汉堡按钮
   - sync-state 切换到短文案
   - 点击 ☰ 弹出纵向下拉菜单
   与 @media(max-width:760px) 共存：窄屏媒体查询仍生效，溢出检测作为补充 */
.nav--collapsed .links {
  display: none; position: absolute; top: 52px; left: 0; right: 0;
  flex-direction: column; background: var(--panel); border-bottom: 1px solid var(--line);
  padding: 8px; box-shadow: var(--shadow); z-index: 59;
}
.nav--collapsed .links.open { display: flex; animation: pin .18s ease; }
.nav--collapsed .links a { padding: 13px 16px; }
.nav--collapsed #btn-nav-toggle { display: block; }
.nav--collapsed #sync-state .t-long { display: none; }
.nav--collapsed #sync-state .t-short { display: inline; }
.nav--collapsed #sync-state { max-width: min(28vw, 220px); }
/* play.html 导航高 52px，折叠下拉菜单贴紧 */
.nav--collapsed .links { top: 52px; }
#btn-theme svg { display: block; width: 17px; height: 17px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 30px 22px 80px; animation: pin .25s ease; }

/* ---------- 按钮（按压 + 流光） ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r2); padding: 12px 26px; font-size: 15px; font-weight: 700; min-height: 46px;
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(76,154,255,.30); }
.btn-pipe, .btn-good {
  background: linear-gradient(135deg, #2dd4a7, #1fa886); color: #04241a;
  box-shadow: 0 8px 22px rgba(45,212,167,.30);
}
.btn-pipe::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); animation: sweep 4s ease-in-out infinite;
}
@keyframes sweep { 0%, 68% { left: -80%; } 88%, 100% { left: 130%; } }
.btn-ghost, .btn-ghost2 { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover, .btn-ghost2:hover { border-color: var(--pipe); color: var(--pipe); }
.btn-line { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.btn-line:hover { border-color: var(--pipe); color: var(--pipe); }
.btn-gold { background: linear-gradient(135deg, #f5b301, #e08e00); color: #3a2500; box-shadow: 0 8px 22px rgba(245,179,1,.25); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 8px 18px; min-height: 38px; font-size: 13px; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; margin-bottom: 14px;
  background:
    radial-gradient(120% 140% at 85% -10%, rgba(45,212,167,.16), transparent 50%),
    radial-gradient(100% 120% at 10% 110%, rgba(245,179,1,.10), transparent 50%),
    var(--panel);
  border: 1px solid var(--line); padding: 58px 48px 54px;
}
.hero .grid-bg {
  position: absolute; inset: 0; opacity: .10; pointer-events: none;
  background-image: linear-gradient(var(--ink) 1px, transparent 1px), linear-gradient(90deg, var(--ink) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(80% 90% at 70% 20%, #000, transparent);
  -webkit-mask-image: radial-gradient(80% 90% at 70% 20%, #000, transparent);
}
.hero .badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--pipe) 13%, transparent); color: var(--pipe);
  font-size: 12.5px; font-weight: 700; margin-bottom: 20px;
  border: 1px solid color-mix(in srgb, var(--pipe) 30%, transparent);
}
.hero .badge i { width: 7px; height: 7px; border-radius: 2px; background: var(--pipe); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 900; letter-spacing: 1px; line-height: 1.2; margin-bottom: 14px; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--pipe), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 15.5px; color: var(--ink2); line-height: 1.8; max-width: 580px; margin-bottom: 26px; }
.hero p.lead b { color: var(--ink); }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .cta p.note { flex-basis: 100%; margin-top: 4px; font-size: 13px; color: var(--ink2); line-height: 1.8; }
.hero .cta p.note b { color: var(--gold); }
.hero .pipes { position: absolute; right: -30px; top: 0; height: 100%; opacity: .5; pointer-events: none; }
.hero .pipes path { stroke-dasharray: 6 10; animation: flow 2.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -32; } }

/* 数据条 */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink2);
}
.chip b { color: var(--ink); }
.chip .d { width: 8px; height: 8px; border-radius: 3px; }

/* ---------- 区块标题 ---------- */
.section-title { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 800; margin: 34px 0 16px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.section-title .hint { font-size: 12px; color: var(--ink2); font-weight: 600; }

/* ---------- 卡片 ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; box-shadow: var(--shadow); transition: transform .18s, border-color .18s; overflow: hidden;
}
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--tc, var(--pipe)); opacity: .9; }
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--tc, var(--pipe)) 45%, var(--line)); }
.card h3 { font-size: 16px; margin-bottom: 9px; }
.card p { font-size: 13.5px; color: var(--ink2); line-height: 1.75; }
.card .ico {
  width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--tc, var(--pipe)) 15%, transparent);
  color: var(--tc, var(--pipe)); margin-bottom: 14px;
}

/* 三步玩法 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step .n {
  width: 32px; height: 32px; border-radius: 10px;
  background: color-mix(in srgb, var(--pipe) 15%, transparent); color: var(--pipe);
  font-weight: 900; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; font-size: 15px;
}
.step h4 { font-size: 14.5px; margin-bottom: 7px; }
.step p { font-size: 13px; color: var(--ink2); line-height: 1.7; }
.step::after {
  content: '→'; position: absolute; right: -14px; top: 50%; transform: translateY(-50%);
  color: var(--ink2); font-size: 17px; opacity: .6;
}
.step:last-child::after { display: none; }

/* 排行榜 */
.rank-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 18px; box-shadow: var(--shadow); }
.rank-list { list-style: none; }
.rank-list li { display: flex; align-items: center; gap: 14px; padding: 13px 6px; border-bottom: 1px solid var(--line); font-size: 14px; }
.rank-list li:last-child { border-bottom: none; }
.rank-list .no {
  width: 28px; height: 28px; border-radius: 9px; background: var(--panel2); flex: none;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: var(--ink2);
}
.rank-list li:nth-child(1) .no { background: linear-gradient(135deg, #f5b301, #e08e00); color: #3a2500; }
.rank-list li:nth-child(2) .no { background: #94a3b8; color: #fff; }
.rank-list li:nth-child(3) .no { background: #b08968; color: #fff; }
.rank-list .avatar-m {
  width: 30px; height: 30px; border-radius: 50%; background: var(--panel2); color: var(--pipe); flex: none;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; border: 1px solid var(--line);
}
.rank-list .wave { margin-left: auto; font-weight: 800; color: var(--purple); white-space: nowrap; }
.rank-list .name-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-state { text-align: center; padding: 34px 10px; color: var(--ink2); font-size: 13.5px; }

/* ---------- 用户中心 ---------- */
.profile-card {
  display: flex; align-items: center; gap: 20px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 16px; flex-wrap: wrap;
}
.level-ring { position: relative; width: 72px; height: 72px; flex: none; }
.level-ring svg { transform: rotate(-90deg); }
.level-ring .ring-fg { transition: stroke-dashoffset .4s; }
.level-ring .lv { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.level-ring .lv b { font-size: 14px; color: var(--pipe); }
.level-ring .lv span { font-size: 9.5px; color: var(--ink2); font-weight: 700; }
.profile-card .who { flex: 1; min-width: 150px; }
.profile-card .who .nick { font-size: 20px; font-weight: 800; }
.profile-card .who .meta { font-size: 12.5px; color: var(--ink2); margin-top: 5px; }
.bp-box { text-align: right; }
.bp-box .v { font-size: 30px; font-weight: 900; color: var(--gold); }
.bp-box .k { font-size: 12px; color: var(--ink2); }

.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 10px; text-align: center; transition: transform .15s; }
.stat:hover { transform: translateY(-3px); }
.stat .v { font-size: 24px; font-weight: 800; color: var(--pipe); font-variant-numeric: tabular-nums; }
.stat .k { font-size: 11.5px; color: var(--ink2); margin-top: 5px; font-weight: 600; }

.tbl-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 16px; box-shadow: var(--shadow); overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
.tbl-hint { display: none; text-align: center; font-size: 11.5px; color: var(--ink2); padding: 7px 0 2px; }
.tbl th { text-align: left; color: var(--ink2); font-size: 12px; padding: 11px 10px; border-bottom: 1px solid var(--line); font-weight: 700; white-space: nowrap; }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: none; }
.tag { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tag.win { background: color-mix(in srgb, var(--pipe) 14%, transparent); color: var(--pipe); }
.tag.lose { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.tag.endless_end { background: color-mix(in srgb, var(--purple) 14%, transparent); color: var(--purple); }

.sync-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px;
  background: var(--panel2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink2);
}
.sync-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--pipe); box-shadow: 0 0 8px var(--pipe); }
.sync-pill.guest i { background: var(--ink2); box-shadow: none; }

/* ---------- 任务中心 ---------- */
.checkin { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-bottom: 8px; }
.cday {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 6px;
  text-align: center; transition: .15s;
}
.cday .d { font-size: 11px; color: var(--ink2); font-weight: 700; }
.cday .gift { margin: 7px 0 2px; }
.cday .gift svg { display: block; margin: 0 auto; width: 22px; height: 22px; }
.cday .rw { color: var(--gold); font-weight: 800; }
.cday.done { opacity: .55; }
.cday.done .gift { filter: grayscale(1); }
.cday.today { border-color: var(--pipe); background: color-mix(in srgb, var(--pipe) 8%, var(--panel)); animation: breath 1.6s infinite; }
@keyframes breath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45,212,167,.28); }
  50% { box-shadow: 0 0 0 7px rgba(45,212,167,0); }
}
.task-item {
  display: flex; align-items: center; gap: 16px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; transition: border-color .2s;
}
.task-item.claimable { border-color: var(--pipe); animation: breath 1.6s infinite; }
.task-item .info { flex: 1; }
.task-item .name { font-weight: 700; font-size: 14.5px; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.task-item .name .rw {
  font-size: 11.5px; color: var(--gold); background: color-mix(in srgb, var(--gold) 13%, transparent);
  padding: 2px 9px; border-radius: 999px; font-weight: 800;
}
.task-bar { height: 7px; border-radius: 4px; background: var(--panel2); overflow: hidden; }
.task-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--pipe), var(--gold)); position: relative; transition: width .4s; }
.task-item .prog { font-size: 12px; color: var(--ink2); margin-top: 6px; font-variant-numeric: tabular-nums; }
.claim-btn {
  background: linear-gradient(135deg, #2dd4a7, #1fa886); color: #04241a; border-radius: 11px;
  padding: 9px 20px; min-height: 38px; font-weight: 800; font-size: 13.5px;
  display: inline-flex; gap: 6px; align-items: center; transition: transform .12s; white-space: nowrap;
}
.claim-btn:active { transform: scale(.94); }
.task-item .reward { font-size: 13px; font-weight: 800; color: var(--gold); white-space: nowrap; }
.task-item .done { color: var(--ink2); font-size: 12.5px; font-weight: 700; }

/* ---------- 登录页 ---------- */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: stretch; margin-top: 10px; }
.auth-brand {
  border-radius: 20px; padding: 40px 34px; position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 80% 0%, rgba(45,212,167,.18), transparent 55%), var(--panel);
  border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
.auth-brand h2 { font-size: 26px; font-weight: 900; line-height: 1.35; }
.auth-brand h2 em { font-style: normal; color: var(--pipe); }
.auth-brand .feat { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--ink2); }
.auth-brand .feat i {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  background: color-mix(in srgb, var(--pipe) 14%, transparent); color: var(--pipe);
  display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 800;
}
.auth-box {
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  padding: 32px 30px; box-shadow: var(--shadow); max-width: 460px; width: 100%;
  justify-self: center; align-self: center;
}
.auth-wrap .auth-box { max-width: none; width: auto; }
.auth-tabs {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  background: var(--panel2); border-radius: 12px; padding: 4px; margin-bottom: 18px;
}
.auth-tabs button { position: relative; z-index: 1; padding: 10px; font-size: 14.5px; font-weight: 700; color: var(--ink2); border-radius: 9px; transition: color .2s; }
.auth-tabs button.on { color: #04241a; }
.auth-tabs .slider {
  position: absolute; top: 4px; left: 4px; width: calc(50% - 4px); bottom: 4px; border-radius: 9px;
  background: linear-gradient(135deg, #2dd4a7, #1fa886);
  transition: transform .25s cubic-bezier(.5, 1.4, .6, 1);
}
.auth-tabs.reg .slider { transform: translateX(100%); }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink2); margin-bottom: 7px; }
.field input {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--ink); font-size: 15px; min-height: 48px; outline: none; transition: .18s;
}
.field input:focus {
  border-color: var(--pipe);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pipe) 18%, transparent);
  background: var(--panel);
}
.form-err { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.form-ok { color: var(--pipe); font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.auth-perk {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 18px; font-size: 13px; line-height: 1.9;
}
.auth-perk b.t { font-size: 13.5px; }
.auth-perk svg.ok { vertical-align: -2.5px; margin-right: 5px; }
.auth-perk .skip { color: var(--ink2); }
.auth-perk .skip a { color: var(--accent); }
.w100 { width: 100%; }

/* ---------- 游戏页 ---------- */
.play-frame-wrap { position: fixed; inset: 60px 0 0 0; background: var(--bg); }
.play-frame-wrap iframe { width: 100%; height: 100%; border: none; background: var(--bg); }
/* 导航右侧按钮组：登录/注册 CTA 永不压缩 */
.nav .right .btn { flex: none; white-space: nowrap; }
#sync-state {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: var(--panel2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink2);
  flex: 0 1 auto; min-width: 0; max-width: min(50vw, 600px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#sync-state a { color: var(--pipe); font-weight: 700; }
#sync-state .t-short { display: none; }
/* 长文案默认完整显示（上限 600px 足够容纳整句「游客试玩中…云同步存档」≈447px），
   仅在 ≤900px 窄屏才切短文案；中等宽度不再用 max-width 截断长文案，避免全屏/小笔记本满屏被裁。 */
@media (max-width: 900px) {
  #sync-state .t-long { display: none; }
  #sync-state .t-short { display: inline; }
  #sync-state { max-width: min(28vw, 240px); }
}
@media (max-width: 860px) {
  .nav { gap: 10px; padding: 0 14px; }
  .nav .links a { padding: 9px 11px; }
  #sync-state { max-width: 180px; font-size: 12px; }
}

/* ---------- Toast ---------- */
#toasts {
  position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 200;
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.toast {
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 700; padding: 11px 20px; border-radius: 12px;
  box-shadow: var(--shadow); animation: pin .25s;
}
.toast.good { background: var(--pipe); color: #04241a; border-color: transparent; }
.toast.danger { background: var(--danger); color: #fff; border-color: transparent; }
.toast.warn { background: var(--gold); color: #3a2500; border-color: transparent; }
@keyframes pin { from { opacity: 0; transform: translateY(8px); } }

/* ---------- 手机底部 TabBar ---------- */
.tabbar { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .cards, .steps { grid-template-columns: 1fr; }
  .step::after { display: none; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .hero { padding: 40px 24px; }
  .hero .pipes { display: none; }
  .section-title { flex-wrap: wrap; row-gap: 8px; }
}
@media (max-width: 760px) {
  /* 导航 */
  .nav { padding: 0 12px; gap: 10px; }
  .nav .right { gap: 6px; flex: none; }
  .nav .user-chip { max-width: 148px; padding-right: 10px; }
  .nav .user-chip > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav #nav-logout { padding: 7px 10px !important; white-space: nowrap; }
  /* 登录/注册按钮：永不换行、不被压缩 */
  .nav .right .btn { flex: none; white-space: nowrap; }
  .nav .right .btn-pipe { padding: 7px 12px !important; font-size: 13px; }
  .nav .links {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; background: var(--panel); border-bottom: 1px solid var(--line);
    padding: 8px; box-shadow: var(--shadow);
  }
  .nav .links a { padding: 13px 16px; }
  .nav .links.open { display: flex; animation: pin .18s ease; }
  #btn-nav-toggle { display: block; }

  /* 底部 TabBar（含 iPhone 底部安全区） */
  body.has-tabbar { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
    height: calc(62px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 10.5px; font-weight: 700; color: var(--ink2); transition: .15s;
  }
  .tabbar a svg { width: 21px; height: 21px; }
  .tabbar a.on { color: var(--pipe); }

  /* 页面容器与 Hero */
  .wrap { padding: 20px 15px 40px; }
  .hero { padding: 32px 20px; }
  .hero h1 { font-size: 28px; }
  .hero .cta { gap: 10px; }
  .hero .cta .btn { flex: 1 1 100%; }        /* 双 CTA 全宽，拇指友好 */
  .hero p.lead { font-size: 14px; }

  /* 统计与个人卡 */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .profile-card { gap: 14px; padding: 18px; }
  .profile-card .btn { flex: 1 1 100%; }
  .bp-box { text-align: left; }
  .bp-box .v { font-size: 26px; }

  /* 战绩表：横向滑动 + 提示 */
  .tbl-card { padding: 4px 12px; }
  .tbl-hint { display: block; }

  /* 任务中心 */
  .task-item { padding: 15px 16px; gap: 12px; flex-wrap: wrap; }
  .task-item .claim-btn, .task-item .reward, .task-item .done { margin-left: auto; }
  .checkin { gap: 6px; }
  .cday { padding: 10px 4px; border-radius: 11px; }

  /* 登录页：输入 16px 防 iOS 聚焦自动放大 */
  .auth-box { padding: 24px 18px; }
  .field input { font-size: 16px; padding: 12px 14px; }

  /* Toast 全宽留边 */
  #toasts { width: calc(100vw - 32px); }
  .toast { max-width: 100%; text-align: center; }

  #sync-state { max-width: 100%; }
}
@media (max-width: 560px) {
  /* 战绩表小屏：隐藏次要列（击杀/Boss），保留时间/模式/难度/波次/结果 */
  .tbl th:nth-child(5), .tbl td:nth-child(5),
  .tbl th:nth-child(6), .tbl td:nth-child(6) { display: none; }
  table.tbl { min-width: 460px; }
  /* 云同步按钮堆叠 */
  .sync-pill { max-width: 100%; }
  .sync-pill #sync-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 480px) {
  .checkin { gap: 4px; }
  .cday { padding: 8px 2px; border-radius: 10px; }
  .cday .d { font-size: 10px; }
  .cday .gift { margin: 5px 0 1px; }
  .cday .gift svg { width: 18px; height: 18px; }
  .cday .rw { font-size: 10.5px; }
  .nav .logo .sub { display: none; }          /* 极窄屏 logo 收成单行 */
  .nav .user-chip > span:not(.avatar) { display: none; }  /* 只留头像，昵称去「我的」页看 */
  .nav .user-chip { padding: 5px; border-radius: 50%; }
  /* 极窄屏：登录按钮缩短文字，保证一行显示 */
  .nav .right .btn-pipe[href*="login"] { font-size: 12px; padding: 6px 10px !important; min-height: 32px; }
  .chip { padding: 8px 12px; font-size: 12px; }
  #sync-state { max-width: 140px; font-size: 11.5px; padding: 6px 8px; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 25px; }
  .wrap { padding: 16px 12px 40px; }
  .card { padding: 20px 16px; }
  .stat .v { font-size: 20px; }
}
/* 手机横屏玩游戏：让位给游戏画面，隐藏同步胶囊（桌面小窗口不受影响） */
@media (orientation: landscape) and (max-height: 460px) {
  #sync-state { display: none; }
}

/* ---------- 更新日志（时间轴） ---------- */
.hero-slim { padding: 30px 26px; }
.timeline { margin-top: 26px; }
.tl-item { display: flex; gap: 0; }
.tl-rail {
  width: 30px; flex: none; display: flex; justify-content: center;
  position: relative;
}
.tl-rail::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: 2px;
  background: linear-gradient(var(--line), var(--line));
}
.tl-item:first-child .tl-rail::before { top: 14px; }
.tl-item:last-child .tl-rail::before { bottom: auto; height: 32px; }
.tl-dot {
  position: relative; z-index: 1; width: 12px; height: 12px; border-radius: 50%;
  background: var(--tc, var(--pipe)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc, var(--pipe)) 18%, transparent);
  margin-top: 26px; flex: none;
}
.tl-card { flex: 1; margin: 0 0 18px 6px; padding: 18px 20px; }
.tl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.v-badge {
  font-size: 13.5px; font-weight: 800; letter-spacing: .5px;
  color: var(--tc, var(--pipe));
  background: color-mix(in srgb, var(--tc, var(--pipe)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc, var(--pipe)) 35%, transparent);
  padding: 3px 11px; border-radius: 999px;
}
.tl-date { font-size: 12.5px; color: var(--ink2); font-weight: 600; }
/* 关键：CJK 标题在 flex 容器里若允许 min-width 收缩到 0，会被压成「逐字竖排」(flex+CJK 经典坑)。
   这里去掉 min-width:0，改用 word-break:keep-all —— 让 CJK 标题不可在字符间断行，于是 flex 自动最小宽度=整条标题，
   放不下时整体换到独立整行(横向多行折行)，而不会压成 1 字符宽的竖列。overflow-wrap:anywhere 仅作窄屏兜底防溢出。 */
.tl-title { font-size: 15px; font-weight: 800; flex: 1 1 auto; word-break: keep-all; overflow-wrap: anywhere; }
/* 内联代码（更新日志大量出现 Game.applyMobileDefaultZoom 等超长标识符）：此前完全无样式，
   长标识符会撑破卡片、在窄屏引发横向滚动。这里给代码上色 + 允许任意位置断行。 */
.changelog-wrap code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: .9em; line-height: 1.4;
  color: var(--tc, var(--pipe));
  background: color-mix(in srgb, var(--tc, var(--pipe)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc, var(--pipe)) 26%, transparent);
  padding: 1px 5px; border-radius: 6px;
  overflow-wrap: anywhere; word-break: break-word; white-space: normal;
}
.tl-list { list-style: none; display: grid; gap: 8px; overflow-wrap: anywhere; }
/* flex-wrap:wrap 兜底：描述文字里的超长 <code> 或 CJK 文本若撑破行，整体换行到独立整行满宽折行，
   而非被压成逐字竖排（与 .tl-title 同一类 flex+CJK 陷阱）。 */
.tl-list li { font-size: 13.5px; line-height: 1.75; color: var(--ink); opacity: .92; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tag {
  flex: none; font-size: 11px; font-weight: 800; padding: 1.5px 7px; border-radius: 6px;
  transform: translateY(-1px);
}
.t-new { color: #04241a; background: var(--pipe); }
.t-opt { color: #2b1d00; background: var(--gold); }
.t-fix { color: #fff; background: var(--danger); }
@media (max-width: 560px) {
  .tl-rail { width: 20px; }
  .tl-card { padding: 15px 14px; margin-left: 4px; }
  /* 手机端：标签与文字行内流动，避免标签独占一行 */
  .tl-list li { display: block; }
  .tl-list .tag { margin-right: 6px; }
  .hero-slim { padding: 24px 18px; }
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 34px; padding: 22px 4px 6px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center;
}
.site-footer .f-links { display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 600; color: var(--ink2); flex-wrap: wrap; justify-content: center; }
.site-footer .f-links a { transition: .15s; padding: 4px 6px; }
.site-footer .f-links a:hover { color: var(--pipe); }
.site-footer .f-links i { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }
.site-footer .f-copy { font-size: 12px; color: var(--ink2); opacity: .8; }

/* ---------- 玩游戏页 · 版本更新浮条 ---------- */
#update-bar {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 40; display: flex; align-items: center; gap: 12px;
  padding: 9px 10px 9px 18px; border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border: 1px solid color-mix(in srgb, var(--pipe) 45%, var(--line));
  box-shadow: 0 10px 30px rgba(0,0,0,.35); backdrop-filter: blur(10px);
  white-space: nowrap; animation: pin .25s ease;
}
#update-bar[hidden] { display: none; }   /* 关键：display:flex 会压过 hidden 属性的 UA 样式，必须显式关掉，否则空浮条常驻顶部长一颗空白胶囊 */
#update-bar .u-text { font-size: 13px; font-weight: 600; color: var(--ink); }
#update-bar .u-text b { color: var(--pipe); font-weight: 800; }
#update-bar .u-btn {
  border: none; border-radius: 999px; padding: 8px 16px; min-height: 34px;
  background: linear-gradient(135deg, #2dd4a7, #1fa886); color: #04241a;
  font-size: 12.5px; font-weight: 800; cursor: pointer;
  animation: breath 1.6s ease-in-out infinite; transition: transform .12s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
#update-bar .u-btn:active { transform: scale(.95); }
#update-bar .u-btn:disabled { opacity: .6; animation: none; }
@media (max-width: 560px) {
  #update-bar { top: 8px; padding: 7px 8px 7px 14px; gap: 8px; max-width: calc(100vw - 20px); }
  #update-bar .u-text { font-size: 12px; }
}

/* ============================================================
   手机扫码玩（首页 QR 卡片）
   ============================================================ */
.qr-card { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.qr-card .qr-left { flex: 1 1 280px; min-width: 0; }
.qr-card .qr-left h3 { font-size: 17px; margin-bottom: 8px; }
.qr-card .qr-left p { font-size: 13.5px; color: var(--ink2); line-height: 1.7; }
.qr-card .qr-left p b { color: var(--pipe); }
.qr-card .qr-actions { margin-top: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qr-card .qr-status { font-size: 12px; color: var(--ink2); cursor: default; user-select: none; }
.qr-card .qr-status.can-regen { color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.qr-box {
  position: relative; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center;
  padding: 16px; border-radius: var(--r2); background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.qr-box[hidden] { display: none; }
.qr-box img { display: block; width: 220px; height: 220px; border-radius: 8px; }
.qr-box .qr-tip {
  margin-top: 12px; max-width: 220px; font-size: 12.5px; line-height: 1.6; color: #2a3342; text-align: center;
}
.qr-box .qr-tip b { color: #0ca678; }
.qr-box .qr-close {
  position: absolute; top: -12px; right: -12px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--panel2); color: var(--ink); border: 1px solid var(--line); font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.qr-box .qr-close:active { transform: scale(.92); }
.qr-phone-ico { color: var(--pipe); }
/* 窄屏：卡片纵向堆叠，二维码居中 */
@media (max-width: 620px) {
  .qr-card { justify-content: center; text-align: center; }
  .qr-card .qr-left { text-align: center; }
  .qr-card .qr-actions { justify-content: center; }
}

/* 首页「大家还在搜」相关搜索词区块（自然内链标签云，防堆砌被判定 spam） */
.rs-block { margin: 34px 0 4px; }
.rs-intro { font-size: 13.5px; line-height: 1.85; color: var(--ink2); margin: 0 0 18px; max-width: 700px; }
.rs-intro b { color: var(--ink); }
.rs-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 22px; }
.rs-group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r2); padding: 14px 16px; }
.rs-glabel { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--ink); margin-bottom: 11px; }
.rs-glabel i { width: 8px; height: 8px; border-radius: 3px; background: var(--tc, var(--pipe)); }
.rs-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.rs-tag {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--panel2) 70%, transparent);
  border: 1px solid var(--line); font-size: 12.5px; color: var(--ink2);
  text-decoration: none; line-height: 1.4; transition: .15s;
}
.rs-tag:hover { color: var(--tc, var(--pipe)); border-color: color-mix(in srgb, var(--tc, var(--pipe)) 45%, var(--line)); transform: translateY(-1px); }
@media (max-width: 620px) { .rs-groups { grid-template-columns: 1fr; } }

/* 首页「新手教程」入口卡 */
.tut-entry {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--pipe) 12%, var(--panel)), var(--panel));
  border: 1px solid color-mix(in srgb, var(--pipe) 35%, var(--line));
  border-radius: var(--radius); padding: 22px 24px; margin: 22px 0 4px;
  transition: border-color .2s, transform .18s;
}
.tut-entry:hover { border-color: color-mix(in srgb, var(--pipe) 55%, var(--line)); transform: translateY(-2px); }
.tut-entry .te-ico {
  width: 54px; height: 54px; flex: none; border-radius: 14px;
  background: color-mix(in srgb, var(--pipe) 16%, transparent); color: var(--pipe);
  display: flex; align-items: center; justify-content: center;
}
.tut-entry .te-body { flex: 1; min-width: 0; }
.tut-entry h3 { font-size: 16px; margin-bottom: 6px; }
.tut-entry p { font-size: 13px; color: var(--ink2); line-height: 1.7; margin-bottom: 12px; max-width: 620px; }
@media (max-width: 560px) {
  .tut-entry { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px 18px; }
  .tut-entry .te-body { width: 100%; }
}

/* ============================================================
   新手教程页（tutorial.html）插图式图文教程
   ============================================================ */
/* 锚点目录：粘性吸顶，顺滑跳转 */
.tut-toc {
  position: sticky; top: 66px; z-index: 40;
  display: flex; flex-wrap: wrap; gap: 8px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 12px; margin: 16px 0 4px;
}
.tut-toc a { font-size: 13px; font-weight: 700; color: var(--ink2); padding: 6px 13px; border-radius: 999px; transition: .15s; white-space: nowrap; }
.tut-toc a:hover, .tut-toc a:active { background: var(--panel2); color: var(--ink); }
.tut-toc a.on { color: var(--pipe); background: color-mix(in srgb, var(--pipe) 12%, transparent); }
/* SVG 流动虚线动画（复用 @keyframes flow） */
.flow { animation: flow 1.6s linear infinite; }

/* Hero */
.tut-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 26px; align-items: center;
  border-radius: 22px; margin: 14px 0 6px;
  background:
    radial-gradient(120% 140% at 85% -10%, rgba(45,212,167,.14), transparent 50%),
    radial-gradient(100% 120% at 10% 110%, rgba(245,179,1,.08), transparent 50%),
    var(--panel);
  border: 1px solid var(--line); padding: 46px 44px;
}
.tut-hero .badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--pipe) 13%, transparent); color: var(--pipe);
  font-size: 12.5px; font-weight: 700; margin-bottom: 18px;
  border: 1px solid color-mix(in srgb, var(--pipe) 30%, transparent);
}
.tut-hero .badge i { width: 7px; height: 7px; border-radius: 2px; background: var(--pipe); animation: blink 1.6s infinite; }
.tut-hero h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 900; line-height: 1.2; margin-bottom: 14px; }
.tut-hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--pipe), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tut-hero p.lead { font-size: 15px; color: var(--ink2); line-height: 1.8; max-width: 520px; margin-bottom: 22px; }
.tut-hero p.lead b { color: var(--ink); }
.tut-hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.th-right .scene { width: 100%; height: auto; display: block; border-radius: 16px; }

/* 三步玩法配图 */
.step-ico { width: 56px; height: 56px; display: block; margin-bottom: 12px; }

/* 操作图解卡片 */
.op-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.op-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; text-align: center; transition: transform .18s, border-color .18s;
}
.op-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--pipe) 40%, var(--line)); }
.op-card svg { width: 100%; max-width: 96px; height: auto; display: block; margin: 0 auto 10px; }
.op-card h4 { font-size: 14.5px; margin-bottom: 6px; }
.op-card p { font-size: 12.5px; color: var(--ink2); line-height: 1.7; }

/* 六种炮塔卡片 */
.tower-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tower-card {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; text-align: center; transition: transform .18s; overflow: hidden;
}
.tower-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--tc, var(--pipe)); opacity: .9; }
.tower-card:hover { transform: translateY(-3px); }
.tower-card svg { width: 56px; height: 56px; display: block; margin: 0 auto 10px; }
.tower-card h4 { font-size: 15px; margin-bottom: 4px; }
.tower-card .role {
  display: inline-block; font-size: 11px; font-weight: 800; color: var(--tc, var(--pipe));
  background: color-mix(in srgb, var(--tc, var(--pipe)) 14%, transparent);
  padding: 2px 10px; border-radius: 999px; margin-bottom: 9px;
}
.tower-card p { font-size: 12.5px; color: var(--ink2); line-height: 1.65; }

/* 核心机制图解卡 */
.mech-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.mech-card {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; transition: transform .18s; overflow: hidden;
}
.mech-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--tc, var(--pipe)); opacity: .9; }
.mech-card:hover { transform: translateY(-3px); }
.mech-card svg { width: 100%; height: auto; display: block; border-radius: 12px; margin-bottom: 12px; background: var(--panel2); }
.mech-card h4 { font-size: 15px; margin-bottom: 7px; }
.mech-card p { font-size: 13px; color: var(--ink2); line-height: 1.7; }

/* 常见问题（折叠） */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r2); padding: 0 16px; transition: border-color .2s; }
.faq details[open] { border-color: color-mix(in srgb, var(--pipe) 38%, var(--line)); }
.faq summary {
  cursor: pointer; padding: 14px 4px; font-size: 14px; font-weight: 700; color: var(--ink);
  list-style: none; display: flex; align-items: center; gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '＋'; color: var(--pipe); font-weight: 900; flex: none; font-size: 16px; transition: transform .2s; }
.faq details[open] summary::before { content: '－'; }
.faq details p { font-size: 13px; color: var(--ink2); line-height: 1.85; padding: 0 4px 14px; }

/* 教程页响应式 */
@media (max-width: 860px) {
  .tut-hero { grid-template-columns: 1fr; padding: 34px 24px; }
  .th-right { order: -1; max-width: 420px; margin: 0 auto; }
  .op-grid, .tower-grid { grid-template-columns: repeat(2, 1fr); }
  .mech-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .op-grid, .tower-grid { grid-template-columns: 1fr; }
  .tut-hero { padding: 28px 18px; }
  .tut-hero h1 { font-size: 26px; }
  .tut-toc { top: 60px; padding: 7px 10px; gap: 6px; }
  .tut-toc a { padding: 6px 11px; font-size: 12.5px; }
  .hero { padding: 30px 20px; }
}
