* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; }
body {
  font-family: 'Ubuntu', -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 400;  /* 字体正常粗细，不加粗 */
  color: #fff;
}
/* 全局禁止选中/拖拽：卡面与文字都是画布像素，没有任何可选中的 DOM 文本 */
*, *::before, *::after {
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  -webkit-user-drag: none; -webkit-tap-highlight-color: transparent;
}

#game { display: block; position: absolute; inset: 0; }
.hidden { display: none !important; }

/* 断线悬浮框：屏幕【上半部分的中央】（不是贴顶边缘）。
   与服务端脱节（一段时间收不到快照）时显示，重连成功立刻消失。 */
#netLost {
  position: fixed;
  left: 50%;
  top: 24%;
  transform: translate(-50%, -50%);
  padding: 12px 24px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font: 800 18px/1.25 Ubuntu, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .3px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 600;                 /* 高于聊天浮动层(500)、低于 Loading 蒙版(900) */
  text-shadow: 0 2px 6px rgba(0, 0, 0, .55);
}

/* HUD */
#hud { position: absolute; inset: 0; pointer-events: none; }

/* 左上角玩家状态框：头像 + 通用血条 + 等级条（在 #topBtns 下方，整体 0.6×）
   三条图层自下而上：粒子(1) < 血条/等级条(2) < 头像(3)。
   血条与游戏内通用血条同一套画法：黑框 #2b2b33 + 灰色残影 + 纯色主条（hpBarColor）。 */
#playerHud {
  position: absolute; left: 16px; top: 74px;
  width: 184px; height: 55px;
  pointer-events: none; z-index: 46;
  user-select: none;
}
#playerHud canvas { position: absolute; display: block; }
#phFx   { left: 0; top: -30px; width: 184px; height: 120px; z-index: 1; pointer-events: none; }
#phBars { left: -2px; top: -2px; width: 188px; height: 59px; z-index: 2; pointer-events: none; }
#phFace { left: 0; top: 0; width: 46px; height: 46px; z-index: 3; pointer-events: none; }

/* 左下角图标列：使用 assets/ui 真实矢量化按钮贴图（层级高于窗口） */
#dockBtns {
  position: absolute; left: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px;
  pointer-events: auto; z-index: 45;
}
.dockbtn {
  padding: 0; border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: filter .1s, transform .08s;
}
.dockbtn img { width: 100%; height: 100%; display: block; pointer-events: none; }
.dockbtn:hover { filter: brightness(1.1); }
.dockbtn:active { filter: brightness(.82); transform: scale(.95); }
/* 背包按钮：原 54px × 0.85 × 1.2 */
#bagBtn { width: 55.2px; height: 55.2px; }
/* 合成按钮：与背包按钮同尺寸，排在背包正下方（列从底部锚定 -> 背包整体上移一格） */
#craftBtn { width: 55.2px; height: 55.2px; }
/* 左上角按钮组：设置（最左）+ 生物图鉴（右移一格） */
#topBtns {
  position: absolute; left: 16px; top: 12px;
  display: flex; align-items: center; gap: 3px;   /* 两个图标靠得更近 */
  /* 49：高于准备页(48)，开始界面也能点；低于 Loading 蒙版(50)，加载时仍被盖住 */
  pointer-events: auto; z-index: 49;
}
/* 生物图鉴按钮：原 32.4px × 1.4 = 45.36px */
#dexBtn { width: 45.36px; height: 45.36px; }
/* 设置按钮：与图鉴同级；内联 SVG 便于单独转动中间齿轮 */
#setBtn { width: 45.36px; height: 45.36px; }
/* 退出服务器按钮：与其它顶部按钮同尺寸同间距，里面的 ✕ 取边长的 0.5 */
#quitBtn {
  width: 27.22px; height: 27.22px; margin-left: 6px; display: none; align-items: center; justify-content: center;
  order: 99;      /* 账户按钮是运行时 append 进来的，靠 order 保证退出永远在最右 */
}
/* 只在【真正进入游戏后】出现：Game.joinServer 加 .on，returnToStartScreen 去掉。 */
#quitBtn.on { display: flex; }
#quitBtn img { width: 50%; height: 50%; display: block; pointer-events: none; }
.setbtn-svg { width: 100%; height: 100%; display: block; }
/* 只有中间那个白色齿轮转：外框与底板保持不动 */
#setBtn .gear { transform-box: view-box; transform-origin: 50% 50%; }
#setBtn:hover .gear { animation: gearSpin 2.6s linear infinite; }
@keyframes gearSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* 底部常驻快捷栏：仅一行 = 当前装备的卡（空位为灰色半透明圆角块，无描边；层级高于窗口） */
#quickbar {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  pointer-events: auto; z-index: 45;
}
.quickrow { display: flex; gap: 8px; }
/* 状态效果条：卡槽正上方，按获得顺序从左到右排列。
   每条 = 圆角条带（略浅底色）+ 圆形图标 + 数字；宽度由 JS 按文本量出并自适应。
   无描边：原本 2px 黑边的位置改成条带自身的内边距（本体更大更宽）；
   宽度、位移、入场/退场（缩放+透明度）全部平滑过渡。 */
.status-row {
  display: flex; gap: 6px; margin-bottom: 6px;
  justify-content: center;
  position: relative;
  min-height: 22px;
}
.status-band {
  display: flex; align-items: center; gap: 4px;
  height: 22px; box-sizing: border-box;
  padding: 0 9px 0 5px;
  border-radius: 9px;
  color: #fff;
  font-family: 'Ubuntu', 'Segoe UI', sans-serif;
  font-size: 12px; font-weight: 800; line-height: 1;
  -webkit-text-stroke: 0.6px #000; paint-order: stroke fill;
  overflow: hidden; white-space: nowrap;
  flex: 0 0 auto;
  will-change: transform, opacity, width;
  transition: width .18s ease, background .18s linear,
              transform .2s cubic-bezier(.3,1.15,.5,1), opacity .18s ease;
}
/* 图标：圆形底色 + 一个符号（减号 / 骷髅 / 约等号） */
.status-ico {
  flex: 0 0 auto;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 11px; font-weight: 900;
  color: #000; -webkit-text-stroke: 0;
}
/* 数值：条带内部只显示数字/百分比，不放文字或 emoji */
.status-txt {
  font-style: normal; font-weight: 800; white-space: nowrap;
}
/* 主槽行：整体 0.9 倍（zoom 同步缩放描边/圆角/间距等所有子元素） */
#slotRow { zoom: 0.9; }
/* 副槽行：整体 0.75 倍（临时存储），位于主槽正下方 */
#subRow { zoom: 0.75; margin-top: 10px; }
/* [R] 提示：绝对定位，故不参与副槽行的居中计算；
   位于第二行第一个卡槽的【正左边】，并相对该卡槽上下居中 */
.subwrap { position: relative; }
.qkey {
  position: absolute; top: 50%; right: calc(100% + 10px); transform: translateY(-50%);
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-size: 12.5px; font-weight: 800;
  color: #fff; -webkit-text-stroke: 1.83px #000; paint-order: stroke fill;
  white-space: nowrap; line-height: 1; pointer-events: none;
}
/* 空卡槽：用 .qinner::after 画"空 eternal 卡"灰白外观；装卡后 .card 绝对铺满完全覆盖，无痕迹 */
.qslot { width: 54px; height: 54px; border-radius: 4px; position: relative; }
.qinner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.qinner::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-radius: 4px; background: #ededed; border: 3.4px solid #c3c3c3; box-sizing: border-box;
}
.qslot .card { position: absolute; inset: 0; z-index: 1; }
/* 拾取落槽：卡牌凭空出现在槽里时"快速渐大"（无位移，只有缩放 + 淡入） */
@keyframes slot-pop {
  0%   { transform: scale(0.55); opacity: 0.15; }
  60%  { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.slot-pop { animation: slot-pop 0.22s cubic-bezier(.3,1.4,.5,1) both; transform-origin: center; }
/* 花瓣血量"水缸"阴影已改画在卡牌 canvas 内板上（cards.js drawHpShadow，与
   reload 装填阴影同层同色、掉血从顶边下垂），DOM 层方案已删除。 */
/* 数量角标（xN / ∞）：DOM 文本，可自由溢出卡牌边界（canvas 绘制会被自身裁掉而显示不全）。
   定位用百分比 -> 随卡牌尺寸等比；倾斜 30° 与原 canvas 版观感一致，
   锚点在卡面右上角 (right:15% / top:11%)，绕该点旋转。 */
.card-count {
  position: absolute; right: 8%; top: 20%;
  transform: rotate(30deg); transform-origin: 100% 0;
  font-family: 'Ubuntu', 'Segoe UI', sans-serif;
  font-weight: 800; font-size: 10.4px; line-height: 1;
  color: #fff; -webkit-text-stroke: 0.115em #000;
  paint-order: stroke fill; white-space: nowrap;
  pointer-events: none; z-index: 3;
}
/* 主槽装填（reload）阴影：改由卡牌 canvas 内部绘制（见 cards.js 的 drawReload）——
   画在「内板之上、花瓣图形与名称之下」，所以阴影只压暗卡牌中部底板，
   外周描边、花瓣本体、名称文字全都不被遮盖。因此这里不再需要任何 DOM 覆盖层。 */
/* 副槽格子正下方的数字快捷键提示（放在 .qinner 内，随副槽缩放同步缩放） */
.qinner .qnum {
  position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%);
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-size: 15px; font-weight: 800;
  color: #fff; -webkit-text-stroke: 2.2px #000; paint-order: stroke fill;
  white-space: nowrap; line-height: 1; pointer-events: none; z-index: 2;
}
/* 卡牌：纯 canvas 绘制（外框/内板/素材/数量角标全在 JS 里画）
   CSS 只负责布局尺寸与外角裁剪，卡面本身没有任何 DOM 文字/图片节点。 */
.card {
  display: block; width: 100%; height: 100%;
  border-radius: 7%;      /* 画布外角裁剪（内框圆角由 JS 绘制） */
  pointer-events: auto; -webkit-user-drag: none;
}
.cardcell .card { border-radius: 5.88%; }   /* 背包卡外角裁剪 */

/* 悬浮框覆盖层：全屏 canvas，画卡牌数据框（在所有窗口之上） */
#uiOverlay {
  position: fixed; left: 0; top: 0; z-index: 500; pointer-events: none;
}

