/* ── 选项按钮 ── */
.choices-wrap{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:8px 0 12px;
  animation:fadeIn .3s ease;
}
.choice-btn{
  width:100%;
  padding:12px 16px;
  background:rgba(26,26,46,0.8);
  border:1px solid rgba(212,175,55,0.3);
  border-radius:10px;
  color:#e8d5a3;
  font-family:inherit;
  font-size:15px;
  cursor:pointer;
  transition:all .2s;
  text-align:left;
}
.choice-main{
  display:block;
}
.choice-effect{
  display:block;
  margin-top:4px;
  font-size:12px;
  line-height:1.4;
  color:rgba(212,175,55,0.72);
}
.effect-inline{
  font-size:12px;
  line-height:1.45;
  color:rgba(212,175,55,0.72);
  margin:4px 0 10px;
  padding:0 4px;
}
.stage-title-divider{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin:8px 0 12px;
  color:rgba(212,175,55,0.86);
  font-size:13px;
  letter-spacing:1px;
}
.stage-title-divider::before,
.stage-title-divider::after{
  content:'';
  height:1px;
  flex:1;
  min-width:36px;
  background:linear-gradient(90deg,rgba(212,175,55,0),rgba(212,175,55,0.48));
}
.stage-title-divider::after{
  background:linear-gradient(90deg,rgba(212,175,55,0.48),rgba(212,175,55,0));
}
.choice-btn:active{
  background:rgba(212,175,55,0.15);
  border-color:rgba(212,175,55,0.5);
}
.choice-btn.disabled{
  opacity:0.4;
  cursor:not-allowed;
}
.choice-btn.chosen{
  background:rgba(212,175,55,0.2);
  border-color:#d4af37;
  color:#d4af37;
}
.choice-btn.chosen-disabled{
  opacity:0.5;
  pointer-events:none;
}
.share-btn{
  background:rgba(212,175,55,0.15);
  border-color:rgba(212,175,55,0.5);
  text-align:center;
  color:#d4af37;
}
/* ── 分享弹窗 ── */
.share-overlay{
  position:fixed;top:0;left:0;right:0;bottom:0;
  background:rgba(0,0,0,0.85);
  z-index:999;
  display:flex;
  align-items:center;
  justify-content:center;
}
.share-card{
  max-width:90vw;
  max-height:85vh;
  text-align:center;
}
.share-card canvas{
  max-width:100%;
  max-height:75vh;
  border-radius:8px;
}
.share-tip{
  color:rgba(212,175,55,0.7);
  font-size:14px;
  margin-top:12px;
}

.encounter-overlay{
  position:fixed;top:0;left:0;right:0;bottom:0;
  background:rgba(0,0,0,0.72);
  z-index:950;
  display:none;
  align-items:center;
  justify-content:center;
  padding:0 16px;
}
.encounter-overlay.active{
  display:flex;
}
/* ── 背包（道具系统）：大厅内嵌面板 ── */
.hall-panel-bag{
  padding:0 12px 12px;
  min-height:0;
}
.bag-panel-inner{
  flex:1;
  display:flex;
  flex-direction:column;
  min-height:0;
  max-width:440px;
  margin:0 auto;
  width:100%;
}
.bag-type-tabs{
  display:flex;
  flex-direction:row;
  gap:8px;
  flex-shrink:0;
  margin-bottom:10px;
  padding:4px 0;
}
.bag-type-tab{
  flex:1;
  padding:10px 8px;
  border:1px solid rgba(212,175,55,0.35);
  border-radius:10px;
  background:rgba(26,26,46,0.65);
  color:#e8d5a3;
  font-family:inherit;
  font-size:14px;
  letter-spacing:2px;
  cursor:pointer;
  transition:background .2s,border-color .2s;
}
.bag-type-tab.active{
  border-color:#d4af37;
  background:rgba(212,175,55,0.14);
  color:#f0e6c8;
  font-weight:600;
}
.bag-type-tab:active{
  opacity:0.92;
}
.bag-list{
  flex:1;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  min-height:0;
}
.bag-list--panel{
  max-height:none;
}
.bag-subheading{
  font-size:12px;
  color:rgba(212,175,55,0.85);
  letter-spacing:3px;
  padding:8px 4px 4px;
  margin-top:4px;
  border-bottom:1px solid rgba(212,175,55,0.15);
}
.bag-empty-hint{
  text-align:center;
  color:rgba(212,175,55,0.5);
  padding:28px 8px;
  font-size:14px;
}
.bag-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  padding:10px 8px;
  margin-bottom:8px;
  border-radius:8px;
  background:rgba(26,26,46,0.45);
}
.bag-row.bag-tier-1{
  border:2px solid rgba(139,90,43,0.55);
  box-shadow:inset 0 0 0 1px rgba(212,175,55,0.08);
}
.bag-row.bag-tier-2{
  border:2px solid rgba(180,220,200,0.45);
  box-shadow:inset 0 0 0 1px rgba(200,230,210,0.12);
}
.bag-row.bag-tier-3{
  border:2px solid rgba(212,175,55,0.5);
  box-shadow:0 0 12px rgba(212,175,55,0.15), inset 0 0 0 1px rgba(255,230,180,0.1);
}
.bag-name{
  font-size:14px;
  color:#e8d5a3;
  font-weight:bold;
}
.bag-meta{
  font-size:11px;
  color:rgba(212,175,55,0.55);
  margin-top:2px;
}
.bag-desc{
  font-size:12px;
  color:rgba(232,213,163,0.78);
  line-height:1.45;
  margin-top:4px;
}
.bag-actions{
  flex-shrink:0;
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:flex-end;
}
.bag-count{
  font-size:12px;
  color:#d4af37;
}
.bag-use-btn{
  padding:6px 12px;
  border:1px solid rgba(212,175,55,0.45);
  border-radius:8px;
  background:rgba(26,26,46,0.85);
  color:#e8d5a3;
  font-family:inherit;
  font-size:13px;
  cursor:pointer;
}
.bag-use-btn:disabled{
  opacity:0.45;
}
.bag-row--treasure{
  border:1px solid rgba(120,160,200,0.35);
  box-shadow:inset 0 0 0 1px rgba(180,210,240,0.08);
}
.bag-row--treasure .bag-actions{
  flex-direction:row;
  align-items:center;
  gap:8px;
}
.bag-help-btn{
  width:32px;min-width:32px;height:32px;padding:0;
  border-radius:50%;
  border:1px solid rgba(180,210,240,0.45);
  background:rgba(26,26,46,0.85);
  color:#b8d4f0;
  font-size:15px;font-weight:bold;
  font-family:inherit;
  line-height:1;
  cursor:pointer;
}
.bag-help-btn:active{opacity:0.88;}
.encounter-dialog{
  width:min(33vw, 560px);
  min-width:300px;
  max-width:calc(100vw - 32px);
  max-height:72vh;
  overflow-y:auto;
  border:1px solid rgba(212,175,55,0.45);
  border-radius:12px;
  background:linear-gradient(180deg,rgba(18,14,30,0.98),rgba(14,12,24,0.98));
  box-shadow:0 20px 38px rgba(0,0,0,0.45), inset 0 1px 0 rgba(212,175,55,0.16);
  padding:16px 14px 14px;
}
.encounter-title{
  font-size:18px;
  color:#d4af37;
  margin-bottom:10px;
  letter-spacing:1px;
}
.encounter-type{
  font-size:12px;
  color:rgba(212,175,55,0.7);
  margin-left:8px;
}
.encounter-text{
  font-size:15px;
  line-height:1.7;
  color:#e8d5a3;
  margin-bottom:8px;
  white-space:pre-wrap;
}
.encounter-choices{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:10px;
}
.encounter-refuse{
  margin-top:10px;
  border-color:rgba(212,175,55,0.22);
  color:rgba(232,213,163,0.85);
}
.login-overlay{
  position:fixed;top:0;left:0;right:0;bottom:0;
  z-index:920;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px 16px;
  background:rgba(0,0,0,0.72);
}
.login-overlay.active{
  display:flex;
}
.login-dialog{
  width:min(92vw, 340px);
  padding:18px 16px 16px;
  border:1px solid rgba(212,175,55,0.4);
  border-radius:14px;
  background:linear-gradient(180deg,rgba(22,18,36,0.98),rgba(14,12,24,0.98));
  box-shadow:0 16px 40px rgba(0,0,0,0.55);
}
.login-input{
  width:100%;
  margin-bottom:10px;
  padding:11px 12px;
  border:1px solid rgba(212,175,55,0.24);
  border-radius:8px;
  background:rgba(0,0,0,0.28);
  color:#e8d5a3;
  font-family:inherit;
  font-size:15px;
}
.login-input:last-of-type{
  margin-bottom:14px;
}
.login-submit{
  width:100%;
  padding:12px 16px;
  border:1px solid rgba(212,175,55,0.45);
  border-radius:10px;
  background:rgba(212,175,55,0.12);
  color:#e8d5a3;
  font-family:inherit;
  font-size:16px;
  cursor:pointer;
  letter-spacing:2px;
}
.login-submit:active{
  background:rgba(212,175,55,0.22);
}
/* 飘字提示 */
.toast-wrap{
  position:fixed;
  top:0;left:0;right:0;
  z-index:2000;
  pointer-events:none;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding-top:max(12px, env(safe-area-inset-top));
  gap:8px;
}
.toast{
  max-width:90%;
  padding:10px 18px;
  border-radius:10px;
  font-size:14px;
  line-height:1.45;
  text-align:center;
  box-shadow:0 4px 20px rgba(0,0,0,0.35);
  animation:toastIn .35s ease, toastOut .4s ease 2.1s forwards;
}
.toast.success{
  background:rgba(26,46,32,0.95);
  border:1px solid rgba(120,200,140,0.45);
  color:#c8f0d0;
}
.toast.error{
  background:rgba(46,26,26,0.95);
  border:1px solid rgba(220,120,120,0.45);
  color:#f0d0d0;
}
@keyframes toastIn{
  from{opacity:0;transform:translateY(-12px);}
  to{opacity:1;transform:translateY(0);}
}
@keyframes toastOut{
  to{opacity:0;transform:translateY(-16px);}
}
/* -- 主界面 -- */
#mainMenu{
  position:absolute;top:0;left:0;right:0;bottom:0;
  z-index:100;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
