/* pages.css — 各页面专属样式 */

/* 通用页头：桌面同行右对齐，手机自动换行拉伸 */
.page-head {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 12px; margin-bottom: var(--gutter);
}
.page-head .titles { flex: 1 1 auto; min-width: 0; }
.page-head h1 { margin: 0; font-size: 18px; font-weight: 700; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.page-head .actions {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-left: auto;
}
@media (max-width: 767px) {
  .page-head .actions {
    width: 100%; margin-left: 0;
  }
  .page-head .actions .btn { flex: 1 1 0; min-width: 0; padding-left: 8px; padding-right: 8px; }
}

/* 账号页 —— 工具栏 */
.acc-toolbar-wrap { margin-bottom: 10px; }
.acc-toolbar-card {
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .04);
}
.acc-toolbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.acc-toolbar-row .seg { flex: 1; min-width: 0; }
.acc-bulk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.acc-bulk-row .acc-bulk-btn { flex: 1; min-width: 120px; justify-content: center; }
.acc-card.connecting { opacity: .92; }
.acc-card .pill.status.connecting {
  color: var(--warn, #e6a23c);
  border-color: rgba(230, 162, 60, .35);
  background: rgba(230, 162, 60, .12);
}
.acc-toolbar-card .seg {
  display: inline-flex; padding: 3px; width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--panel-border); border-radius: 999px;
  justify-content: space-between;
}
.acc-toolbar-card .seg button {
  background: transparent; border: none; color: var(--muted);
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
  font-size: 12px; min-height: 28px; flex: 1;
}
.acc-toolbar-card .seg button.on {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--on-primary); font-weight: 600;
}
.acc-search-field {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 12px;
  background: var(--input-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.acc-search-field:focus-within {
  border-color: var(--primary-a45);
  background: var(--panel);
  box-shadow: 0 0 0 3px var(--primary-a12);
}
.acc-search-field.disabled { opacity: .62; pointer-events: none; }
.acc-search-ico {
  flex-shrink: 0; display: flex; align-items: center; color: var(--muted);
}
.acc-search-field:focus-within .acc-search-ico { color: var(--primary); }
.acc-search-inp {
  flex: 1; min-width: 0; height: 100%;
  border: none; outline: none; background: transparent;
  font-size: 14px; color: var(--text);
}
.acc-search-inp::placeholder { color: var(--muted); opacity: .9; }
.acc-sort-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 36px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--panel-border);
  background: var(--input-bg); color: var(--text);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
}
.acc-sort-btn.on {
  border-color: var(--primary-a50); color: var(--primary);
  background: var(--primary-a12);
}
.acc-import-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.acc-import-btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 56px; padding: 8px 6px;
  border-radius: 11px; border: 1px solid var(--panel-border);
  background: var(--input-bg); color: var(--text);
  font-size: 11.5px; font-weight: 600; line-height: 1.2;
  cursor: pointer; transition: border-color .15s, background .15s, transform .1s;
}
.acc-import-btn:active { transform: scale(0.98); }
.acc-import-btn svg { opacity: .9; }
.acc-import-btn.wechat { color: #07c160; border-color: rgba(7, 193, 96, .25); background: rgba(7, 193, 96, .08); }
.acc-import-btn.phone { color: var(--primary); border-color: var(--primary-a35); background: var(--primary-a08); }
.acc-import-btn.file { color: var(--text); }
.acc-phone-form .field { margin-bottom: 12px; }
.acc-phone-form label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.acc-phone-row { display: flex; gap: 8px; align-items: stretch; }
.acc-phone-row .input { flex: 1; min-width: 0; }
.acc-phone-row .btn { flex: 0 0 auto; white-space: nowrap; min-width: 96px; }
.acc-phone-status {
  font-size: 12px; color: var(--muted); text-align: center;
  min-height: 18px; margin-top: 4px;
}
.action-row {
  display: flex; gap: 8px; margin-bottom: 10px; padding: 0;
}
.action-row .btn {
  flex: 1; justify-content: center; height: 36px; font-size: 13px;
}
.acc-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 10px;
  padding: 8px 10px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px) saturate(120%);
}
.acc-toolbar .search {
  flex: 1 1 220px; min-width: 0; max-width: 360px;
  display: flex; align-items: center; gap: 8px;
  background: var(--input-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px; padding: 6px 10px;
}
.acc-toolbar .search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 13px; min-height: 26px;
}
.acc-toolbar .search svg { color: var(--muted); flex-shrink: 0; }
.acc-toolbar .seg {
  display: inline-flex; padding: 3px; background: var(--input-bg);
  border: 1px solid var(--panel-border); border-radius: 999px;
}
.acc-toolbar .seg button {
  background: transparent; border: none; color: var(--muted);
  padding: 5px 14px; border-radius: 999px; cursor: pointer;
  font-size: 12px; min-height: 28px;
}
.acc-toolbar .seg button.on {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--on-primary); font-weight: 600;
}
.acc-toolbar .grow { flex: 1; }

/* 移动端：搜索占整行，分段在下方 */
@media (max-width: 767px) {
  .acc-toolbar { gap: 8px; }
  .acc-toolbar .search { flex: 1 1 100%; max-width: none; }
  .acc-toolbar .seg { width: 100%; justify-content: space-between; }
  .acc-toolbar .seg button { flex: 1; }
}

/* 账号页 —— 统计行 */
.acc-stats {
  display: grid; gap: 8px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 10px;
}
.acc-stat {
  padding: 8px 10px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  display: flex; flex-direction: column; gap: 2px;
  position: relative; overflow: hidden;
}
.acc-stat .lbl { color: var(--muted); font-size: 10px; letter-spacing: .5px; text-transform: uppercase; }
.acc-stat .val { font-size: 17px; font-weight: 700; line-height: 1.2; }
.acc-stat.accent .val { color: var(--primary); }
.acc-stat.online .val { color: var(--accent); }
.acc-stat.offline .val { color: var(--muted); }

/* 账号列表骨架屏 */
.acc-skeleton .acc-skeleton-card {
  pointer-events: none;
  min-height: 118px;
  animation: acc-sk-pulse 1.2s ease-in-out infinite;
}
.acc-skeleton .sk-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(90deg, var(--input-bg) 25%, var(--hover-bg) 50%, var(--input-bg) 75%);
  background-size: 200% 100%;
  animation: acc-sk-shimmer 1.2s linear infinite;
}
.acc-skeleton .sk-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.acc-skeleton .sk-line {
  height: 10px; border-radius: 6px;
  background: linear-gradient(90deg, var(--input-bg) 25%, var(--hover-bg) 50%, var(--input-bg) 75%);
  background-size: 200% 100%;
  animation: acc-sk-shimmer 1.2s linear infinite;
}
.acc-skeleton .sk-line.w70 { width: 70%; }
.acc-skeleton .sk-line.w45 { width: 45%; }
.acc-skeleton-card .top { display: flex; gap: 10px; align-items: flex-start; }
@keyframes acc-sk-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes acc-sk-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .72; }
}