/* 死亡效果：全屏【边缘晕影】压暗（置于所有 UI 之下、pointer-events:none 不挡交互）
   + 面板从屏幕下方滑入渐显（0.35s 回弹曲线）。退出反向，播完再摘除 DOM。
   【纯色】项目美术规则：禁止任何渐变（linear/radial-gradient），一律纯色。
   晕影用 inset box-shadow 的模糊做边缘过渡（不是渐变 API），中心只压一点点，
   所以是"四周黑、中间还看得见"的晕，而不是一整块纯黑。 */
.death-vignette {
  position: fixed; inset: 0; z-index: 10;   /* 高于 canvas(0)、低于所有 UI(45+) */
  pointer-events: none;
  background: rgba(8, 8, 8, .22);
  box-shadow: inset 0 0 240px 110px rgba(8, 8, 8, .95);
  opacity: 0; transition: opacity 0.45s ease;
}
.death-vignette.on { opacity: 1; }

/* 濒死晕影：血量 ≤30% 时屏幕四周渐渐压暗，随血量平滑变化。
   与死亡晕影同一套做法（inset box-shadow 做边缘过渡，不是渐变）；
   强度只由 JS 改 opacity（0 -> LOW_HP_VIG_MAX_OPACITY），这里写的是"满强度"的浓度，
   所以别把阴影 alpha 拉满 —— 叠到 opacity 1 会糊住整个视野。
   JS 侧没有最低底座，暗角永远从全透明开始浮现。 */
.lowhp-vignette {
  position: fixed; inset: 0; z-index: 9;    /* 高于 canvas(0)、低于死亡晕影(10) */
  pointer-events: none;
  background: rgba(8, 8, 8, .10);
  box-shadow: inset 0 0 200px 150px rgba(8, 0, 0, .80);
  opacity: 0;
}
.death-overlay {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
  pointer-events: none;            /* 容器不挡交互，仅 Continue 按钮可点（可继续操作背包/卡槽） */
}
.death-overlay.on { opacity: 1; }
.death-panel {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-weight: 800;
  text-align: center;
  transform: translateY(64px); opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1.2, 0.36, 1), opacity 0.35s ease;
  pointer-events: none;
}
.death-overlay.on .death-panel { transform: translateY(0); opacity: 1; }
.death-title {
  font-size: 17px; color: #fff;
  -webkit-text-stroke: 1px #000; paint-order: stroke fill;
}
.death-cause {
  font-size: 22px; color: #fff;
  -webkit-text-stroke: 1.2px #000; paint-order: stroke fill;
}
/* Continue 按钮：略下移、更小；加粗描边且描边色 = 原主色(#1ea761)，主色(底色)改浅 */
.death-continue {
  /* 与准备页 Ready 按钮同一套：同样的绿、同样的深绿描边与底部硬阴影，
     只是【没有右侧三角】，所以左右内边距对称、宽度贴合文字。 */
  margin-top: 18px; padding: 6px 16px;
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-weight: 800; font-size: 17px; line-height: 1;
  color: #fff; -webkit-text-stroke: 1px #06341d; paint-order: stroke fill;
  background: #2fc47a; border: 3px solid #1a8a52; border-radius: 6px;
  box-shadow: 0 3px 0 #14663c;
  cursor: pointer;
  pointer-events: auto;            /* 死亡面板里唯一可点的元素 */
  transition: transform 0.15s ease, background 0.15s ease;
}
.death-continue:hover { background: #45d68d; transform: scale(1.06); }
.death-continue:active { transform: scale(0.96); }

/* 窗口：左下角背包窗口（宽 = 原 0.8 倍；主色 = 捕获.png 背包按钮棕，描边 = darken(0.18)） */
.window {
  position: absolute; left: 80px; bottom: 16px;
  width: 272.16px;                         /* 背包宽度 = 原 0.5 倍×1.05 = 259.2×0.5×1.05 */
  height: auto; min-height: 120px; max-height: 408px;   /* 纵向自适应：最多 1.5×宽，多了滚轮 */
  background: #5A9FDB; border: 4px solid #4981B1; border-radius: 5.4px;  /* 背包主色 #5A9FDB，边框 #4981B1 */
  display: flex; flex-direction: column; pointer-events: auto; z-index: 100;   /* 窗口置于最高图层 */
  opacity: 1; transform: translateY(0);
  transition: transform .3s ease, opacity .3s ease;   /* 打开从下方冒出 / 关闭滑回下方 0.3s */
}
/* 关闭态：完全滑回屏幕下方外并淡出（保持 flex 布局，仅覆盖全局 .hidden 的 display:none） */
.window.hidden { display: flex !important; opacity: 0; transform: translateY(100%); pointer-events: none; }
/* 关闭的窗口【连同内部所有元素】都不许再接收鼠标事件。
   仅靠父级 pointer-events:none 不够：内部卡牌 canvas 自带 pointer-events:auto（见 .card），
   会把命中测试重新打开 —— 于是窗口关掉后，鼠标扫过原位置仍会弹出格子的悬浮框。 */
.window.hidden, .window.hidden * { pointer-events: none !important; }

/* ---- 生物图鉴窗口 ----
   主色 = 图鉴按钮（btn-bee.svg）的黄 #dbd74b，描边同背包算法（darken 0.18 = #b3b03d）。
   动画与背包完全一致（.window 上的 0.3s transform/opacity），只是方向改为从左上角弹出。 */
#dex {
  left: 16px; top: 64px; bottom: auto;      /* 紧贴左上角按钮组（top 12 + 45.36 高）下方，避免盖住按钮 */
  width: 530.7px;                                 /* 上一版 408.24 × 1.3；每格约 51.9px */
  min-height: 0;
  max-height: 408px;                              /* 与背包窗口同高，行多了在框内滚动 */
  background: #dbd74b; border-color: #b3b03d;
  transform-origin: left top;
}
/* 左上角窗口一律【水平】弹入/收回（只做 X 位移，绝不斜向移动） */
#dex.window.hidden { transform: translateX(-26px); opacity: 0; }

/* ---- 设置窗口 ----
   主色 = 设置按钮（btn-gear-settings.svg）的内板灰 #aaaaaa，
   描边 #8c8c8c（正是该素材的外框色），动效与图鉴一致：从左上角按钮位置弹出。 */
#settings {
  left: 16px; top: 68px; bottom: auto;
  width: 306px; min-height: 0; max-height: 380px;
  background: #aaaaaa; border-color: #8c8c8c;
  transform-origin: left top;
}
#settings.window.hidden { transform: translateX(-18px); opacity: 0; }   /* 水平弹入 */

/* ---- 合成窗口 ----
   主色 = 合成按钮（btn-party.svg）的内板 #db9d5a，描边 = darken 0.18 = #b17f49。
   位置/动效与背包窗口一致，宽度 = 背包 1.5×（288 → 432）；
   上半是 5 个材料槽 + 合成按钮，下半是背包卡按种类分行（同种不同稀有度同一行）。 */