#mainMenu .menu-bg{
  position:absolute;top:0;left:0;right:0;bottom:0;
  z-index:0;
}
#mainMenu .menu-bg img{
  width:100%;height:100%;
  object-fit:cover;
  display:block;
}
#mainMenu .menu-bg::after{
  content:'';
  position:absolute;top:0;left:0;right:0;bottom:0;
  background:linear-gradient(to bottom,rgba(10,10,18,0.3) 0%,rgba(10,10,18,0.6) 100%);
}
#mainMenu .menu-content{
  position:relative;z-index:1;
  text-align:center;
}
#mainMenu .menu-title{
  font-size:32px;
  color:#d4af37;
  text-shadow:0 0 20px rgba(212,175,55,0.4);
  margin-bottom:48px;
  letter-spacing:4px;
}
#startBtn{
  padding:14px 48px;
  background:rgba(26,26,46,0.8);
  border:1.5px solid rgba(212,175,55,0.5);
  border-radius:12px;
  color:#e8d5a3;
  font-family:inherit;
  font-size:20px;
  cursor:pointer;
  transition:all .3s;
  letter-spacing:2px;
}
#startBtn:hover{
  background:rgba(212,175,55,0.2);
  border-color:#d4af37;
  color:#d4af37;
}
#startBtn:active{
  background:rgba(212,175,55,0.3);
  transform:scale(0.97);
}
/* -- 大厅（三栏壳层） -- */
#hallScreen{
  position:absolute;top:0;left:0;right:0;bottom:0;
  z-index:102;
  display:none;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
}
.hall-bg{
  position:absolute;top:0;left:0;right:0;bottom:0;
  z-index:0;
  background:#16121e;
}
.hall-bg img{
  width:100%;height:100%;
  object-fit:cover;
  display:block;
}
.hall-bg::after{
  content:'';
  position:absolute;top:0;left:0;right:0;bottom:0;
  background:linear-gradient(to bottom,rgba(10,10,18,0.35) 0%,rgba(10,10,18,0.65) 100%);
}
.hall-layout{
  position:relative;z-index:1;
  flex:1;
  display:flex;
  flex-direction:column;
  min-height:0;
  width:100%;
  /* 与底栏共用，用于顶栏上方留白等（底栏按钮区相对上一版约 0.9） */
  --hall-nav-h:75px;
}
/* 大厅顶栏：左返回 + 右（头像 | 境界/名 | 寿元/灵石），无属性小方框 */
#hallTopBar.hall-top-bar{
  padding:0;
  /* 属性栏上方留白 = 底栏下方留白（0.3×栏高）的 0.5 倍 */
  padding-top:calc(var(--hall-nav-h) * 0.3 * 0.5);
  box-sizing:border-box;
}
.hall-top-bar-row{
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  gap:12px;
  width:100%;
  padding:8px 10px 6px;
  box-sizing:border-box;
}
.hall-back-actions{
  flex-shrink:0;
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:stretch;
  margin-top:4px;
}
.hall-gm-btn{
  padding:6px 14px;
  background:rgba(30,12,18,0.85);
  border:1px solid rgba(255,107,107,0.35);
  border-radius:6px;
  color:#ff6b6b;
  font-size:13px;
  font-family:inherit;
  cursor:pointer;
  line-height:1.2;
}
.hall-gm-btn:hover{
  background:rgba(255,107,107,0.12);
  border-color:rgba(255,107,107,0.55);
}
.hall-gm-btn:active{
  opacity:0.9;
}
.hall-top-main{
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  gap:10px;
  flex:1;
  min-width:0;
}
.hall-col-realm-name{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:4px;
  flex:1;
  min-width:0;
  font-size:12px;
}
.hall-realm-line{
  font-size:1.5em;
  line-height:1.25;
  color:#e8d5a3;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}
#hallTopBar .player-name{
  font-size:12px;
  text-align:left;
}
#hallTopBar .player-name-row{
  justify-content:flex-start;
}
.hall-col-age-stone{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:6px;
  flex-shrink:0;
}
.hall-plain-stat{
  margin:0;
  padding:0;
  border:none;
  background:transparent;
  box-shadow:none;
  font-size:12px;
  color:#e8d5a3;
  line-height:1.35;
  white-space:nowrap;
  font-family:inherit;
}
.hall-fight-power-line{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:0 4px;
  max-width:100%;
}
.hall-morality-tag{
  font-size:11px;
  color:rgba(200,180,120,0.88);
  letter-spacing:1px;
  white-space:normal;
}
.hall-treasure-row{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:6px;
  max-width:100%;
  min-width:0;
}
.hall-treasure-line{
  font-size:11px;
  color:rgba(180,210,240,0.92);
  flex:1;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}
