:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --panel-2: #fafbfc;
  --text: #12141a;
  --muted: #6b7280;
  --line: #e6e8ee;
  --line-strong: #d3d7e2;
  --brand: #4f46e5;
  --brand-hover: #4338ca;
  --brand-soft: rgba(79, 70, 229, 0.09);
  --accent: #06b6d4;
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.08);
  --ok: #059669;
  --radius: 16px;
  --radius-sm: 12px;
  --sidebar: 76px;
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.04);
}

[data-theme="dark"] {
  --bg: #0b0d12;
  --panel: #14171f;
  --panel-2: #191d26;
  --text: #f2f4f8;
  --muted: #98a2b3;
  --line: #242a36;
  --line-strong: #333b4a;
  --brand: #6366f1;
  --brand-hover: #7c7af7;
  --brand-soft: rgba(99, 102, 241, 0.16);
  --accent: #22d3ee;
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --ok: #34d399;
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--brand);
  text-decoration: none;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.hidden {
  display: none !important;
}

::selection {
  background: rgba(79, 70, 229, 0.18);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- 启动页 ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: var(--bg);
}

.boot-mark {
  width: 58px;
  height: 58px;
}

.boot-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding-left: 0.12em;
}

.boot-bar {
  width: 120px;
  height: 3px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.boot-bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #22d3ee, #4f46e5, #a855f7);
  animation: boot-move 1s ease-in-out infinite;
}

@keyframes boot-move {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

/* ---------- 登录 ---------- */
.imp-banner {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 6px 0 14px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  font-size: 12px;
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

[data-theme="dark"] .imp-banner {
  color: #fbbf24;
}

.imp-banner span {
  white-space: nowrap;
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.imp-banner button {
  height: 24px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.9);
  color: #fff;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background-color: var(--bg);
  background-image: radial-gradient(var(--line) 0.8px, transparent 0.8px);
  background-size: 22px 22px;
}

body.auth-layer .auth {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow-y: auto;
}

.auth-back {
  position: fixed;
  left: 18px;
  top: 16px;
  z-index: 210;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.auth-back:hover {
  background: var(--panel-2);
  color: var(--text);
}

.auth-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.07);
}

[data-theme="dark"] .auth-card {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-logo {
  width: 54px;
  height: 54px;
  border-radius: 14px;
}

.auth-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.auth-tagline {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.segmented {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 4px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.seg {
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.seg.active {
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.auth-message {
  margin: 14px 0 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
}

.auth-message.success {
  background: rgba(5, 150, 105, 0.1);
  color: var(--ok);
}

.auth-form {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--brand);
  background: var(--panel);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.field-row {
  display: flex;
  gap: 8px;
}

.field-row input {
  flex: 1;
  min-width: 0;
}

/* ---------- 图形验证码 ---------- */
.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 8px;
  align-items: center;
}

.captcha-row input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  outline: none;
  letter-spacing: 0.08em;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.captcha-row input:focus {
  border-color: var(--brand);
  background: var(--panel);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.captcha-btn {
  height: 42px;
  padding: 0;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  overflow: hidden;
  transition: border-color 0.15s, opacity 0.15s;
}

.captcha-btn:hover {
  border-color: var(--line-strong);
}

.captcha-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.captcha-img.is-loading {
  opacity: 0.35;
}

@media (max-width: 380px) {
  .captcha-row {
    grid-template-columns: minmax(0, 1fr) 112px;
  }
}

.hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn.primary {
  background: var(--brand);
  color: #fff;
}

.btn.primary:hover {
  background: var(--brand-hover);
}

.btn.ghost {
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
}

.btn.ghost:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
}

.btn.text {
  color: var(--brand);
  padding: 0 6px;
}

.btn.text:hover {
  background: var(--brand-soft);
}

.btn.danger {
  color: var(--danger);
  border-color: var(--line);
}

.btn.danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
}

.btn.block {
  width: 100%;
}

.oauth-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.oauth-btn {
  flex: 1;
  min-width: 104px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  font-size: 12.5px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.oauth-btn:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
}

.oauth-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.auth-guest {
  margin-top: 14px;
}

.auth-guest-hint {
  margin: 8px 0 0;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}

.auth-foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- 应用壳 ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 10px 18px;
  background: var(--panel);
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0 2px;
}

.sidebar-toggle {
  flex: none;
  width: 28px;
  height: 28px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sidebar-toggle:hover {
  background: var(--panel-2);
  color: var(--text);
}

.sidebar-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-reopen {
  position: fixed;
  left: 0;
  top: 50%;
  z-index: 60;
  width: 22px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.15s, color 0.15s;
}

.sidebar-reopen:hover {
  background: var(--panel-2);
  color: var(--text);
}

.sidebar-reopen svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 901px) {
  .shell.sidebar-closed {
    grid-template-columns: 0 1fr;
  }

  .shell.sidebar-closed .sidebar {
    width: 0;
    padding: 0;
    border-right: 0;
    overflow: hidden;
    visibility: hidden;
  }
}

/* 菜单收起后固定为图标栏：名称仅在悬停时以气泡显示 */
.sidebar .nav-item {
  position: relative;
  justify-content: center;
  padding: 0;
}

.sidebar .nav-item > span,
.sidebar .brand-name,
.sidebar .company-line,
.sidebar .user-meta,
.sidebar .user-chip .icon-btn {
  display: none;
}

.sidebar .nav-item::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  z-index: 80;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%) translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.sidebar .nav-item:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%);
}

.sidebar .nav-item[data-tip=""]::after {
  display: none;
}

.sidebar .user-chip {
  justify-content: center;
  padding: 6px 0;
  border-color: transparent;
  background: transparent;
}

.sidebar .sidebar-foot {
  gap: 6px;
}

