/* ==========================================================================
   太白浏览器 Taibai Browser — 视觉与布局
   深空墨蓝 + 启明金星；玻璃质感；移动优先，桌面呈现为设备卡片
   ========================================================================== */

:root {
  --bg: #05070d;
  --ink: #080d17;
  --line: rgba(255, 255, 255, .085);
  --line-2: rgba(255, 255, 255, .15);
  --text: #eaf0fa;
  --text-2: #9aa8be;
  --text-3: #66738a;
  --gold: #f0c977;
  --gold-2: #e2b45c;
  --gold-3: #b9852c;
  --jade: #79d7c4;
  --danger: #ff8080;
  --dock-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
          "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(90% 55% at 50% 0%, #0d1728 0%, #070b13 45%, #04060b 100%);
}

button { font-family: inherit; border: 0; background: none; color: inherit; cursor: pointer; padding: 0; }
input { font-family: inherit; border: 0; background: none; color: inherit; outline: none; }
input::placeholder { color: var(--text-3); }
svg { display: block; }

/* ── 背景星野 ─────────────────────────────────────────────── */
.stars, .aurora { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.aurora {
  height: 70vh;
  background:
    radial-gradient(48% 58% at 26% -4%, rgba(64, 112, 196, .20), transparent 72%),
    radial-gradient(38% 46% at 78% 4%, rgba(240, 201, 119, .10), transparent 74%);
  filter: blur(6px);
}
.stars i {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: #fff;
  opacity: .30;
  animation: twinkle 7s var(--d, 0s) infinite ease-in-out;
}
.stars i:nth-child(1) { left: 12%; top: 14%; --d: .2s; }
.stars i:nth-child(2) { left: 78%; top: 9%;  --d: 1.4s; width: 3px; height: 3px; }
.stars i:nth-child(3) { left: 62%; top: 26%; --d: 2.6s; }
.stars i:nth-child(4) { left: 22%; top: 62%; --d: 3.4s; width: 3px; height: 3px; }
.stars i:nth-child(5) { left: 88%; top: 48%; --d: 4.1s; }
.stars i:nth-child(6) { left: 41%; top: 87%; --d: 5.2s; }
@keyframes twinkle { 0%, 100% { opacity: .12; transform: scale(.8); } 50% { opacity: .55; transform: scale(1.15); } }

/* ── 外壳 ─────────────────────────────────────────────────── */
.app {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;              /* 防止 grid 子项被内容最小宽度撑破 */
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow: clip;          /* 禁止任何意外滚动：收起的抽屉在画布外 */
  background: linear-gradient(180deg, #070b13 0%, #05070d 100%);
}

@media (min-width: 900px) and (min-height: 620px) {
  body { padding: 26px; }
  .app {
    width: min(1060px, 100%);
    height: min(860px, calc(100dvh - 52px));
    border-radius: 24px;
    border: 1px solid var(--line-2);
    box-shadow:
      0 50px 130px -40px rgba(0, 0, 0, .95),
      0 0 0 1px rgba(255, 255, 255, .04) inset,
      0 0 90px -30px rgba(240, 201, 119, .18);
  }
}

/* ── 顶栏 ─────────────────────────────────────────────────── */
.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(9px + var(--safe-t)) 12px 9px;
  background: linear-gradient(180deg, rgba(12, 18, 30, .92), rgba(8, 12, 20, .78));
  backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  position: relative;
  z-index: 12;
}
.brand {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 11px;
  color: var(--gold);
  transition: transform .2s var(--ease), background .2s;
}
.brand:active { transform: scale(.9); background: rgba(240, 201, 119, .1); }
.brand svg { width: 22px; height: 22px; fill: currentColor; filter: drop-shadow(0 0 7px rgba(240, 201, 119, .45)); }
.brand .spark { opacity: .7; }

.omni {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 5px 0 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid var(--line);
  transition: border-color .22s, background .22s, box-shadow .22s;
}
.omni:focus-within {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(240, 201, 119, .45);
  box-shadow: 0 0 0 3px rgba(240, 201, 119, .1);
}
.omni-ico { flex: 0 0 auto; width: 15px; height: 15px; fill: none; stroke: var(--text-3); stroke-width: 1.8; stroke-linecap: round; }
.omni input {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14.5px;
  letter-spacing: .1px;
  height: 100%;
}
.omni-act {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--text-3);
}
.omni-act svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.omni-act.go {
  background: linear-gradient(150deg, #f7dc9c, #e2b45c);
  color: #191107;
  box-shadow: 0 3px 12px -3px rgba(240, 201, 119, .6);
}
.omni-act.go svg { stroke-width: 2; }

.view-toggle {
  flex: 0 0 auto;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 9px 0 7px;
  border-radius: 16px;
  color: var(--gold);
  background: rgba(240, 201, 119, .09);
  border: 1px solid rgba(240, 201, 119, .20);
  transition: transform .16s var(--ease), background .2s;
}
.view-toggle:active { transform: scale(.94); background: rgba(240, 201, 119, .16); }
.vt-ico { width: 16px; height: 16px; display: block; }
.vt-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.vt-ico .ic-pc { display: none; }
.app[data-view="pc"] .vt-ico .ic-mobile { display: none; }
.app[data-view="pc"] .vt-ico .ic-pc { display: block; }
.vt-label { font-size: 11px; font-weight: 600; letter-spacing: .5px; }

/* 进度条 */
.progress {
  position: absolute;
  left: 0; right: 0;
  top: 0;
  height: 2px;
  z-index: 20;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.progress.on { opacity: 1; }
.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(240, 201, 119, 0), var(--gold) 40%, #fff6dd);
  box-shadow: 0 0 10px rgba(240, 201, 119, .8);
  transition: width .45s var(--ease);
}

/* ── 舞台 ─────────────────────────────────────────────────── */
.stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; overflow: clip; }