.hall-buff-btn{
  flex-shrink:0;
  padding:2px 8px;
  font-size:11px;
  line-height:1.35;
  font-family:inherit;
  cursor:pointer;
  border-radius:6px;
  border:1px solid rgba(180,210,240,0.45);
  background:rgba(80,120,180,0.2);
  color:rgba(200,220,255,0.95);
  -webkit-tap-highlight-color:transparent;
}
.hall-buff-btn:active{
  opacity:0.88;
}
.tavern-disgust-badge{
  flex-shrink:0;
  font-size:11px;
  color:rgba(200,160,120,0.9);
  letter-spacing:0.5px;
  padding:4px 8px;
  border:1px solid rgba(212,175,55,0.25);
  border-radius:8px;
  background:rgba(0,0,0,0.2);
}
.hall-top-bar .hall-stone-bag-btn{
  border:none;
  background:transparent;
  box-shadow:none;
  padding:0;
  margin:0;
  cursor:pointer;
  font-family:inherit;
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.hall-top-bar .hall-stone-bag-btn:active{
  opacity:0.85;
}
.hall-main{
  flex:1;
  display:flex;
  flex-direction:column;
  min-height:0;
  position:relative;
  overflow:hidden;
}
.hall-panel{
  display:none;
  flex:1;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
}
.hall-panel.active{
  display:flex;
}
.hall-placeholder{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px 16px;
  color:rgba(232,213,163,0.65);
  font-size:16px;
  letter-spacing:2px;
  text-align:center;
}
/* 大厅 · 属性面板（账号系统） */
.hall-panel-attr{
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  padding:12px 14px 16px;
}
.player-attr-detail{
  width:100%;
  max-width:420px;
  margin:0 auto;
}
.attr-detail-grid{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.attr-detail-row{
  display:flex;
  flex-direction:row;
  gap:10px;
  align-items:stretch;
}
.attr-detail-row--triple .attr-detail-cell{
  flex:1;
  min-width:0;
}
.attr-detail-row--realm-line .attr-detail-cell--full,
.attr-detail-cell--full{
  flex:1 1 100%;
  max-width:100%;
}
.attr-detail-cell{
  flex:1;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:0;
  padding:10px 12px;
  border:1px solid rgba(212,175,55,0.28);
  border-radius:10px;
  background:rgba(18,16,32,0.55);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);
}
.attr-detail-label{
  flex-shrink:0;
  font-size:13px;
  color:rgba(212,175,55,0.78);
  letter-spacing:1px;
}
.attr-detail-value{
  font-size:14px;
  font-weight:600;
  color:#e8d5a3;
  text-align:right;
  min-width:2.5em;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.attr-detail-value--emptyable{
  min-width:3.5em;
  color:rgba(232,213,163,0.55);
  font-weight:500;
}
/* NPC / 好友 · 属性弹层（高度 80vh） */
.npc-attr-overlay{
  position:fixed;
  top:0;left:0;right:0;bottom:0;
  background:rgba(0,0,0,0.72);
  z-index:968;
  display:none;
  align-items:center;
  justify-content:center;
  padding:12px 14px;
}
.npc-attr-overlay.active{
  display:flex;
}
.npc-attr-dialog{
  position:relative;
  width:min(100%,400px);
  max-height:80vh;
  height:80vh;
  display:flex;
  flex-direction:column;
  border:1px solid rgba(212,175,55,0.42);
  border-radius:14px;
  background:linear-gradient(180deg,rgba(20,16,36,0.98),rgba(12,10,22,0.99));
  box-shadow:0 20px 48px rgba(0,0,0,0.55);
  overflow:hidden;
}
.npc-attr-close{
  position:absolute;
  top:8px;
  right:8px;
  z-index:2;
  width:36px;
  height:36px;
  border:none;
  border-radius:10px;
  background:rgba(0,0,0,0.35);
  color:#d4af37;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  font-family:inherit;
}
.npc-attr-scroll{
  flex:1;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  padding:16px 14px 20px;
}
.npc-attr-header{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  margin-bottom:16px;
  padding-top:8px;
}
.npc-attr-avatar-wrap{
  width:88px;
  height:88px;
  border-radius:12px;
  overflow:hidden;
  border:2px solid rgba(212,175,55,0.45);
  background:#1a1a2e;
}
.npc-attr-avatar-wrap img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.npc-attr-name{
  font-size:17px;
  font-weight:bold;
  color:#e8d5a3;
  letter-spacing:2px;
  text-align:center;
}
.npc-attr-desc{
  font-size:13px;
  color:rgba(232,213,163,0.72);
  line-height:1.5;
  text-align:center;
  max-width:100%;
}
.npc-attr-stones-line{
  font-size:13px;
  color:rgba(212,175,55,0.85);
  text-align:center;
  letter-spacing:1px;
}
.npc-card-avatar--clickable{
  cursor:pointer;
}
.npc-card-avatar--clickable:active{
  opacity:0.88;
}
.hall-bottom-wrap{
  flex-shrink:0;
  display:flex;
  flex-direction:column;
  width:100%;
}
.hall-bottom-nav{
  display:flex;
  flex-direction:row;
  align-items:stretch;
  justify-content:space-around;
  gap:1px;
  min-height:var(--hall-nav-h);
  padding:8px 3px 9px;
  background:transparent;
  border-top:1px solid rgba(212,175,55,0.22);
  box-shadow:none;
}
.hall-nav-btn{
  flex:1;
  max-width:104px;
  padding:12px 5px 9px;
  border-radius:14px;
  background:transparent;
  border:1px solid rgba(212,175,55,0.35);
  color:rgba(232,213,163,0.92);
  font-family:inherit;
  font-size:25px;
  letter-spacing:2px;
  cursor:pointer;
  transition:background .2s,border-color .2s,color .2s;
}
.hall-nav-btn:active{
  transform:scale(0.97);
}
.hall-nav-btn.active{
  background:rgba(212,175,55,0.18);
  border-color:rgba(212,175,55,0.55);
  color:#d4af37;
}
.hall-nav-btn.hall-nav-btn-disabled{
  opacity:0.5;
  cursor:not-allowed;
}
.hall-nav-spacer{
  width:100%;
  height:calc(var(--hall-nav-h) * 0.3);
  flex-shrink:0;
  pointer-events:none;
}
/* -- 游戏主区域（历练，嵌入大厅） -- */
#gameView{
  display:none;
  flex:1;
  flex-direction:column;
  min-height:0;
  position:relative;
}
/* ── 好友系统（嵌入大厅中间区） ── */
#hallPanelFriend.hall-panel-friend{
  background:rgba(10,10,18,0.25);
}
.hall-friend-inner{
  display:flex;
  flex-direction:column;
  flex:1;
  min-height:0;
  width:100%;
}
.hall-friend-tabs.friend-tabs{
  display:flex;
  flex-direction:row;
  justify-content:flex-end;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  padding:6px 10px 8px;
  flex-shrink:0;
  border-bottom:1px solid rgba(212,175,55,0.18);
  background:transparent;
}
.hall-friend-tabs .friend-tab{
  flex:0 0 auto;
  padding:2px 8px;
  margin:0;
  background:rgba(26,26,46,0.45);
  border:1px solid rgba(212,175,55,0.42);
  border-radius:4px;
  color:rgba(232,213,163,0.75);
  font-family:inherit;
  font-size:12px;
  letter-spacing:1px;
  line-height:1.35;
  cursor:pointer;
  transition:color .2s,border-color .2s,background .2s;
}
.hall-friend-tabs .friend-tab.active{
  color:#d4af37;
  border-color:rgba(212,175,55,0.65);
  background:rgba(212,175,55,0.08);
}
.hall-friend-tabs .friend-tab:active{
  color:#e8d5a3;
}
#hallPanelFriend .friend-tab-content{
  display:none;
  flex:1;
  flex-direction:column;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  min-height:0;
  padding:10px 12px;
}
#hallPanelFriend .friend-tab-content.active{
  display:flex;
}
/* NPC卡片列表 */
.tavern-npc-list,
.friend-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  flex:1;
}
.friend-empty-state{
  text-align:center;
  color:rgba(212,175,55,0.5);
  padding:40px 8px;
  font-size:14px;
}
/* NPC卡片：三栏布局 */
.npc-card{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border:1px solid rgba(212,175,55,0.3);
  border-radius:10px;
  background:rgba(26,26,46,0.65);
  box-shadow:0 2px 8px rgba(0,0,0,0.25);
}
.npc-card-avatar{
  width:54px;height:54px;
  border-radius:8px;
  overflow:hidden;
  flex-shrink:0;
  border:1.5px solid rgba(212,175,55,0.4);
  background:#1a1a2e;
}
.npc-card-avatar img{
  width:100%;height:100%;
  object-fit:cover;
  display:block;
}
.npc-card-info{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.npc-card-name{
  font-size:15px;
  font-weight:bold;
  color:#e8d5a3;
  letter-spacing:1px;
}
.npc-card-affinity{
  font-size:12px;
  color:rgba(212,175,55,0.75);
}
.npc-card-desc{
  font-size:12px;
  color:rgba(232,213,163,0.65);
  line-height:1.4;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.npc-card-gift-btn{
  flex-shrink:0;
  padding:8px 14px;
  border:1px solid rgba(212,175,55,0.45);
  border-radius:8px;
  background:rgba(212,175,55,0.1);
  color:#e8d5a3;
  font-family:inherit;
  font-size:13px;
  cursor:pointer;
  transition:all .2s;
  white-space:nowrap;
}
.npc-card-gift-btn:active{
  background:rgba(212,175,55,0.22);
  border-color:#d4af37;
}
.npc-card-gift-btn:disabled{
  opacity:0.4;
  cursor:not-allowed;
}
/* 酒馆底部操作栏 */
.tavern-actions{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 0 4px;
  flex-shrink:0;
}
#tavernRefreshBtn{
  flex:1;
  padding:12px 0;
  border:1.5px solid rgba(212,175,55,0.45);
  border-radius:10px;
  background:rgba(26,26,46,0.82);
  color:#e8d5a3;
  font-family:inherit;
  font-size:16px;
  letter-spacing:2px;
  cursor:pointer;
  transition:all .2s;
}
#tavernRefreshBtn:active{
  background:rgba(212,175,55,0.15);
  border-color:#d4af37;
}
.tavern-rule-icon{
  width:38px;height:38px;
  flex-shrink:0;
  border:1px solid rgba(212,175,55,0.35);
  border-radius:50%;
  background:rgba(26,26,46,0.75);
  color:#d4af37;
  font-family:inherit;
  font-size:18px;
  line-height:1;
  cursor:pointer;
  transition:background .2s;
}
.tavern-rule-icon:active{
  background:rgba(212,175,55,0.15);
}
/* 规则弹窗 */
.tavern-rule-overlay{
  position:fixed;top:0;left:0;right:0;bottom:0;
  background:rgba(0,0,0,0.72);
  z-index:960;
  display:none;
  align-items:center;
  justify-content:center;
  padding:0 16px;
}
.tavern-rule-overlay.active{
  display:flex;
}
.tavern-rule-dialog{
  width:min(92vw,360px);
  padding:18px 16px 14px;
  border:1px solid rgba(212,175,55,0.4);
  border-radius:12px;
  background:linear-gradient(180deg,rgba(18,14,30,0.98),rgba(14,12,24,0.98));
  box-shadow:0 16px 36px rgba(0,0,0,0.5);
  color:#e8d5a3;
  font-size:14px;
  line-height:1.7;
}
.tavern-rule-dialog h3{
  color:#d4af37;
  font-size:16px;
  margin-bottom:10px;
  letter-spacing:2px;
  text-align:center;
}
.tavern-rule-close{
  width:100%;
  margin-top:12px;
  padding:10px;
  border:1px solid rgba(212,175,55,0.35);
  border-radius:8px;
  background:rgba(26,26,46,0.75);
  color:#e8d5a3;
  font-family:inherit;
  font-size:14px;
  cursor:pointer;
}