#craft { width: 432px; max-height: 530px; background: #db9d5a; border-color: #b17f49; }
#craft .win-body {
  display: flex; flex-direction: column; overflow: hidden;
  padding: 0 8px 8px; gap: 2px;
}
.craft-top { display: flex; align-items: stretch; gap: 4px; }
/* 舞台吃满主行剩余宽度（按钮侧栏固定宽），5 槽不再被挤；高度固定，增量全给下方列表 */
.craft-stage { position: relative; flex: 1 1 auto; min-width: 0; height: 178px; }
/* 空材料槽：正五边形五个，尺寸与下方卡片一致；点击 = 卸下全部材料 */
.craft-slot {
  position: absolute; width: 48px; height: 48px; margin: -24px 0 0 -24px;
  border-radius: 3.2px; background: rgba(96, 96, 96, .38); cursor: pointer;
  z-index: 1;
}
.craft-stage.crafting .craft-slot { opacity: .32; }
/* 待合成卡：每帧直接写 left/top/transform，绝不能加 CSS 过渡（会拖慢聚拢张开） */
.craft-card {
  position: absolute; width: 48px; height: 48px; margin: -24px 0 0 -24px;
  z-index: 2; cursor: pointer;
}
/* 切卡 / 加卡 / 卸下的渐大渐小：只缩放【卡面内容】，绝不动卡片本体的
   left/top/transform —— 那些每帧由合成动画写，CSS 动画会覆盖导致卡片"消失"。 */
/* 数量角标是 canvas 的兄弟节点，必须和卡面【同一时刻同一曲线】一起渐大/渐小，
   否则会出现"卡没了、xN 才突然消失"。 */
