/* ==========================================================================
   合服多角色独立通道选择页（11.19 原生星域美术风格）
   硬规则：严禁透明线框（所有图标/头像/按钮均 data-lg-skip="1" 且 outline: none）
   ========================================================================== */

body[data-active-screen="channel-select"] .bottom-nav,
body[data-active-screen="channel-select"] .global-hud-resources,
body[data-active-screen="channel-select"] .global-chat-widget,
body[data-active-screen="channel-select"] .chat-fab {
  display: none !important;
}

.channel-select-screen {
  position: relative;
  min-height: 100%;
  height: 100%;
  padding: 0 !important;
  color: #edf8fb;
  background:
    linear-gradient(180deg, rgba(4, 12, 22, 0.42) 0%, rgba(4, 10, 18, 0.72) 55%, rgba(3, 8, 14, 0.94) 100%),
    url("../../../assets/ui-parsed/bg-pass-warp.webp") center top / cover no-repeat;
  background-color: #04090f;
  overflow-x: hidden;
  overflow-y: auto;
}

.channel-select-screen *,
.channel-select-screen *::before,
.channel-select-screen *::after {
  box-sizing: border-box;
}

.channel-select-screen button {
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

.channel-select-screen button:focus-visible {
  box-shadow: 0 0 0 1px rgba(127, 240, 220, 0.85);
}

.channel-select-mount {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  width: 100%;
  isolation: isolate;
}

/* 四角军工 L 定位角标 */
.ch-sel-corner {
  position: absolute;
  width: 11px;
  height: 11px;
  pointer-events: none;
  z-index: 6;
  border-style: solid;
  border-color: rgba(126, 240, 228, 0.85);
}
.ch-sel-corner.is-tl { left: 2px; top: 2px; border-width: 2px 0 0 2px; border-color: #f4d27d; }
.ch-sel-corner.is-tr { right: 2px; top: 2px; border-width: 2px 2px 0 0; border-color: #f4d27d; }
.ch-sel-corner.is-bl { left: 2px; bottom: 2px; border-width: 0 0 2px 2px; }
.ch-sel-corner.is-br { right: 2px; bottom: 2px; border-width: 0 2px 2px 0; }

/* 顶部导航栏（11.19 login-topbar.webp） */
.ch-sel-topbar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 76px;
  align-items: center;
  height: 54px;
  padding: 0 10px;
  background:
    url("../../../assets/ui-parsed/login-topbar.webp") center / 100% 100% no-repeat,
    linear-gradient(180deg, rgba(6, 20, 30, 0.94), rgba(4, 12, 20, 0.88));
  border-top: 2px solid #f0ca72;
  border-bottom: 1px solid rgba(112, 208, 228, 0.34);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.52);
}

.ch-sel-back {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
}
.ch-sel-back:hover { transform: translateX(-2px); filter: brightness(1.25); }
.ch-sel-back img {
  width: 19px;
  height: 21px;
  object-fit: contain;
  display: block;
  filter: brightness(1.75) drop-shadow(0 0 6px rgba(96, 232, 246, 0.75));
}

.ch-sel-topbar-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.ch-sel-kicker {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #e7c26f;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}
.ch-sel-topbar h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #f6fdff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 14px rgba(84, 218, 242, 0.35);
}

.ch-sel-count-tag {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 2px;
  border: 1px solid rgba(235, 192, 98, 0.55);
  background: rgba(48, 34, 10, 0.66);
  color: #fde29b;
  font-size: 10px;
  font-weight: 800;
  font-family: "Cascadia Code", "Consolas", monospace;
  letter-spacing: 0.04em;
}

/* 主内容区 */
.ch-sel-body {
  flex: 1;
  padding: 10px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@keyframes ch-sel-spin { to { transform: rotate(360deg); } }
@keyframes ch-sel-beam { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }

/* 合服星域横幅（11.19 banner-pass-fleet.webp + wormhole-gate.webp） */
.ch-sel-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 3px;
  border: 1px solid rgba(235, 194, 102, 0.5);
  border-left: 3px solid #f0ca72;
  background:
    linear-gradient(95deg, rgba(6, 18, 30, 0.88) 0%, rgba(10, 26, 38, 0.64) 55%, rgba(42, 28, 10, 0.62) 100%),
    url("../../../assets/ui-parsed/banner-pass-fleet.webp") center / cover no-repeat;
  box-shadow: inset 0 1px 0 rgba(255, 232, 168, 0.24), 0 8px 22px rgba(0, 0, 0, 0.42);
}

.ch-sel-banner-gate {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
}
.ch-sel-banner-gate img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  animation: ch-sel-spin 18s linear infinite;
  filter: drop-shadow(0 0 8px rgba(84, 232, 246, 0.72));
}