.brand-mark {
  width: 28px;
  height: 28px;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.company-line {
  padding: 8px 10px 0;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  opacity: 0.75;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover {
  background: var(--panel-2);
  color: var(--text);
}

.nav-item.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.nav-item svg {
  width: 19px;
  height: 19px;
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #22d3ee, #4f46e5 60%, #a855f7);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  flex: none;
  user-select: none;
}

.avatar.small {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

/* 左下角圆形头像：链到「我的」 */
a.avatar {
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
}

a.avatar:hover {
  box-shadow: 0 0 0 3px var(--brand-soft);
  transform: translateY(-1px);
}

button.avatar {
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
}

button.avatar:hover {
  box-shadow: 0 0 0 3px var(--brand-soft);
  transform: translateY(-1px);
}

.user-menu {
  position: relative;
}

.user-menu-panel {
  position: absolute;
  z-index: 70;
  top: calc(100% + 8px);
  right: 0;
  width: 212px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 20px 45px -24px rgba(15, 23, 42, 0.45);
  display: none;
}

.user-menu.open .user-menu-panel {
  display: block;
}

.user-menu.up .user-menu-panel {
  top: auto;
  bottom: calc(100% + 8px);
  left: 0;
  right: auto;
}

.user-menu-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.user-menu-link:hover {
  background: var(--panel-2);
}

.user-menu-link svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--muted);
}

.user-menu-link.danger {
  color: #dc2626;
}

.user-menu-link.danger svg {
  color: #dc2626;
}

.user-menu-sep {
  height: 1px;
  margin: 5px 6px;
  background: var(--line);
}

.avatar.xl {
  width: 62px;
  height: 62px;
  font-size: 22px;
}

.user-meta {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: var(--panel-2);
  color: var(--text);
}

.icon-btn.danger:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.stage {
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 26px 36px 60px;
}

.topbar {
  display: none;
}

.h5-crumb,
.h5-menu,
.h5-menu-mask {
  display: none;
}

.views {
  min-height: 0;
}

.view {
  display: none;
  animation: fade-in 0.18s ease;
}

.view.active {
  display: block;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 首页 ---------- */
.home {
  width: min(980px, 100%);
  margin: 0 auto;
  padding-top: 34px;
}

.hero {
  text-align: center;
}

.hero-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
  text-decoration: none;
  border-radius: 12px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.hero-brand:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.hero-brand:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 6px;
}

.hero-mark {
  width: 72px;
  height: 72px;
}

.hero h1 {
  margin: 10px 0 0;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: 0.04em;
}

.hero p {
  margin: 9px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(720px, 100%);
  height: 58px;
  margin: 26px auto 0;
  padding: 6px 6px 6px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.searchbar:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.search-icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.searchbar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
}

.searchbar input::placeholder {
  color: var(--muted);
}

.search-go {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
}

.search-go:hover {
  background: var(--brand-hover);
}

.search-go svg {
  width: 20px;
  height: 20px;
}

.home-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

.home-stats b {
  color: var(--text);
  font-weight: 600;
}

.home-stats i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

.home-icp {
  margin: 34px auto 0;
  text-align: center;
  font-size: 12px;
  line-height: 1;
  color: var(--muted);
}

@media (min-width: 901px) {
  .stage.home-active {
    padding-bottom: 32px;
  }

  .stage.home-active .home {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 58px);
  }

  .stage.home-active .home-icp {
    margin-top: auto;
  }
}

.home-icp a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.home-icp a:hover {
  color: var(--text);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 38px 0 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 18px 8px;
}

.shortcut {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 0;
  padding: 8px 4px 6px;
  background: transparent;
  border: 0;
  border-radius: 18px;
  color: var(--text);
  text-align: center;
  transition: transform 0.18s ease;
}

.shortcut:hover {
  border-color: transparent;
  background: transparent;
  transform: translateY(-2px);
  box-shadow: none;
}

[data-theme="dark"] .shortcut:hover {
  box-shadow: none;
}

.shortcut-top {
  display: grid;
  place-items: center;
}

.s-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 19px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(24, 28, 40, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.s-icon::before {
  content: "";
  position: absolute;
  inset: -34%;
  z-index: 0;
  background: conic-gradient(from 0deg, #22d3ee, #4f46e5, #a855f7, #ec4899, #f59e0b, #22d3ee);
  animation: shortcut-aurora 10s linear infinite;
}

.s-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 68%),
    rgba(12, 15, 24, 0.34);
}

@keyframes shortcut-aurora {
  to { transform: rotate(1turn); }
}

.shortcut:hover .s-icon {
  transform: scale(1.05);
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.34);
}