/* 切磋结果弹窗 */
.spar-result-overlay{
  position:fixed;top:0;left:0;right:0;bottom:0;
  background:rgba(0,0,0,0.75);
  z-index:965;
  display:none;
  align-items:center;
  justify-content:center;
  padding:0 14px;
}
.spar-result-overlay.active{
  display:flex;
}
.spar-result-dialog{
  width:min(94vw,380px);
  padding:16px 14px 12px;
  border:1px solid rgba(212,175,55,0.45);
  border-radius:12px;
  background:linear-gradient(165deg,rgba(22,18,38,0.98),rgba(12,10,22,0.99));
  box-shadow:0 18px 40px rgba(0,0,0,0.55);
  color:#e8d5a3;
}
.spar-result-title{
  text-align:center;
  font-size:17px;
  font-weight:bold;
  letter-spacing:6px;
  color:#d4af37;
  margin-bottom:12px;
}
.spar-result-duel{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  margin-bottom:12px;
}
.spar-side{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  min-width:0;
}
.spar-avatar-wrap{
  width:72px;height:72px;
  border-radius:10px;
  overflow:hidden;
  border:2px solid rgba(212,175,55,0.45);
  background:#1a1a2e;
}
.spar-avatar-wrap img{
  width:100%;height:100%;
  object-fit:cover;
  display:block;
}
.spar-name{
  font-size:13px;
  color:rgba(232,213,163,0.95);
  text-align:center;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.spar-vs{
  flex-shrink:0;
  align-self:center;
  padding-top:22px;
  font-size:13px;
  color:rgba(212,175,55,0.55);
  letter-spacing:1px;
}
.spar-result-body{
  min-height:52px;
  padding:10px 8px;
  border-radius:8px;
  background:rgba(0,0,0,0.22);
  border:1px solid rgba(212,175,55,0.2);
  font-size:14px;
  line-height:1.65;
  transition:opacity .25s ease;
}
.spar-result-body--pending{
  opacity:0;
  pointer-events:none;
}
.spar-result-body:not(.spar-result-body--pending){
  opacity:1;
}
.spar-result-line{
  color:rgba(232,213,163,0.92);
}
.spar-result-line span{
  color:#f0e6c8;
  font-weight:600;
}
.spar-battle-log{
  margin-top:10px;
  max-height:min(40vh,220px);
  overflow-y:auto;
  padding:8px 10px;
  border-radius:6px;
  background:rgba(0,0,0,0.35);
  border:1px solid rgba(212,175,55,0.15);
  font-size:13px;
  line-height:1.55;
  color:rgba(218,200,150,0.95);
  text-align:left;
}
.spar-battle-log__line{
  padding:2px 0;
  border-bottom:1px solid rgba(212,175,55,0.08);
}
.spar-battle-log__line:last-child{
  border-bottom:none;
}
.spar-result-close{
  width:100%;
  margin-top:12px;
  padding:10px;
  border:1px solid rgba(212,175,55,0.35);
  border-radius:8px;
  background:rgba(26,26,46,0.75);
  color:#e8d5a3;
  font-family:inherit;
  font-size:14px;
  cursor:pointer;
}
.npc-card-actions{
  display:flex;
  flex-direction:row;
  align-items:stretch;
  gap:6px;
  flex-shrink:0;
}
/* 左列：切磋 + 送礼，高度由两按钮决定；右列击杀与之对齐 */
.npc-card-actions-stack{
  display:flex;
  flex-direction:column;
  gap:6px;
  flex-shrink:0;
  justify-content:flex-start;
}
.npc-card-spar-btn{
  padding:7px 12px;
  border:1px solid rgba(120,180,220,0.45);
  border-radius:8px;
  background:rgba(80,140,200,0.12);
  color:#c8e0f0;
  font-family:inherit;
  font-size:12px;
  cursor:pointer;
  transition:all .2s;
  white-space:nowrap;
}
.npc-card-spar-btn:active{
  background:rgba(80,140,200,0.22);
}
.npc-card-spar-btn:disabled{
  opacity:0.45;
  cursor:not-allowed;
}
.npc-card-kill-btn{
  flex:0 0 auto;
  align-self:stretch;
  min-width:52px;
  padding:8px 10px;
  border:1px solid rgba(200,70,70,0.55);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(120,30,30,0.45),rgba(80,20,25,0.5));
  color:#ffcccc;
  font-family:inherit;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  transition:all .2s;
  white-space:nowrap;
  box-shadow:0 2px 8px rgba(0,0,0,0.35);
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1.2;
}
.npc-card-kill-btn:active{
  background:rgba(160,40,40,0.55);
}
.npc-card-kill-btn:disabled{
  opacity:0.45;
  cursor:not-allowed;
}