/* 账号页 —— 列表 */
.acc-grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.acc-card {
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 12px 10px 14px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s, box-shadow .18s;
}
.acc-card::before {
  content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, rgba(140,160,240,.25), rgba(140,160,240,.05));
}
.acc-card.online::before {
  background: linear-gradient(180deg, var(--accent), rgba(93,211,158,.2));
  box-shadow: 0 0 12px rgba(93,211,158,.45);
}
.acc-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-a40);
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
}
.acc-card .top { display: flex; align-items: flex-start; gap: 10px; }
.acc-card .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
  color: #fff;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 2px 8px rgba(0,0,0,.35);
}
.acc-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.acc-card .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.acc-card .name {
  display: flex; align-items: baseline; gap: 6px; min-width: 0;
  font-weight: 600; font-size: 13.5px;
}
.acc-card .name .name-text {
  flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acc-card .name .role-id {
  color: var(--muted); font-weight: 500; font-size: 11px; flex-shrink: 0;
}
.acc-card .sub {
  display: flex; align-items: center; gap: 8px; margin-top: 0;
  color: var(--muted); font-size: 11px;
}
.acc-card .pill.status {
  flex-shrink: 0; font-size: 10px; padding: 2px 8px;
  border-radius: 999px; line-height: 1.5;
  background: var(--input-bg); color: var(--muted);
  border: 1px solid var(--panel-border);
}
.acc-card .pill.status.online {
  background: linear-gradient(135deg, var(--accent-soft), rgba(93,211,158,.08));
  color: var(--accent); border-color: var(--accent-border);
}
.acc-card .actions { margin-top: auto; display: flex; gap: 6px; }
.acc-card .actions .btn { flex: 1; height: 32px; font-size: 12px; padding: 0 10px; }
.acc-card .actions .btn.ghost { flex: 0 0 40px; }
.acc-card.sorting {
  display: flex; align-items: flex-start; gap: 8px;
}
.acc-card.sorting:hover { transform: none; }
.acc-sort-btns { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; padding-top: 2px; }
.acc-sort-toggle.on { border-color: var(--primary-a50); color: var(--primary); background: var(--primary-a10); }

.acc-card .sub-id { color: var(--muted); font-size: 11px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.acc-card .actions .btn.icon-only { flex: 0 0 36px; padding: 0; justify-content: center; }

/* 账号卡片 — 区服切换入口 */
.acc-server-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  margin-top: 2px; padding: 4px 8px 4px 6px;
  border-radius: 999px;
  border: 1px solid var(--primary-a30);
  background: linear-gradient(135deg, var(--primary-a12), rgba(93,211,158,.06));
  color: var(--text); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: border-color .15s, background .15s, transform .12s;
}
.acc-server-chip:hover {
  border-color: var(--primary-a50);
  background: linear-gradient(135deg, var(--primary-a18), rgba(93,211,158,.12));
  transform: translateY(-1px);
}
.acc-server-chip-ico { display: flex; color: var(--primary); opacity: .9; flex-shrink: 0; }
.acc-server-chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.acc-server-chip-chev { display: flex; color: var(--muted); flex-shrink: 0; opacity: .75; }

/* 区服切换弹窗 (sws) */
.sws-modal { display: flex; flex-direction: column; gap: 12px; min-width: 0; width: 100%; }
.modal:has(.sws-modal) .modal-body { max-height: min(72vh, 640px); overflow: auto; }

.sws-hero {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(135deg, var(--primary-a10), rgba(93,211,158,.05));
}
.sws-hero-avatar {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: #fff; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 4px 12px rgba(0,0,0,.25);
}
.sws-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sws-hero-meta { flex: 1; min-width: 0; }
.sws-hero-name { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sws-hero-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.sws-hero-server { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-weight: 600; }
.sws-hero-id { font-family: ui-monospace, Menlo, Consolas, monospace; }

.sws-stats {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 8px 12px; border-radius: 10px;
  background: var(--input-bg); border: 1px solid var(--panel-border);
}
.sws-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 56px; }
.sws-stat-num { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.1; }
.sws-stat-label { font-size: 11px; color: var(--muted); }
.sws-stat-div { width: 1px; height: 28px; background: var(--panel-border); }

.sws-search {
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px; height: 38px;
  border-radius: 10px; border: 1px solid var(--panel-border);
  background: var(--input-bg); transition: border-color .15s;
}
.sws-search:focus-within { border-color: var(--primary-a50); }
.sws-search-ico { display: flex; color: var(--muted); flex-shrink: 0; }
.sws-search-input {
  flex: 1; min-width: 0; border: none !important; background: transparent !important;
  box-shadow: none !important; height: 100%; padding: 0; font-size: 13px;
}

.sws-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.sws-filter {
  height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--panel-border); background: var(--panel);
  color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.sws-filter:hover { border-color: var(--primary-a40); color: var(--text); }
.sws-filter.active {
  border-color: var(--primary-a50); color: var(--primary);
  background: var(--primary-a12);
}

.sws-list { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sws-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 32px 16px; color: var(--muted); font-size: 13px; text-align: center;
}
.sws-state-ico { display: flex; opacity: .55; }
.sws-state.loading .sws-state-ico { animation: sws-spin 1s linear infinite; }
@keyframes sws-spin { to { transform: rotate(360deg); } }

.sws-zone { display: flex; flex-direction: column; gap: 8px; }
.sws-zone-head {
  display: flex; align-items: center; gap: 8px;
  padding: 0 2px 4px; border-bottom: 1px dashed var(--panel-border);
}
.sws-zone.is-current-zone .sws-zone-head { border-bottom-color: var(--accent-border); }
.sws-zone-name { font-size: 14px; font-weight: 700; letter-spacing: .3px; }
.sws-zone.is-current-zone .sws-zone-name { color: var(--accent); }
.sws-zone-count { font-size: 11px; color: var(--muted); margin-left: auto; }
.sws-zone-tag {
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border);
}

.sws-zone-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.sws-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--panel-border); background: var(--panel);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.sws-card:hover { border-color: var(--primary-a35); }
.sws-card.is-selected { border-color: var(--primary-a45); background: var(--primary-a08); }
.sws-card.is-current {
  border-color: var(--accent-border);
  background: linear-gradient(135deg, rgba(93,211,158,.08), rgba(93,211,158,.02));
}

.sws-check { display: flex; align-items: center; cursor: pointer; }
.sws-check-input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }

.sws-card-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sws-card-line1 {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0;
}
.sws-card-line2 {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 10.5px; color: var(--muted);
}
.sws-role {
  font-size: 13px; font-weight: 700; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 100%;
}
.sws-server-pill {
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px;
  background: var(--primary-a15); color: var(--primary); border: 1px solid var(--primary-a30);
  flex-shrink: 0;
}
.sws-suffix { font-size: 9px; padding: 1px 5px; border-radius: 4px; font-weight: 700; flex-shrink: 0; }
.sws-suffix.left { background: var(--primary-a18); color: var(--primary); border: 1px solid var(--primary-a35); }
.sws-suffix.right { background: rgba(255,128,170,.15); color: #ff80aa; border: 1px solid rgba(255,128,170,.35); }
.sws-live-tag {
  font-size: 9px; padding: 1px 6px; border-radius: 999px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border);
}
.sws-id { font-family: ui-monospace, Menlo, Consolas, monospace; }
.sws-power { display: inline-flex; align-items: center; gap: 2px; color: #ffb547; font-weight: 600; }

.sws-card-actions {
  display: flex; flex-direction: row; gap: 4px; flex-shrink: 0;
}

.sws-mini-act {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; width: 42px; height: 42px; padding: 3px 2px;
  border-radius: 8px; border: 1px solid var(--panel-border);
  background: var(--input-bg); color: var(--text);
  cursor: pointer; transition: background .12s, border-color .12s, opacity .12s;
}
.sws-mini-act:disabled { opacity: .5; cursor: not-allowed; }
.sws-mini-ico { display: flex; line-height: 0; }
.sws-mini-lbl { font-size: 9.5px; font-weight: 700; line-height: 1; white-space: nowrap; }

.sws-mini-act.switch { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.32); color: #86efac; }
.sws-mini-act.switch:hover:not(:disabled) { background: rgba(34,197,94,.2); }
.sws-mini-act.is-active { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }
.sws-mini-act.download { background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.28); color: #93c5fd; }
.sws-mini-act.download:hover:not(:disabled) { background: rgba(59,130,246,.18); }
.sws-mini-act.add { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); color: #fcd34d; }
.sws-mini-act.add:hover:not(:disabled) { background: rgba(245,158,11,.18); }

.sws-act {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 64px; height: 28px; padding: 0 8px;
  border-radius: 8px; border: 1px solid var(--panel-border);
  background: var(--input-bg); color: var(--text);
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: background .12s, border-color .12s, opacity .12s;
}
.sws-act:disabled { opacity: .45; cursor: not-allowed; }
.sws-act-ico { display: flex; line-height: 0; }
.sws-act.switch { background: rgba(34,197,94,.15); border-color: rgba(34,197,94,.35); color: #4ade80; }
.sws-act.switch:hover:not(:disabled) { background: rgba(34,197,94,.25); }
.sws-act.is-active { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }
.sws-act.download { background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.3); color: #60a5fa; }
.sws-act.download:hover:not(:disabled) { background: rgba(59,130,246,.2); }
.sws-act.add { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.35); color: #fbbf24; }
.sws-act.add:hover:not(:disabled) { background: rgba(245,158,11,.22); }
.sws-act.ghost { background: transparent; color: var(--muted); border-color: transparent; min-width: 0; height: 26px; padding: 0 6px; }

.sws-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; width: 100%;
}
.sws-footer-left { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sws-footer-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.sws-sel-label { font-size: 12px; color: var(--muted); }
.sws-sel-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--primary-a18); color: var(--primary); font-size: 12px; font-weight: 700;
}
.sws-bulk-btn { white-space: nowrap; }

/* 下载格式选择 */
.sws-dl-picker { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sws-dl-desc { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
.sws-dl-options { display: flex; flex-direction: column; gap: 8px; }
.sws-dl-opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--panel-border); background: var(--panel);
  cursor: pointer; text-align: left; transition: border-color .15s, background .15s;
}
.sws-dl-opt:hover { border-color: var(--primary-a40); background: var(--primary-a08); }
.sws-dl-opt.primary { border-color: var(--primary-a45); background: var(--primary-a10); }
.sws-dl-opt-ico { display: flex; color: var(--primary); flex-shrink: 0; }
.sws-dl-opt-text { display: flex; flex-direction: column; gap: 2px; }
.sws-dl-opt-text strong { font-size: 14px; color: var(--text); }
.sws-dl-opt-text span { font-size: 12px; color: var(--muted); }

@media (max-width: 640px) {
  .modal:has(.sws-modal) {
    padding: 12px 14px max(12px, env(safe-area-inset-bottom, 0px));
    border-radius: 18px 18px 0 0;
  }
  .sws-zone-grid { grid-template-columns: 1fr; }
  .sws-mini-act { width: 38px; height: 38px; }
  .sws-footer { flex-direction: column; align-items: stretch; }
  .sws-footer-right { margin-left: 0; justify-content: stretch; }
  .sws-footer-right .sws-bulk-btn { flex: 1; }
}

@media (max-width: 380px) {
  .sws-mini-act { width: 36px; height: 36px; }
  .sws-mini-lbl { font-size: 9px; }
  .acc-server-chip-text { max-width: 120px; }
}

/* 账号页空态 */
.acc-empty {
  text-align: center; padding: 48px 16px;
  border: 1px dashed var(--panel-border); border-radius: var(--radius);
  background: var(--track-bg);
}
.acc-empty .ico {
  width: 56px; height: 56px; margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--primary-gradient-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
}
.acc-empty .ico svg { width: 28px; height: 28px; }
.acc-empty .title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.acc-empty .desc { color: var(--muted); font-size: 13px; margin-bottom: 16px; }