.s-favicon {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 13px;
  overflow: hidden;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

.s-favicon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.shortcut-meta {
  width: 100%;
  min-width: 0;
  text-align: center;
}

.shortcut-title {
  max-width: 100%;
  padding: 0 2px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.shortcut-host {
  margin-top: 1px;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.shortcut-actions {
  display: flex;
  justify-content: center;
  gap: 6px;
  height: 26px;
  margin-top: 0;
  opacity: 0;
  transition: opacity 0.15s;
}

.shortcut:hover .shortcut-actions,
.shortcut:focus-within .shortcut-actions {
  opacity: 1;
}

.shortcut-actions button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
}

.shortcut-actions button:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.shortcut-actions button.danger:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.shortcut-actions svg {
  width: 14px;
  height: 14px;
}

.shortcut-add {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  min-height: 122px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.shortcut-add:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.shortcut-add svg {
  width: 22px;
  height: 22px;
}

.empty {
  margin-top: 18px;
  padding: 34px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.empty p {
  margin: 0 0 14px;
}

.empty.small {
  padding: 22px 12px;
  border: 0;
  font-size: 12px;
}

/* ---------- 通用视图头 ---------- */
.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.view-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.view-head p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- 记事本 ---------- */
.notes-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  min-height: 520px;
  height: calc(100vh - 190px);
}

.notes-list-pane,
.note-editor,
.editor-placeholder {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 0;
}

.notes-list-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notes-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}

.notes-search svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.notes-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12.5px;
}

.notes-list {
  flex: 1;
  overflow-y: auto;
}

.note-item {
  width: 100%;
  padding: 13px 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background 0.15s;
}

.note-item:hover {
  background: var(--panel-2);
}

.note-item.active {
  background: var(--brand-soft);
  box-shadow: inset 2px 0 0 var(--brand);
}

.note-item-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-item-snippet {
  font-size: 11.5px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-item-time {
  font-size: 10.5px;
  color: var(--muted);
  opacity: 0.8;
}

.note-editor {
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.note-editor.active {
  display: flex;
}

.editor-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.editor-head input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
}

.save-state {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

#note-content {
  flex: 1;
  width: 100%;
  min-height: 320px;
  padding: 20px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font-size: 14.5px;
  line-height: 1.85;
}

.editor-placeholder {
  display: none;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  border-style: dashed;
}

.notes-layout:not(.has-note) .editor-placeholder {
  display: grid;
}

.editor-placeholder img {
  width: 44px;
  opacity: 0.5;
}

/* ---------- 网盘 ---------- */
.dropzone {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  padding: 32px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover,
.dropzone.dragging {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.dropzone svg {
  width: 28px;
  height: 28px;
  color: var(--brand);
}

.dropzone p {
  margin: 0;
  font-size: 13px;
  color: var(--text);
}

.dropzone span {
  font-size: 11.5px;
}

.file-list {
  margin-top: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.file-list:empty {
  display: none;
}

.file-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}

.file-row:last-child {
  border-bottom: 0;
}

.file-ext {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: uppercase;
  overflow: hidden;
}

.file-meta {
  min-width: 0;
}

.file-name {
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}

.file-actions {
  display: flex;
  gap: 2px;
}

/* 网盘工具栏：路径 + 视图切换 */
.file-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.file-head-actions .btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}

.file-path {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  min-height: 30px;
  font-size: 12.5px;
  color: var(--muted);
}

.file-path button {
  max-width: 220px;
  padding: 4px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.file-path button:hover {
  background: var(--panel-2);
  color: var(--text);
}

.file-path button.current {
  color: var(--text);
  font-weight: 600;
  cursor: default;
}

.file-path button.current:hover {
  background: transparent;
}

.file-path i {
  font-style: normal;
  opacity: 0.45;
}

.file-view-switch {
  display: flex;
  flex: none;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}

.file-view-switch .seg {
  width: 30px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 7px;
}

.file-view-switch .seg svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 网格视图 */
.file-list.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 16px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.file-card,
.folder-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.folder-card {
  cursor: pointer;
}

.file-card:hover,
.folder-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.folder-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}

.folder-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  overflow: hidden;
}

.folder-name,
.file-card .file-name {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}

.folder-sub,
.file-card .file-sub {
  margin-top: auto;
  font-size: 11px;
  color: var(--muted);
}

.card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  opacity: 1;
  z-index: 3;
  transition: opacity 0.15s;
}

.file-card:hover .card-actions,
.folder-card:hover .card-actions,
.file-card:focus-within .card-actions,
.folder-card:focus-within .card-actions {
  opacity: 1;
}

.card-actions .icon-btn {
  width: 26px;
  height: 26px;
}

.card-actions .icon-btn svg {
  width: 14px;
  height: 14px;
}

@media (hover: none) {
  .card-actions {
    opacity: 1;
  }
}

/* 列表视图 */
.file-list.list-view {
  margin-top: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.file-list.grid-view:empty,
.file-list.list-view:empty {
  display: none;
}

.file-ext.folder {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: transparent;
}

.file-ext.folder svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.folder-row {
  cursor: pointer;
}

.folder-row:hover {
  background: var(--panel-2);
}

.field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
}

/* ---------- 我的 ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.panel h3 {
  margin: 0 0 16px;
  font-size: 15px;
}

.profile-card {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px 40px;
}

/* 插件中心：紧跟在升级会员卡片下方，整行铺满 */
.profile-plugins {
  grid-column: 1 / -1;
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 220px;
}

.profile-main h3 {
  margin: 0;
  font-size: 18px;
}

.profile-main p {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.profile-stats {
  display: flex;
  gap: 28px;
}

.profile-stats div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.profile-stats b {
  font-size: 19px;
}

.profile-stats span {
  font-size: 11.5px;
  color: var(--muted);
}

.meta-rows {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  min-width: 180px;
}

.meta-rows div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.meta-rows span {
  color: var(--muted);
}

.meta-rows b {
  font-weight: 550;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack-form .btn {
  align-self: flex-start;
  margin-top: 2px;
}

.pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.pref-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.pref-row b {
  font-size: 13px;
  font-weight: 600;
}

.pref-row p {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 12, 20, 0.44);
  animation: fade-in 0.15s ease;
}

.modal {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 30px 80px rgba(10, 12, 20, 0.25);
  animation: modal-in 0.18s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-head h3 {
  margin: 0;
  font-size: 16px;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.modal-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- 消息 ---------- */
.nav-dot,
.msg-bell-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 2px var(--panel);
}

.nav-dot {
  top: 9px;
  right: 13px;
}

.msg-bell {
  position: relative;
}

.msg-bell-dot {
  top: 7px;
  right: 8px;
}

.msg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg-item {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.msg-item.unread {
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: inset 3px 0 0 var(--brand);
}

.msg-item-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.16), rgba(8, 145, 178, 0.16));
  color: var(--brand);
}

.msg-item-icon svg {
  width: 19px;
  height: 19px;
}

.msg-item-body {
  flex: 1;
  min-width: 0;
  padding-right: 22px;
}

.msg-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.msg-item-head b {
  font-size: 14px;
}

.msg-item-head small {
  flex: none;
  font-size: 11px;
  color: var(--muted);
}

.msg-item-body p {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  word-break: break-word;
}

.msg-coupon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 12px;
  border: 1px dashed rgba(79, 70, 229, 0.45);
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--brand);
  font-size: 12px;
  cursor: pointer;
}

.msg-coupon code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.msg-del {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.msg-del:hover {
  background: rgba(148, 163, 184, 0.16);
  color: var(--text);
}

.msg-del svg {
  width: 13px;
  height: 13px;
}

.msg-pop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 320;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(340px, calc(100vw - 32px));
  pointer-events: none;
}