/* 决斗确认 / 战后处置 */
.duel-confirm-overlay,
.duel-aftermath-overlay{
  position:fixed;top:0;left:0;right:0;bottom:0;
  background:rgba(0,0,0,0.78);
  z-index:970;
  display:none;
  align-items:center;
  justify-content:center;
  padding:0 14px;
}
.duel-confirm-overlay.active,
.duel-aftermath-overlay.active{
  display:flex;
}
.duel-confirm-dialog,
.duel-aftermath-dialog{
  width:min(94vw,380px);
  padding:18px 16px 14px;
  border:1px solid rgba(212,175,55,0.4);
  border-radius:12px;
  background:linear-gradient(165deg,rgba(22,18,38,0.98),rgba(12,10,22,0.99));
  box-shadow:0 18px 40px rgba(0,0,0,0.55);
  color:#e8d5a3;
}
.duel-confirm-title{
  text-align:center;
  font-size:17px;
  font-weight:bold;
  letter-spacing:4px;
  color:#c44;
  margin-bottom:12px;
}
.duel-confirm-text{
  font-size:14px;
  line-height:1.7;
  margin:0 0 16px;
  color:rgba(232,213,163,0.92);
}
.duel-confirm-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.duel-confirm-btn{
  width:100%;
  padding:12px;
  border-radius:8px;
  font-family:inherit;
  font-size:15px;
  cursor:pointer;
  border:1px solid rgba(212,175,55,0.35);
}
.duel-confirm-btn--danger{
  background:rgba(140,35,35,0.45);
  color:#ffcccc;
  border-color:rgba(200,80,80,0.5);
}
.duel-confirm-btn--muted{
  background:rgba(26,26,46,0.75);
  color:#c8c8c8;
}
.duel-aftermath-title{
  text-align:center;
  font-size:16px;
  color:#d4af37;
  letter-spacing:6px;
  margin-bottom:10px;
}
.duel-aftermath-plead{
  font-size:14px;
  line-height:1.65;
  margin:0 0 14px;
  color:rgba(232,213,163,0.95);
}
.duel-aftermath-hero{
  font-size:14px;
  color:#f0e6c8;
  margin-bottom:12px;
  padding:8px;
  border-radius:8px;
  background:rgba(0,0,0,0.25);
}
.duel-aftermath-actions{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.duel-aftermath-btn{
  width:100%;
  padding:11px;
  border-radius:8px;
  font-family:inherit;
  font-size:14px;
  cursor:pointer;
  border:1px solid rgba(212,175,55,0.35);
}
.duel-aftermath-btn--danger{
  background:rgba(130,30,30,0.5);
  color:#ffcccc;
}
.duel-aftermath-btn--gold{
  background:rgba(212,175,55,0.18);
  color:#f5e6b8;
}
.duel-aftermath-btn--muted{
  background:rgba(26,26,46,0.75);
  color:#b0b0b0;
}

/* 沦为凡人 · 天道恢复 */
.mortal-restore-overlay{
  position:fixed;top:0;left:0;right:0;bottom:0;
  background:rgba(0,0,0,0.82);
  z-index:975;
  display:none;
  align-items:center;
  justify-content:center;
  padding:0 14px;
}
.mortal-restore-overlay.active{
  display:flex;
}
.mortal-restore-dialog{
  width:min(94vw,380px);
  padding:18px 16px 14px;
  border:1px solid rgba(180,140,80,0.45);
  border-radius:12px;
  background:linear-gradient(165deg,rgba(28,22,18,0.98),rgba(14,12,20,0.99));
  box-shadow:0 18px 40px rgba(0,0,0,0.55);
  color:#e8d5a3;
}
.mortal-restore-title{
  text-align:center;
  font-size:17px;
  font-weight:bold;
  letter-spacing:4px;
  color:#c9a227;
  margin-bottom:12px;
}
.mortal-restore-text{
  font-size:14px;
  line-height:1.7;
  margin:0 0 16px;
  color:rgba(232,213,163,0.92);
}
.mortal-restore-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.mortal-restore-btn{
  width:100%;
  padding:12px;
  border-radius:8px;
  font-family:inherit;
  font-size:15px;
  cursor:pointer;
  border:1px solid rgba(212,175,55,0.35);
}
.mortal-restore-btn--primary{
  background:linear-gradient(180deg,rgba(212,175,55,0.25),rgba(140,110,40,0.35));
  color:#fff8e8;
}
.mortal-restore-btn--muted{
  background:rgba(26,26,46,0.75);
  color:#a8a8a8;
}


/* ── 排行榜 ── */
#rankScreen{
  position:absolute;top:0;left:0;right:0;bottom:0;
  z-index:104;
  display:none;flex-direction:column;
  background:linear-gradient(180deg,rgba(10,10,18,0.97) 0%,rgba(14,12,24,0.98) 100%);
}
.rank-header{
  display:flex;align-items:center;
  padding:12px 12px 0;flex-shrink:0;
}
.rank-close-btn{
  width:36px;height:36px;border:none;background:none;
  color:#d4af37;font-size:22px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
.rank-title{
  flex:1;text-align:center;color:#d4af37;font-size:16px;
  font-weight:bold;letter-spacing:2px;
}
#rankTabBar{
  display:flex;padding:8px 12px 0;gap:4px;flex-shrink:0;
}
.rank-tab{
  flex:1;padding:10px 0;border:none;
  background:transparent;color:#8a8a8a;
  font-size:14px;cursor:pointer;
  border-bottom:2px solid transparent;
  transition:all .2s;
}
.rank-tab.active{
  color:#d4af37;border-bottom-color:#d4af37;
}
#rankList{
  flex:1;overflow-y:auto;padding:8px 12px;
  -webkit-overflow-scrolling:touch;
}
.rank-row{
  display:flex;align-items:center;
  padding:10px 8px;
  border-bottom:1px solid rgba(212,175,55,0.08);
}
.rank-num{
  width:32px;text-align:center;font-size:14px;
  color:#8a8a8a;font-weight:bold;flex-shrink:0;
}
.rank-top1{color:#ffd700;font-size:18px;}
.rank-top2{color:#c0c0c0;font-size:16px;}
.rank-top3{color:#cd7f32;font-size:16px;}
.rank-name{
  flex:1;font-size:14px;color:#e0e0e0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  padding:0 8px;
}
.rank-score{
  font-size:14px;color:#d4af37;font-weight:bold;flex-shrink:0;
}
.rank-loading,.rank-empty{
  text-align:center;color:#8a8a8a;padding:40px 0;font-size:14px;
}
#rankMyBar{
  padding:12px;text-align:center;
  color:#e0e0e0;font-size:13px;
  border-top:1px solid rgba(212,175,55,0.15);
  flex-shrink:0;
}

/* ── GM 系统 ── */
#gmScreen{
  position:absolute;top:0;left:0;right:0;bottom:0;
  z-index:105;
  display:none;flex-direction:column;
  background:linear-gradient(180deg,rgba(10,10,18,0.97) 0%,rgba(14,12,24,0.98) 100%);
}
.gm-header{
  display:flex;align-items:center;
  padding:12px 12px 0;flex-shrink:0;
}
.gm-close-btn{
  width:36px;height:36px;border:none;background:none;
  color:#ff6b6b;font-size:22px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
.gm-title{
  flex:1;text-align:center;color:#ff6b6b;font-size:16px;
  font-weight:bold;letter-spacing:2px;
}
.gm-body{
  flex:1;overflow-y:auto;padding:12px;
  display:flex;flex-direction:column;gap:12px;
}
#gmAttrList{
  display:flex;flex-wrap:wrap;gap:8px;
}
.gm-attr-btn{
  padding:8px 14px;border:1px solid rgba(255,107,107,0.2);
  background:rgba(255,107,107,0.05);color:#e0e0e0;
  border-radius:6px;font-size:13px;cursor:pointer;
  transition:all .2s;
}
.gm-attr-btn.active{
  color:#ff6b6b;border-color:#ff6b6b;
  background:rgba(255,107,107,0.15);
}
.gm-input-row{
  display:flex;gap:8px;align-items:center;
}
#gmValueInput{
  flex:1;padding:10px 12px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,107,107,0.2);
  border-radius:6px;color:#e0e0e0;
  font-size:14px;outline:none;
}
#gmValueInput:focus{
  border-color:#ff6b6b;
}
#gmApplyBtn{
  padding:10px 20px;border:1px solid rgba(255,107,107,0.3);
  background:rgba(255,107,107,0.1);color:#ff6b6b;
  border-radius:6px;font-size:14px;cursor:pointer;
  font-weight:bold;
}
#gmAllItemsBtn{
  padding:12px;border:1px solid rgba(255,107,107,0.3);
  background:rgba(255,107,107,0.08);color:#ff6b6b;
  border-radius:6px;font-size:14px;cursor:pointer;
  text-align:center;margin-top:8px;
  touch-action:manipulation;
  -webkit-tap-highlight-color:rgba(255,200,120,0.15);
}
#gmGrantAllBtn{
  padding:12px;border:1px solid rgba(255,200,120,0.45);
  background:rgba(255,180,80,0.12);color:#ffc878;
  border-radius:6px;font-size:14px;cursor:pointer;
  text-align:center;margin-top:8px;
  touch-action:manipulation;
  -webkit-tap-highlight-color:rgba(255,200,120,0.2);
}
.gm-treasure-block{
  margin-top:12px;padding-top:12px;
  border-top:1px solid rgba(255,107,107,0.15);
}
.gm-treasure-label{
  display:block;font-size:12px;color:rgba(224,224,224,0.75);
  margin-bottom:8px;
}
.gm-treasure-row{
  display:flex;gap:8px;align-items:center;
}
#gmTreasureIdInput{
  flex:1;min-width:0;padding:10px 12px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,107,107,0.2);
  border-radius:6px;color:#e0e0e0;
  font-size:14px;outline:none;
}
#gmTreasureAddBtn{
  flex-shrink:0;padding:10px 14px;
  border:1px solid rgba(100,200,255,0.35);
  background:rgba(100,200,255,0.1);color:#8ecfff;
  border-radius:6px;font-size:14px;cursor:pointer;font-weight:bold;
}