/* 上传/导入区 */
.drop {
  border: 2px dashed var(--panel-border); border-radius: var(--radius);
  padding: 22px; text-align: center; cursor: pointer;
  background: var(--track-bg); position: relative;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.drag { border-color: var(--primary); background: var(--hover-bg); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop strong { display: block; font-size: 14px; }
.drop span { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }

/* 在线任务 */
.cmd-grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.cmd-btn {
  padding: 12px; border-radius: 10px; cursor: pointer;
  background: var(--hover-bg); border: 1px solid var(--panel-border);
  color: var(--text); text-align: left; font-size: 13px;
  transition: border-color .15s, background .15s;
}
.cmd-btn:hover { border-color: var(--primary); background: var(--track-bg); }
.cmd-btn .desc { color: var(--muted); font-size: 11px; margin-top: 4px; }

.log-pane {
  background: var(--code-bg); border: 1px solid var(--panel-border);
  border-radius: var(--radius); padding: 12px;
  font-family: 'Cascadia Code', 'Consolas', monospace; font-size: 12px;
  max-height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-word;
}
.log-line { padding: 2px 0; }
.log-line .ts { color: var(--muted); margin-right: 8px; }
.log-line.send { color: var(--primary); }
.log-line.recv { color: var(--accent); }
.log-line.err { color: var(--err); }

/* 离线任务表 / 卡片堆叠 */
.task-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.task-card {
  padding: 14px; background: var(--panel);
  border: 1px solid var(--panel-border); border-radius: var(--radius);
}
.task-card .name { font-weight: 600; margin-bottom: 4px; }
.task-card .row {
  display: flex; justify-content: space-between; font-size: 12px; color: var(--muted);
  margin-top: 4px;
}
.task-card .row b { color: var(--text); font-weight: 500; }

/* ========== 高级配置/列表卡片 UI (仿移动端/iOS 风格) ========== */
.list-card {
  background: var(--panel);
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.list-card-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--panel-border);
  background: transparent;
}
.list-card-header .icon-box {
  width: 32px; height: 32px; border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.list-card-header .icon-box svg { width: 18px; height: 18px; }
.list-card-header .title {
  font-size: 15.5px; font-weight: 700; color: var(--text);
}
.list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--panel-border);
  background: transparent;
  transition: background .15s;
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--hover-bg); }
.list-row-main {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px;
}
.list-row-title {
  font-size: 14.5px; font-weight: 500; color: var(--text);
}
.list-row-desc {
  font-size: 12px; color: var(--muted); line-height: 1.4;
}
.list-row-action {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
}

.page-head {
  padding: 16px 18px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.page-head h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.page-head .sub {
  display: none;
}
.page-head .right-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
}
.avatar-placeholder svg {
  width: 18px;
  height: 18px;
}