.craft-card > .card.craft-pop { animation: craft-pop .22s cubic-bezier(.3, 1.5, .5, 1); }
.craft-card > .card.craft-pop-out { animation: craft-pop-out .22s cubic-bezier(.3, 1.5, .5, 1) forwards; }
/* 角标自带 rotate(30deg)，必须用它自己的关键帧保住旋转，否则动画期间会突然摆正 */
.craft-card > .card-count.craft-pop { animation: craft-pop-count .22s cubic-bezier(.3, 1.5, .5, 1); }
.craft-card > .card-count.craft-pop-out {
  animation: craft-pop-out-count .22s cubic-bezier(.3, 1.5, .5, 1) forwards;
}
@keyframes craft-pop {
  from { transform: scale(.35); opacity: .4; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes craft-pop-out {
  from { transform: scale(1); opacity: 1; }
  to   { transform: scale(.2); opacity: 0; }
}
@keyframes craft-pop-count {
  from { transform: rotate(30deg) scale(.35); opacity: .4; }
  to   { transform: rotate(30deg) scale(1); opacity: 1; }
}
@keyframes craft-pop-out-count {
  from { transform: rotate(30deg) scale(1); opacity: 1; }
  to   { transform: rotate(30deg) scale(.2); opacity: 0; }
}
/* UI 层方形粒子画布：就在合成舞台内，不受世界坐标/相机影响。
   z-index 0 = 位于槽位(1)和卡片(2)【下方】，粒子不会盖住卡面。 */
.craft-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
/* 最终结果：中心渐大一张更大的卡面，点击即"拿下来"（收起 + 5 槽从中心张开） */
.craft-big {
  position: absolute; left: 50%; top: 50%; width: 74px; height: 74px;
  margin: -37px 0 0 -37px; z-index: 5; cursor: pointer;
}
.craft-big.grow { animation: craft-grow .42s cubic-bezier(.2, 1.5, .5, 1) both; }
.craft-big .card { width: 100%; height: 100%; pointer-events: none; }
.craft-big.hidden { display: none !important; }
@keyframes craft-grow {
  from { transform: scale(.15); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.craft-card .card { width: 100%; height: 100%; }
.craft-side {
  flex: 0 0 112px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
}
.craft-btn {
  min-width: 56px; padding: 4px 6px; border-radius: 5px; cursor: pointer;
  border: 2.4px solid #a07640; background: #8a8a8a; color: #fff;
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-size: 12px; font-weight: 800;
  -webkit-text-stroke: 1.2px #1e1e1e; paint-order: stroke fill;
  transition: transform .08s;
}
.craft-btn:active { transform: scale(.95); }
/* 不足 5 张或合成中：全灰禁用（与合成完毕后的禁用效果一致） */
.craft-btn:disabled,
.craft-btn.crafting {
  cursor: default; background: #5a5a5a; border-color: #6e5030;
  color: #c2c2c2; -webkit-text-stroke-color: #222;
}
.craft-chance {
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-size: 10.4px; font-weight: 800;
  color: #fff; -webkit-text-stroke: 1.4px #000; paint-order: stroke fill;
  text-align: center; white-space: nowrap;
}
.craft-note {
  padding: 5px 8px 1px; text-align: center; line-height: 1.5;
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-size: 11px; font-weight: 800;
  color: #fff; -webkit-text-stroke: 1.4px #000; paint-order: stroke fill;
}
/* 下半：一种花瓣一行，行内 8 格 = 8 个可合成稀有度（common..super，eternal 不计入）；
   有货的格上色可点（装 5 张 / 补齐 / 叠加触发自动合成），空槽 = 生物图鉴同款灰槽；
   Shift+点击 = 全部库存自动多次合成。悬浮只出 tooltip。 */
.craft-list { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.craft-list::-webkit-scrollbar { width: 8px; }
.craft-list::-webkit-scrollbar-track { background: transparent; }
.craft-list::-webkit-scrollbar-thumb { background: rgba(226,232,236,.5); border-radius: 8px; }
.craft-row { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.craft-cell {
  position: relative; aspect-ratio: 1 / 1; border-radius: 3.2px;
  background: rgba(96, 96, 96, .38);
}
.craft-cell.on { background: transparent; cursor: pointer; }
.craft-cell.off { cursor: default; }
.craft-cell.off .card { filter: grayscale(.85) brightness(.82); }   /* 凑不齐 5 张：置灰不可点 */
.craft-cell .card { position: absolute; inset: 0; }
/* 分栏标签：四等分的小按钮，选中项用白底深字 */
.set-tabs { display: flex; gap: 4px; padding: 2px 12px 0; }
.set-tab {
  flex: 1 1 0; padding: 4px 0; border: none; border-radius: 3.4px; cursor: pointer;
  background: rgba(0, 0, 0, .18); color: #fff;
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-size: 11.4px; font-weight: 800; line-height: 1.2;
  -webkit-text-stroke: 1.5px #000; paint-order: stroke fill;
}
.set-tab:hover { background: rgba(0, 0, 0, .3); }
.set-tab.on { background: #fefefe; color: #3b3b3b; -webkit-text-stroke: 0; }

.set-panel { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-size: 12px; font-weight: 800;
  color: #fff; -webkit-text-stroke: 1.6px #000; paint-order: stroke fill; cursor: pointer;
}
.set-row select {
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-size: 11.4px; font-weight: 800;
  padding: 3px 6px; border-radius: 3.4px; border: 2px solid #8c8c8c;
  background: #fefefe; color: #2b2b2b; cursor: pointer;
  /* 描边是可继承属性：父级 .set-row 的 1.6px 黑描边会继承进下拉框，
     在浅底深字上糊成一团（看起来像纯黑字），这里必须清零。 */
  -webkit-text-stroke: 0;
}
.set-row select option { -webkit-text-stroke: 0; color: #2b2b2b; }

/* 勾选框：与聊天面板【同款】——黑描边外框 + 内部填充块 + 勾选绿→深灰 / 取消红→缩没，
   动画复用同一组 keyframes（cbx-check / cbx-uncheck）。
   结构：<span class="set-check"><i class="set-box"><b class="set-fill"></b></i></span> */
.set-check { display: inline-flex; align-items: center; cursor: pointer; }
.set-check .set-box {
  position: relative; width: 15px; height: 15px; box-sizing: border-box;
  /* 未勾选 = 深色底（勾选时被浅色填充盖住） */
  display: inline-block; background: #555; border: 1px solid #000; border-radius: 2px;
  -webkit-text-stroke: 0;
}
.set-check .set-box .set-fill {
  /* 勾选稳定态 = 浅色（与未勾选的深色底正好反过来） */
  position: absolute; inset: 0; background: #ececec; border-radius: 1px;
  transform: scale(0); transform-origin: center;
}
.set-check.on .set-box .set-fill { transform: scale(1); }
.set-check .set-box .set-fill.cbx-checking   { animation: cbx-check   0.36s cubic-bezier(.4,0,.2,1) forwards; }
.set-check .set-box .set-fill.cbx-unchecking { animation: cbx-uncheck 0.36s cubic-bezier(.4,0,.2,1) forwards; }

/* 说明小字：与窗口标题一致的黑色描边（不能只有浅色字，浅底上会看不清） */
.set-note {
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-size: 10.4px; font-weight: 700; line-height: 1.35;
  color: #fff; -webkit-text-stroke: 1.4px #000; paint-order: stroke fill;
}
.set-credits a {
  color: #8ad1ff; text-decoration: none; cursor: pointer;
  user-select: none; -webkit-user-select: none;
  transition: color .12s ease;
}
.set-credits a:visited { color: #8ad1ff; }
.set-credits a:hover { color: #c8ebff; text-decoration: underline; }
.set-credits a:active { color: #ffffff; }
.set-credits {
  padding: 18px 0; text-align: center;
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-size: 13px; font-weight: 800; line-height: 1.9;
  color: #fff; -webkit-text-stroke: 1.8px #000; paint-order: stroke fill;
}

/* 图鉴内容：一行一种生物，9 格从左到右稀有度递增 */
.dex-grid { display: flex; flex-direction: column; gap: 3px; }
.dex-row { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; }
/* 空格子 = 灰色半透明槽；打过的那格换成空白稀有度卡面 + 生物贴图 */
.dex-cell {
  position: relative; aspect-ratio: 1 / 1;
  border-radius: 3.2px; background: rgba(96, 96, 96, .38);
}
.dex-cell.on { background: transparent; }
/* 生物贴图画布：铺满卡面内侧（图案本身在画布里再按 0.78 的留白比例缩放，
   见 ui.js _paintMobArt —— 卡面圆角描边不会被盖住，也不会溢出格子） */
.dex-mob {
  position: absolute; left: 4%; top: 4%; width: 92%; height: 92%;
  pointer-events: none; -webkit-user-drag: none;
}

/* 卡牌/卡槽：触屏上禁止滚动手势与长按菜单（否则拖动会被 pointercancel 掐断） */
.card, .cardcell, .qslot, .qinner, .flyghost {
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

/* 拿起卡牌：左右小幅晃动。只作用在幽灵元素本身（内部卡面不再另加动画），
   否则父子两层旋转叠加（±9°×2）会放大成左上/右下的抖动。 */
.dragging { animation: cardWobble .6s ease-in-out infinite; opacity: 1; }  /* 不透明 */
@keyframes cardWobble {
  0%, 100% { rotate: -2.5deg; translate: -1.5px 0; }
  50%      { rotate: 2.5deg;  translate: 1.5px 0; }
}
.win-head { position: relative; padding: 12px 54px 4px; }
.win-title {
  display: block; text-align: center; font-size: 15px; font-weight: 900; color: #fff; letter-spacing: .3px;
  -webkit-text-stroke: 2.25px #000; paint-order: stroke fill;  /* 黑描边加粗 0.5 倍：1.5 -> 2.25px */
}
.win-subtitle {
  display: block; text-align: center; font-size: 10.8px; font-weight: 900; color: #e8f2fa; margin-top: 2px;
  -webkit-text-stroke: 1.8px #000; paint-order: stroke fill;    /* 黑描边加粗 0.5 倍：1.2 -> 1.8px */
}
.win-count {
  position: absolute; left: 16px; top: 15px; font-size: 12px; font-weight: 800; color: #eaf4fc;
  -webkit-text-stroke: 1.2px #000; paint-order: stroke fill;  /* 纯色黑描边 */
}
/* 关闭按钮：统一使用 btn-close.svg 真实矢量化贴图，尺寸不变（17px） */
.win-close {
  position: absolute; top: 6px; right: 8px;
  width: 17px; height: 17px; padding: 0; border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.win-close img { width: 100%; height: 100%; display: block; pointer-events: none; }
.win-close:hover { filter: brightness(1.1); }
.win-close:active { filter: brightness(.85); }
/* 自绘滚动条：仅一根半透明灰色条，不用浏览器默认样式 */
/* pan-y：窗口内容区可以用手指上下滚动；落在卡面上的手势仍然是"拖卡"（卡上是 none，
   取交集后以 none 为准，所以拖卡不会被滚动抢走）。 */
.win-body { padding: 10px 16px 16px; overflow-y: auto; flex: 1 1 auto; min-height: 0; touch-action: pan-y; }
.win-body::-webkit-scrollbar { width: 8px; }
.win-body::-webkit-scrollbar-track { background: transparent; }
.win-body::-webkit-scrollbar-thumb { background: rgba(226,232,236,.5); border-radius: 8px; }
.win-body::-webkit-scrollbar-thumb:hover { background: rgba(226,232,236,.7); }
.win-body { scrollbar-width: thin; scrollbar-color: rgba(226,232,236,.5) transparent; }

/* 画廊：按稀有度分组 */
.gallery { display: flex; flex-direction: column; gap: 12px; }
/* 背包内部卡牌 = 原 0.8 倍 */
.bag-grid { display: grid; grid-template-columns: repeat(auto-fill, 44.544px); gap: 5.76px; justify-items: center; }  /* 卡牌×1.2，居中对齐 */
.cardcell { display: flex; align-items: center; justify-content: center; }  /* 让卡牌在cell内完全居中 */
.cardcell .card { width: 44.544px; height: 44.544px; }  /* 背包卡牌 = 37.12×1.2 */
.rar-divider { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; }
.rar-line { flex: 1; height: 2.4px; border-radius: 1.5px; }   /* 分割线宽度0.6倍 = 4×0.6 */
.rar-name {
  font-size: 9.6px; font-weight: 800; padding: 1px 6.4px; border-radius: 4.8px;  /* 字体0.8倍 = 12×0.8 */
  background: transparent; white-space: nowrap;
  -webkit-text-stroke: 1.2px #000; paint-order: stroke fill;   /* 描边宽度1.2倍 = 1×1.2 */
}
/* 背包卡牌：一行最多 5 张（官方口径），间距收紧到 3px。
   用 flex-wrap + 容器最大宽度 = 5 张的宽度来"限行"，
   这样不足 5 张的那一行仍然是【整行居中】，不会像固定网格那样靠左对齐。
   原来 gap 7.2px + cell 55.68px（两侧各 5.57px 空白）在 272px 窗口里只能排 4 张。 */
/* 背包格子：固定【一行 5 张】（grid 定列数，不靠 flex 换行猜宽度）。
   格子宽度随窗口自适应，窗口又随页面尺寸走（见 #inventory.window）。 */.rar-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px; justify-items: center;
  margin-left: auto; margin-right: auto;
}
/* 背包窗口【随页面大小自适应】：宽随视口缩放；高度最多 70vh，超出滚轮。 */
#inventory.window {
  width: clamp(260px, 26vw, 460px);
  max-height: 70vh;
}
/* cell 只要比卡牌大一点点即可：原来的 55.68 两侧各留 5.57px 空白，
   再加上 7.2px 的 grid gap，一行只能排 4 张且看着很散。 */
/* 格子尺寸跟着 grid 列宽走（原来写死 47px）：窗口变宽/变窄时一行始终 5 张。 */
.cardcell { position: relative; width: 100%; max-width: 64px; aspect-ratio: 1 / 1; border-radius: 10px; cursor: pointer; }

/* 拖拽幽灵 / 飞入动画 */
.flyghost {
  position: fixed; z-index: 200; pointer-events: none; width: 54px; height: 54px;
  transform: translate(-50%, -50%);
}
/* 拖拽中的卡 = 卡槽中卡牌(54px) × 1.3 × 0.6 × 1.2 = 50.54px，摇晃动画保持不变 */
#dragGhost {
  position: fixed; z-index: 200; pointer-events: none; width: 50.54px; height: 50.54px;
  transform: translate(-50%, -50%);
}
/* 小地图名：样式与副槽 [1][2] 相同（Ubuntu 800 + 黑描边），始终居中在小地图正下方 */
#mmName {
  position: fixed; left: 0; top: 0; transform: translateX(-50%);
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-size: 11.25px; font-weight: 800;
  color: #fff; -webkit-text-stroke: 1.65px #000; paint-order: stroke fill;
  white-space: nowrap; line-height: 1; pointer-events: none; z-index: 46;
}
/* 加载：纯黑底 + 内联蜘蛛动画 + 标志性 Ubuntu 白色大字（原 18px × 2） */
#loading {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 40px;
  background: #000; font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-weight: 700;
  font-size: 36px; color: #fff; z-index: 50; line-height: 1; text-align: center;
}
/* Worker 在 OffscreenCanvas 上直接画白蛛（透明底），不再需要 invert；
   不支持 Worker 时退回内联 SVG（此时 CSS filter 由 JS 补 invert）。 */
#loadAnim { width: 120px; height: 120px; flex: 0 0 auto; }
#loadAnim svg, #loadAnim canvas { display: block; width: 100%; height: 100%; }
#loadText { flex: 0 0 auto; }
/* 加载完成后的退场序列：蜘蛛 + 文案先渐隐 -> 播放一次映界 logo -> 停留 -> 整块蒙版渐隐。
   蒙版在 #loadAnim/#loadText 改写 opacity 时不能整块跟着变，所以只给子元素加过渡。 */
#loading.fade-out #loadAnim,
#loading.fade-out #loadText { opacity: 0; transition: opacity .45s ease; }
#loading.gone { opacity: 0; transition: opacity .45s ease; pointer-events: none; }
/* studio logo：居中、放大到 220px（"适当缩放"），原本是黑的，素材已翻成白字适配纯黑蒙版 */
#studioLogo {
  position: absolute; left: 50%; top: 50%; width: 220px; height: 220px;
  transform: translate(-50%, -50%); opacity: 0;
  transition: opacity .5s ease; pointer-events: none;
}
#studioLogo.on { opacity: 1; }
#studioLogo.hidden { display: none; }
#studioLogo svg { display: block; width: 100%; height: 100%; }
/* 加载过慢提示：定格于正上方中央的悬浮框（不随页面滚动，不阻塞交互） */
#loadWarn {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  max-width: min(520px, 86vw); padding: 10px 16px; box-sizing: border-box;
  background: rgba(20, 30, 24, 0.92); border: 2px solid #3c5a44; border-radius: 8px;
  font-size: 15px; line-height: 1.45; color: #e8f3dd; text-align: center;
  z-index: 60; pointer-events: none;
  font-family: 'Ubuntu', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
/* ================= 准备页（Connecting -> Ready） =================
   Loading 蒙版撤掉后才出现：花园瓦片平铺背景（与游戏里默认视野同尺寸，由 JS 平移）+ 花瓣飘过。
   标题 Flocn.cn 在上，下面一行是「Connecting」/「玩家名 + Ready」。
   连接建立后文字快速渐小，Ready 按钮（Continue 同款绿钮）快速渐大；点 Ready 才入服。 */
/* z-index 必须低于 #loading(50)：准备页会在 Loading 淡出前预挂载，
   由蒙版盖住；蒙版撤走时下面已经是准备页，不会先闪一下游戏画面。
   也必须低于 #topBtns(49)：开始界面要能看到左上角的设置/图鉴按钮。 */
#connect {
  position: fixed; inset: 0; z-index: 48;
  display: flex; align-items: center; justify-content: center;
  background: #1ea761 url('../assets/static/tiles/grass_c_0.svg') repeat;
  background-size: 288px 288px;   /* = GARDEN_TILE：与游戏里默认视野的瓦片一样大 */
  opacity: 1; transition: opacity .45s ease;
  overflow: hidden;
}
/* 背景就是素材原色，不要再压一层半透明黑 —— 压暗会让人以为游戏里也这么暗。
   标题/按钮的白色文字靠自身黑色描边保证可读性。 */
/* 花瓣层：画在背景之上（canvas 是 #connect 的子节点） */
#connectPetals {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}
#connect.gone { opacity: 0; pointer-events: none; }
/* margin-top 负值 = 整块上移：标题变大后如果只靠居中，按钮会被一起推下去，
   这里把整块提起来，让"变大的标题往上、按钮大致留在原位"。 */
#connectInner {
  position: relative; display: flex; flex-direction: column;
  align-items: center; gap: 62px; margin-top: -34px;
}
/* 标题：Ubuntu 800 纯白 + 纯黑描边（与卡牌/名牌同款漫画字） */
#connectTitle {
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-weight: 800; font-size: 66px; line-height: 1;
  color: #fff; -webkit-text-stroke: 5px #000; paint-order: stroke fill;
  /* 字间距收紧（原 .5px） */
  letter-spacing: -1.5px;
}
/* 舞台：Connecting 与「名字 + Ready」叠在同一块固定尺寸区域里，
   互相替换时整体不会跳位（两个子元素都绝对定位居中）。 */
#connectStage {
  position: relative; width: min(560px, 92vw); height: 88px;
  display: flex; align-items: center; justify-content: center;
}
#connectText {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-weight: 800; font-size: 52px;
  color: #fff; -webkit-text-stroke: 4px #000; paint-order: stroke fill;
  transition: transform .28s cubic-bezier(.5, 0, .9, .4), opacity .28s ease;
}
#connectText.shrink { transform: translate(-50%, -50%) scale(.15); opacity: 0; }
#connectText.hidden, #connectBtn.hidden, #connectReady.hidden { display: none; }
#connectReady {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 20px;
}
/* 玩家名：白色 + 黑描边，和 Ready 按钮并排（Guest #0038  Ready）
   margin:0 + 同一行 flex 居中 = 两者文字中心线严格对齐（按钮带 margin-top 会整体下沉）。 */
#connectName {
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-weight: 800; font-size: 24px; line-height: 1;
  color: #fff; -webkit-text-stroke: 2.4px #000; paint-order: stroke fill;
  white-space: nowrap; margin: 0;
}
/* Ready：小号绿钮，文字在左、右侧一个深绿右向箭头（带硬阴影）。
   margin:0 必须写 —— .death-continue 自带 margin-top:20px，会把按钮压到玩家名下面去。 */