/* 首页 */
.home {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background:
    radial-gradient(80% 46% at 50% 0%, rgba(36, 62, 104, .32), transparent 70%),
    linear-gradient(180deg, #070b13, #05070d 60%);
}
.home::-webkit-scrollbar { display: none; }
.home-scroll { min-height: 100%; display: flex; flex-direction: column; padding-bottom: 16px; }

.hero { padding: 30px 22px 16px; text-align: center; animation: rise .6s var(--ease) both; }
.hero-mark { display: grid; place-items: center; margin-bottom: 12px; }
.hero-mark svg {
  width: 46px; height: 46px;
  fill: var(--gold);
  filter: drop-shadow(0 0 16px rgba(240, 201, 119, .55));
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .92; } 50% { transform: scale(1.06); opacity: 1; } }
.hero h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: 4px; text-indent: 4px; }
.slogan { margin: 7px 0 0; font-size: 11.5px; letter-spacing: 3.5px; text-indent: 3.5px; color: var(--text-3); }

.home-search {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 16px 20px 0;
  padding: 0 6px 0 15px;
  height: 50px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid var(--line);
  transition: border-color .22s, box-shadow .22s, background .22s;
  animation: rise .6s .06s var(--ease) both;
}
.home-search:focus-within {
  border-color: rgba(240, 201, 119, .45);
  box-shadow: 0 0 0 4px rgba(240, 201, 119, .09);
  background: rgba(255, 255, 255, .075);
}
.home-search > svg { width: 17px; height: 17px; fill: none; stroke: var(--text-3); stroke-width: 1.8; stroke-linecap: round; flex: 0 0 auto; }
.home-search input { flex: 1 1 auto; min-width: 0; font-size: 14.5px; }
.home-search button {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #191107;
  background: linear-gradient(150deg, #f7dc9c, #e2b45c 60%, #d3a049);
  box-shadow: 0 6px 18px -8px rgba(240, 201, 119, .9);
  transition: transform .16s var(--ease);
}
.home-search button:active { transform: scale(.95); }

/* 快捷宫格 */
.quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px 4px;
  margin: 20px 16px 4px;
  animation: rise .6s .12s var(--ease) both;
}
.qi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 8px 2px;
  border-radius: 14px;
  transition: background .18s, transform .16s var(--ease);
  text-align: center;
}
.qi:active { background: rgba(255, 255, 255, .05); transform: scale(.96); }
.qi .dot {
  width: 44px; height: 44px;
  border-radius: 15px;
  display: grid; place-items: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  color: #fff;
  background: linear-gradient(145deg, var(--c1, #33507d), var(--c2, #1b2c47));
  box-shadow: 0 8px 18px -10px #000, 0 0 0 1px rgba(255, 255, 255, .08) inset;
}
.qi em { font-style: normal; font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* 最近访问 */
.recent { margin: 18px 20px 0; animation: rise .6s .16s var(--ease) both; }
.recent-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.recent-head span { font-size: 11.5px; letter-spacing: 1.6px; color: var(--text-3); }
.recent-head button { font-size: 11.5px; color: var(--text-3); padding: 4px 2px; }
.recent-list { display: flex; flex-direction: column; }
.rl {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-radius: 12px;
  text-align: left;
  transition: background .16s;
}
.rl:active { background: rgba(255, 255, 255, .045); }
.rl .ic {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  color: var(--gold);
  background: rgba(240, 201, 119, .1);
  border: 1px solid rgba(240, 201, 119, .16);
}
.rl .tx { flex: 1 1 auto; min-width: 0; }
.rl .tx b { display: block; font-size: 13.5px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl .tx span { display: block; font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

/* 首页底部提示 */
.home-foot { display: flex; gap: 10px; margin: 22px 20px 0; animation: rise .6s .2s var(--ease) both; }
.foot-card {
  flex: 1 1 0;
  min-width: 0;
  padding: 12px 13px;
  border-radius: 15px;
  background: linear-gradient(150deg, rgba(240, 201, 119, .07), rgba(255, 255, 255, .02));
  border: 1px solid rgba(240, 201, 119, .14);
  text-align: left;
}
.foot-card b { display: block; font-size: 12.5px; font-weight: 600; color: var(--gold); margin-bottom: 4px; }
.foot-card span { font-size: 11px; line-height: 1.5; color: var(--text-3); display: block; }
.home-note { margin: 20px 24px 6px; font-size: 10.5px; line-height: 1.7; color: #4c576c; text-align: center; }

.home-dl { text-align: center; margin: 14px 0 0; }
.home-dl a {
  display: inline-block; padding: 9px 18px; border-radius: 12px;
  font-size: 12px; letter-spacing: .5px; color: var(--gold); text-decoration: none;
  border: 1px solid rgba(240, 201, 119, .26); background: rgba(240, 201, 119, .08);
}
.home-dl a:active { background: rgba(240, 201, 119, .16); }
.app-mode .only-web { display: none !important; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── 页面窗格 ─────────────────────────────────────────────── */
.panes { position: absolute; inset: 0; display: flex; }
.panes[data-dir="row"] { flex-direction: column; }
.panes[data-dir="col"] { flex-direction: row; }
.panes[data-mode="single"] .pane:nth-of-type(2),
.panes[data-mode="single"] .splitter { display: none; }

.pane {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #0a0f18;
  overflow: hidden;
}
.panes[data-mode="split"] .pane:first-of-type { flex: 0 0 calc(var(--split, 50) * 1%); }

.pane-head {
  flex: 0 0 auto;
  height: 0;
  touch-action: manipulation;   /* 双击是「出地址条」，不要缩放 */
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: rgba(10, 15, 24, .95);
  border-bottom: 1px solid var(--line);
  transition: height .3s var(--ease);
  cursor: pointer;
}
.panes[data-mode="split"] .pane-head { height: 33px; }
.pane-head .ph-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, #4a5a76); flex: 0 0 auto; }
.pane.active .pane-head .ph-dot { background: var(--gold); box-shadow: 0 0 8px rgba(240, 201, 119, .8); }
.pane-head .ph-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pane.active .pane-head .ph-title { color: var(--text); }
.pane-head .ph-close { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--text-3); }
.pane-head .ph-close svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.pane-head .ph-close:active { background: rgba(255, 255, 255, .08); }

.pane-body { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: #0a0f18; }
.frame-wrap { position: absolute; inset: 0; overflow: hidden; background: #10151f; }
.frame-wrap iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }

/* 移动视图：模拟手机宽度居中 */
.panes[data-view="mobile"] .frame-wrap { inset: 0; }
.panes[data-view="mobile"] .frame-wrap iframe { width: min(100%, 430px); margin: 0 auto; }
.panes[data-view="mobile"] .pane-body::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(70% 50% at 50% 0%, rgba(64, 112, 196, .07), transparent 70%);
}

/* 空窗格 */
.pane-empty {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 22px;
  background:
    radial-gradient(70% 50% at 50% 30%, rgba(64, 112, 196, .12), transparent 70%),
    #070b13;
}
.pane.empty .pane-empty { display: flex; }
.pane.empty .frame-wrap { display: none; }
.pane-empty .pe-star { width: 34px; height: 34px; fill: var(--gold); opacity: .55; }
.pane-empty h3 { margin: 0; font-size: 14px; font-weight: 500; color: var(--text-2); letter-spacing: 1px; }
.pane-empty form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  height: 44px;
  padding: 0 5px 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
}
.pane-empty form:focus-within { border-color: rgba(240, 201, 119, .4); }
.pane-empty input { flex: 1 1 auto; min-width: 0; font-size: 13.5px; }
.pane-empty button { flex: 0 0 auto; height: 34px; padding: 0 14px; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: #191107; background: linear-gradient(150deg, #f7dc9c, #e2b45c); }
.pane-empty p { margin: 0; font-size: 11px; color: var(--text-3); }

/* 分隔条 */
.splitter {
  flex: 0 0 12px;
  position: relative;
  background: rgba(255, 255, 255, .05);
  touch-action: none;
  transition: background .18s var(--ease);
}
.splitter.drag, .splitter:hover { background: rgba(240, 201, 119, .18); }
.splitter.drag::after, .splitter:hover::after { background: var(--gold, #f0c977); }
.panes[data-dir="row"] .splitter { cursor: row-resize; }
.panes[data-dir="col"] .splitter { cursor: col-resize; }
.splitter::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, .22);
  border-radius: 3px;
}
.panes[data-dir="row"] .splitter::after { width: 44px; height: 4px; }
.panes[data-dir="col"] .splitter::after { width: 4px; height: 44px; }
.panes[data-dir="col"] .splitter::after { height: 34px; width: 3px; }

/* 加载中的骨架微光 */
.pane.loading .frame-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, #10151f 20%, #161d2a 40%, #10151f 60%);
  background-size: 220% 100%;
  animation: shimmer 1.3s linear infinite;
  pointer-events: none;
}
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* ── 底栏 ─────────────────────────────────────────────────── */
.dock {
  flex: 0 0 auto;
  position: relative;
  z-index: 15;
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: center;
  height: calc(var(--dock-h) + var(--safe-b));
  padding: 0 4px var(--safe-b);
  background: rgba(8, 12, 20, .88);
  backdrop-filter: blur(24px) saturate(150%);
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.dock::before {
  content: "";
  position: absolute;
  top: -1px; left: 18%; right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 201, 119, .38), transparent);
}
.dock-btn {
  justify-self: center;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  color: var(--text-2);
  transition: transform .15s var(--ease), background .18s, color .18s;
}
.dock-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.dock-btn:active { transform: scale(.9); background: rgba(255, 255, 255, .07); }
.dock-btn.on { color: var(--gold); background: rgba(240, 201, 119, .1); }
.dock-btn[disabled] { color: #3b4558; }

.ai-fab {
  position: relative;
  justify-self: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #1a1206;
  background: linear-gradient(150deg, #fbe6ae 0%, #f0c977 40%, #d9a94e 100%);
  box-shadow:
    0 10px 26px -8px rgba(240, 201, 119, .75),
    0 0 0 1px rgba(255, 245, 220, .35) inset,
    0 2px 6px rgba(0, 0, 0, .4);
  transform: translateY(-11px);
  transition: transform .18s var(--ease), box-shadow .25s;
  z-index: 2;
}
.ai-fab:active { transform: translateY(-11px) scale(.93); }
.ai-fab svg { width: 24px; height: 24px; fill: #221808; margin-top: -6px; }
.ai-fab b { position: absolute; bottom: 8px; font-size: 8.5px; letter-spacing: 1px; font-weight: 800; color: rgba(34, 24, 8, .8); }
.fab-halo {
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 201, 119, .42), transparent 68%);
  animation: halo 4.5s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}
@keyframes halo { 0%, 100% { opacity: .45; transform: scale(.92); } 50% { opacity: .85; transform: scale(1.06); } }

/* ── 遮罩与抽屉 ───────────────────────────────────────────── */
.scrim {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(2, 4, 8, .6);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .32s var(--ease);
}
.scrim.show { opacity: 1; }

.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #101828 0%, #0a0f1a 42%, #070b13 100%);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 -26px 70px -24px rgba(0, 0, 0, .95);
  transform: translateY(103%);
  transition: transform .44s var(--ease), height .34s var(--ease);
  padding-bottom: var(--safe-b);
  max-height: 94%;
  will-change: transform;
}
.sheet.open { transform: translateY(0); }

.grip { flex: 0 0 auto; height: 18px; display: grid; place-items: center; cursor: grab; }
.grip::after { content: ""; width: 40px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .16); }

.sheet-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px 10px 18px;
}
.sheet-title { display: flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 600; letter-spacing: .5px; }
.sheet-title em {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .5px;
  color: var(--gold);
  background: rgba(240, 201, 119, .12);
  border: 1px solid rgba(240, 201, 119, .22);
  padding: 2px 6px;
  border-radius: 6px;
}
.mini-star { width: 15px; height: 15px; fill: var(--gold); }
.sheet-ops { display: flex; align-items: center; gap: 4px; }
.chip {
  height: 27px;
  padding: 0 11px;
  border-radius: 14px;
  font-size: 11.5px;
  color: var(--gold);
  background: rgba(240, 201, 119, .1);
  border: 1px solid rgba(240, 201, 119, .22);
}
.chip:active { background: rgba(240, 201, 119, .18); }
.icon-btn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--text-2); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon-btn:active { background: rgba(255, 255, 255, .07); }

/* AI 抽屉 */
.ai-sheet { height: 64%; }
.ai-sheet.open { height: 64%; }
.ai-sheet.expanded { height: 91%; }
.ai-body { flex: 1 1 auto; min-height: 0; padding: 0 10px 10px; }
.ai-body iframe { width: 100%; height: 100%; border: 0; border-radius: 16px; background: #0b1019; display: block; }

/* 菜单 */
.menu-sheet { padding: 0 12px calc(12px + var(--safe-b)); }
.menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px 0 8px; }
.menu-grid button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 2px;
  border-radius: 14px;
  transition: background .16s, transform .15s var(--ease);
}
.menu-grid button:active { background: rgba(255, 255, 255, .06); transform: scale(.95); }
.menu-grid i { font-style: normal; font-size: 19px; color: var(--gold); line-height: 1; }
.menu-grid span { font-size: 11.5px; color: var(--text-2); }
.menu-cancel {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  border-radius: 14px;
  font-size: 13.5px;
  color: var(--text-2);
  background: rgba(255, 255, 255, .05);
}