.msg-pop-card {
  pointer-events: auto;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
  animation: msg-pop-in 0.28s ease;
}

.msg-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.msg-pop-head b {
  font-size: 13.5px;
}

.msg-pop-close {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.msg-pop-close:hover {
  background: rgba(148, 163, 184, 0.16);
  color: var(--text);
}

.msg-pop-close svg {
  width: 13px;
  height: 13px;
}

.msg-pop-card p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}

.msg-pop-coupon {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 7px 11px;
  border: 1px dashed rgba(79, 70, 229, 0.45);
  border-radius: 10px;
  background: rgba(79, 70, 229, 0.08);
  font-size: 11.5px;
  color: var(--muted);
}

.msg-pop-coupon code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--brand);
}

@keyframes msg-pop-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Toast ---------- */
.toast-root {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 9px 15px;
  border-radius: 11px;
  background: #111827;
  color: #fff;
  font-size: 12.5px;
  box-shadow: 0 10px 30px rgba(10, 12, 20, 0.25);
  animation: toast-in 0.18s ease;
}

.toast.error {
  background: #b91c1c;
}

.toast.success {
  background: #065f46;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 浏览器壳 ---------- */
.browser-bar {
  display: none;
  position: relative;
  z-index: 45;
  flex-direction: column;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

body.browser-mode .stage {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.browser-mode .topbar {
  display: none;
}

body.browser-mode .browser-bar {
  display: flex;
}

body.browser-mode .views {
  flex: 1;
  overflow-y: auto;
  padding: 26px 36px 50px;
}

body.browser-mode .webview-stack:not(.hidden) + .views {
  display: none;
}

.tabstrip {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 40px;
  padding: 6px 8px 0;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  overflow-y: hidden;
}

.tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 33px;
  min-width: 132px;
  max-width: 220px;
  padding: 0 8px 0 12px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  flex: none;
}

.tab:hover {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .tab:hover {
  background: rgba(255, 255, 255, 0.04);
}

.tab.active {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
}

.tab-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.tab-close {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  flex: none;
}

.tab-close:hover {
  background: var(--panel-2);
  color: var(--danger);
}

.tab-close svg {
  width: 12px;
  height: 12px;
}

.tab-new {
  width: 30px;
  height: 30px;
  margin-left: 2px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  flex: none;
}

.tab-new:hover {
  background: var(--panel);
  color: var(--text);
}

.browser-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 10px;
}

.tool-group {
  display: flex;
  gap: 1px;
}

.tool-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.tool-btn:hover:not(:disabled) {
  background: var(--panel-2);
  color: var(--text);
}

.account-avatar {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
}

/* 访客模式：隐藏账号数据，仅保留起始页与本地快捷访问 */
body.guest-mode .home-stats {
  display: none;
}

.tool-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.tool-btn svg {
  width: 17px;
  height: 17px;
}

.address-form {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.address-form:focus-within {
  background: var(--panel);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.address-icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.address-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12.5px;
}

.webview-stack {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #fff;
  overflow: hidden;
}

.webview-stack webview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
}

/* ---------- 移动端 ---------- */
.tabbar {
  display: none;
}

/* ---------- iPad / 平板 ---------- */
@media (min-width: 901px) and (max-width: 1180px) {
  .stage {
    padding: 22px 26px 48px;
  }

  .home {
    padding-top: 24px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .shortcut-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 18px 8px;
  }

  .notes-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 14px;
  }

  .profile-grid {
    gap: 14px;
  }
}

@media (min-width: 1440px) {
  .home {
    width: min(1080px, 100%);
  }

  .profile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .sidebar-reopen {
    display: none;
  }

  .stage {
    height: auto;
    min-height: 100dvh;
    padding: 0 0 calc(74px + env(safe-area-inset-bottom));
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: calc(54px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
  }

  .topbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }

  .topbar-brand img {
    width: 25px;
    height: 25px;
  }

  .h5-crumb {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    max-width: calc(100% - 132px);
    padding: 4px 7px 4px 4px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    text-align: left;
  }

  .h5-crumb:active {
    background: var(--panel-2);
  }

  .h5-crumb img {
    flex: none;
    width: 25px;
    height: 25px;
  }

  .h5-crumb-path {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
  }

  .h5-crumb-root {
    flex: none;
    color: var(--muted);
    font-weight: 600;
  }

  .h5-crumb-sep {
    flex: none;
    width: 11px;
    height: 11px;
    color: var(--muted);
    opacity: 0.7;
  }

  .h5-crumb strong {
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .h5-crumb-caret {
    flex: none;
    width: 13px;
    height: 13px;
    color: var(--muted);
    transition: transform 0.18s ease;
  }

  .h5-crumb[aria-expanded="true"] .h5-crumb-caret {
    transform: rotate(180deg);
  }

  .h5-menu-mask {
    position: fixed;
    inset: 0;
    z-index: 18;
    display: block;
    background: rgba(6, 9, 18, 0.42);
    animation: fade-in 0.16s ease;
  }

  .h5-menu {
    position: fixed;
    top: calc(60px + env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    z-index: 24;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 62vh;
    padding: 12px;
    overflow-y: auto;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    animation: fade-in 0.16s ease;
  }

  .h5-menu-item {
    height: auto;
    min-height: 74px;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    padding: 10px 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 12.5px;
    text-align: center;
  }

  .h5-menu-item svg {
    width: 22px;
    height: 22px;
  }

  #h5-admin-link {
    grid-column: 1 / -1;
    min-height: 48px;
    flex-direction: row;
    gap: 9px;
  }

  .topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .views {
    padding: 16px 14px 18px;
  }

  .home {
    padding-top: 12px;
  }

  .hero-mark {
    width: 58px;
    height: 58px;
  }

  .hero h1 {
    font-size: 27px;
  }

  .hero p {
    font-size: 12.5px;
  }

  .searchbar {
    height: 52px;
    margin-top: 20px;
    padding-left: 14px;
    border-radius: 16px;
  }

  .search-go {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .section-head {
    margin-top: 28px;
  }

  .shortcut-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px 6px;
  }

  .shortcut {
    min-height: 0;
    padding: 8px 4px 6px;
    border-radius: 18px;
  }

  .shortcut-add {
    min-height: 112px;
    padding: 13px;
    border-radius: 14px;
  }

  .view-head {
    align-items: center;
    margin-bottom: 14px;
  }

  .view-head h2 {
    font-size: 19px;
  }

  .view-head p {
    font-size: 11.5px;
  }

  .view-head .btn {
    height: 36px;
    padding: 0 12px;
  }

  .notes-layout {
    display: block;
    height: auto;
    min-height: 0;
  }

  .notes-list-pane {
    min-height: 320px;
    max-height: none;
  }

  .notes-list {
    max-height: 420px;
  }

  .note-editor {
    display: none;
    min-height: 440px;
  }

  .notes-layout.editing .notes-list-pane {
    display: none;
  }

  .notes-layout.editing .note-editor {
    display: flex;
  }

  .back-to-list {
    display: grid !important;
  }

  .editor-placeholder {
    display: none !important;
  }

  .notes-layout:not(.has-note) .note-editor {
    display: none;
  }

  .dropzone {
    padding: 24px 14px;
  }

  .file-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 11px 12px;
  }

  .file-ext {
    width: 34px;
    height: 34px;
    font-size: 8.5px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .meta-rows {
    margin-left: 0;
    width: 100%;
  }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    height: calc(58px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--panel);
    border-top: 1px solid var(--line);
  }

  .tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 10.5px;
    text-decoration: none;
  }

  .tab-item.active {
    color: var(--brand);
  }

  .tab-item svg {
    width: 20px;
    height: 20px;
  }

  .toast-root {
    top: 12px;
    width: calc(100% - 28px);
  }

  .msg-pop {
    left: 14px;
    right: 14px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    width: auto;
  }

  .msg-item {
    padding: 14px;
    gap: 10px;
  }

  .msg-item-icon {
    width: 32px;
    height: 32px;
  }

  .msg-item-head {
    flex-direction: column;
    gap: 2px;
  }

  .toast {
    text-align: center;
  }

  body.browser-mode .stage {
    height: 100vh;
  }

  body.browser-mode .browser-bar {
    display: flex;
  }

  body.browser-mode .views {
    padding: 16px 14px 90px;
  }
}