#connectBtn {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0; padding: 6px 12px 6px 16px;
  font-family: 'Ubuntu', 'Segoe UI', sans-serif; font-weight: 800;
  font-size: 17px; line-height: 1;
  color: #fff; -webkit-text-stroke: 1px #06341d; paint-order: stroke fill;
  background: #2fc47a; border: 3px solid #1a8a52; border-radius: 6px; cursor: pointer;
  box-shadow: 0 3px 0 #14663c;
  animation: connect-btn-in .28s cubic-bezier(.3, 1.5, .5, 1) both;
  transition: transform .15s ease, background .15s ease;
}
/* 右侧箭头：用纯色边框拼的三角形，深绿 + 投影，不用渐变 */
#connectBtn i {
  display: block; width: 0; height: 0;
  border-left: 13px solid #16794a;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  filter: drop-shadow(2px 1px 0 rgba(0, 0, 0, .22));
}
#connectBtn:hover { background: #45d68d; transform: scale(1.06); }
#connectBtn:active { transform: scale(.96); }
/* 按钮由代码自动 focus（为了回车能直接点），浏览器默认的焦点环是白+黑双色描边，
   会把参考图那种干净的绿钮糊掉一圈，这里去掉；它是页面上唯一的操作，不靠焦点环辨识。 */
#connectBtn:focus { outline: none; }
@keyframes connect-btn-in {
  0% { transform: scale(.15); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ================= 全局聊天（仿 notice.PNG / notice2.PNG / example1.PNG） ================= */
/* 单一容器：收起态与展开态共用同一个输入框，左右边界/圆角/白底黑边完全一致；
   展开只是在上方追加标签与历史（#chat 以 bottom 定位，自动向上生长）。 */

/* 左右边界恒定：左侧避开左下角图标列（#dockBtns 宽约 71px），右侧由 width 决定 */
#chat {
  position: absolute; left: 88px; bottom: 22px; width: 235px;
  pointer-events: auto; z-index: 46;
  font-family: 'Ubuntu', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 13px; line-height: 1.45; color: #fff;
}
/* 收起态：隐藏标签/历史/前缀；输入行变成参考图里紧凑的深绿胶囊（notice.PNG / example1.PNG），
   宽度自适应内容，不再是 340px 白框。点击或按 Enter 后还原为白底黑边输入框（notice2.PNG 底部）。 */
#chat.collapsed .chat-tabs,
#chat.collapsed .chat-log,
#chat.collapsed .chat-chan { display: none; }
#chat.collapsed { width: 235px; }   /* 与展开态同宽，点击展开时输入框不再变宽 */
#chat.collapsed .chat-inputrow {
  display: inline-flex; width: 100%;
  background: rgba(0, 0, 0, 0.35);     /* 非焦点态：半透明黑底（与悬浮信息框同级） */
  border: 2px solid transparent;       /* 预留与聚焦态相同的描边宽度(2px)：无焦点看着不再小一圈 */
  border-radius: 5px;
  padding: 2px 8px;                    /* 与聚焦态一致，保证两态内容区精确对齐 */
  box-shadow: none;
}
#chat.collapsed .chat-input {
  flex: 1; min-width: 0; color: #fff; font-size: 13px;
}
#chat.collapsed .chat-input::placeholder {
  color: #fff; opacity: 1; font-weight: 700;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.55);
}