/* 设置 / 关于 */
.settings-sheet, .about-sheet { height: auto; max-height: 90%; }
.settings-body, .about-body { overflow-y: auto; padding: 0 18px 18px; }
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
}
.set-row.col { flex-direction: column; align-items: stretch; gap: 9px; }
.set-row label { font-size: 13.5px; color: var(--text); flex: 0 0 auto; }
.set-row input[type="url"] {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
}
.set-row input[type="url"]:focus { border-color: rgba(240, 201, 119, .4); }
.hint { margin: 0; font-size: 11px; line-height: 1.65; color: var(--text-3); }
.seg { display: flex; gap: 3px; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, .05); }
.seg button { padding: 6px 11px; border-radius: 8px; font-size: 12px; color: var(--text-2); }
.seg button.on { background: linear-gradient(150deg, #f7dc9c, #e2b45c); color: #191107; font-weight: 600; }
.danger-btn {
  width: 100%;
  height: 44px;
  margin-top: 18px;
  border-radius: 13px;
  font-size: 13px;
  color: var(--danger);
  background: rgba(255, 128, 128, .08);
  border: 1px solid rgba(255, 128, 128, .2);
}
.ver { text-align: center; font-size: 10.5px; color: #47536a; margin: 16px 0 4px; letter-spacing: 1px; }

/* 关于 */
.about-body { text-align: center; padding-top: 4px; }
.about-mark { display: grid; place-items: center; margin: 6px 0 12px; }
.about-mark svg { width: 40px; height: 40px; fill: var(--gold); filter: drop-shadow(0 0 14px rgba(240, 201, 119, .5)); }
.about-body h2 { margin: 0; font-size: 19px; letter-spacing: 3px; font-weight: 600; }
.about-ver { margin: 6px 0 14px; font-size: 11px; color: var(--text-3); letter-spacing: 1.5px; }
.about-text { margin: 0 auto 16px; max-width: 330px; font-size: 12.5px; line-height: 1.75; color: var(--text-2); }
.about-kv { display: flex; flex-direction: column; gap: 1px; border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .05); text-align: left; }
.about-kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; background: rgba(10, 15, 24, .6); }
.about-kv span { font-size: 12px; color: var(--text-3); }
.about-kv b { font-size: 12px; font-weight: 500; color: var(--text-2); }
.ghost-btn {
  width: 100%;
  height: 42px;
  margin-top: 14px;
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--gold);
  border: 1px solid rgba(240, 201, 119, .25);
  background: rgba(240, 201, 119, .07);
}