.ch-sel-banner-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ch-sel-banner-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ch-sel-banner-top strong {
  font-size: 14px;
  font-weight: 900;
  color: #fff6dc;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}
.ch-sel-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 2px;
  border: 1px solid rgba(244, 204, 114, 0.72);
  background: linear-gradient(180deg, rgba(114, 78, 20, 0.76), rgba(62, 40, 10, 0.86));
  color: #ffe8ad;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.ch-sel-banner-copy p {
  margin: 0;
  font-size: 11px;
  color: #b7d7e2;
  line-height: 1.35;
}

/* 物理通道分流导轨 */
.ch-sel-conduit-wrap {
  margin: -2px 0 -4px;
}
.ch-sel-conduit-svg {
  width: 100%;
  height: 34px;
  display: block;
  overflow: visible;
}
.ch-sel-line-dim { fill: none; stroke-width: 1.5; opacity: 0.32; transition: opacity 180ms ease; }
.ch-sel-line-flow { fill: none; stroke-width: 2.4; stroke-dasharray: 6 6; opacity: 0; transition: opacity 180ms ease; }
.ch-sel-branch.is-active .ch-sel-line-dim { opacity: 0.86; stroke-width: 1.8; }
.ch-sel-branch.is-active .ch-sel-line-flow { opacity: 1; animation: ch-sel-beam 0.75s linear infinite; }

/* 独立通道卡片网格 */
.ch-sel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}
.ch-sel-grid.is-count-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.ch-sel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 0 12px;
  border-radius: 3px;
  border: 1px solid rgba(98, 174, 194, 0.28);
  border-top: 2px solid var(--ch-border-dim);
  background: linear-gradient(180deg, rgba(7, 20, 30, 0.84) 0%, rgba(4, 12, 20, 0.94) 100%);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.48);
  color: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}
.ch-sel-card:hover {
  transform: translateY(-2px);
  border-color: var(--ch-border-mid);
  filter: brightness(1.06);
}
.ch-sel-card.is-selected {
  transform: translateY(-2px);
  border-color: var(--ch-color);
  border-top: 2px solid var(--ch-bright);
  background:
    var(--ch-glow-layer),
    linear-gradient(180deg, var(--ch-bg-top) 0%, rgba(5, 14, 22, 0.94) 100%);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.68),
    0 0 22px var(--ch-glow),
    inset 0 1px 0 var(--ch-inset);
}
.ch-sel-card.is-selected::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 0;
  height: 3px;
  background: var(--ch-bottom-beam);
}

.ch-sel-card-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 9px;
  background: linear-gradient(90deg, var(--ch-head-bg), rgba(4, 12, 20, 0.72));
  border-bottom: 1px solid rgba(110, 198, 218, 0.16);
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--ch-bright);
}
.ch-sel-card-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ch-sel-card-dot i {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--ch-color);
  box-shadow: 0 0 8px var(--ch-color);
}
.ch-sel-recent {
  padding: 1px 5px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ffe08a, #e29d2c);
  color: #2c1404;
  font-family: inherit;
  font-size: 9px;
  font-weight: 900;
}