@media (max-width: 560px) {
  .auth {
    padding: 16px;
    align-items: start;
    padding-top: 40px;
  }

  .auth-card {
    padding: 22px;
    border-radius: 20px;
  }

  .shortcut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-stats {
    gap: 10px;
  }

  .modal {
    padding: 18px;
    border-radius: 18px;
  }

  .modal-overlay {
    padding: 12px;
    align-items: end;
  }

  .profile-stats {
    width: 100%;
    justify-content: space-between;
  }

  .file-head-actions {
    width: 100%;
  }

  .file-head-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .file-tools {
    gap: 8px;
  }

  .file-list.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  }
}

@media (hover: none) {
  .shortcut-actions {
    opacity: 1;
  }
}

@media (pointer: coarse) {
  .nav-item {
    height: 46px;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
  }

  .btn {
    min-height: 42px;
  }

  .shortcut {
    min-height: 0;
  }

  .shortcut-add {
    min-height: 118px;
  }

  .note-item,
  .file-row {
    min-height: 48px;
  }

  .tab-item {
    font-size: 11px;
  }
}

/* ---------- 会员中心 ---------- */
.view[data-view="member"] > .panel,
.member-tab-panel > .panel {
  margin-bottom: 16px;
}

.member-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.member-tab {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.16s, color 0.16s, background 0.16s;
}

.member-tab:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.member-tab.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.member-tab-panel {
  display: block;
}

.member-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(34, 211, 238, 0.07));
}

.member-hero-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 240px;
}

.member-emblem {
  flex: none;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.member-emblem.vip {
  background: linear-gradient(135deg, #22d3ee, #4f46e5 55%, #a855f7);
  color: #fff;
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.32);
}

.member-level {
  font-size: 18px;
  font-weight: 700;
}

.member-hero-main p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.member-quota {
  flex: 1;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quota-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11.5px;
  color: var(--muted);
}

.quota-head b {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.quota-track {
  height: 6px;
  margin-top: 6px;
  border-radius: 6px;
  background: var(--line);
  overflow: hidden;
}

.quota-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #22d3ee, #4f46e5, #a855f7);
  transition: width 0.35s ease;
}

.member-cycles {
  flex: none;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.plan-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.plan-card::before,
.coupon-chip::before {
  content: "";
  position: absolute;
  inset: -70%;
  z-index: -1;
  background: conic-gradient(from 0deg, #6366f1, #06b6d4, #ec4899, #f59e0b, #22c55e, #6366f1);
  opacity: 0.18;
  filter: blur(22px);
  animation: plugin-aurora 22s linear infinite;
}

[data-theme="dark"] .plan-card::before,
[data-theme="dark"] .coupon-chip::before {
  opacity: 0.26;
}

.plan-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
}

.plan-card.active {
  border-color: var(--brand);
  box-shadow: 0 14px 34px rgba(79, 70, 229, 0.2);
}

.plan-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10px;
  font-weight: 600;
}

.plan-badge:empty {
  display: none;
}

.plan-name {
  font-size: 15px;
  font-weight: 600;
}

.plan-price {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plan-price small {
  margin-left: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.plan-storage {
  font-size: 11.5px;
  color: var(--muted);
}

.plan-features {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
}

.plan-features li::before {
  content: "✓";
  margin-right: 6px;
  color: var(--brand);
}

.plan-pick {
  margin-top: auto;
  padding-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
}

.coupon-line {
  display: flex;
  gap: 8px;
}

.coupon-line input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
}

.coupon-line input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.coupon-message {
  margin: 10px 0 0;
  font-size: 11.5px;
  color: #10b981;
}

.coupon-message.warn {
  color: #ef4444;
}

.coupon-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.coupon-chip {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 132px;
  padding: 9px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.coupon-chip:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
}

.coupon-chip b {
  font-size: 12.5px;
  color: var(--brand);
  letter-spacing: 0.04em;
}

.coupon-chip span {
  color: var(--muted);
}

.coupon-chip small {
  font-size: 10px;
  color: var(--brand);
}

.coupon-chip.disabled {
  opacity: 0.45;
  cursor: default;
}

.coupon-chip.disabled:hover {
  transform: none;
  border-color: var(--line-strong);
}

.checkout-lines {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}

.checkout-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.checkout-line b {
  color: var(--text);
  font-weight: 600;
}

.checkout-line.discount b {
  color: #10b981;
}

.checkout-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.checkout-total b {
  font-size: 24px;
  font-weight: 700;
  color: var(--brand);
}

@media (max-width: 1100px) {
  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .member-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .plan-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-cycles {
    width: 100%;
  }

  .panel-head {
    flex-wrap: wrap;
    gap: 10px;
  }
}


/* ================= 上传队列时间轴 ================= */
.upload-dock {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 344px;
  max-width: calc(100vw - 32px);
  z-index: 70;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 46px -22px rgba(16, 24, 40, 0.45);
  overflow: hidden;
  animation: uploadDockIn 0.24s ease;
}

.upload-dock.hidden {
  display: none;
}

.upload-dock-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.upload-dock-title {
  font-size: 12.5px;
  font-weight: 700;
}

.upload-dock-sum {
  margin-right: auto;
  font-size: 11.5px;
  color: var(--muted);
}

.upload-dock .icon-btn {
  width: 24px;
  height: 24px;
  font-size: 15px;
  line-height: 1;
}

.upload-dock.collapsed .upload-list {
  display: none;
}

.upload-list {
  max-height: 44vh;
  overflow-y: auto;
  padding: 12px 14px 14px;
}

.upload-item {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 0 0 14px 22px;
}

.upload-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: -2px;
  width: 1px;
  background: var(--line);
}

.upload-item:last-child::before {
  display: none;
}

.upload-item:last-child {
  padding-bottom: 0;
}

.upload-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--panel);
}