/* iOS 风 Switch */
.ui-switch {
  position: relative; display: inline-block; width: 44px; height: 24px;
  flex-shrink: 0; margin: 0;
}
.ui-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.ui-switch .slider {
  position: absolute; cursor: pointer; inset: 0;
  background-color: var(--track-bg);
  border-radius: 24px; transition: .25s ease;
}
.ui-switch .slider:before {
  position: absolute; content: "";
  height: 20px; width: 20px; left: 2px; bottom: 2px;
  background-color: #fff; border-radius: 50%; transition: .25s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
.ui-switch input:checked + .slider {
  background-color: var(--primary);
}
.ui-switch input:checked + .slider:before {
  transform: translateX(20px);
}

/* 列表内的小号表单控件 */
.list-select {
  background: transparent; border: 1px solid var(--panel-border);
  border-radius: 6px; padding: 6px 26px 6px 10px; color: var(--text); outline: none;
  font-size: 13px; appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 6px center; background-size: 14px;
}
.list-input {
  background: transparent; border: 1px solid var(--panel-border);
  border-radius: 6px; padding: 6px 10px; color: var(--text); outline: none;
  font-size: 13px; width: 60px; text-align: center;
}
.list-row-action .btn {
  padding: 6px 16px; font-size: 13px; border-radius: 6px; height: 32px;
}

/* ========== 我的 / 设置中心（Hub） ========== */
.settings-page {
  padding: 12px 14px calc(20px + env(safe-area-inset-bottom, 0px));
  max-width: 560px;
  margin: 0 auto;
  box-sizing: border-box;
}
.settings-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 4px 14px;
}
.settings-profile-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid color-mix(in srgb, var(--primary) 30%, transparent);
}
.settings-profile-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.settings-profile-avatar-fallback { color: var(--on-primary, #fff); font-size: 24px; font-weight: 700; }
.settings-profile-body { flex: 1; min-width: 0; }
.settings-profile-name {
  font-size: 18px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.settings-profile-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.settings-profile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.settings-profile-tag {
  font-size: 10px; font-weight: 600; letter-spacing: 0.03em;
  padding: 3px 8px; border-radius: 999px;
  background: var(--hover-bg); color: var(--muted);
  border: 1px solid var(--panel-border);
}
.settings-profile-tag.is-ok {
  background: color-mix(in srgb, #22c55e 14%, transparent);
  color: #16a34a;
  border-color: color-mix(in srgb, #22c55e 35%, transparent);
}
.settings-lic-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; margin-bottom: 14px;
  border-radius: 16px; cursor: pointer;
  border: 1px solid color-mix(in srgb, #8b5cf6 35%, var(--panel-border));
  background: linear-gradient(135deg,
    color-mix(in srgb, #7c3aed 88%, #1e1b4b),
    color-mix(in srgb, #6366f1 75%, #312e81));
  box-shadow: var(--shadow);
  transition: transform .12s, filter .15s;
}
.settings-lic-banner:hover { filter: brightness(1.04); transform: translateY(-1px); }
.settings-lic-banner.is-active {
  border-color: color-mix(in srgb, #22c55e 40%, var(--panel-border));
  background: linear-gradient(135deg,
    color-mix(in srgb, #15803d 85%, #14532d),
    color-mix(in srgb, #16a34a 70%, #166534));
}
.settings-lic-banner-body { flex: 1; min-width: 0; }
.settings-lic-banner-title {
  font-size: 15px; font-weight: 700; color: #fff;
}
.settings-lic-banner-desc {
  font-size: 12px; color: rgba(255,255,255,0.78); margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.settings-lic-banner-chev { color: rgba(255,255,255,0.85); flex-shrink: 0; display: inline-flex; }
.settings-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--primary) 12%, var(--panel)),
    color-mix(in srgb, var(--primary-2, var(--primary)) 8%, var(--panel)));
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.settings-hero::after {
  content: '';
  position: absolute;
  width: 140px; height: 140px;
  right: -40px; top: -50px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  pointer-events: none;
}
.settings-hero-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid color-mix(in srgb, var(--primary) 35%, transparent);
  position: relative; z-index: 1;
}
.settings-hero-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.settings-hero-avatar-fallback { color: var(--on-primary, #fff); font-size: 22px; font-weight: 700; }
.settings-hero-body { flex: 1; min-width: 0; position: relative; z-index: 1; }
.settings-hero-name {
  font-size: 17px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.settings-hero-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.settings-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.settings-hero-tag {
  font-size: 10px; font-weight: 600; letter-spacing: 0.03em;
  padding: 3px 8px; border-radius: 999px;
  background: var(--hover-bg); color: var(--muted);
  border: 1px solid var(--panel-border);
}
.settings-hero-tag.is-ok {
  background: color-mix(in srgb, #22c55e 14%, transparent);
  color: #16a34a;
  border-color: color-mix(in srgb, #22c55e 35%, transparent);
}
.settings-hero-edit {
  flex-shrink: 0; width: 36px; height: 36px;
  border-radius: 12px; border: 1px solid var(--panel-border);
  background: var(--panel); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; z-index: 1;
  transition: background .15s, color .15s, border-color .15s;
}
.settings-hero-edit:hover {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 45%, transparent);
  background: var(--hover-bg);
}
.settings-section { margin-top: 4px; }
.settings-section + .settings-section { margin-top: 12px; }
.settings-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  padding: 0 6px 8px;
}
.settings-menu {
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.settings-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 13px 14px;
  border: none; border-bottom: 1px solid var(--panel-border);
  background: transparent; color: inherit; text-align: left;
  cursor: pointer; font: inherit;
  transition: background .15s;
}
.settings-item:last-child { border-bottom: none; }
.settings-item:hover { background: var(--hover-bg); }
.settings-item.is-disabled {
  opacity: 0.55; cursor: default;
}
.settings-item.is-disabled:hover { background: transparent; }
.settings-item-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
}
.settings-item-icon svg { width: 18px; height: 18px; }
.settings-item-icon.tone-blue {
  background: color-mix(in srgb, #3b82f6 16%, transparent);
  color: #3b82f6;
}
.settings-item-icon.tone-purple {
  background: color-mix(in srgb, #8b5cf6 16%, transparent);
  color: #8b5cf6;
}
.settings-item-icon.tone-amber {
  background: color-mix(in srgb, #f59e0b 16%, transparent);
  color: #d97706;
}
.settings-item-icon.tone-green {
  background: color-mix(in srgb, #22c55e 16%, transparent);
  color: #16a34a;
}
.settings-item-icon.tone-red {
  background: color-mix(in srgb, #ef4444 14%, transparent);
  color: #dc2626;
}
.settings-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.settings-item-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.settings-item-desc {
  font-size: 12px; color: var(--muted); line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.settings-item-tail {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px;
}
.settings-item-value { font-size: 12px; color: var(--muted); max-width: 88px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings-item-badge {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: var(--hover-bg); color: var(--muted);
}
.settings-item-badge.tone-ok {
  background: color-mix(in srgb, #22c55e 14%, transparent);
  color: #16a34a;
}
.settings-item-badge.tone-warn {
  background: color-mix(in srgb, #f59e0b 14%, transparent);
  color: #d97706;
}
.settings-item-chev { color: var(--muted); display: inline-flex; opacity: 0.75; }
.settings-mini-swatch {
  display: inline-flex; height: 14px; border-radius: 5px; overflow: hidden;
  border: 1px solid var(--panel-border);
}
.settings-mini-swatch i { display: block; width: 10px; height: 100%; }
.settings-foot {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.85;
  line-height: 1.4;
}
.settings-foot-logo {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.settings-foot-brand { font-weight: 600; color: color-mix(in srgb, var(--text) 55%, var(--muted)); }
.settings-foot-sep { opacity: 0.45; user-select: none; }
.settings-foot-lic { color: var(--muted); }
.settings-theme-page { padding-top: 8px; }
.settings-theme-tip {
  margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.45;
}
.settings-theme-grid { padding-bottom: 8px; }
.settings-sk-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  margin-bottom: 18px;
}
.settings-sk-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(90deg, var(--hover-bg) 25%, var(--track-bg) 50%, var(--hover-bg) 75%);
  background-size: 200% 100%; animation: page-sk-shimmer 1.2s ease-in-out infinite;
}
.settings-sk-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.settings-sk-line {
  height: 12px; border-radius: 4px;
  background: linear-gradient(90deg, var(--hover-bg) 25%, var(--track-bg) 50%, var(--hover-bg) 75%);
  background-size: 200% 100%; animation: page-sk-shimmer 1.2s ease-in-out infinite;
}
.settings-sk-line.lg { width: 55%; height: 14px; }
.settings-sk-line.sm { width: 38%; }

/* ========== 设置页（旧 list-card 兼容） ========== */
/* 主页：设置项列表 */
.settings-list {
  display: flex; flex-direction: column; gap: 10px;
}
.settings-row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit; color: var(--text); text-align: left;
  width: 100%;
  transition: transform .12s, border-color .15s, box-shadow .15s;
}
.settings-row:hover {
  transform: translateX(2px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}
.settings-row .icon-wrap {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--on-primary);
}
.settings-row .icon-wrap svg { width: 20px; height: 20px; }
.settings-row .main { flex: 1; min-width: 0; }
.settings-row .title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.settings-row .desc {
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.settings-row .current-theme {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text); font-weight: 500;
}
.settings-row .mini-swatch {
  display: inline-flex; height: 14px; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--panel-border);
}
.settings-row .mini-swatch span { display: block; width: 8px; height: 100%; }
.settings-row .chevron {
  color: var(--muted); flex-shrink: 0;
  display: flex; align-items: center;
}
.settings-row:hover .chevron { color: var(--primary); }

/* 次级页头：返回按钮 */
.page-head.subpage { align-items: center; }
.page-head.subpage .back-btn {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--hover-bg);
  border: 1px solid var(--panel-border);
  color: var(--text); cursor: pointer;
  transition: background .15s, border-color .15s, transform .12s;
}
.page-head.subpage .back-btn:hover {
  background: var(--track-bg);
  border-color: var(--primary);
  transform: translateX(-2px);
}

/* 主题预览卡片网格 */
.theme-grid-v2 {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.theme-card-v2 {
  position: relative;
  padding: 0;
  background: var(--bg-elev);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  cursor: pointer;
  overflow: hidden;
  display: flex; flex-direction: column;
  font: inherit; color: inherit; text-align: left;
  transition: transform .18s ease, border-color .15s, box-shadow .2s;
  box-shadow: var(--shadow);
}
.theme-card-v2:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}
.theme-card-v2.on {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary), var(--shadow);
}
.theme-card-v2.on::before {
  content: '✓';
  position: absolute; top: 10px; right: 10px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  z-index: 2;
}

/* 主题预览图（迷你 UI 模拟） */
.theme-card-v2 .preview {
  position: relative; height: 110px; overflow: hidden;
}
.preview-bg { position: absolute; inset: 0; }
.preview-blob {
  position: absolute; width: 120px; height: 120px; border-radius: 50%;
  filter: blur(28px); opacity: .55;
}
.preview-blob.a { top: -30px; right: -20px; }
.preview-blob.b { bottom: -40px; left: -30px; opacity: .45; }
.preview-card {
  position: absolute; left: 16px; right: 16px; bottom: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  display: flex; flex-direction: column; gap: 5px;
}
.preview-line {
  height: 6px; border-radius: 3px;
  background: rgba(255, 255, 255, .35);
}
.preview-line.w70 { width: 70%; height: 8px; }
.preview-line.w50 { width: 50%; }
.preview-line.w40 { width: 40%; }

/* 元数据条 */
.theme-card-v2 .meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; gap: 10px;
  border-top: 1px solid var(--panel-border);
  background: var(--bg-elev);
}
.theme-card-v2 .meta .name {
  font-size: 13.5px; font-weight: 600; color: var(--text);
}
.theme-card-v2 .dots {
  display: flex; gap: 4px;
}
.theme-card-v2 .dots span {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid var(--panel-border);
}

/* 二维码弹窗内的图框 */
.qr-frame {
  width: min(72vw, 240px); height: min(72vw, 240px); margin: 0 auto;
  background: var(--on-primary); border-radius: 12px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.qr-frame img { width: 100%; height: 100%; border-radius: 12px; }
.qr-frame .placeholder { color: var(--muted); font-size: 13px; }

/* ========== 消耗活动子页 ========== */
.consume-activity-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 28px;
  max-width: 720px;
  margin: 0 auto;
}
.ca-card-elevated {
  border-color: var(--primary-a20, rgba(124, 140, 255, .22));
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, .06));
}
.ca-card-compact {
  padding: 12px 14px;
}
.ca-card-compact .ca-card-head {
  margin-bottom: 8px;
}
.ca-card-compact .ca-item-list {
  margin: 8px 0;
}
.ca-offline-tip {
  padding: 10px 14px;
  border-radius: var(--radius, 10px);
  background: var(--warn-a12, rgba(250, 173, 20, .12));
  color: var(--warn, #faad14);
  font-size: 13px;
  border: 1px solid var(--warn-a25, rgba(250, 173, 20, .25));
}
.ca-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius, 12px);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm, 0 1px 4px rgba(0, 0, 0, .06));
}
.ca-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.ca-card-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ca-card-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ca-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.ca-progress-item {
  background: var(--bg-elev);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ca-progress-item.completed {
  border-color: var(--success-a40, rgba(82, 196, 26, .4));
  background: var(--success-a08, rgba(82, 196, 26, .08));
}
.ca-progress-name { font-size: 12px; color: var(--muted); }
.ca-progress-value { font-size: 13px; font-weight: 600; color: var(--text); }
.ca-progress-value.completed { color: var(--success, #52c41a); }
.ca-progress-obtained { font-size: 11px; color: var(--primary); }
.ca-progress-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
@media (min-width: 520px) {
  .ca-progress-stats { grid-template-columns: repeat(4, 1fr); }
}
.ca-stat {
  background: var(--bg-elev);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ca-stat .lbl { font-size: 11px; color: var(--muted); }
.ca-stat .val { font-size: 15px; font-weight: 600; color: var(--text); }
.ca-stat .val.gold { color: var(--warn, #faad14); }
.ca-stat .val.green { color: var(--success, #52c41a); }
.ca-stat .val.blue { color: var(--primary); }
.ca-rate {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.ca-rate-val { font-weight: 600; color: var(--primary); margin-left: 6px; }
.ca-open-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}
.ca-open-row .btn {
  flex: 1;
  min-width: 0;
}
.ca-open-count {
  flex: 0 0 72px;
  width: 72px;
  padding: 8px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
.ca-modes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
@media (min-width: 640px) {
  .ca-modes { grid-template-columns: repeat(3, 1fr); }
}
.ca-mode-card {
  background: var(--bg-elev);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 10px;
}
.ca-mode-title {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary);
  letter-spacing: .02em;
}
/* 宝箱计算器弹窗 */
.ca-calc-modal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(560px, 92vw);
  max-width: 100%;
}
.ca-calc-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.ca-modes-modal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}
.ca-modes-modal .ca-mode-card {
  width: 100%;
}
.ca-calc-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}
@media (min-width: 520px) {
  .ca-modes-modal {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
.ca-chest-round-panel {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-a08, rgba(124, 140, 255, .08)), var(--bg-elev));
  border: 1px solid var(--primary-a18, rgba(124, 140, 255, .18));
}
.ca-chest-round-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.ca-chest-round-lbl {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.ca-chest-exec-round {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  min-height: 16px;
}
.ca-chest-exec-round.is-active {
  color: var(--warn, #faad14);
  animation: ca-pulse 1.2s ease-in-out infinite;
}
@keyframes ca-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .65; }
}
.ca-chest-round-main {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -.02em;
}
.ca-chest-round-sub {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}
.ca-chest-items .ca-grid-item-row {
  background: var(--panel);
}
.ca-mode-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}
.ca-mode-stat { display: flex; flex-direction: column; gap: 2px; }
.ca-mode-stat .lbl { font-size: 10px; color: var(--muted); }
.ca-mode-stat-val { font-size: 13px; font-weight: 600; color: var(--text); }
.ca-mode-stat-val.gold { color: var(--warn, #faad14); }
.ca-mode-stat-val.blue { color: var(--primary); }
.ca-mode-info { font-size: 11px; color: var(--muted); line-height: 1.35; }
.ca-chest-progress { margin-bottom: 10px; }
.ca-chest-prog-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.ca-chest-prog-val { color: var(--text); font-weight: 600; }
.ca-chest-prog-bar {
  height: 8px;
  background: var(--bg-elev);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.ca-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary-gradient, linear-gradient(90deg, var(--primary), var(--primary-2, var(--primary))));
  border-radius: 4px;
  transition: width .3s ease;
}
.ca-milestones {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
}
.ca-next {
  margin: 8px 0 10px;
  padding: 10px 12px;
  background: var(--bg-elev);
  border-radius: 8px;
  border: 1px solid var(--panel-border);
}
.ca-next-lbl { font-size: 11px; color: var(--muted); display: block; margin-bottom: 4px; }
.ca-next-val { font-size: 12px; color: var(--text); line-height: 1.4; }
.ca-claim-btn {
  width: 100%;
  margin-bottom: 10px;
}
/* 钓鱼/招募：纵向列表（普通在上、黄金在下） */
.ca-item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
  width: 100%;
}
/* 图标+数量在左，输入框+按钮在右且右对齐 */
.ca-grid-item.ca-grid-item-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  width: 100%;
  box-sizing: border-box;
}
.ca-grid-item-media {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 56px;
}
.ca-grid-item-actions {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}
.ca-grid-item-row .ca-grid-input {
  flex: 1;
  min-width: 0;
  max-width: 120px;
  width: auto;
  margin-left: 0;
  text-align: center;
}
.ca-grid-item-row .ca-grid-btn {
  flex-shrink: 0;
  width: auto;
  min-width: 72px;
  max-width: none;
  margin-left: 0;
  padding-left: 14px;
  padding-right: 14px;
  justify-content: center;
}

.ca-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.ca-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
  max-width: none;
}
.ca-grid-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 10px 8px;
  background: var(--bg-elev);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
}
.ca-upgrade-item { min-height: 88px; justify-content: center; }
.ca-upgrade-item .ca-grid-qty { text-align: center; }
.ca-grid-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  align-self: center;
}
.ca-grid-qty {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  align-self: center;
}
.ca-grid-input {
  width: 100%;
  max-width: none;
  padding: 6px 8px;
  text-align: center;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}
.ca-grid-btn {
  width: 100%;
  min-height: 40px;
}
.ca-grid-btn.running,
#upgradeStarMainBtn.running,
#upgradeStarBookBtn.running {
  background: var(--danger-a15, rgba(255, 77, 79, .15));
  border-color: var(--danger, #ff4d4f);
  color: var(--danger, #ff4d4f);
}
.ca-batch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.ca-batch .btn {
  width: 100%;
  min-height: 40px;
  justify-content: center;
}
.ca-batch .ca-batch-stop:disabled { opacity: .45; }
.consume-activity-page .ca-card .ca-action-btn,
.consume-activity-page .ca-card .ca-claim-btn {
  width: 100%;
  min-height: 40px;
}

/* ========== 限时活动（擂台挑战）========== */
.limited-activity-page {
  padding: 12px 14px 24px;
  max-width: 560px;
  margin: 0 auto;
}
.la-offline-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #fff7e6;
  border: 1px solid #ffd591;
  color: #ad6800;
  font-size: 13px;
}
.la-card {
  background: var(--panel, #fff);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--panel-border, #e8ecf2);
}
.la-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--panel-border, #f0f0f0);
}
.la-card-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text, #1f2937);
}
.la-log-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.la-log-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--accent, #1890ff);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}
.la-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--panel-border, #f0f0f0);
}
.la-section-label {
  font-size: 13px;
  color: var(--muted, #666);
  margin-bottom: 10px;
}
.la-hint {
  font-size: 11px;
  color: var(--muted2, #999);
  margin-top: 4px;
}
.la-target-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.la-target-radio {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  background: var(--bg-soft, #f5f5f5);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.la-target-radio:hover {
  background: #e6f7ff;
  border-color: #91d5ff;
}
.la-target-radio input {
  display: none;
}
.la-target-radio:has(input:checked) {
  background: #e6f7ff;
  border-color: var(--accent, #1890ff);
}
.la-target-radio:has(input:checked) span {
  color: var(--accent, #1890ff);
  font-weight: 600;
}
.la-target-radio span {
  font-size: 13px;
  color: var(--muted, #666);
}
.la-loop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.la-loop-input {
  width: 80px;
  padding: 8px 12px;
  border: 1px solid var(--border, #d9d9d9);
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}
.la-btn-row {
  display: flex;
  gap: 12px;
  padding: 16px;
}
.la-btn {
  flex: 1;
  min-height: 44px;
}
.la-btn-stop:not(:disabled) {
  color: #ff4d4f;
  border-color: #ffccc7;
}
.la-log-modal {
  max-height: 60vh;
  overflow: auto;
}
.la-log-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-family: ui-monospace, monospace;
}
.la-log-line {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--panel-border, #f0f0f0);
}
.la-log-time {
  flex-shrink: 0;
  color: var(--muted2, #999);
}
.la-log-success .la-log-msg { color: #389e0d; }
.la-log-error .la-log-msg { color: #cf1322; }
.la-log-warning .la-log-msg { color: #d46b08; }
.la-log-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted2, #999);
}

/* 换皮闯关 */
.la-card-skin .la-card-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.la-skin-hint {
  margin-bottom: 10px;
  line-height: 1.5;
}
.la-skin-status-wrap {
  min-height: 48px;
}
.la-skin-empty {
  font-size: 13px;
  color: var(--muted, #999);
  padding: 8px 0;
}
.la-skin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.la-skin-tower {
  padding: 10px 8px;
  border-radius: 10px;
  background: var(--bg-soft, #f5f5f5);
  border: 2px solid transparent;
  text-align: center;
}
.la-skin-tower.open {
  background: #f0f9ff;
}
.la-skin-tower.pending {
  border-color: var(--accent, #1890ff);
}
.la-skin-tower.cleared {
  background: #f6ffed;
  border-color: #b7eb8f;
}
.la-skin-tower-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #1f2937);
}
.la-skin-tower-status {
  font-size: 11px;
  color: var(--muted, #666);
  margin-top: 4px;
}
.la-skin-tower.cleared .la-skin-tower-status {
  color: #52c41a;
  font-weight: 600;
}
.la-skin-desc p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted, #666);
}
.la-card-manual {
  margin-top: 12px;
}
.la-manual-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1f2937);
}
.la-manual-chevron {
  display: inline-flex;
  color: var(--muted, #999);
}
.la-btn-row-manual {
  padding-top: 0;
}
.la-formation-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.la-formation-label {
  font-size: 13px;
  color: var(--muted, #666);
  flex: 0 0 auto;
}
.limited-activity-page .formation-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}
.limited-activity-page .formation-btn {
  min-width: 44px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--panel-border, #ddd);
  background: var(--input-bg, #f5f5f5);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.limited-activity-page .formation-btn:hover:not(:disabled) {
  border-color: #91d5ff;
}
.limited-activity-page .formation-btn.active {
  background: #e6f7ff;
  color: #1890ff;
  border-color: #91d5ff;
}
.limited-activity-page .formation-btn:disabled:not(.active) {
  opacity: 0.55;
  cursor: not-allowed;
}
.limited-activity-page .la-card-board {
  margin-top: 14px;
}
.la-card-gift {
  margin-bottom: 14px;
}
.la-gift-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}
.la-gift-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1f2937);
  margin-bottom: 4px;
}
.la-gift-desc {
  font-size: 12px;
  color: var(--muted2, #999);
  line-height: 1.45;
}
.la-free-gift-btn {
  flex-shrink: 0;
  white-space: nowrap;
}
.la-card-board {
  margin-top: 14px;
  border: 1px solid #c4ddd8;
  background: linear-gradient(180deg, #f8fcfb 0%, #fff 40%);
}
.la-card-board .la-card-head {
  background: linear-gradient(90deg, rgba(19, 194, 194, 0.08) 0%, transparent 100%);
}
.la-board-visual {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}
.la-board-floor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.la-board-floor-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e6fffb 0%, #b5f5ec 100%);
  border: 1px solid #87e8de;
  color: #006d75;
}
.la-board-floor-num {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.la-board-mode-tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.la-board-mode-tag.mode-4 {
  background: #08979c;
  color: #fff;
}
.la-board-mode-tag.mode-6 {
  background: #531dab;
  color: #fff;
}
.la-board-floor-meta {
  font-size: 12px;
  color: var(--muted, #666);
  line-height: 1.45;
}
.la-board-frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: clamp(8px, 2.5vw, 14px);
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
    linear-gradient(165deg, #4a3728 0%, #3d2e24 38%, #2f241c 100%);
  border: 2px solid #6b5344;
  box-shadow:
    0 8px 24px rgba(47, 36, 28, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.la-board-frame.mode-6x6 {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
    linear-gradient(165deg, #3d2f5c 0%, #2d2245 40%, #1f1830 100%);
  border-color: #5b4a7a;
}
.la-board-frame::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.la-board-playgrid {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  gap: 5px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
}
.la-board-playgrid.size-6 {
  gap: 4px;
}
.la-board-playgrid.size-4 {
  gap: 6px;
  max-width: min(100%, 300px);
  margin: 0 auto;
}
.la-board-playgrid.size-4 .la-board-cell {
  border-radius: 11px;
}
.la-board-cell {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: auto;
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: linear-gradient(160deg, rgba(139, 115, 85, 0.55) 0%, rgba(90, 72, 54, 0.75) 100%);
  border: 1px solid rgba(210, 180, 140, 0.28);
  color: #fff8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition:
    background 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    opacity 0.28s ease,
    transform 0.28s ease;
}
.mode-6x6 .la-board-cell {
  background: linear-gradient(160deg, rgba(107, 91, 149, 0.5) 0%, rgba(67, 55, 99, 0.78) 100%);
  border-color: rgba(180, 160, 220, 0.28);
}
.la-board-playgrid.size-6 .la-board-cell {
  border-radius: 7px;
}
.la-board-playgrid.size-6 .la-board-cell-icon {
  font-size: 14px;
}
.la-board-playgrid.size-6 .la-board-cell-idx {
  font-size: 9px;
}
.la-board-cell.inner-ring {
  background: linear-gradient(160deg, rgba(180, 140, 90, 0.45) 0%, rgba(120, 90, 55, 0.65) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 160, 0.15);
}
.mode-6x6 .la-board-cell.inner-ring {
  background: linear-gradient(160deg, rgba(150, 120, 200, 0.5) 0%, rgba(90, 70, 140, 0.7) 100%);
}
.la-board-cell.wall {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
  opacity: 0.4;
}
.la-board-cell.outer-ring {
  background: linear-gradient(160deg, rgba(160, 130, 95, 0.42) 0%, rgba(100, 80, 58, 0.68) 100%);
  border-color: rgba(220, 190, 150, 0.22);
}
.la-board-cell.gate {
  background: linear-gradient(160deg, rgba(250, 173, 20, 0.55) 0%, rgba(212, 136, 6, 0.65) 100%);
  border-color: #ffc53d;
  box-shadow: 0 0 0 2px rgba(255, 197, 61, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.la-board-cell.gate .la-board-cell-icon {
  color: #fffbe6;
  font-weight: 800;
  font-size: 22px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.la-board-cell.face-down {
  background: linear-gradient(145deg, #3a2f26 0%, #2a221c 100%);
  border-color: rgba(255, 255, 255, 0.1);
}
.la-board-cell.face-down .la-board-cell-icon {
  color: rgba(255, 235, 210, 0.5);
  font-size: 17px;
  font-weight: 700;
}
.la-board-cell.inner-ring.face-down {
  background: linear-gradient(145deg, #352a22 0%, #241c17 100%);
}
.la-board-cell.blank {
  opacity: 0.3;
}
.la-board-cell.reward {
  background: linear-gradient(160deg, rgba(255, 214, 102, 0.45) 0%, rgba(212, 136, 6, 0.5) 100%);
  border-color: rgba(255, 214, 102, 0.55);
}
.la-board-cell.launcher {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.28) 0%, rgba(200, 200, 200, 0.18) 100%);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.15);
}
.la-board-cell.collected {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.08);
  opacity: 0.6;
}
.la-board-cell-icon {
  font-size: 18px;
  line-height: 1;
}
.la-board-frame.anim-dice-step {
  animation: la-board-frame-nudge 0.32s ease-out;
}
.la-board-frame.anim-floor-change {
  animation: la-board-floor-pop 0.45s ease-out;
}
.la-board-cell.anim-player-land {
  animation: la-board-player-land 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.la-board-cell.anim-flip {
  animation: la-board-flip 0.42s ease-out;
}
.la-board-cell.anim-collect {
  animation: la-board-collect 0.36s ease-out;
}
@keyframes la-board-frame-nudge {
  0%, 100% { transform: translateY(0); }
  35% { transform: translateY(-2px); }
  70% { transform: translateY(1px); }
}
@keyframes la-board-floor-pop {
  0% { transform: scale(0.97); opacity: 0.82; }
  55% { transform: scale(1.015); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes la-board-player-land {
  0% { transform: scale(0.88); }
  55% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
@keyframes la-board-flip {
  0% { transform: perspective(240px) rotateY(88deg) scale(0.92); opacity: 0.55; }
  100% { transform: perspective(240px) rotateY(0deg) scale(1); opacity: 1; }
}
@keyframes la-board-collect {
  0% { transform: scale(1); filter: brightness(1); }
  45% { transform: scale(1.08); filter: brightness(1.25); }
  100% { transform: scale(1); filter: brightness(1); }
}
@media (prefers-reduced-motion: reduce) {
  .la-board-frame.anim-dice-step,
  .la-board-frame.anim-floor-change,
  .la-board-cell.anim-player-land,
  .la-board-cell.anim-flip,
  .la-board-cell.anim-collect {
    animation: none !important;
  }
  .la-board-cell {
    transition: none;
  }
}
.la-board-cell-idx {
  font-size: 10px;
  line-height: 1;
  color: rgba(255, 248, 240, 0.9);
  font-weight: 600;
}
.la-board-reward-icon {
  width: clamp(18px, 5.2vw, 28px);
  height: clamp(18px, 5.2vw, 28px);
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.la-board-playgrid.size-6 .la-board-reward-icon {
  width: clamp(14px, 4vw, 22px);
  height: clamp(14px, 4vw, 22px);
}
.la-board-reward-value {
  font-size: clamp(8px, 2.2vw, 10px);
  line-height: 1.1;
  font-weight: 700;
  color: rgba(255, 248, 240, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.la-board-playgrid.size-6 .la-board-reward-value {
  font-size: clamp(7px, 1.8vw, 9px);
}
.la-board-cell.reward.has-preview {
  padding: 2px;
  gap: 1px;
}
.la-board-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-soft, #f5f7fa);
  font-size: 11px;
  color: var(--muted2, #888);
}
.la-board-legend-item {
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #eef0f3;
}
.la-board-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 6px;
  margin-top: 4px;
  border-top: 1px dashed var(--panel-border, #eef0f3);
}
.la-board-stat-inline {
  font-size: 11px;
  color: var(--muted2, #999);
}
.la-board-fallback {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  padding: 16px 8px;
}
.la-board-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.la-board-stat {
  padding: 10px 8px;
  border-radius: 10px;
  background: var(--bg-soft, #f8fafc);
  text-align: center;
}
.la-board-stat-label {
  display: block;
  font-size: 11px;
  color: var(--muted2, #999);
  margin-bottom: 4px;
}
.la-board-stat-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1f2937);
}

@media (max-width: 480px) {
  .limited-activity-page {
    padding-left: 10px;
    padding-right: 10px;
  }
  .la-card-board .la-section {
    padding-left: 12px;
    padding-right: 12px;
  }
  .la-board-frame {
    padding: 8px;
    border-radius: 14px;
  }
  .la-board-playgrid {
    gap: 3px;
    padding: 2px;
  }
  .la-board-playgrid.size-4 {
    gap: 4px;
    max-width: 100%;
  }
  .la-board-playgrid.size-6 {
    gap: 2px;
  }
  .la-board-cell-icon {
    font-size: clamp(12px, 3.2vw, 18px);
  }
  .la-board-playgrid.size-6 .la-board-cell-icon {
    font-size: clamp(11px, 2.6vw, 14px);
  }
  .la-board-cell-idx {
    font-size: clamp(8px, 2.2vw, 10px);
  }
  .la-board-cell.gate .la-board-cell-icon {
    font-size: clamp(14px, 4vw, 20px);
  }
  .la-board-legend {
    gap: 4px 6px;
    font-size: 10px;
  }
}

/* ========== 活动周免费礼包 ========== */
.week-free-gifts-page {
  padding: 12px 14px 24px;
  max-width: 560px;
  margin: 0 auto;
}
.wg-week-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wg-week-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f5f5f5;
  color: #666;
}
.wg-week-badge.open {
  background: #f6ffed;
  color: #389e0d;
  border: 1px solid #b7eb8f;
}
.wg-week-badge.closed {
  background: #fff7e6;
  color: #ad6800;
  border: 1px solid #ffd591;
}
.wg-week-hint {
  font-size: 12px;
  color: var(--muted, #666);
  line-height: 1.5;
}
.wg-gift-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wg-gift-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-soft, #f8fafc);
  border: 1px solid var(--panel-border, #eef2f6);
}
.wg-gift-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wg-gift-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1f2937);
}
.wg-gift-desc {
  font-size: 12px;
  color: var(--muted2, #999);
}
.wg-gift-tag {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e6f7ff;
  color: #096dd9;
}
.wg-empty {
  padding: 16px 8px;
  text-align: center;
  font-size: 13px;
  color: var(--muted2, #999);
}
.wg-desc p {
  margin: 0;
  font-size: 12px;
  color: var(--muted, #666);
  line-height: 1.55;
}
.wg-bm-section {
  margin-top: 4px;
}
.wg-bm-tip {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted2, #999);
  line-height: 1.45;
}
.wg-bm-list {
  display: grid;
  gap: 8px;
}
.wg-bm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 10px;
  background: var(--panel, #fff);
}
.wg-bm-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wg-bm-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1f1f1f);
}
.wg-bm-desc {
  font-size: 12px;
  color: var(--muted, #666);
}
.wg-bm-buy-btn {
  flex-shrink: 0;
  min-width: 64px;
}

/* ========== 梦境活动 ========== */
.dream-activity-page {
  padding: 12px 14px 28px;
  max-width: 560px;
  margin: 0 auto;
}
.da-offline-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #fff7e6;
  border: 1px solid #ffd591;
  color: #ad6800;
  font-size: 13px;
}
.da-card {
  background: var(--panel, #fff);
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--panel-border, #e8ecf2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.da-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--panel-border, #f0f0f0);
}
.da-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
}
.da-card-body { padding: 14px 16px; }
.da-card-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
}
.da-card-actions.wrap { flex-wrap: wrap; }
.da-card-actions .btn { flex: 1; min-height: 40px; }
.da-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.da-row.between { justify-content: space-between; }
.da-muted { font-size: 13px; color: var(--muted, #666); }
.da-hint { font-size: 12px; color: var(--muted2, #999); margin: 0 0 10px; }
.da-level-val { font-weight: 600; color: var(--accent, #1890ff); }
.da-open-badge {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 12px;
  background: #f5f5f5;
  color: #666;
}
.da-open-badge.open { background: #f6ffed; color: #389e0d; }
.da-open-badge.closed { background: #fff2f0; color: #cf1322; }
.da-team-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.da-team-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border, #d9d9d9);
  background: var(--bg-soft, #f5f5f5);
  cursor: pointer;
  font-weight: 600;
}
.da-team-btn.active {
  background: #e6f7ff;
  border-color: var(--accent, #1890ff);
  color: var(--accent, #1890ff);
}
.da-formation { min-height: 80px; }
/* 阵容立绘：复用日常 fmt-slot 结构 */
.dream-activity-page .da-fmt-team {
  margin-top: 4px;
  padding: 8px 10px;
  background: var(--primary-gradient-panel, rgba(72, 85, 224, 0.06));
  border: 1px solid var(--panel-border, #e8ecf2);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dream-activity-page .da-fmt-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dream-activity-page .da-fmt-slot.fmt-slot {
  width: 64px;
}
.dream-activity-page .fmt-slot-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
}
.dream-activity-page .fmt-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dream-activity-page .da-hero-name.fmt-slot-name {
  max-width: 64px;
  margin-top: 4px;
  font-size: 11px;
  text-align: center;
  color: var(--text, #333);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.da-battle-heroes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.da-battle-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 8px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
}
.da-battle-hero .da-fmt-slot { pointer-events: none; }
.da-battle-hero.active { background: rgba(255, 77, 79, 0.08); }
.da-battle-status-line {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}
.da-battle-hero.running .fmt-slot-img {
  animation: da-battle-pulse 1.2s ease-in-out infinite;
}
@keyframes da-battle-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.45); }
  50% { box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.85); }
}
.da-battle-tag {
  font-size: 10px;
  margin-top: 2px;
  max-width: 72px;
  text-align: center;
  line-height: 1.25;
}
.da-battle-tag.running { color: #ff4d4f; font-weight: 600; }
.da-battle-tag.win { color: #389e0d; }
.da-battle-tag.lose { color: #cf1322; }
.da-battle-tag.exhausted { color: #d46b08; }
.da-battle-tag.stopped { color: #8c8c8c; }
.da-battle-tag.error { color: #cf1322; }
.da-merchant-block {
  border: 1px solid var(--panel-border, #eee);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}
.da-merchant-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.da-merchant-items { display: flex; flex-direction: column; gap: 6px; }
.da-merchant-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.da-item-img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  background: var(--input-bg, #f5f5f5);
  flex-shrink: 0;
}
.da-item-name { flex: 1; }
.da-gold-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  background: #fff7e6;
  color: #d46b08;
}
.da-empty {
  text-align: center;
  color: var(--muted2, #999);
  font-size: 13px;
  padding: 16px;
}
.da-log-btn { display: inline-flex; align-items: center; gap: 6px; }
.da-log-count {
  min-width: 18px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--accent, #1890ff);
  color: #fff;
  font-size: 11px;
  text-align: center;
}
.da-log-list { max-height: 55vh; overflow: auto; font-size: 12px; }
.da-log-line { padding: 4px 0; border-bottom: 1px solid #f0f0f0; }
.da-log-time { color: #999; margin-right: 8px; }
.da-log-success { color: #389e0d; }
.da-log-error { color: #cf1322; }
.da-log-warning { color: #d46b08; }

/* ===== 月度活动 ===== */
.monthly-activity-page { padding: 12px 14px 24px; }
.ma-offline-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #fff7e6;
  color: #d46b08;
  font-size: 13px;
}
.ma-card {
  border: 1px solid var(--panel-border, #eee);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  background: var(--panel-bg, #fff);
}
.ma-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.ma-card-head-left {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}
.ma-card-icon {
  flex-shrink: 0;
  color: var(--accent, #1890ff);
}
.ma-card-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}
.ma-card-desc {
  margin: 0;
  font-size: 12px;
  color: var(--muted2, #888);
}
.ma-card-head-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.ma-resource-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ma-item-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}
.ma-btn-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ma-btn-item-icon {
  width: 18px;
  height: 18px;
}
.ma-resource-num { font-size: 14px; font-weight: 600; color: #1890ff; line-height: 1; }
.ma-resource-fish { color: #fa8c16; }
.ma-progress-box {
  text-align: center;
  padding: 14px 10px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.ma-progress-box-arena {
  background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
}
.ma-progress-box-fish {
  background: linear-gradient(135deg, #fff7e6 0%, #ffe7ba 100%);
}
.ma-progress-label { font-size: 12px; color: #666; margin-bottom: 4px; }
.ma-progress-value { font-size: 24px; font-weight: 700; }
.ma-progress-arena { color: #1890ff; }
.ma-progress-fish { color: #fa8c16; }
.ma-formation-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--input-bg, #f5f5f5);
  border-radius: 8px;
  margin-bottom: 8px;
}
.ma-formation-label { font-size: 13px; color: #666; flex-shrink: 0; }
.ma-formation-hint { font-size: 12px; color: var(--muted2, #999); }
.monthly-activity-page .formation-btns { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.monthly-activity-page .formation-btn {
  min-width: 44px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--panel-border, #ddd);
  background: var(--input-bg, #f5f5f5);
  color: var(--text, #333);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.monthly-activity-page .formation-btn:hover:not(:disabled) {
  border-color: var(--primary-a50, rgba(24, 144, 255, 0.5));
}
.monthly-activity-page .formation-btn.active {
  background: var(--primary-a18, #e6f7ff);
  color: var(--primary, #1890ff);
  border-color: var(--primary-a50, #91d5ff);
  cursor: default;
}
.monthly-activity-page .formation-btn:disabled:not(.active) {
  opacity: 0.5;
  cursor: not-allowed;
}
.ma-hint {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin: 0 0 10px;
}
.ma-btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ma-btn-row-split .ma-btn-fish { flex: 1; min-width: 120px; }
.ma-btn-row-split .ma-btn-exchange { flex: 1; min-width: 120px; }
.ma-btn { flex: 1; min-width: 120px; }
.ma-btn-fish { background: linear-gradient(135deg, #fa8c16 0%, #d46b08 100%); border: none; color: #fff; }
.ma-btn-exchange { color: #389e0d; border-color: #b7eb8f; }

/* ===== 怪异爬塔 ===== */
.weird-tower-activity-page { padding: 12px 14px 24px; }
.wt-offline-tip {
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #fff7e6;
  color: #d46b08;
  font-size: 13px;
}
.wt-card-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.wt-log-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.2;
}
.wt-log-btn-icon {
  display: inline-flex;
  align-items: center;
  opacity: 0.85;
}
.wt-log-count {
  min-width: 18px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--accent, #1890ff);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}
.wt-card {
  border: 1px solid var(--panel-border, #eee);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  background: var(--panel-bg, #fff);
}
.wt-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.wt-card-head-left { display: flex; gap: 10px; align-items: flex-start; }
.wt-card-title { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.wt-card-desc { margin: 0; font-size: 12px; color: var(--muted2, #888); }
.wt-open-banner {
  font-size: 12px;
  color: #d46b08;
  background: #fff7e6;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.wt-progress-box {
  text-align: center;
  padding: 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff7e6 0%, #ffe7ba 100%);
  margin-bottom: 12px;
}
.wt-progress-label { font-size: 12px; color: #666; margin-bottom: 4px; }
.wt-layer-value { font-size: 28px; font-weight: 700; color: #fa8c16; letter-spacing: 2px; }
.wt-energy-badge { display: flex; align-items: center; gap: 4px; }
.wt-energy-icon-wrap {
  position: relative;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wt-energy-icon-wrap .wt-item-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
}
.wt-energy-icon-wrap .wt-item-icon[src=''],
.wt-energy-icon-wrap .wt-item-icon:not([src]) {
  display: none;
}
.wt-energy-emoji {
  font-size: 18px;
  line-height: 1;
}
.wt-energy-icon-wrap .wt-item-icon[src]:not([src='']) ~ .wt-energy-emoji {
  display: none;
}
.wt-item-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}
.wt-energy-num { font-size: 16px; font-weight: 600; color: #fa8c16; }
.wt-formation-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.wt-formation-label { font-size: 13px; color: #666; }
.weird-tower-activity-page .formation-btns { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.weird-tower-activity-page .formation-btn {
  min-width: 44px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--panel-border, #ddd);
  background: var(--input-bg, #f5f5f5);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.weird-tower-activity-page .formation-btn.active {
  background: #e6f7ff;
  color: #1890ff;
  border-color: #91d5ff;
}
.wt-buy-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #666;
}
.wt-buy-input {
  width: 64px;
  height: 36px;
  text-align: center;
  border: 1px solid var(--panel-border, #ddd);
  border-radius: 8px;
}
.wt-btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.wt-btn { flex: 1; min-width: 120px; }
.wt-btn-merge { background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%); border: none; color: #fff; }
.wt-merge-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}
.wt-stat-box { text-align: center; padding: 10px 6px; border-radius: 8px; }
.wt-stat-box-blue { background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%); }
.wt-stat-box-orange { background: linear-gradient(135deg, #fff7e6 0%, #ffe7ba 100%); }
.wt-stat-box-green { background: linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%); }
.wt-stat-label { font-size: 11px; color: #666; margin-bottom: 4px; }
.wt-stat-val { font-size: 18px; font-weight: 600; }
.wt-stat-blue { color: #1890ff; }
.wt-stat-orange { color: #fa8c16; }
.wt-stat-green { color: #52c41a; }
.wt-claim-row { display: flex; justify-content: center; margin-bottom: 8px; }
.wt-log-modal { min-width: 0; }
.wt-log-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--muted2, #999);
  font-size: 13px;
}
.wt-log-list { max-height: 55vh; overflow: auto; font-size: 12px; }
.wt-log-line { padding: 4px 0; border-bottom: 1px solid #f0f0f0; }
.wt-log-time { color: #999; margin-right: 8px; }
.wt-log-success { color: #389e0d; }
.wt-log-error { color: #cf1322; }
.wt-log-warning { color: #d46b08; }

/* ===== 功法活动 ===== */
.legacy-activity-page { display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }
.lg-offline-tip {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-radius: 10px; background: #fff7e6; border: 1px solid #ffd591; color: #ad6800; font-size: 13px;
}
.lg-topbar-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 6px; border-radius: 999px;
  background: var(--primary-a10); border: 1px solid var(--primary-a25);
}
.lg-topbar-pill .lg-topbar-item-icon,
.lg-topbar-pill .lg-item-icon {
  width: 22px; height: 22px;
}
.lg-topbar-pill .lg-header-essence { font-size: 14px; }
.lg-item-icon {
  width: 28px; height: 28px; object-fit: contain; flex-shrink: 0;
  border-radius: 6px; background: var(--input-bg);
}
.lg-header-essence { font-size: 16px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.lg-card-ico.amber { background: rgba(245, 158, 11, .14); color: #d97706; }
.lg-card-ico.violet { background: rgba(139, 92, 246, .14); color: #7c3aed; }
.lg-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lg-action-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 88px; padding: 14px 10px; border-radius: 12px;
  border: 1px solid var(--panel-border); background: var(--input-bg);
  cursor: pointer; transition: border-color .15s, background .15s, transform .12s;
}
.lg-action-tile:hover { border-color: var(--primary-a45); background: var(--primary-a08); }
.lg-action-tile.primary {
  border-color: var(--primary-a45); background: var(--primary-a12);
}
.lg-action-tile-num { font-size: 28px; font-weight: 800; line-height: 1; color: var(--text); }
.lg-action-tile.primary .lg-action-tile-num { color: var(--primary); }
.lg-action-tile-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.lg-season-gap-tip {
  font-size: 12px; line-height: 1.45; padding: 8px 10px;
  border-radius: 8px; background: #fff7e6; border: 1px solid #ffd591; color: #ad6800;
}
.lg-stat-val.lg-privilege-text { font-size: 13px; line-height: 1.35; word-break: break-word; }
.lg-card-gift .lg-gift-form { gap: 14px; }
.lg-form-label-text {
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  color: var(--text); opacity: .72; padding-left: 2px;
}
.lg-gift-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lg-gift-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) {
  .lg-gift-field-row { grid-template-columns: 1fr; }
}
.lg-gift-input-wrap {
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 14px;
  background: var(--input-bg);
  border: 1.5px solid var(--panel-border);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.lg-gift-input-wrap:focus-within {
  border-color: rgba(139, 92, 246, .55);
  background: var(--panel);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .12);
}
.lg-gift-input-ico {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 20px; color: var(--muted); transition: color .15s;
}
.lg-gift-input-wrap:focus-within .lg-gift-input-ico { color: #7c3aed; }
.lg-gift-inp {
  flex: 1; min-width: 0; height: 100%;
  border: none; outline: none; background: transparent;
  font-size: 15px; font-weight: 500; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.lg-gift-inp::placeholder { color: var(--muted); opacity: .75; font-weight: 400; }
.lg-gift-inp[type="password"] { letter-spacing: .06em; }
.lg-gift-verify-btn {
  width: 100%; height: 44px; margin-top: 2px;
  border-radius: 12px; font-size: 14px; font-weight: 700;
}
.lg-gift-send-btn { width: 100%; height: 46px; border-radius: 12px; font-weight: 700; }
.lg-gift-form { gap: 12px; }
.lg-form-label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.lg-gift-input { width: 100%; }
.lg-gift-target-host { min-height: 0; }
.lg-gift-target-empty {
  font-size: 12px; line-height: 1.45; padding: 10px 12px;
  border-radius: 10px; background: var(--input-bg); text-align: center;
}
.lg-gift-target-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--input-bg); border: 1px solid var(--panel-border);
}
.lg-gift-target-avatar {
  flex: 0 0 44px; width: 44px; height: 44px;
  border-radius: 50%; overflow: hidden;
  background: var(--panel); border: 1px solid var(--panel-border);
  display: flex; align-items: center; justify-content: center;
}
.lg-gift-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lg-gift-avatar-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: var(--primary); background: var(--primary-a10);
}
.lg-gift-target-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lg-gift-target-name {
  font-size: 14px; font-weight: 700; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lg-gift-target-sub { font-size: 12px; line-height: 1.35; color: var(--text); }
.lg-gift-target-sub.muted { color: var(--muted); }
.lg-gift-verified-tag {
  flex-shrink: 0; font-size: 11px; font-weight: 700;
  padding: 4px 8px; border-radius: 999px;
  background: #dcfce7; color: #15803d;
}
.lg-gift-row { display: flex; gap: 8px; align-items: stretch; }
.lg-gift-row .lg-gift-input { flex: 1; min-width: 0; }
.lg-gift-preview { display: block; font-size: 12px; line-height: 1.45; padding: 8px 10px; border-radius: 8px; background: var(--input-bg); }
.lg-gift-preview.ok { color: #15803d; background: #f0fdf4; }
.lg-card {
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 14px; overflow: hidden;
}
.lg-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--panel-border);
}
.lg-card-head-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lg-card-ico {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--input-bg); color: var(--primary);
}
.lg-card-ico.teal { background: rgba(13, 148, 136, .12); color: #0d9488; }
.lg-card-ico.blue { background: rgba(14, 165, 233, .12); color: #0284c7; }
.lg-card-title { margin: 0; font-size: 15px; font-weight: 700; }
.lg-card-desc { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.lg-card-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.lg-card-foot { padding: 0 14px 14px; }
.lg-btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.lg-btn-row.wrap .btn { flex: 1 1 auto; min-width: 120px; }
.lg-btn-row .btn { flex: 1; min-width: 0; }
.lg-time-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.lg-time-big { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lg-time-big.accent { color: var(--primary); }
.lg-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lg-stat { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 8px; background: var(--input-bg); }
.lg-stat-label { font-size: 11px; color: var(--muted); }
.lg-stat-val { font-size: 16px; font-weight: 700; }
.lg-stat-val.accent { color: var(--primary); }
.lg-stat-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lg-muted { font-size: 12px; color: var(--muted); }
.lg-badge {
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.lg-badge.off { background: var(--input-bg); color: var(--muted); }
.lg-badge.run { background: #dbeafe; color: #1d4ed8; }
.lg-badge.ok { background: #dcfce7; color: #15803d; }
.lg-quality-grid { display: flex; flex-direction: column; gap: 6px; }
.lg-quality-row {
  display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center;
  padding: 6px 8px; border-radius: 8px; background: var(--input-bg);
}
.lg-quality-dot { width: 8px; height: 8px; border-radius: 50%; }
.lg-quality-dot.q6, .lg-quality-dot.q5 { background: #fbbf24; }
.lg-quality-dot.q4 { background: #ef4444; }
.lg-quality-dot.q3 { background: #f97316; }
.lg-quality-dot.q2 { background: #06b6d4; }
.lg-quality-dot.q1 { background: #3b82f6; }
.lg-quality-dot.q0 { background: #22c55e; }
.lg-quality-name { font-size: 13px; }
.lg-quality-count { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lg-field { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lg-field .offline-input { flex: 1; min-width: 140px; }
.lg-hint { margin: 0; font-size: 12px; line-height: 1.45; }