/* ---- 频道标签（notice2.PNG 顶部四个） ---- */
.chat-tabs { display: flex; gap: 2px; margin-bottom: 5px; }
.chat-tab {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 5px; border: none; border-radius: 4px;
  background: rgba(170, 170, 170, 0.45); color: #fff;
  font: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
  -webkit-text-stroke: 1.1px #000; paint-order: stroke fill;
}
.chat-tab:hover { background: rgba(195, 195, 195, 0.55); }
.chat-tab.on { background: rgba(255, 255, 255, 0.22); }
/* 通用勾选框：外框(黑描边) + 内部填充块。填充块 inset:0 落在描边内侧，缩放时不覆盖描边。
   未勾选 = 白/淡灰底；勾选稳定态 = 深灰；两段动画由 JS 加类触发（keyframes 见下）：
   勾选 = 绿块从中心放大到满 -> 平滑变深灰；取消 = 先平滑变红 -> 再缩到中心直至看不见。 */
.chat-tab .chat-box {
  position: relative;
  width: 11px; height: 11px;
  box-sizing: border-box;
  display: inline-block;
  background: #555;                    /* 未勾选：深色 */
  border: 1px solid #000;              /* 勾选框描边（填充不覆盖它） */
  border-radius: 2px;
}
.chat-tab .chat-box .chat-fill {
  position: absolute; inset: 0;
  background: #ececec;                 /* 勾选稳定态：浅色 */
  border-radius: 1px;
  transform: scale(0);
  transform-origin: center;
}
.chat-tab.on .chat-box .chat-fill { transform: scale(1); }
.chat-tab .chat-box .chat-fill.cbx-checking   { animation: cbx-check   0.36s cubic-bezier(.4,0,.2,1) forwards; }
.chat-tab .chat-box .chat-fill.cbx-unchecking { animation: cbx-uncheck 0.36s cubic-bezier(.4,0,.2,1) forwards; }
/* 红/绿过渡保持不变，只把"稳定态"翻过来：勾选 = 浅色，未勾选 = 深色 */
@keyframes cbx-check {
  0%   { transform: scale(0); background: #3ecf5b; }   /* 绿，从中心出现 */
  55%  { transform: scale(1); background: #3ecf5b; }   /* 放大到满（不覆盖描边） */
  100% { transform: scale(1); background: #ececec; }   /* 平滑变浅色 */
}
@keyframes cbx-uncheck {
  0%   { transform: scale(1); background: #ececec; }
  40%  { transform: scale(1); background: #e0483a; }   /* 先平滑变红 */
  100% { transform: scale(0); background: #e0483a; }   /* 再缩到中心直至看不见 */
}

/* ---- 历史区：中浅灰半透明底（notice2.PNG）、可滚动、保留登入以来全部消息 ---- */
.chat-log {
  background: rgba(150, 150, 150, 0.55); border-radius: 4px;
  padding: 6px 8px; margin-bottom: 5px;
  max-height: 168px; overflow-y: auto; overscroll-behavior: contain;
  font-size: 13px;
}
.chat-log::-webkit-scrollbar { width: 8px; }
.chat-log::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.35); border-radius: 4px; }
.chat-log::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
/* 指令提示：匹配的指令一条一个小半透明栏（命令格式 + 介绍） */
.chat-log .chat-hint {
  padding: 2px 6px; margin: 1px 0; border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 12px; line-height: 1.4;
}
.chat-hint-cmd { color: #ffe763; font-weight: 700; -webkit-text-stroke: 1.2px #000; paint-order: stroke fill; }
.chat-hint-desc { color: #ffffff; -webkit-text-stroke: 1.2px #000; paint-order: stroke fill; }

/* ---- 强制换行：任何长度都不许撑破左右边界 ---- */
.chat-line { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.chat-tag  { color: #ffffff; font-weight: 700; margin-right: 2px; }   /* 频道前缀：白字（notice2.PNG） */
.chat-name { color: #ffffff; font-weight: 700; margin-right: 3px; }  /* 玩家名：默认白字，只有自己黄字（见 chat.js _line） */
.chat-text { color: #ffffff; }
/* 文字统一黑色描边（与画面内 canvas 的 strokeText 同款：黑边、圆角连接、填充在上） */
.chat-tag, .chat-name, .chat-text, .chat-sys {
  -webkit-text-stroke: 1.8px #000;
  paint-order: stroke fill;
}
/* 系统消息：整行红字（约定：红色一律为系统） */
.chat-line.sys .chat-sys { color: #FF0000; font-weight: 700; }
/* 密语行：[@对象] 前缀用 rare 紫蓝区分 */
.chat-line.whisper .chat-tag { color: #4D52E3; }

/* ---- 输入行：白底黑字黑边。收起/展开完全同一款，左右边界与 #chat 一致 ---- */
.chat-inputrow {
  display: flex; align-items: center; gap: 6px;
  background: #ffffff; border: 2px solid #000; border-radius: 5px;
  padding: 2px 8px; width: 100%; box-sizing: border-box;
}
.chat-chan { font-size: 13px; font-weight: 700; white-space: nowrap; -webkit-text-stroke: 1px #000; paint-order: stroke fill; }
.chat-input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font: inherit; font-size: 13px; color: #000;
  -webkit-text-stroke: 0.6px #000; paint-order: stroke fill;   /* 与全局文字一致的描边（更粗实） */
}
.chat-input::placeholder { color: #333; opacity: 1; }
/* 聚焦后隐藏提示文案：与 notice2.PNG 一致，只留 [Local] 前缀与光标 */
.chat-input:focus::placeholder { opacity: 0; }

/* ---- 漂浮态：无边框、无底色，直接叠在游戏画面上（example1.PNG） ---- */
.chat-float {
  position: absolute; left: 88px; bottom: 62px;
  display: flex; flex-direction: column; gap: 2px;
  pointer-events: none; user-select: none;
  font-family: 'Ubuntu', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 13px; line-height: 1.4;
  max-width: 235px;
}
/* 漂浮态同样黑描边（不用投影，与画面内文字观感一致） */
.chat-float .chat-tag, .chat-float .chat-name, .chat-float .chat-text, .chat-float .chat-sys {
  -webkit-text-stroke: 1.8px #000;
  paint-order: stroke fill;
}
.chat-float .chat-line { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }

/* ================= 移动端触控层（ui/touch.js） ================= */
/* 只在粗指针设备创建（JS 判断）；桌面浏览器不会出现这些元素。
   只占左下这一块（摇杆活动区），不覆盖整屏 —— 免得挡住快捷栏/聊天/按钮。 */
#touchLayer {
  position: fixed; left: 0; bottom: 0;
  width: 64vw; height: 78vh; z-index: 30;
  pointer-events: auto; touch-action: none;
}
/* 触屏上禁止整页滚动/下拉刷新，避免拖摇杆时页面跟着动 */
html, body { overscroll-behavior: none; }
body.touch-ui { touch-action: none; -webkit-user-select: none; user-select: none; }
body.touch-ui canvas { touch-action: none; }
.t-stick {
  position: fixed; z-index: 30;
  width: var(--t-stick, 120px); height: var(--t-stick, 120px);
  pointer-events: none;
  transition: left .12s ease-out, top .12s ease-out;
}
.t-stick.active { transition: none; }
.t-stick-base {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(16, 28, 20, .26);
  border: 2px solid rgba(255, 255, 255, .35);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .25);
}
.t-stick-knob {
  position: absolute; left: 50%; top: 50%;
  width: var(--t-knob, 52px); height: var(--t-knob, 52px);
  margin-left: calc(var(--t-knob, 52px) / -2);
  margin-top: calc(var(--t-knob, 52px) / -2);
  border-radius: 50%;
  background: rgba(226, 244, 214, .55);
  border: 2px solid rgba(255, 255, 255, .7);
  will-change: transform;
}
.t-stick.active .t-stick-base { border-color: rgba(255, 255, 255, .6); }

/* A/B 按钮：独立挂在 body 上（不在摇杆层里），四边都显式写死，
   保证【严格贴屏幕右下角】—— 之前夹在 #touchLayer(64vw×78vh) 里，
   任何父级尺寸/变换都会把它带偏。 */
.t-btns {
  position: fixed;
  left: auto; top: auto;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 12px; align-items: flex-end; justify-content: flex-end;
  margin: 0; padding: 0;
  z-index: 31;
}
.t-btn {
  width: var(--t-btn, 68px); height: var(--t-btn, 68px);
  border-radius: 50%; padding: 0; border: 2px solid rgba(255, 255, 255, .5);
  background: rgba(18, 32, 22, .38); color: #eaf7e4;
  font-family: 'Ubuntu', sans-serif; line-height: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; touch-action: none; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.t-btn b { font-size: calc(var(--t-btn, 68px) * .38); font-weight: 800; }
.t-btn i { font-size: calc(var(--t-btn, 68px) * .16); font-style: normal; opacity: .85; }
.t-btn-a { border-color: rgba(255, 214, 102, .7); }
.t-btn-b { border-color: rgba(120, 214, 255, .7); }
.t-btn.down { transform: scale(.94); background: rgba(60, 96, 68, .6); }

/* 触控设备上隐藏桌面提示类文字，并把快捷栏整体缩小，给摇杆/按钮让位 */
body.touch-ui #touchLayer { touch-action: none; }
/* 移动端：卡槽【靠左下】，避开右下角的 A/B 按钮与摇杆。
   注意 transform 必须换掉桌面端的 translateX(-50%)（居中位移），
   否则 scale 会把它覆盖掉 -> 整排右移半个宽度，看上去就是"位置不对"。
   bottom 抬起 = #dockBtns（背包按钮）的高度 + 间距，两张都露得出来。 */
body.touch-ui #quickbar {
  left: calc(8px + env(safe-area-inset-left, 0px));
  bottom: calc(16px + 62px + 8px);
  transform: scale(.82);
  transform-origin: 0% 100%;
  align-items: flex-start;
}
body.touch-ui .chat-float { max-width: 46vw; }

/* ================= F3 调试屏幕（ui/debug-screen.js） ================= */
#f3 {
  position: fixed; left: 0; top: 0; z-index: 80;
  display: flex; align-items: flex-start; gap: 26px;
  padding: 10px 14px; pointer-events: none;
  font-family: 'Consolas', 'DejaVu Sans Mono', monospace;
  font-size: 12px; line-height: 1.55; color: #eaf7e4;
  text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
  max-width: 100vw; overflow: hidden;
}
#f3.hidden { display: none; }
#f3 .f3-col { min-width: 208px; }
#f3 .f3-head {
  margin: 6px 0 2px; color: #9fe870; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; font-size: 11px;
}
#f3 .f3-col > .f3-head:first-child { margin-top: 0; }
#f3 .f3-row { display: flex; justify-content: space-between; gap: 14px; }
#f3 .f3-k { color: #b9d8ab; }
#f3 .f3-v { color: #fff; font-variant-numeric: tabular-nums; }
#f3 .f3-petals { display: flex; flex-direction: column; gap: 1px; }
#f3 .f3-petal { white-space: nowrap; }
#f3 .f3-petal b { display: inline-block; width: 16px; color: #7EEF6D; }
#f3 .f3-petal i { color: #ffd166; font-style: normal; }
#f3 .f3-petal em { color: #8fb3a7; font-style: normal; font-size: 11px; }
#f3 .f3-hint {
  position: fixed; left: 14px; bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  color: #9fe870; font-size: 11px;
}
@media (max-width: 760px) {
  #f3 { font-size: 11px; gap: 12px; flex-wrap: wrap; }
  #f3 .f3-col { min-width: 44vw; }
}
/* ============================================================================
   账户窗口（左上角红色齿轮按钮）
   主色取按钮图标 btn-cog-red.svg 的红 #B24949，描边按既有规则 darken 0.18 = #8F3A3A。
   全部纯色，无渐变（项目硬规则）。
   ============================================================================ */
#accBtn { width: 45.36px; height: 45.36px; }
#account {
  left: 16px; top: 64px; bottom: auto;
  width: 430px; min-height: 0; max-height: 520px;
  background: #B24949; border-color: #8F3A3A;
  transform-origin: left top;
}
/* 左上角的窗口一律【水平】弹入/收回。
   少了这一条就会继承 .window.hidden 的 translateY(100%) —— 窗口明明钉在左上角，
   却从屏幕底部往上冒（用户看到的就是这个）。 */
#account.window.hidden { transform: translateX(-18px); opacity: 0; }
#account .set-tab.on { background: #fefefe; color: #8F3A3A; }
#account .win-body { display: flex; flex-direction: column; gap: 8px; }

/* 已登录身份卡 */
.acc-card {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0, 0, 0, .18); border: 2px solid rgba(0, 0, 0, .25);
  border-radius: 6px; padding: 12px 14px;
}
.acc-check {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  background: #3ecf5b; border: 2px solid #2a9e43; color: #fff;
  font: 700 20px/30px 'Ubuntu', sans-serif; text-align: center;
}
.acc-main { min-width: 0; }
.acc-name {
  font: 700 24px/1.15 'Ubuntu', sans-serif; color: #fff;
  -webkit-text-stroke: 1.4px #000; paint-order: stroke fill; word-break: break-all;
}
.acc-meta { font: 600 12px/1.4 'Ubuntu', sans-serif; color: #fff; opacity: .92; margin-top: 2px; }
.acc-badge {
  display: inline-block; margin-top: 6px; padding: 1px 8px; border-radius: 4px;
  background: #ffd43b; color: #3b2b00; font: 700 11px/1.6 'Ubuntu', sans-serif;
  -webkit-text-stroke: 0;
}

/* 游客提示 */
.acc-guest {
  background: rgba(0, 0, 0, .16); border-radius: 6px; padding: 10px 12px;
  font: 500 12px/1.5 'Ubuntu', sans-serif; color: #fff;
}
.acc-guest b { font-size: 14px; font-weight: 800; }

/* 表单 */
.acc-field { display: flex; flex-direction: column; gap: 4px; font: 700 12px/1.2 'Ubuntu', sans-serif; color: #fff; }
.acc-field input {
  font: 600 14px/1.2 'Ubuntu', sans-serif; padding: 7px 9px; border-radius: 4px;
  border: 2px solid #6f2b2b; background: #fdfdfd; color: #2b2b2b;
  -webkit-text-stroke: 0; outline: none;
}
.acc-field input.big { font-size: 20px; padding: 10px 12px; letter-spacing: .4px; }
.acc-field input:focus { border-color: #ffd43b; }
.acc-warn { font: 700 12px/1.45 'Ubuntu', sans-serif; color: #ffe066; }

/* 按钮 */
.acc-btn {
  font: 700 14px/1 'Ubuntu', sans-serif; padding: 9px 14px; border-radius: 4px;
  border: 2px solid #6f2b2b; background: #e8e8e8; color: #2b2b2b;
  -webkit-text-stroke: 0; cursor: pointer; transition: filter .12s ease, transform .12s ease;
}
.acc-btn:hover { filter: brightness(1.06); }
.acc-btn:active { transform: scale(.98); }
.acc-btn:disabled { opacity: .55; cursor: default; }
.acc-btn.sm { font-size: 12px; padding: 6px 10px; }
.acc-btn.danger { background: #d9483f; color: #fff; border-color: #8f2a24; }

.acc-msg { min-height: 16px; font: 600 12px/1.3 'Ubuntu', sans-serif; color: #fff; }
.acc-msg.err { color: #ffd7d3; font-weight: 800; }
.acc-msg.ok { color: #d8ffd8; font-weight: 800; }

/* 管理面板 */
.acc-toolbar { display: flex; gap: 6px; }
.acc-toolbar input {
  flex: 1 1 auto; font: 600 12px/1.2 'Ubuntu', sans-serif; padding: 6px 8px;
  border-radius: 4px; border: 2px solid #6f2b2b; background: #fdfdfd; color: #2b2b2b;
  -webkit-text-stroke: 0; outline: none;
}
.acc-total { font: 600 11px/1.3 'Ubuntu', sans-serif; color: #fff; opacity: .9; }
.acc-list {
  max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px;
  scrollbar-width: thin;
}
.acc-item {
  display: grid; grid-template-columns: 52px 1fr 42px 10px; align-items: center; gap: 6px;
  text-align: left; padding: 5px 8px; border: none; border-radius: 4px;
  background: rgba(0, 0, 0, .14); color: #fff; font: 600 12px/1.2 'Ubuntu', sans-serif;
  cursor: pointer;
}
.acc-item.on { background: rgba(255, 255, 255, .28); }
.acc-item-id { font-weight: 800; opacity: .85; }
.acc-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-item-tag { font-size: 10px; opacity: .8; }
.acc-item-dot { width: 8px; height: 8px; border-radius: 50%; background: #6b6b6b; }
.acc-item-dot.on { background: #3ecf5b; }

.acc-detail {
  border-top: 2px solid rgba(0, 0, 0, .25); padding-top: 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.acc-dhead { display: flex; align-items: center; gap: 6px; font: 600 13px/1.2 'Ubuntu', sans-serif; color: #fff; }
.acc-on { font: 800 11px/1.5 'Ubuntu', sans-serif; color: #0b3; background: #d8ffd8; border-radius: 3px; padding: 0 5px; }
.acc-grid { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.acc-grid label { display: flex; gap: 4px; align-items: center; font: 700 12px/1 'Ubuntu', sans-serif; color: #fff; }
.acc-grid input, .acc-grid select {
  font: 600 12px/1.2 'Ubuntu', sans-serif; padding: 5px 6px; border-radius: 4px;
  border: 2px solid #6f2b2b; background: #fdfdfd; color: #2b2b2b; -webkit-text-stroke: 0;
}
.acc-grid input[type="number"] { width: 68px; }
.acc-sub { font: 800 12px/1 'Ubuntu', sans-serif; color: #fff; opacity: .9; margin-top: 2px; }
.acc-inv { display: flex; flex-wrap: wrap; gap: 4px; max-height: 66px; overflow-y: auto; }
.acc-chip {
  font: 600 11px/1.5 'Ubuntu', sans-serif; background: rgba(0, 0, 0, .2);
  border-radius: 3px; padding: 1px 6px; color: #fff;
}

/* ============================================================================
   管理端「玩家详情」大弹窗（js/ui/admin-modal.js）
   · 独立于 .window 的互斥体系：自己挂在 body 上，打开它不关别的窗口，关别的窗口也不影响它。
   · 淡灰色蒙版铺满其余区域并吃掉所有点击，只有右上角 ✕ 能关。
   · 允许叠加：每层 .amodal-wrap 的 z-index 由 JS 递增（700, 701, …）。
   · 主色沿用账户窗口的红 #B24949 / #8F3A3A，面板底色用中性深灰让卡面跳出来。
   · 全部纯色，无渐变（项目硬规则）。
   ============================================================================ */
.amodal-wrap {
  position: fixed; inset: 0; z-index: 700;
  display: flex; align-items: center; justify-content: center;
}
.amodal-mask {
  position: absolute; inset: 0;
  background: rgba(150, 154, 160, .45);   /* 淡灰色蒙版：还能看见底下的画面，但明显被压了一层 */
}
.amodal {
  position: relative;
  width: min(1080px, 94vw); height: min(680px, 88vh);
  display: flex; flex-direction: column;
  background: #2f333a; border: 4px solid #1e2126; border-radius: 6px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, .5);
}
.amodal-head {
  position: relative; flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 44px 9px 14px;
  background: #B24949; border-bottom: 3px solid #8F3A3A; border-radius: 2px 2px 0 0;
}
.amodal-name {
  font: 700 19px/1.1 'Ubuntu', sans-serif; color: #fff;
  -webkit-text-stroke: 1.4px #000; paint-order: stroke fill;
  max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.amodal-head .acc-item-id { color: #fff; opacity: .9; font: 700 12px/1.2 'Ubuntu', sans-serif; }
.amodal-head .acc-item-tag { color: #fff; opacity: .85; }
.amodal-online {
  display: none; font: 800 11px/1.6 'Ubuntu', sans-serif;
  color: #0b3; background: #d8ffd8; border-radius: 3px; padding: 0 6px;
}
.amodal-online.on { display: inline-block; }
.amodal-x {
  position: absolute; top: 50%; right: 10px; margin-top: -10px;
  width: 20px; height: 20px;
}
.amodal-body {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: 268px .9fr 1.25fr; gap: 10px;
  padding: 12px;
}
.amodal-col {
  min-height: 0; display: flex; flex-direction: column;
  background: rgba(255, 255, 255, .055);
  border: 2px solid rgba(0, 0, 0, .38); border-radius: 5px;
  padding: 8px;
}
.amodal-colhead {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  margin-bottom: 7px; font: 800 13px/1.2 'Ubuntu', sans-serif; color: #fff;
  -webkit-text-stroke: 1.3px #000; paint-order: stroke fill;
}
.amodal-bagcount { font: 600 11px/1.2 'Ubuntu', sans-serif; opacity: .8; -webkit-text-stroke: 0; }
.amodal-grid {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px;
  padding: 2px; scrollbar-width: thin;
}
.amodal-cell { position: relative; width: 58px; height: 58px; border-radius: 8px; cursor: pointer; }
.amodal-cell .card { border-radius: 5.88%; }
.amodal-cell:hover { outline: 2px solid rgba(255, 255, 255, .55); outline-offset: 1px; }
/* 拖动经过的目标栏：整栏描边高亮，比逐格高亮更容易判断落点 */
.amodal-col.amodal-drop { border-color: #ffd43b; background: rgba(255, 212, 59, .12); }
/* 拖动幽灵：跟手、不参与命中测试（否则 elementFromPoint 永远只取到它自己） */
.amodal-ghost {
  position: fixed; left: 0; top: 0; z-index: 900;
  width: 58px; height: 58px; transform: translate(-50%, -50%);
  pointer-events: none; opacity: .92;
}
.amodal-wrap.amodal-dragging, .amodal-wrap.amodal-dragging * { cursor: grabbing; }
.amodal-rars { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 6px; }
.amodal-rar {
  font: 800 11px/1 'Ubuntu', sans-serif; padding: 3px 6px; border-radius: 3px;
  border: 2px solid rgba(0, 0, 0, .4); background: rgba(255, 255, 255, .08); cursor: pointer;
}
.amodal-rar:hover { background: rgba(255, 255, 255, .2); }
.amodal-rar.on { background: #fefefe; }
.amodal-search {
  margin-left: auto; width: 132px;
  font: 600 11px/1.2 'Ubuntu', sans-serif; padding: 3px 6px;
  border-radius: 3px; border: 2px solid #6f2b2b; background: #fdfdfd; color: #2b2b2b;
  -webkit-text-stroke: 0; outline: none;
}
.amodal-search:focus { border-color: #ffd43b; }
.amodal-info .acc-grid { gap: 6px; }
.amodal-info .amodal-form { flex-wrap: nowrap; }
.amodal-info .amodal-form input { width: 62px; }
.amodal-info .amodal-pass { flex: 1 1 auto; min-width: 0; width: auto; }
.amodal-msg { min-height: 16px; }

/* ---- 封禁（管理端） ---- */
/* 状态行：未封禁时是空行（不占视觉重量），封禁中显示红底白字 */
.amodal-banstatus { min-height: 0; font-size: 12px; line-height: 1.5; }
.amodal-banstatus.on {
  padding: 3px 8px; border-radius: 4px;
  background: #b3352f; color: #fff; font-weight: 600;
}
.amodal-banform select,
.amodal-banform input {
  width: 62px;
}
.amodal-banform select { width: auto; min-width: 74px; }
.amodal-banform input:disabled,
.amodal-banform select:disabled { opacity: .45; }
.amodal-banpermlabel {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; cursor: pointer; user-select: none;
}
.amodal-banpermlabel input { width: auto; margin: 0; }
.acc-btn:disabled { opacity: .45; cursor: default; }
/* 列表里的封禁标记：一个红色 B，比整行变色更省地方 */
.acc-item-ban {
  font-size: 10px; font-weight: 700; line-height: 1;
  padding: 2px 4px; border-radius: 3px;
  background: #b3352f; color: #fff;
}

/* ---- IP 封禁（管理端） ---- */
/* 信息栏现在有账户 + 封禁 + IP 三段，超出高度要能滚，不能撑破弹窗 */
.amodal-info { overflow-y: auto; scrollbar-width: thin; }
.amodal-iprow {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; min-height: 20px;
}
.amodal-lastip {
  flex: 1 1 auto; min-width: 0;
  font-family: monospace; opacity: .9;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.amodal-iprow .acc-btn { padding: 3px 8px; font-size: 11px; }
.amodal-ipinput { width: 100%; min-width: 0; font-family: monospace; }
/* 已封禁 IP 列表：最多 5 行高度，超出滚动 */
.amodal-iplist {
  max-height: 92px; overflow-y: auto; scrollbar-width: thin;
  display: flex; flex-direction: column; gap: 2px;
}
.amodal-ipitem {
  display: flex; align-items: center; gap: 6px;
  font: 600 11px/1.6 monospace;
  padding: 1px 2px 1px 6px; border-radius: 3px;
  background: rgba(179, 53, 47, .22);
}
.amodal-ipitem span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.amodal-ipx {
  flex: 0 0 auto; width: 18px; height: 18px; padding: 0;
  border: 0; border-radius: 3px; cursor: pointer;
  background: rgba(0, 0, 0, .35); color: #fff;
  font: 700 13px/1 'Ubuntu', sans-serif;
}
.amodal-ipx:hover { background: #b3352f; }
.amodal-ipempty { font-size: 11px; opacity: .55; padding: 2px 0; }
/* 窄屏（平板/小窗）：三栏塞不下就把账户信息提到最上面占满一行 */
@media (max-width: 900px) {
  .amodal-body { grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; }
  .amodal-info { grid-column: 1 / -1; }
}
.amodal-clearbag { margin-left: auto; padding: 3px 8px; font-size: 11px; }