/* Toast */
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--dock-h) + 12px + var(--safe-b) + 16px);
  transform: translate(-50%, 8px);
  z-index: 60;
  padding: 9px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--text);
  background: rgba(26, 34, 50, .96);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 12px 30px -12px #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease);
  max-width: 82%;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 小屏适配 */
@media (max-width: 360px) {
  .hero h1 { font-size: 21px; letter-spacing: 3px; }
  .quick { grid-template-columns: repeat(4, 1fr); }
  .qi .dot { width: 40px; height: 40px; border-radius: 13px; font-size: 12px; }
  .dock-btn { width: 40px; }
  .ai-fab { width: 50px; height: 50px; }
}

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

/* ═══════════════ 原生网页视图模式（App 内，1.1 起） ═══════════════ */
/* 网页由原生 WebView 渲染，壳子只留版位 */
html.native-panes .frame-wrap iframe { display: none; }
html.native-panes .frame-wrap { background: transparent; }
html.native-panes .pane.loading .frame-wrap::after { display: none; }
html.native-panes .ai-body iframe { display: none; }
html.native-panes .ai-body { background: transparent; }
html.native-panes .pane-body { background: #0a0f18; }
/* 移动视图下 430px 居中列：原生视图会精确盖在这条列上 */
html.native-panes .panes[data-view="mobile"] .frame-wrap { background: #0a0f18; }

/* 加载失败 */
.pane-error {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, #101a2b 0%, #0a0f18 60%, #070b12 100%);
}
.pane.error .pane-error { display: flex; }
.pane.error .frame-wrap { display: none; }
.pane-error .pe-ico {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 700; color: #f0c977;
  background: rgba(240, 201, 119, .12);
  border: 1px solid rgba(240, 201, 119, .3);
}
.pane-error b { font-size: 14.5px; color: #e8ecf4; font-weight: 600; letter-spacing: .5px; }
.pane-error .pe-desc { font-size: 12.5px; color: #8b96aa; max-width: 280px; line-height: 1.6; }
.pane-error em { font-style: normal; font-size: 11.5px; color: #5d6779; word-break: break-all; }
.pane-error button {
  margin-top: 6px; height: 36px; padding: 0 22px; border-radius: 12px;
  font-size: 13px; font-weight: 600; color: #191107;
  background: linear-gradient(150deg, #f7dc9c, #e2b45c);
  box-shadow: 0 6px 18px rgba(226, 180, 92, .22);
}


/* ── AI 上下文状态条 ─────────────────────────────────────── */
.ai-ctx {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 6px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(240, 201, 119, .09);
  border: 1px solid rgba(240, 201, 119, .18);
  font-size: 11.5px;
  color: var(--text-2, #a9b4c6);
  line-height: 1.35;
}
.ai-ctx[data-state="unsupported"] {
  background: rgba(240, 120, 120, .10);
  border-color: rgba(240, 120, 120, .28);
  color: #f0b3b3;
}
.ai-ctx[data-state="acked"] {
  background: rgba(120, 220, 160, .09);
  border-color: rgba(120, 220, 160, .24);
}
.ai-ctx-txt {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-ctx-btn {
  flex: 0 0 auto;
  border: 0;
  background: rgba(255, 255, 255, .08);
  color: inherit;
  font: inherit;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
}
.ai-ctx-btn:active { background: rgba(255, 255, 255, .18); }
.ai-ctx-full {
  flex: 0 1 auto;
  max-height: 34vh;
  overflow: auto;
  margin: 0 12px 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--line, rgba(255, 255, 255, .08));
  color: var(--text-2, #a9b4c6);
  font-size: 11.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-overflow-scrolling: touch;
}

/* ══════════════════════════════════════════════════════════
   版本更新（设置页）
   ══════════════════════════════════════════════════════════ */
.set-sep {
  margin: 20px 0 8px;
  font-size: 10.5px;
  letter-spacing: 1.6px;
  color: var(--text-3);
  text-transform: uppercase;
}
.upd-card {
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .042);
  border: 1px solid var(--line);
}
.upd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.upd-meta { min-width: 0; }
.upd-cur { font-size: 13px; color: var(--text); }
.upd-cur b { font-weight: 600; color: var(--gold); letter-spacing: .3px; }
.upd-sub {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--text-3);
  word-break: break-word;
}
.upd-sub.ok { color: var(--jade); }
.upd-sub.bad { color: var(--danger); }
.upd-sub.hot { color: var(--gold); }
.upd-btn {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  color: #191107;
  background: linear-gradient(150deg, #f7dc9c, #e2b45c);
  border: 0;
  transition: opacity .18s, transform .18s;
}
.upd-btn:active { transform: scale(.97); }
.upd-btn[disabled] { opacity: .55; }
.upd-btn.ghost {
  color: var(--gold);
  background: rgba(240, 201, 119, .09);
  border: 1px solid rgba(240, 201, 119, .26);
}
.upd-body {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, .055);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-2);
}
.upd-body[hidden] { display: none !important; }
.upd-verline { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.upd-verline b { font-size: 13px; color: var(--gold); font-weight: 600; }
.upd-verline span { font-size: 10.5px; color: var(--text-3); }
.upd-notes { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.upd-notes li { position: relative; padding-left: 13px; font-size: 11.5px; line-height: 1.7; color: var(--text-2); }
.upd-notes li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold-2); opacity: .8;
}
.upd-bar {
  height: 4px;
  margin: 11px 0 7px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .09);
  overflow: hidden;
}
.upd-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #b9852c, #f0c977);
  transition: width .25s var(--ease);
}
.upd-actions { display: flex; gap: 8px; margin-top: 11px; }
.upd-actions button, .upd-actions a {
  flex: 1;
  height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-size: 12px;
  text-decoration: none;
  color: var(--gold);
  background: rgba(240, 201, 119, .09);
  border: 1px solid rgba(240, 201, 119, .26);
}
.upd-actions button.main, .upd-actions a.main {
  color: #191107;
  background: linear-gradient(150deg, #f7dc9c, #e2b45c);
  border-color: transparent;
  font-weight: 600;
}
.upd-actions button[disabled] { opacity: .5; }
.upd-tip { margin-top: 9px; font-size: 10.5px; line-height: 1.65; color: var(--text-3); }
.upd-spin {
  display: inline-block;
  width: 11px; height: 11px;
  margin-right: 6px;
  vertical-align: -1px;
  border-radius: 50%;
  border: 1.5px solid rgba(240, 201, 119, .28);
  border-top-color: var(--gold);
  animation: updSpin .8s linear infinite;
}
@keyframes updSpin { to { transform: rotate(360deg); } }
.upd-dot {
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--danger);
  vertical-align: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .upd-spin { animation: none; }
  .upd-bar i { transition: none; }
}

/* ══════════════════════════════════════════════════════════
   1.3.1：主页设置 / 分隔条浮层
   ══════════════════════════════════════════════════════════ */
.home-set { display: flex; gap: 8px; align-items: stretch; }
.home-set input { flex: 1 1 auto; min-width: 0; }
.chip-btn {
  flex: 0 0 auto;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 11.5px;
  white-space: nowrap;
  color: var(--gold);
  background: rgba(240, 201, 119, .09);
  border: 1px solid rgba(240, 201, 119, .26);
}
.chip-btn:active { transform: scale(.97); }

/* 分隔条：做得更明显，手指才好找 */
.splitter { flex: 0 0 14px !important; }
.panes[data-dir="row"] .splitter::after { width: 46px; height: 4px; box-shadow: 0 0 10px rgba(240, 201, 119, .25); }
.panes[data-dir="col"] .splitter::after { width: 4px; height: 46px; box-shadow: 0 0 10px rgba(240, 201, 119, .25); }
.splitter.tap { background: rgba(240, 201, 119, .22); }

/* 点分隔条弹出的浮层 */
.split-pop {
  position: fixed;
  z-index: 60;
  width: 148px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(14, 20, 32, .96);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transform-origin: 50% 0;
  opacity: 0;
  transform: scale(.94);
  transition: opacity .14s var(--ease), transform .14s var(--ease);
}
.split-pop[hidden] { display: none !important; }
.split-pop.open { opacity: 1; transform: scale(1); }
.split-pop button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text);
  background: transparent;
  text-align: left;
}
.split-pop button:active { background: rgba(255, 255, 255, .08); }
.split-pop button i {
  font-style: normal;
  font-size: 14px;
  color: var(--gold);
  width: 16px;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════
   1.3.2：底栏层级 / 页面按钮 / 页面面板
   ══════════════════════════════════════════════════════════ */

/* AI 按钮上浮 11px 原本探进了内容区，被原生 WebView 盖住一半、点不准。
   现在把这段空间还给底栏，按钮完整待在底栏里。 */
.dock {
  height: calc(var(--dock-h) + 12px + var(--safe-b));
  padding: 12px 4px var(--safe-b);
}
.ai-fab { transform: translateY(-12px); }
.ai-fab:active { transform: translateY(-12px) scale(.93); }

/* 页面按钮上的「2」 */
.dock-btn { position: relative; }
.dock-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 15px; height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  font-size: 9.5px;
  line-height: 15px;
  text-align: center;
  font-weight: 700;
  color: #1a1206;
  background: linear-gradient(150deg, #f7dc9c, #e2b45c);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

/* 页面面板 */
.tabs-body { overflow-y: auto; padding: 2px 18px 18px; }
.tab-new {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  margin-bottom: 12px;
  border-radius: 13px;
  font-size: 13px;
  color: var(--gold);
  background: rgba(240, 201, 119, .08);
  border: 1px dashed rgba(240, 201, 119, .3);
  text-align: left;
}
.tab-new i { font-style: normal; font-size: 15px; }
.tab-new:active { background: rgba(240, 201, 119, .14); }

.tabs-tip {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-3);
}
.tabs-empty {
  margin: 16px 0;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}
.tabs-list { display: flex; flex-direction: column; gap: 8px; }
.tab-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line);
  text-align: left;
}
.tab-row:active { background: rgba(255, 255, 255, .08); }
.tab-n {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 7px;
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  background: rgba(255, 255, 255, .07);
}
.tab-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tab-main b {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tab-main em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tab-cur, .tab-go {
  flex: 0 0 auto;
  font-size: 10.5px;
  padding: 4px 8px;
  border-radius: 8px;
}
.tab-cur { color: var(--gold); background: rgba(240, 201, 119, .12); }
.tab-go { color: var(--text-2); background: rgba(255, 255, 255, .06); }
.tabs-foot { margin-top: 14px; }
.tabs-foot .chip-btn { width: 100%; height: 40px; border-radius: 12px; font-size: 12px; }


/* ══════════════════════════════════════════════════════════
   标签总览（短按「页面」按钮）
   原生网页视图在这一层下面，打开时由 syncRects 把它们藏起来
   ══════════════════════════════════════════════════════════ */
.tabs-view {
  position: fixed; inset: 0; z-index: 58;
  display: flex; flex-direction: column;
  background: radial-gradient(140% 90% at 50% 0%, #dbe4ee 0%, #c3cfdb 55%, #b6c3d1 100%);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
  animation: tvIn .18s ease-out;
}
.tabs-view[hidden] { display: none; }
@keyframes tvIn { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }

.tv-top {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 14px 18px 12px; position: relative;
}
.tv-pill {
  min-width: 46px; height: 42px; padding: 0 14px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 21px;
  box-shadow: 0 2px 10px rgba(24, 39, 60, .12);
  font-size: 19px; font-weight: 700; color: #16202e;
  letter-spacing: .5px;
}
.tv-pill b { font: inherit; }
.tv-shield {
  position: absolute; right: 16px; top: 16px;
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .5); color: #2b3a4d;
  display: flex; align-items: center; justify-content: center;
}
.tv-shield svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tv-shield:active { background: rgba(255, 255, 255, .8); }

.tv-grid {
  flex: 1; min-height: 0; overflow-y: auto;
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  padding: 6px 14px 16px;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 340px) { .tv-grid { grid-template-columns: 1fr; } }

.tv-card {
  display: flex; flex-direction: column;
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 3px 12px rgba(24, 39, 60, .13);
  border: 1.5px solid transparent;
  min-height: 190px; max-height: 62vh;
  transition: transform .12s ease, border-color .12s ease;
}
.tv-card:active { transform: scale(.985); }
.tv-card.on { border-color: var(--gold, #c8a44d); }
.tv-card.ai { background: linear-gradient(160deg, #fdfbf4 0%, #fff 58%); }

.tv-ch {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 9px 8px 11px; border-bottom: 1px solid #eef0f3;
}
.tv-ic { flex: none; width: 19px; height: 19px; color: #59677a; display: flex; }
.tv-card.ai .tv-ic { color: var(--gold, #b8892f); }
.tv-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tv-card.ai .tv-ic svg { fill: currentColor; stroke: none; }
.tv-t {
  flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: #1b2430;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tv-x {
  flex: none; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: transparent; color: #7d8794; display: flex; align-items: center; justify-content: center;
}
.tv-x svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tv-x:active { background: #f0f2f5; color: #36414f; }

.tv-cb {
  flex: 1; min-height: 0; overflow: hidden; padding: 10px 12px;
  font-size: 12px; line-height: 1.55; color: #5c6875;
  position: relative;
}
.tv-cb::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 30px;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 78%);
}
.tv-card.ai .tv-cb::after { background: linear-gradient(rgba(253, 251, 244, 0), #fffbf2 78%); }
.tv-note { display: block; }
.tv-blank { color: #98a2ad; }

.tv-cf {
  padding: 6px 12px 9px; font-size: 10.5px; color: #98a2ad;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tv-foot {
  display: flex; align-items: center; justify-content: space-around;
  padding: 10px 8px calc(10px + 4px);
  background: rgba(255, 255, 255, .34);
  border-top: 1px solid rgba(255, 255, 255, .5);
}
.tv-foot button {
  flex: 1; border: 0; background: transparent; color: #1f2a37;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 6px 4px; font-size: 12.5px; font-weight: 500;
}
.tv-foot svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tv-foot button:active { opacity: .55; }


/* ══════════════════════════════════════════════════════════
   分屏：顶栏（含地址栏）整体让给页面内容
   双击某个窗格的标题栏 → 顶部滑出该页的地址条（浮层，不占布局）
   ══════════════════════════════════════════════════════════ */
.app[data-mode="split"] .topbar { display: none; }
.app[data-mode="split"] .progress { z-index: 46; }

.peek {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 45;
  padding: calc(8px + var(--safe-t)) 10px 10px;
  background: linear-gradient(180deg, rgba(10, 15, 25, .98), rgba(8, 12, 20, .94));
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  transform: translateY(-104%);
  transition: transform .22s var(--ease);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.peek.show { transform: none; }
.peek[hidden] { display: none; }

.peek-row { display: flex; align-items: center; gap: 8px; }
.peek-tag {
  flex: 0 0 auto; font-size: 11px; color: var(--gold);
  padding: 3px 8px; border-radius: 7px;
  background: rgba(240, 201, 119, .1);
  border: 1px solid rgba(240, 201, 119, .22);
  white-space: nowrap;
}
.peek-form {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 6px 0 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
}
.peek-form:focus-within {
  border-color: rgba(240, 201, 119, .5);
  background: rgba(255, 255, 255, .09);
}
.peek-form input {
  flex: 1 1 auto; min-width: 0;
  font-size: 14px; color: var(--text);
  background: transparent; border: 0; outline: 0;
}
.peek-form input::placeholder { color: var(--text-3); }
.peek-go {
  flex: 0 0 auto; height: 28px; padding: 0 10px;
  border-radius: 8px; font-size: 12.5px; font-weight: 600;
  color: #1a1305;
  background: linear-gradient(180deg, #ffdf9b, var(--gold));
}
.peek-x {
  flex: 0 0 auto; width: 26px; height: 26px;
  display: grid; place-items: center; border-radius: 7px; color: var(--text-3);
}
.peek-x svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.peek-x:active { background: rgba(255, 255, 255, .1); }
.peek-home {
  flex: 0 0 auto; width: 36px; height: 36px;
  display: grid; place-items: center; border-radius: 10px;
  color: var(--text-2); background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .09);
}
.peek-home svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.peek-home:active { background: rgba(255, 255, 255, .12); }

/* 更新卡片：versionCode 小角标（用来一眼核对比对基准） */
.upd-code { display:inline-block; margin-left:6px; padding:0 5px; border-radius:5px;
  font-size:11px; font-weight:600; letter-spacing:0; color:var(--muted);
  background:rgba(255,255,255,.07); vertical-align:2px; }
.upd-verline span { white-space:nowrap; }
