/* 全站账号切换组件（account-switch.js）。自带配色，不依赖页面变量；悬停效果只给鼠标设备。 */
.acs-mount { display: inline-flex; flex: none; align-items: center; -webkit-tap-highlight-color: transparent; }
.topbar > .acs-mount { margin-left: 10px; }
.nd-top-actions > .acs-mount { margin-right: 6px; }
.acs-float { position: fixed; top: 10px; right: 10px; z-index: 60; }

.acs-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 190px;
  padding: 6px 12px 6px 9px;
  color: #5a3413;
  background: #fff;
  border: 2px solid #ffd08a;
  border-radius: 999px;
  box-shadow: 0 3px 0 rgba(224, 106, 18, .18);
  font: 800 13px/1.2 "Microsoft YaHei UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}
.acs-chip.is-device { border-color: #9fd9c8; box-shadow: 0 3px 0 rgba(34, 184, 168, .2); }
.acs-ico { flex: none; font-size: 15px; }
.acs-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.acs-count {
  flex: none;
  min-width: 18px;
  padding: 1px 5px;
  color: #fff;
  background: #ff9b2f;
  border-radius: 999px;
  font-size: 11px;
  text-align: center;
}

.acs-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(47, 33, 20, .32);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.acs-panel {
  position: absolute;
  top: 64px;
  right: max(12px, calc((100vw - 1120px) / 2));
  width: min(370px, calc(100vw - 24px));
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  padding: 14px 16px 16px;
  color: #3a2c1c;
  background: #fffdf7;
  border: 3px solid #fff;
  border-radius: 22px;
  box-shadow: 0 8px 0 rgba(90, 52, 23, .1), 0 24px 44px -12px rgba(90, 52, 23, .45);
  font: 14px/1.5 "Microsoft YaHei UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  animation: acs-pop .22s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes acs-pop { from { transform: translateY(-8px) scale(.97); opacity: 0; } }
.acs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.acs-head strong { color: #e06a12; font-size: 17px; }
.acs-x { width: 30px; height: 30px; padding: 0; color: #8a7a66; background: #f6efe2; border: 0; border-radius: 50%; font-size: 18px; cursor: pointer; }

.acs-now {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #fff4e2;
  border-radius: 14px;
}
.acs-now-name { font-size: 16px; font-weight: 800; }
.acs-tag { padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; }
.tag-full { color: #23653b; background: #dff3d6; }
.tag-device { color: #0e7c70; background: #d5f3ee; }
.acs-muted { color: #8a7a66; }
.acs-now .acs-mini:first-of-type { margin-left: auto; }

.acs-btn {
  padding: 8px 14px;
  color: #fff;
  background: linear-gradient(180deg, #ffb24a, #ff8a1f);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 3px 0 #d56a10;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}
.acs-btn:disabled { opacity: .55; cursor: default; }
.acs-mini { padding: 4px 10px; font-size: 12px; box-shadow: 0 2px 0 #d56a10; }
.acs-ghost { color: #8a4b12; background: #fff; border: 2px solid #ffd9a8; box-shadow: none; }
.acs-wide { width: 100%; margin-top: 6px; }
.acs-next { width: 100%; margin-top: 10px; background: linear-gradient(180deg, #4fd6a5, #22b8a8); box-shadow: 0 3px 0 #168d80; }
.acs-link { display: block; margin: 10px auto 0; padding: 4px; color: #a16a2f; background: none; border: 0; font: inherit; font-size: 12.5px; text-decoration: underline; cursor: pointer; }

.acs-sub { display: flex; align-items: baseline; justify-content: space-between; margin: 14px 2px 6px; font-weight: 800; }
.acs-sub small { color: #8a7a66; font-weight: 700; }
.acs-empty { margin: 6px 0; padding: 12px; color: #8a7a66; background: #faf5ea; border-radius: 12px; font-size: 13px; }
.acs-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.acs-list li { display: flex; align-items: stretch; gap: 6px; }
.acs-row {
  display: flex;
  flex: 1;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 9px 12px;
  color: inherit;
  background: #fff;
  border: 2px solid #f0e4cf;
  border-radius: 12px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.acs-row b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.acs-row small { flex: none; color: #8a7a66; font-size: 12px; }
.acs-list li.is-current .acs-row { background: #fff4e2; border-color: #ffc978; cursor: default; }
.acs-del { flex: none; width: 36px; padding: 0; color: #b0897a; background: #fff; border: 2px solid #f0e4cf; border-radius: 12px; font-size: 16px; cursor: pointer; }

.acs-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.acs-msg { min-height: 1.2em; margin: 8px 2px 0; color: #d9480f; font-size: 13px; }
.acs-tip { margin: 12px 0 0; padding: 9px 11px; color: #7b6a55; background: #faf5ea; border-radius: 12px; font-size: 12px; }
.acs-hint { margin: 0 0 8px; color: #7b6a55; font-size: 12.5px; }

.acs-form { display: grid; gap: 8px; }
.acs-field { display: grid; gap: 3px; font-size: 12.5px; font-weight: 800; color: #6b5640; }
.acs-field input {
  width: 100%;
  padding: 8px 10px;
  color: #3a2c1c;
  background: #fff;
  border: 2px solid #eadcc3;
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
}
.acs-row2 { display: grid; grid-template-columns: 1.4fr 1fr .8fr; gap: 8px; }
.acs-captcha { display: flex; align-items: end; gap: 8px; }
.acs-captcha .acs-field { flex: 1; }
.acs-captcha img { flex: none; width: 110px; height: 38px; background: #f6efe2; border-radius: 10px; cursor: pointer; }
.acs-remember { display: flex; align-items: flex-start; gap: 6px; margin: 4px 0; font-size: 12.5px; color: #6b5640; cursor: pointer; }
.acs-remember input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: #ff8a1f; }
.acs-result { display: grid; gap: 2px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 12.5px; }
.acs-result .ok { color: #23653b; }
.acs-result .bad { color: #c2410c; }

@media (hover: hover) and (pointer: fine) {
  .acs-chip:hover { border-color: #ffb24a; }
  .acs-row:hover { border-color: #ffc978; }
  .acs-del:hover { color: #d9480f; border-color: #ffc4a8; }
  .acs-btn:not(:disabled):hover { filter: brightness(1.05); }
}
@media (max-width: 560px) {
  /* 角色选择与账号切换另起一行，保持游戏标题完整可读。 */
  .fun-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .fun-top .fun-back { justify-self: start; }
  .fun-top .fun-title { grid-column: 2; justify-self: end; margin: 0; }
  .fun-top .fun-who { grid-row: 2; grid-column: 1; }
  .fun-top > .acs-mount { grid-row: 2; grid-column: 2; justify-self: end; }
  .acs-chip { padding: 5px 9px; }
  .acs-chip .acs-name { max-width: 64px; font-size: 12px; }
  .acs-panel { top: auto; right: 0; bottom: 0; left: 0; width: auto; max-height: 86vh; border-radius: 22px 22px 0 0; animation-name: acs-sheet; }
  .acs-row2 { grid-template-columns: 1fr 1fr; }
  .acs-row2 .acs-field:first-child { grid-column: 1 / -1; }
}
@keyframes acs-sheet { from { transform: translateY(30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .acs-panel { animation: none; } }