/* 上方真实游戏内玩家头像（3px 军工相框 + 四角瞄准线） */
.ch-sel-avatar-stage {
  position: relative;
  margin: 12px 0 10px;
  width: 106px;
  height: 106px;
  padding: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--ch-color), rgba(8, 24, 34, 0.85));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.65);
}
.ch-sel-grid.is-count-3 .ch-sel-avatar-stage {
  width: 78px;
  height: 78px;
  margin: 10px 0 8px;
}
.ch-sel-card.is-selected .ch-sel-avatar-stage {
  box-shadow: 0 0 20px var(--ch-glow), 0 8px 22px rgba(0, 0, 0, 0.72);
}
.ch-sel-avatar-stage::before,
.ch-sel-avatar-stage::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-style: solid;
  border-color: var(--ch-bright);
  opacity: 0.35;
  transition: opacity 150ms ease;
  pointer-events: none;
}
.ch-sel-avatar-stage::before { left: -3px; top: -3px; border-width: 2px 0 0 2px; }
.ch-sel-avatar-stage::after { right: -3px; bottom: -3px; border-width: 0 2px 2px 0; }
.ch-sel-card.is-selected .ch-sel-avatar-stage::before,
.ch-sel-card.is-selected .ch-sel-avatar-stage::after { opacity: 1; }

.ch-sel-avatar-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  overflow: hidden;
  background: #081522;
}
.ch-sel-avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 220ms ease, filter 220ms ease;
  filter: brightness(0.94);
}
.ch-sel-card.is-selected .ch-sel-avatar-inner img {
  transform: scale(1.04);
  filter: brightness(1.05) contrast(1.03);
}

.ch-sel-zone-flag {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 2px 7px;
  background: linear-gradient(90deg, var(--ch-flag-a), var(--ch-flag-b));
  color: var(--ch-flag-txt);
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 2px -2px 8px rgba(0, 0, 0, 0.65);
}

/* 下方原区名字 + 区名铭牌 + 战力与星钻摘要 */
.ch-sel-card-body {
  width: 100%;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.ch-sel-grid.is-count-3 .ch-sel-card-body { padding: 0 6px; }

.ch-sel-player-name {
  font-size: 16px;
  font-weight: 900;
  color: #f6feff;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
  word-break: break-all;
}
.ch-sel-grid.is-count-3 .ch-sel-player-name { font-size: 13px; }

.ch-sel-origin-plate {
  width: 100%;
  padding: 4px 6px;
  border-radius: 2px;
  border: 1px solid var(--ch-border-mid);
  background: var(--ch-plate-bg);
  color: var(--ch-bright);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}
.ch-sel-grid.is-count-3 .ch-sel-origin-plate { font-size: 10px; padding: 3px 4px; }

.ch-sel-divider {
  width: 100%;
  height: 4px;
  background: url("../../../assets/ui-parsed/mail-divider.webp") center / 100% 100% no-repeat;
  opacity: 0.78;
}

.ch-sel-stats {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
  font-size: 11px;
  color: #9dc5d2;
}
.ch-sel-grid.is-count-3 .ch-sel-stats { font-size: 10px; }

.ch-sel-stat-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}
.ch-sel-stat-row img {
  width: 13px;
  height: 13px;
  object-fit: contain;
  flex: none;
}
.ch-sel-stat-row b {
  color: #eaf9fc;
  font-weight: 700;
}
.ch-sel-stat-token b {
  color: #ffe39b;
}

.ch-sel-state-foot {
  margin-top: 4px;
  width: 100%;
  padding-top: 6px;
  border-top: 1px solid rgba(110, 198, 218, 0.14);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #6e94a2;
}
.ch-sel-card.is-selected .ch-sel-state-foot {
  color: var(--ch-bright);
  text-shadow: 0 0 10px var(--ch-glow);
}