.upload-item[data-state="uploading"] .upload-dot {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.upload-item[data-state="done"] .upload-dot {
  border-color: var(--ok);
  background: var(--ok);
}

.upload-item[data-state="failed"] .upload-dot {
  border-color: var(--danger);
  background: var(--danger);
}

.upload-body {
  flex: 1;
  min-width: 0;
}

.upload-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.upload-line b {
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-pct {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.upload-bar {
  height: 5px;
  margin: 7px 0 6px;
  border-radius: 999px;
  background: var(--panel-2);
  overflow: hidden;
}

.upload-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #22d3ee, #34d399, #f59e0b, #ec4899, #6366f1);
  background-size: 300% 100%;
  animation: uploadGradient 2.4s linear infinite;
  transition: width 0.18s linear;
}

.upload-item[data-state="done"] .upload-bar i {
  background: linear-gradient(90deg, #34d399, #22d3ee, #34d399);
  background-size: 200% 100%;
  animation: uploadGradient 3s linear infinite;
}

.upload-item[data-state="failed"] .upload-bar i {
  background: linear-gradient(90deg, #f87171, #dc2626);
  animation: none;
}

@keyframes uploadGradient {
  from { background-position: 0% 0; }
  to { background-position: 300% 0; }
}

.upload-sub {
  font-size: 10.5px;
  color: var(--muted);
}

.upload-item[data-state="failed"] .upload-state {
  color: var(--danger);
}

.upload-item[data-state="done"] .upload-state {
  color: var(--ok);
}

.upload-retry {
  align-self: flex-start;
  margin-top: 6px;
  height: 26px;
  padding: 0 10px;
  font-size: 11px;
}

@keyframes uploadDockIn {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ================= 图片封面与缩略图 ================= */
.file-cover {
  display: block;
  width: 100%;
  height: 104px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-2);
}

.file-cover img,
.file-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-card.image-card {
  gap: 6px;
}

.file-thumb-wrap {
  padding: 0;
  overflow: hidden;
}

.file-thumb.small {
  width: 100%;
  height: 100%;
}

.file-thumb.thumb-failed {
  opacity: 0;
}

/* ================= 图片浮层（3D 切换） ================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.lightbox.hidden {
  display: none;
}

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 18, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lb-stage {
  position: relative;
  width: min(1080px, 92vw);
  height: min(76vh, 760px);
  perspective: 1400px;
  touch-action: pan-y;
}

.lb-coverflow {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.lb-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  height: auto;
  max-width: min(46vw, 520px);
  max-height: 60vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  transform-origin: 50% 50%;
  transform: translate(-50%, -50%) scale(0.42);
  opacity: 0;
  filter: brightness(0.6);
  transition: transform 0.46s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.46s ease, filter 0.46s ease;
  will-change: transform, opacity;
  pointer-events: none;
  backface-visibility: hidden;
}

.lb-card[data-pos="0"] {
  transform: translate(-50%, -50%) translateZ(90px) scale(1);
  opacity: 1;
  filter: brightness(1);
  z-index: 5;
  pointer-events: auto;
}

.lb-card[data-pos="-1"] {
  transform: translate(calc(-50% - 54%), -50%) translateZ(-50px) rotateY(24deg) scale(0.7);
  opacity: 0.6;
  filter: brightness(0.74) saturate(0.95);
  z-index: 4;
  pointer-events: auto;
  cursor: pointer;
}

.lb-card[data-pos="1"] {
  transform: translate(calc(-50% + 54%), -50%) translateZ(-50px) rotateY(-24deg) scale(0.7);
  opacity: 0.6;
  filter: brightness(0.74) saturate(0.95);
  z-index: 4;
  pointer-events: auto;
  cursor: pointer;
}

.lb-card[data-pos="-2"] {
  transform: translate(calc(-50% - 92%), -50%) translateZ(-130px) rotateY(32deg) scale(0.46);
  opacity: 0.28;
  filter: brightness(0.62);
  z-index: 3;
  pointer-events: auto;
  cursor: pointer;
}

.lb-card[data-pos="2"] {
  transform: translate(calc(-50% + 92%), -50%) translateZ(-130px) rotateY(-32deg) scale(0.46);
  opacity: 0.28;
  filter: brightness(0.62);
  z-index: 3;
  pointer-events: auto;
  cursor: pointer;
}

.lb-coverflow.no-anim .lb-card,
.lb-card.lb-recycle {
  transition: none;
}

.lb-card.lb-recycle {
  opacity: 0;
}

.lb-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.lb-nav.prev {
  left: 18px;
}

.lb-nav.next {
  right: 18px;
}

.lb-close:hover,
.lb-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lb-caption {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  max-width: 80vw;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(10, 12, 20, 0.62);
  color: #e8ecf5;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .upload-dock {
    left: 12px;
    right: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
  }

  .upload-list {
    max-height: 32vh;
  }

  .lightbox {
    padding: 16px;
  }

  .lb-stage {
    width: 100%;
    height: 64vh;
  }

  .lb-card {
    max-width: 68vw;
    max-height: 52vh;
  }

  .lb-nav {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .lb-nav.prev {
    left: 6px;
  }

  .lb-nav.next {
    right: 6px;
  }

  .lb-close {
    top: 12px;
    right: 12px;
  }

  .file-cover {
    height: 92px;
  }
}

/* ================= 上传分组、汇总与时间轴 ================= */
.upload-group {
  padding: 10px 0 12px;
  border-bottom: 1px dashed var(--line);
}

.upload-group:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.upload-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.ug-title {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.ug-sum {
  flex: 1;
  min-width: 0;
  text-align: right;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ug-toggle {
  flex: none;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 11px;
  line-height: 1.4;
  cursor: pointer;
}

.upload-group-bar {
  height: 4px;
  margin-bottom: 9px;
  border-radius: 999px;
  background: var(--panel-2);
  overflow: hidden;
}

.upload-group-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #22d3ee, #34d399, #f59e0b, #ec4899, #6366f1);
  background-size: 300% 100%;
  animation: uploadGradient 2.4s linear infinite;
  transition: width 0.2s linear;
}

.upload-group.collapsed .upload-group-items {
  display: none;
}

.upload-group-items .upload-item:last-child {
  padding-bottom: 0;
}

.upload-group .upload-item {
  padding-left: 18px;
}

.upload-group .upload-item::before {
  left: 4px;
}

.upload-summary {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 10.5px;
  color: var(--muted);
}

.upload-timeline {
  position: relative;
  height: 8px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--panel-2);
  overflow: hidden;
}

.ut-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
}

.ut-seg.done {
  background: linear-gradient(90deg, #34d399, #22d3ee);
}

.ut-seg.failed {
  background: linear-gradient(90deg, #f87171, #dc2626);
}

.ut-seg.uploading {
  background: linear-gradient(90deg, #6366f1, #22d3ee);
}

.ut-seg.waiting {
  background: var(--line-strong);
}

.upload-history-title {
  margin: 14px 0 2px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.upload-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 2px;
}

.upload-history-head .upload-history-title {
  margin: 0;
}

.upload-history-clear {
  flex: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 11px;
  cursor: pointer;
}

.ug-remove {
  flex: none;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 11px;
  cursor: pointer;
}

.upload-empty {
  margin: 10px 0 4px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}

.upload-group.history .upload-summary {
  border-top: 0;
}

.ut-seg {
  outline: 1px solid var(--panel);
  outline-offset: -1px;
}

/* 上传状态补充：校验中 / 重复跳过，进度条流光 */
.upload-item[data-state="checking"] .upload-dot {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.upload-item[data-state="duplicate"] .upload-dot {
  border-color: #f59e0b;
  background: #f59e0b;
}

.upload-item[data-state="duplicate"] .upload-state {
  color: #b45309;
}

.upload-item[data-state="duplicate"] .upload-bar i {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  animation: none;
}

.upload-bar i,
.upload-group-bar i {
  position: relative;
  overflow: hidden;
}

.upload-bar i::after,
.upload-group-bar i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.6) 50%, transparent 68%);
  transform: translateX(-100%);
  animation: uploadShine 1.6s linear infinite;
}

@keyframes uploadShine {
  to { transform: translateX(100%); }
}

/* 桌面端：侧栏展开/收拢统一由浏览器栏左侧按钮控制 */
body.is-desktop .sidebar-toggle,
body.is-desktop .sidebar-reopen {
  display: none;
}

/* ================= 插件导航与插件中心 ================= */
.plugin-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.h5-plugin-nav {
  display: contents;
}

/* 插件中心：不包大边框，卡片自带炫彩背景 */
.panel-flat {
  padding: 0;
  border: 0;
  background: transparent;
}

.panel-flat .panel-head {
  padding: 0 2px 12px;
}

.plugin-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
}

.plugin-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 20px 14px 16px;
  border: 0;
  border-radius: 18px;
  background: var(--panel-2);
  box-shadow: var(--shadow-soft);
}

.plugin-card::before {
  content: "";
  position: absolute;
  inset: -70%;
  z-index: -1;
  background: conic-gradient(from 0deg, #6366f1, #06b6d4, #ec4899, #f59e0b, #22c55e, #6366f1);
  opacity: 0.18;
  filter: blur(22px);
  animation: plugin-aurora 22s linear infinite;
}

[data-theme="dark"] .plugin-card::before {
  opacity: 0.26;
}

@keyframes plugin-aurora {
  to {
    transform: rotate(360deg);
  }
}

.plugin-icon {
  flex: none;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--panel);
  color: var(--brand);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.16);
}

.plugin-icon svg {
  width: 27px;
  height: 27px;
}

.plugin-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  width: 100%;
}