/* 法宝说明弹层 */
.treasure-help-overlay{
  position:fixed;inset:0;z-index:120;
  display:none;align-items:center;justify-content:center;
  background:rgba(0,0,0,0.55);
  padding:16px;
}
.treasure-help-dialog{
  position:relative;
  max-width:min(420px,100%);
  max-height:min(70vh,520px);
  overflow-y:auto;
  padding:16px 40px 16px 16px;
  border-radius:12px;
  border:1px solid rgba(120,160,200,0.45);
  background:linear-gradient(180deg,rgba(14,18,28,0.98),rgba(10,12,20,0.98));
  box-shadow:0 16px 40px rgba(0,0,0,0.5);
}
.treasure-help-close{
  position:absolute;top:8px;right:8px;
  width:32px;height:32px;border:none;background:transparent;
  color:#8ecfff;font-size:22px;cursor:pointer;line-height:1;
}
.treasure-help-title{
  margin:0 0 10px;font-size:16px;color:#b8d4f0;
  font-weight:bold;letter-spacing:1px;
}
.treasure-help-body{
  margin:0;font-size:13px;line-height:1.55;
  color:rgba(224,232,240,0.92);white-space:pre-wrap;
}

/* 天赋/事件/修炼 buff 列表弹层（约 80vh，底部三 tab） */
.buff-list-overlay{
  position:fixed;inset:0;z-index:125;
  display:none;align-items:center;justify-content:center;
  background:rgba(0,0,0,0.55);
  padding:12px;
}
.buff-list-dialog{
  position:relative;
  display:flex;flex-direction:column;
  width:min(520px,100%);
  height:80vh;
  max-height:80vh;
  padding:14px 40px 12px 14px;
  border-radius:12px;
  border:1px solid rgba(120,160,200,0.45);
  background:linear-gradient(180deg,rgba(14,18,28,0.98),rgba(10,12,20,0.98));
  box-shadow:0 16px 40px rgba(0,0,0,0.5);
}
.buff-list-close{
  position:absolute;top:8px;right:8px;
  width:32px;height:32px;border:none;background:transparent;
  color:#8ecfff;font-size:22px;cursor:pointer;line-height:1;
}
.buff-list-title{
  flex-shrink:0;
  margin:0 0 10px;font-size:16px;color:#b8d4f0;
  font-weight:bold;letter-spacing:1px;
}
.buff-list-body{
  flex:1;
  min-height:0;
  overflow-y:auto;
  margin:0;
  font-size:13px;line-height:1.55;
  color:rgba(224,232,240,0.92);
  white-space:pre-wrap;
  word-break:break-word;
}
.buff-list-tabs{
  flex-shrink:0;
  display:flex;
  flex-direction:row;
  gap:8px;
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid rgba(120,160,200,0.22);
}
.buff-list-tab{
  flex:1;
  padding:10px 8px;
  font-size:14px;font-family:inherit;
  cursor:pointer;
  border-radius:8px;
  border:1px solid rgba(120,160,200,0.35);
  background:rgba(30,40,60,0.5);
  color:rgba(200,215,235,0.9);
}
.buff-list-tab.active{
  border-color:rgba(100,200,255,0.55);
  background:rgba(100,200,255,0.15);
  color:#c8e8ff;
  font-weight:bold;
}

/* -- 退出账号按钮 -- */
.logout-btn{
  cursor:pointer;
  display:block;
  margin:18px auto 0;
  padding:10px 36px;
  background:transparent;
  border:1px solid rgba(212,175,55,0.25);
  border-radius:8px;
  color:#8a8a8a;
  font-size:13px;
  font-family:inherit;
  letter-spacing:1px;
}
.logout-btn:hover{
  background:rgba(212,175,55,0.1);
  border-color:rgba(212,175,55,0.5);
  color:#e8d5a3;
}
.logout-btn:active{
  background:rgba(212,175,55,0.15);
  transform:scale(0.97);
}
/* -- 大厅返回按钮（顶栏内联，不与头像属性交叉） -- */
.hall-back-btn{
  flex-shrink:0;
  padding:6px 14px;
  background:rgba(10,10,18,0.7);
  border:1px solid rgba(212,175,55,0.25);
  border-radius:6px;
  color:#d4af37;
  font-size:14px;
  font-family:inherit;
  cursor:pointer;
}
.hall-back-btn:hover{
  background:rgba(212,175,55,0.15);
  border-color:#d4af37;
}
/* -- 重修按钮(inline) -- */
.player-name-row{
  display:flex;
  align-items:center;
  gap:4px;
}
.game-restart-btn-inline{
  background:none;
  border:1px solid rgba(212,175,55,0.3);
  color:#d4af37;
  font-size:10px;
  padding:1px 6px;
  border-radius:4px;
  cursor:pointer;
  white-space:nowrap;
  line-height:1.4;
}
.game-restart-btn-inline:hover{
  background:rgba(212,175,55,0.15);
  border-color:#d4af37;
}