/* 底部通道锁定控制台 */
.ch-sel-dock {
  margin-top: auto;
  position: relative;
  padding: 11px 12px 12px;
  border-radius: 3px;
  border: 1px solid rgba(112, 206, 226, 0.36);
  border-top: 2px solid var(--dock-accent, #5eead4);
  background: linear-gradient(180deg, rgba(7, 22, 32, 0.9) 0%, rgba(4, 11, 18, 0.96) 100%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.62);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ch-sel-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.ch-sel-dock-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: var(--dock-bright, #8ff8ec);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ch-sel-dock-title::before {
  content: "";
  width: 3px;
  height: 12px;
  flex: none;
  background: var(--dock-accent, #5eead4);
  box-shadow: 0 0 8px var(--dock-accent, #5eead4);
}
.ch-sel-dock-code {
  flex: none;
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 10px;
  color: #84b4c2;
}

/* 2×2 对称规则矩阵（已去除原技术路由与同账号互攻限制） */
.ch-sel-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.ch-sel-rule {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 2px;
  border: 1px solid rgba(102, 198, 218, 0.22);
  background: rgba(6, 18, 28, 0.76);
  font-size: 11px;
  line-height: 1.25;
  color: #c2e1eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ch-sel-rule i {
  width: 5px;
  height: 5px;
  flex: none;
  background: var(--dock-accent, #5eead4);
  box-shadow: 0 0 6px var(--dock-accent, #5eead4);
}
.ch-sel-rule b {
  color: #eefcff;
  font-weight: 800;
}
.ch-sel-rule.is-gold {
  border-color: rgba(240, 202, 114, 0.34);
  background: rgba(44, 32, 12, 0.44);
  color: #f4dfa8;
}
.ch-sel-rule.is-gold i {
  background: #f0ca72;
  box-shadow: 0 0 6px rgba(240, 202, 114, 0.75);
}
.ch-sel-rule.is-gold b { color: #ffecb8; }

/* 11.19 原生 9-slice 进服按钮 */
.ch-sel-enter-btn {
  width: 100%;
  margin-top: 2px;
  min-height: 44px;
  padding: 0 18px;
  border-style: solid;
  border-width: 10px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #f5feff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  cursor: pointer;
  transition: transform 110ms ease, filter 120ms ease;
}
.ch-sel-enter-btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.1); }
.ch-sel-enter-btn:active:not(:disabled) { transform: translateY(1px); filter: brightness(0.96); }
.ch-sel-enter-btn:disabled { opacity: 0.72; cursor: wait; }

.ch-sel-enter-btn.is-cyan {
  border-image-source: url("../../../assets/ui-parsed/btn-cyan-9s.webp");
  border-image-slice: 24% 36% 24% 36% fill;
  border-image-repeat: stretch;
  filter: drop-shadow(0 6px 16px rgba(42, 188, 210, 0.38));
}
.ch-sel-enter-btn.is-gold {
  border-image-source: url("../../../assets/ui-parsed/btn-gold-9s.webp");
  border-image-slice: 22% 36% 22% 36% fill;
  border-image-repeat: stretch;
  color: #2b1602;
  text-shadow: 0 1px 0 rgba(255, 240, 190, 0.55);
  filter: drop-shadow(0 6px 18px rgba(235, 178, 52, 0.42));
}
.ch-sel-enter-btn.is-violet {
  border-image-source: url("../../../assets/ui-parsed/btn-cyan-9s.webp");
  border-image-slice: 24% 36% 24% 36% fill;
  border-image-repeat: stretch;
  filter: hue-rotate(84deg) saturate(1.25) drop-shadow(0 6px 18px rgba(154, 98, 240, 0.42));
}

.ch-sel-error {
  margin: 0;
  min-height: 16px;
  font-size: 11px;
  font-weight: 700;
  color: #ff989e;
  text-align: center;
}

/* 选服列表中的合服多角色标识 */
.server-channel-pill {
  display: inline-flex;
  align-items: center;
  flex: none;
  white-space: nowrap;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 2px;
  border: 1px solid rgba(244, 204, 114, 0.72);
  background: linear-gradient(180deg, rgba(114, 78, 20, 0.8), rgba(62, 40, 10, 0.9));
  color: #ffe8ad;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

/* 个人主页「切换角色通道」入口（合服多角色才显示） */
.myinfo-bar.is-channel-switch {
  border-color: rgba(240, 202, 114, 0.48);
  background: linear-gradient(90deg, rgba(54, 38, 12, 0.65), rgba(10, 24, 36, 0.86));
}
.myinfo-bar.is-channel-switch .myinfo-bar-value {
  color: #ffe39b;
}