.plugin-name {
  max-width: 100%;
  font-size: 14.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plugin-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.plugin-version {
  font-size: 11px;
  color: var(--muted);
}

.plugin-desc {
  min-height: 34px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plugin-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.plugin-round {
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--panel);
  color: var(--muted);
  transition: background 0.16s, color 0.16s, border-color 0.16s, transform 0.16s;
}

.plugin-round svg {
  width: 14px;
  height: 14px;
}

.plugin-round:hover {
  color: var(--text);
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-1px);
}

.plugin-round.primary,
.plugin-round.toggle.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.plugin-round.primary:hover,
.plugin-round.toggle.on:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #fff;
}

.plugin-round.danger:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-soft);
}

.plugin-round:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.plugin-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
}

.plugin-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}

.plugin-state.on i {
  background: var(--ok);
}

.plugin-state.waiting i {
  background: #f59e0b;
}

.plugin-badges {
  display: flex;
  justify-content: center;
  margin-top: 2px;
}

.plugin-update-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

[data-theme="dark"] .plugin-update-badge {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.plugin-card.has-update {
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.4), var(--shadow-soft);
}

.plugin-round.update {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
}

.plugin-round.update:hover {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}

/* 拖动排序与订阅状态 */
.plugin-grip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  opacity: 0.55;
  cursor: grab;
  touch-action: none;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
}