/* ── 副本系统 ── */
#dungeonLoadingScreen{
  position:absolute;top:0;left:0;right:0;bottom:0;
  z-index:106;display:none;
  flex-direction:column;align-items:center;justify-content:center;
  background:linear-gradient(180deg,rgba(10,10,18,0.98) 0%,rgba(14,12,24,0.99) 100%);
  color:#e0d5c0;font-family:'Ma Shan Zheng',serif;
}
.loading-container{text-align:center;}
.loading-container p{font-size:20px;margin-bottom:18px;color:#d4af37;}
.loading-spinner{
  width:40px;height:40px;margin:0 auto;
  border:3px solid rgba(212,175,55,0.2);
  border-top-color:#d4af37;border-radius:50%;
  animation:dgSpin 1s linear infinite;
}
@keyframes dgSpin{to{transform:rotate(360deg);}}
#dungeonView{
  position:absolute;top:0;left:0;right:0;bottom:0;
  z-index:106;display:none;flex-direction:column;
  background:linear-gradient(180deg,rgba(10,10,18,0.97) 0%,rgba(14,12,24,0.98) 100%);
  color:#e0d5c0;font-family:'Ma Shan Zheng',serif;
}
.dg-header{
  display:flex;align-items:center;padding:12px;flex-shrink:0;
  border-bottom:1px solid rgba(212,175,55,0.15);
}
.dg-back-btn{
  width:36px;height:36px;border:none;background:none;
  color:#d4af37;font-size:20px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
.dg-title{
  flex:1;text-align:center;color:#d4af37;font-size:18px;
  font-weight:bold;letter-spacing:2px;
}
.dg-body{
  flex:1;overflow-y:auto;padding:12px;
  display:flex;flex-direction:column;gap:10px;
}
.dg-event-card{
  background:rgba(212,175,55,0.06);
  border:1px solid rgba(212,175,55,0.15);
  border-radius:10px;padding:14px;
}
#dgEventTitle{font-size:16px;color:#d4af37;margin-bottom:8px;}
#dgEventText{font-size:14px;line-height:1.7;color:#c8c0b0;white-space:pre-wrap;}
#dgChoices{display:flex;flex-direction:column;gap:8px;margin-top:8px;}
.dg-choice-btn{
  width:100%;padding:10px 14px;
  border:1px solid rgba(212,175,55,0.25);
  background:rgba(212,175,55,0.06);
  color:#e0d5c0;border-radius:8px;
  font-size:14px;cursor:pointer;text-align:left;transition:all .2s;
}
.dg-choice-btn:hover{background:rgba(212,175,55,0.14);border-color:#d4af37;color:#d4af37;}
.dg-choice-btn:disabled{opacity:0.4;cursor:not-allowed;}
.dg-stats-panel{
  background:rgba(212,175,55,0.04);
  border:1px solid rgba(212,175,55,0.12);
  border-radius:10px;padding:10px 14px;
  display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px;color:#b0a890;
}
.dg-stats-panel span{white-space:nowrap;}
.dg-bag-panel{
  background:rgba(212,175,55,0.04);
  border:1px solid rgba(212,175,55,0.12);
  border-radius:10px;padding:10px 14px;
}
.dg-bag-panel h4{font-size:13px;color:#d4af37;margin-bottom:6px;}
#dgBagList{display:flex;flex-wrap:wrap;gap:6px;font-size:13px;color:#b0a890;}
.dg-bag-item{
  padding:4px 8px;background:rgba(212,175,55,0.08);
  border:1px solid rgba(212,175,55,0.15);border-radius:6px;
}
#dgLog{
  max-height:120px;overflow-y:auto;
  background:rgba(0,0,0,0.2);border-radius:8px;padding:8px 10px;font-size:12px;
}
.dg-log-msg{margin-bottom:4px;line-height:1.5;}
.dg-log-system{color:#888;}
.dg-log-player{color:#d4af37;}
#dungeonSettleDialog{
  position:fixed;top:0;left:0;right:0;bottom:0;
  z-index:200;display:none;align-items:center;justify-content:center;
  background:rgba(0,0,0,0.7);
}
.settle-card{
  background:linear-gradient(180deg,#1a1a2e 0%,#16213e 100%);
  border:1px solid rgba(212,175,55,0.3);
  border-radius:14px;padding:24px;
  min-width:280px;max-width:360px;
  text-align:center;color:#e0d5c0;font-family:'Ma Shan Zheng',serif;
}
.settle-card h3{font-size:20px;color:#d4af37;margin-bottom:16px;}
#settleRewardsList{margin-bottom:18px;text-align:left;}
.settle-reward-item{
  padding:6px 10px;margin-bottom:4px;
  background:rgba(212,175,55,0.08);
  border:1px solid rgba(212,175,55,0.15);border-radius:6px;font-size:14px;
}
.settle-exit-btn{
  padding:10px 28px;border:1px solid rgba(212,175,55,0.4);
  background:rgba(212,175,55,0.1);color:#d4af37;border-radius:8px;
  font-size:15px;cursor:pointer;transition:all .2s;
}
.settle-exit-btn:hover{background:rgba(212,175,55,0.2);}

/* 首屏资源加载（map + child 完成前不可操作主界面） */
.asset-loading-overlay{
  position:fixed;inset:0;z-index:2500;display:none;
  align-items:center;justify-content:center;
  background:rgba(8,6,16,0.92);
  flex-direction:column;
}
.asset-loading-overlay.active{display:flex;}
.asset-loading-inner{text-align:center;}
.asset-loading-dots{
  width:52px;height:52px;
  position:relative;
  margin:0 auto 18px;
  animation:assetLoadRing 1.15s linear infinite;
}
@keyframes assetLoadRing{to{transform:rotate(360deg);}}
.asset-loading-dots span{
  position:absolute;
  left:50%;top:50%;
  width:8px;height:8px;
  margin:-4px 0 0 -4px;
  background:#d4af37;
  border-radius:50%;
  box-shadow:0 0 6px rgba(212,175,55,0.35);
}
.asset-loading-dots span:nth-child(1){transform:rotate(0deg) translateY(-24px);}
.asset-loading-dots span:nth-child(2){transform:rotate(45deg) translateY(-24px);}
.asset-loading-dots span:nth-child(3){transform:rotate(90deg) translateY(-24px);}
.asset-loading-dots span:nth-child(4){transform:rotate(135deg) translateY(-24px);}
.asset-loading-dots span:nth-child(5){transform:rotate(180deg) translateY(-24px);}
.asset-loading-dots span:nth-child(6){transform:rotate(225deg) translateY(-24px);}
.asset-loading-dots span:nth-child(7){transform:rotate(270deg) translateY(-24px);}
.asset-loading-dots span:nth-child(8){transform:rotate(315deg) translateY(-24px);}
.asset-loading-text{
  font-size:17px;color:#d4af37;
  letter-spacing:4px;
  font-family:'Ma Shan Zheng',serif;
  margin:0;
}

/* 功法面板 */
.hall-panel-skill{
  flex-direction:column;
  padding:8px 10px 12px;
  overflow:auto;
}
.skill-panel-inner{
  max-width:480px;
  margin:0 auto;
  width:100%;
}
.skill-slots-bar{
  font-size:12px;
  color:rgba(180,220,255,0.92);
  margin-bottom:10px;
  letter-spacing:1px;
}
.skill-list-wrap{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.skill-row{
  border:1px solid rgba(100,200,255,0.35);
  border-radius:10px;
  padding:10px 12px;
  background:rgba(18,22,36,0.82);
}
.skill-row-name{
  font-weight:bold;
  color:#e8d5a3;
  font-size:14px;
}
.skill-row-meta{
  font-size:11px;
  color:rgba(255,255,255,0.42);
  margin-top:4px;
}
.skill-row-desc{
  font-size:12px;
  color:rgba(220,230,245,0.88);
  margin-top:6px;
  line-height:1.45;
}
.skill-row-lines{
  font-size:12px;
  color:#b8d4f0;
  margin-top:8px;
  line-height:1.5;
  white-space:pre-wrap;
}
.skill-row-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
  align-items:center;
}
.skill-row-actions button{
  padding:6px 12px;
  font-size:13px;
  border-radius:8px;
  cursor:pointer;
  font-family:inherit;
}
.skill-row-actions button:disabled{
  opacity:0.45;
  cursor:not-allowed;
}
.skill-equip-btn{
  border:1px solid rgba(100,200,255,0.45);
  background:rgba(40,60,90,0.45);
  color:#c8e8ff;
}
.skill-upgrade-btn{
  border:1px solid rgba(212,175,55,0.4);
  background:rgba(212,175,55,0.1);
  color:#e8d5a3;
}
.skill-empty-hint{
  text-align:center;
  color:rgba(212,175,55,0.45);
  padding:28px 8px;
  font-size:14px;
}

/* 境界面板 */
.hall-panel-realm{
  flex-direction:column;
  padding:8px 10px 12px;
  overflow:auto;
}
.realm-panel-layout{
  display:flex;
  flex:1;
  gap:10px;
  min-height:0;
  width:100%;
}
.realm-panel-left{
  flex:0 0 36%;
  display:flex;
  flex-direction:column;
  gap:6px;
  max-height:70vh;
  overflow-y:auto;
}
.realm-panel-right{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0;
}
.realm-realm-btn{
  padding:10px 8px;
  border:1px solid rgba(212,175,55,0.35);
  border-radius:8px;
  background:rgba(26,26,46,0.75);
  color:#e8d5a3;
  font-size:14px;
  cursor:pointer;
  text-align:left;
}
.realm-realm-btn.active{
  border-color:#d4af37;
  background:rgba(212,175,55,0.12);
}
.realm-break-kinds{
  display:flex;
  flex-direction:column;
  flex:1;
  gap:6px;
  min-height:120px;
}
.realm-kind-btn{
  flex:1;
  min-height:48px;
  border:1px solid rgba(212,175,55,0.35);
  border-radius:8px;
  background:rgba(22,22,40,0.85);
  color:#e8d5a3;
  font-size:13px;
  cursor:pointer;
  padding:8px;
}
.realm-kind-btn.active{
  border-color:#d4af37;
  transform:scale(1.02);
}
.realm-cost-box{
  padding:10px;
  border-radius:8px;
  border:1px dashed rgba(212,175,55,0.28);
  font-size:13px;
  line-height:1.45;
  color:#e8d5a3;
}
.realm-cost-title{font-weight:600;margin-bottom:4px;color:#d4af37;}
.realm-muted{color:rgba(232,213,163,0.55);font-size:12px;}
.realm-breakthrough-btn{
  padding:10px;
  border-radius:8px;
  border:1px solid #d4af37;
  background:rgba(212,175,55,0.15);
  color:#d4af37;
  font-size:15px;
  cursor:pointer;
}
.realm-spirit-block{
  margin-top:6px;
  padding-top:8px;
  border-top:1px solid rgba(212,175,55,0.15);
}
.realm-spirit-label{display:block;font-size:12px;color:rgba(232,213,163,0.65);margin-bottom:4px;}
.realm-spirit-row{display:flex;gap:8px;align-items:center;}
.realm-spirit-input{
  flex:1;
  padding:8px;
  border-radius:6px;
  border:1px solid rgba(212,175,55,0.35);
  background:rgba(10,10,20,0.6);
  color:#e8d5a3;
}
.realm-spirit-btn{
  padding:8px 14px;
  border-radius:6px;
  border:1px solid rgba(212,175,55,0.45);
  background:rgba(212,175,55,0.1);
  color:#d4af37;
  cursor:pointer;
}

/* 境界突破居中提示，保留 0.8s */
.realm-center-toast{
  position:fixed;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  z-index:4000;
  max-width:min(92vw,360px);
  padding:16px 22px;
  border-radius:12px;
  border:1px solid rgba(212,175,55,0.45);
  background:rgba(12,10,24,0.94);
  color:#e8d5a3;
  font-size:15px;
  line-height:1.45;
  text-align:center;
  box-shadow:0 8px 32px rgba(0,0,0,0.45);
  pointer-events:none;
}
.realm-center-toast[hidden]{display:none!important;}

/* 创角天赋选择 */
.attr-detail-value--wrap{white-space:normal;word-break:break-all;line-height:1.35;}
.innate-creation-overlay{
  position:fixed;inset:0;z-index:5000;
  display:flex;align-items:center;justify-content:center;
  background:rgba(6,4,14,0.88);
  padding:16px;
}
.innate-creation-overlay[hidden]{display:none!important;}
.innate-creation-dialog{
  width:min(96vw,440px);max-height:92vh;overflow:auto;
  padding:20px 18px 22px;
  border-radius:14px;
  border:1px solid rgba(212,175,55,0.4);
  background:linear-gradient(165deg,rgba(22,18,38,0.98),rgba(12,10,24,0.98));
  box-shadow:0 12px 48px rgba(0,0,0,0.55);
}
.innate-creation-title{margin:0 0 8px;font-size:18px;color:#e8d5a3;font-weight:600;}
.innate-creation-hint{margin:0 0 14px;font-size:13px;line-height:1.45;color:rgba(232,213,163,0.75);}
.innate-candidate-list{display:flex;flex-direction:column;gap:8px;margin-bottom:12px;}
.innate-candidate-item{
  display:flex;align-items:flex-start;gap:10px;padding:10px 12px;
  border-radius:10px;border:1px solid rgba(212,175,55,0.25);
  background:rgba(26,26,46,0.55);cursor:pointer;
}
.innate-candidate-item.selected{border-color:rgba(100,200,140,0.65);background:rgba(30,50,40,0.45);}
.innate-candidate-item input{flex-shrink:0;margin-top:3px;}
.innate-candidate-text{flex:1;font-size:14px;color:#e8d5a3;line-height:1.4;}
.innate-candidate-meta{font-size:12px;color:rgba(212,175,55,0.65);margin-top:4px;}
.innate-spirit-root{margin-bottom:12px;font-size:14px;color:#e8d5a3;}
.innate-creation-actions{display:flex;gap:10px;justify-content:flex-end;margin-bottom:14px;}
.innate-creation-actions button{
  padding:10px 18px;border-radius:8px;border:1px solid rgba(212,175,55,0.45);
  background:rgba(212,175,55,0.12);color:#e8d5a3;cursor:pointer;font-size:14px;
}
.innate-creation-actions button.primary{background:rgba(100,160,120,0.35);border-color:rgba(120,200,150,0.55);}
.innate-attr-preview{font-size:12px;color:rgba(232,213,163,0.8);line-height:1.5;border-top:1px solid rgba(212,175,55,0.2);padding-top:12px;}