.plugin-grip svg {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}

.plugin-grip:hover {
  opacity: 1;
  color: var(--brand);
  background: var(--brand-soft);
}

.plugin-card.dragging {
  pointer-events: none;
  opacity: 0.55;
  transform: scale(0.97);
  box-shadow: 0 12px 30px -18px rgba(16, 24, 40, 0.5);
}

.plugin-expire {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}

.plugin-expire.expired {
  color: var(--danger);
}

.plugin-renew {
  display: inline-flex;
  align-items: center;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.plugin-renew:hover {
  background: var(--brand);
  color: #fff;
}

.plugin-card.expired {
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.28), var(--shadow-soft);
}

.plugin-state.expired i {
  background: var(--danger);
}

.plugin-state.expired {
  color: var(--danger);
}

.backup-modal {
  width: min(680px, calc(100vw - 32px));
  max-height: min(78vh, 720px);
}

.backup-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--text);
  font-size: 12px;
  line-height: 1.7;
}

.backup-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.backup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}

.backup-item.is-missing {
  opacity: 0.6;
}

.backup-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.backup-main b {
  font-size: 13px;
}

.backup-time,
.backup-meta {
  font-size: 11.5px;
  color: var(--muted);
}

.backup-ops {
  display: flex;
  gap: 6px;
  flex: none;
}

.modal-note {
  white-space: pre-line;
}

.switch {
  position: relative;
  flex: none;
  width: 40px;
  height: 23px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.18s ease, background 0.18s ease;
}

.switch.on {
  background: var(--brand);
  border-color: var(--brand);
}

.switch.on::after {
  background: #fff;
  transform: translateX(17px);
}

.switch:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .plugin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .plugin-card {
    padding: 16px 10px 14px;
  }
}


/* ================= 设置：统一 AI 配置 ================= */
.ai-panel .panel-head {
  align-items: flex-start;
}

.ai-panel .panel-head .muted {
  display: block;
  margin-top: 3px;
  font-size: 12px;
}

.ai-vendor-list,
.ai-data-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.ai-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
}

.ai-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.ai-card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.ai-card-title b {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.ai-card-actions {
  display: flex;
  gap: 2px;
  flex: none;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.ai-card:hover .ai-card-actions,
.ai-card:focus-within .ai-card-actions {
  opacity: 1;
}

.ai-badge {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10.5px;
  line-height: 1.75;
  white-space: nowrap;
}

.ai-badge.off {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.ai-card-url {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.ai-card-meta {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
}

.ai-card-note {
  margin: 0;
  font-size: 11.5px;
  color: var(--text);
  opacity: 0.72;
}

/* ---------- AI 算力余额与操作 ---------- */
.ai-quota-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  font-size: 11.5px;
  color: var(--muted);
}

.ai-quota-row.ok {
  border-color: rgba(5, 150, 105, 0.32);
  background: rgba(5, 150, 105, 0.06);
}

.ai-quota-row.expired,
.ai-quota-row.off {
  border-style: dashed;
}

.ai-quota-label {
  font-weight: 600;
  color: var(--text);
}

.ai-quota-value {
  color: var(--text);
  font-weight: 600;
}

.ai-quota-value small {
  font-weight: 400;
  color: var(--muted);
}

.ai-quota-hint {
  flex: 1 1 100%;
  color: var(--muted);
  line-height: 1.5;
}

.ai-quota-bar {
  flex: 1 1 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.ai-quota-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee, #4f46e5);
}

.ai-card-foot {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.ai-act-btn {
  flex: 1;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.ai-act-btn:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
}

.ai-act-btn.danger {
  color: var(--danger);
}

.ai-act-btn.danger:hover {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.ai-act-btn.primary {
  border-color: transparent;
  background: var(--brand);
  color: #fff;
}

.ai-act-btn.primary:hover {
  background: var(--brand-hover);
}

.ai-model-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.ai-model-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  font-size: 11px;
}

.ai-model-chip code {
  font-size: 11px;
  overflow-wrap: anywhere;
}

.ai-cat {
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10px;
}

.ai-model-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
}

.ai-model-editor-head b {
  font-size: 13px;
}

.ai-model-editor-head .hint {
  margin: 2px 0 0;
}

.ai-model-add {
  display: flex;
  gap: 8px;
}

.ai-model-add input {
  flex: 1;
  min-width: 0;
}

.ai-model-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-model-row {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}

.ai-model-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ai-model-line code {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.ai-cat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.ai-cat-btn {
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.ai-cat-btn.active {
  border-color: transparent;
  background: var(--brand-soft);
  color: var(--brand);
}

.ai-suggest {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
}

.ai-suggest-chip {
  padding: 2px 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.ai-suggest-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.ai-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.ai-test-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-test-row .hint {
  margin: 0;
}

[data-ai-auth-name].hidden {
  display: none;
}

@media (max-width: 720px) {
  .ai-vendor-list,
  .ai-data-list {
    grid-template-columns: 1fr;
  }
}
