* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; }
html, body { width: 100%; height: 100%; background: #000; overflow: hidden; font-family: "Microsoft YaHei", sans-serif; color: #d8ccae; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#app { position: fixed; inset: 0; pointer-events: none; }
#app > * { pointer-events: auto; }

/* ---------- 标题界面 ---------- */
.title-screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; pointer-events: auto; animation: screenIn .5s ease both; }
.title-logo {
  font-size: 54px; letter-spacing: 18px; color: #e8c86a; font-weight: bold;
  text-shadow: 0 0 24px rgba(220,60,30,.7), 0 3px 6px #000;
  animation: logoIn 1.1s cubic-bezier(.2,.7,.2,1) both, logoGlow 3.4s ease-in-out 1.1s infinite;
}
.title-sub { color: #9a8a68; letter-spacing: 3px; animation: riseIn .8s ease .25s both; }
.title-version { font-size: 11px; color: #554a38; letter-spacing: 2px; animation: riseIn .8s ease .6s both; }
.class-row { display: flex; gap: 16px; }
.class-card {
  width: 190px; padding: 14px 14px 16px; cursor: pointer;
  background: linear-gradient(#221a12, #14100a); border: 1px solid #4a3a20; border-radius: 8px;
  text-align: center; transition: transform .15s, border-color .15s, box-shadow .15s;
  animation: riseIn .5s ease both;
}
.class-card:hover { transform: translateY(-6px); border-color: #c8a040; box-shadow: 0 8px 26px rgba(200,120,30,.3); }
.class-card.selected { border-color: #ffd76a; box-shadow: 0 0 0 1px #ffd76a, 0 0 22px rgba(255,190,70,.38); transform: translateY(-4px); }
.class-card.selected .cc-btn { background: linear-gradient(#8a5a1a, #5a3a10); color: #ffe9a8; border-color: #ffd76a; }
.cc-art { width: 96px; height: 104px; margin: 0 auto 4px; display: block; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
.cc-icon { width: 62px; height: 62px; margin: 0 auto 10px; border-radius: 50%; border: 2px solid #6a5430; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #f0e0c0; text-shadow: 0 1px 3px #000; }
.cc-name { font-size: 19px; color: #ffd76a; font-weight: bold; margin-bottom: 4px; }
.cc-res { font-size: 12px; color: #8ab8e8; margin-bottom: 8px; }
.cc-desc { font-size: 12px; color: #a89878; line-height: 1.6; min-height: 58px; }
.cc-btn { margin-top: 10px; padding: 7px 0; background: linear-gradient(#5a3a1a, #3a2410); border: 1px solid #8a6430; border-radius: 4px; color: #e8c86a; font-size: 13px; transition: all .15s; }
.title-hint { font-size: 12px; color: #6a5f48; animation: riseIn .8s ease .5s both; }

/* 标题/选人流程动画（T-052） */
@keyframes screenIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes logoIn { from { opacity: 0; letter-spacing: 34px; filter: blur(6px); } to { opacity: 1; letter-spacing: 18px; filter: blur(0); } }
@keyframes logoGlow { 0%, 100% { text-shadow: 0 0 24px rgba(220,60,30,.7), 0 3px 6px #000; } 50% { text-shadow: 0 0 34px rgba(255,140,50,.85), 0 0 60px rgba(220,80,30,.3), 0 3px 6px #000; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.menu-col .menu-btn { animation: riseIn .5s ease both; }
.menu-col .menu-btn:nth-child(1) { animation-delay: .3s; }
.menu-col .menu-btn:nth-child(2) { animation-delay: .42s; }
.menu-col .menu-btn:nth-child(3) { animation-delay: .54s; }
/* 进城黑场过渡：on=淡入遮屏，off=再淡出移除 */
.screen-fade { position: fixed; inset: 0; z-index: 200; background: #000; opacity: 0; pointer-events: none; transition: opacity .32s ease; }
.screen-fade.on { opacity: 1; pointer-events: auto; }
.screen-fade.off { opacity: 0; transition: opacity .65s ease; }

/* ---------- 主菜单 / 按钮 ---------- */
.menu-col { display: flex; flex-direction: column; gap: 12px; width: 300px; }
.menu-btn {
  padding: 11px 0; text-align: center; cursor: pointer; letter-spacing: 4px; font-size: 15px;
  color: #e8c86a; background: linear-gradient(#3a2c16, #241a0c);
  border: 1px solid #6a5430; border-radius: 6px; transition: all .15s;
}
.menu-btn:hover { border-color: #c8a040; box-shadow: 0 0 16px rgba(200,150,50,.35); transform: translateY(-1px); }
.menu-btn.gold { border-color: #c8a040; color: #ffd76a; box-shadow: 0 0 10px rgba(255,215,106,.2); }
.menu-btn.back { width: 220px; margin-top: 8px; font-size: 13px; padding: 8px 0; }
.title-logo.small { font-size: 32px; letter-spacing: 14px; }

/* ---------- 暂停覆盖层 ---------- */
#pause-overlay {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.62); backdrop-filter: blur(2px);
}
.pause-box {
  width: 300px; padding: 24px 22px; display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(#241c12, #171208); border: 2px solid #6a5430; border-radius: 8px;
  box-shadow: 0 0 0 1px #000, 0 14px 60px rgba(0,0,0,.9);
}
.pause-title { text-align: center; font-size: 20px; color: #ffd76a; letter-spacing: 8px; margin-bottom: 8px; text-shadow: 0 0 12px rgba(255,180,60,.4); }

/* ---------- 设置弹窗 ---------- */
#settings-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.55); }
.set-box {
  width: 330px; padding: 20px 22px; background: linear-gradient(#241c12, #171208);
  border: 2px solid #6a5430; border-radius: 8px; box-shadow: 0 0 0 1px #000, 0 14px 60px rgba(0,0,0,.9);
}
.set-title { text-align: center; font-size: 18px; color: #ffd76a; letter-spacing: 8px; margin-bottom: 10px; }
.set-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 4px; border-bottom: 1px solid rgba(90,74,42,.3); font-size: 14px; }
.set-toggle { padding: 3px 14px; border: 1px solid #4a3a20; border-radius: 4px; background: #171008; color: #8a7a58; cursor: pointer; font-size: 12px; }
.set-toggle.on { border-color: #8a6430; color: #ffd76a; }
.set-toggle.danger { color: #ff7a6a; border-color: #6a2a20; }
.set-box .menu-btn { margin-top: 14px; }

/* ---------- toast ---------- */
#toast {
  position: fixed; top: 15%; left: 50%; transform: translateX(-50%); z-index: 70; pointer-events: none;
  padding: 8px 24px; font-size: 14px; color: #ffd76a; text-shadow: 0 1px 2px #000;
  background: rgba(12,9,6,.92); border: 1px solid #8a6430; border-radius: 5px;
  opacity: 0;
}
#toast.show { animation: toastFade 2s ease forwards; }
@keyframes toastFade {
  0% { opacity: 0; transform: translate(-50%, -8px); }
  12% { opacity: 1; transform: translate(-50%, 0); }
  75% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------- HUD ---------- */
#hud { position: fixed; left: 0; right: 0; bottom: 0; height: 108px; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; z-index: 10; }
#hud::before {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 820px; height: 92px; border-radius: 16px 16px 0 0;
  background: radial-gradient(110px 56px at 10% 100%, rgba(90,20,10,.5), transparent 70%),
              radial-gradient(110px 56px at 90% 100%, rgba(20,40,90,.5), transparent 70%),
              linear-gradient(180deg, rgba(16,12,8,0), rgba(22,16,10,.94) 36%, #100c08);
  border-top: 1px solid rgba(120,96,50,.3);
}
.hud-left, .hud-right { display: flex; align-items: flex-end; gap: 12px; padding-bottom: 10px; z-index: 2; }
.hud-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-bottom: 8px; z-index: 2; }

.globe { position: relative; width: 86px; height: 86px; border-radius: 50%; overflow: hidden; background: #0e0606;
  border: 3px solid #3a2c18; box-shadow: 0 0 0 2px #080604, 0 0 16px rgba(0,0,0,.9), inset 0 0 16px rgba(0,0,0,.8); }
.globe-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; transition: height .18s; }
.globe-hp .globe-fill { background: radial-gradient(circle at 50% 18%, #ff8a6a, #d4241a 46%, #7a0c08 92%); }
.globe-res .globe-fill { background: radial-gradient(circle at 50% 18%, #7ab8ff, #1c4fd4 46%, #0a1a6a 92%); }
.globe-glass { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 32% 22%, rgba(255,255,255,.45), rgba(255,255,255,.05) 34%, transparent 60%); }
.globe-num { position: absolute; bottom: 2px; width: 100%; text-align: center; font-size: 10px; color: #f0e6d0; text-shadow: 0 1px 2px #000, 0 0 4px #000; }

.potion-slot { position: relative; width: 44px; height: 44px; margin-bottom: 22px; border-radius: 5px;
  background: linear-gradient(#221a10, #120d08); border: 2px solid #4a3a20;
  display: flex; align-items: center; justify-content: center; }
.potion-icon { width: 22px; height: 24px; border-radius: 50% 50% 46% 46%; background: radial-gradient(circle at 40% 28%, #ff9a7a, #d42418 62%, #7a0c06); box-shadow: 0 0 8px rgba(255,60,30,.7); }
.p-key { position: absolute; bottom: -17px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #9a8a68; }
.p-count { position: absolute; top: -7px; right: -7px; width: 17px; height: 17px; border-radius: 50%; background: #241a0e; border: 1px solid #8a6430; font-size: 10px; color: #ffd76a; display: flex; align-items: center; justify-content: center; }

.skillbar { display: flex; gap: 6px; }
.skill-slot { position: relative; width: 50px; height: 50px; border-radius: 5px;
  background: linear-gradient(#20180e, #120d08); border: 2px solid #4a3a20;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; }
.skill-slot.no-res { border-color: #6a2a20; }
.ss-cv { width: 36px; height: 36px; pointer-events: none; filter: drop-shadow(0 0 4px rgba(255,200,100,.35)); }
.ss-cd { position: absolute; inset: 2px; border-radius: 3px; display: flex; align-items: center; justify-content: center; color: #ffd76a; font-size: 15px; font-weight: bold; text-shadow: 0 1px 2px #000; }
.ss-key { position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #9a8a68; white-space: nowrap; }

.buff-row { display: flex; gap: 5px; justify-content: center; min-height: 18px; margin-top: 2px; }
.buff-chip { padding: 1px 7px; font-size: 10px; color: #cfe8ff; background: rgba(30,50,80,.75); border: 1px solid #3a5a8a; border-radius: 3px; text-shadow: 0 1px 1px #000; }
.buff-chip.shield { color: #9fd8ff; border-color: #5a8ab8; }

#boss-bar { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); width: 560px; z-index: 12; text-align: center; pointer-events: none; }
#boss-bar.hidden { display: none; }
.bb-name { font-size: 18px; color: #ff5a3c; font-weight: bold; text-shadow: 0 1px 3px #000, 0 0 10px rgba(255,60,20,.5); margin-bottom: 4px; }
.bb-name #bb-lv { color: #ffd76a; font-size: 14px; margin-left: 8px; }
.bb-wrap { height: 13px; border: 1px solid #6a1a10; border-radius: 3px; background: linear-gradient(#2a0a08, #180404); box-shadow: inset 0 2px 6px rgba(0,0,0,.8), 0 0 10px rgba(255,40,20,.25); overflow: hidden; }
.bb-fill { height: 100%; width: 100%; background: linear-gradient(#ff7a5a, #c92a18 55%, #8a1208); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); transition: width .15s; }

#minimap { border: 2px solid #5a4a2a; border-radius: 4px; background: #120d08; box-shadow: 0 0 0 1px #000, inset 0 0 12px rgba(0,0,0,.7); width: 100%; }

.cell-ic { position: absolute; right: 3px; top: 3px; width: 40px; height: 40px; pointer-events: none; opacity: .95; }
.inv-cell { padding-right: 46px; }
.inv-cell.q-legendary { box-shadow: inset 0 0 12px rgba(232,138,58,.28), 0 0 8px rgba(232,138,58,.2); }
.inv-cell.q-unique { box-shadow: inset 0 0 12px rgba(160,120,64,.32), 0 0 8px rgba(160,120,64,.25); }

.peak-cell.on { animation: peakPulse 2.2s ease-in-out infinite; }
@keyframes peakPulse {
  0%, 100% { box-shadow: inset 0 0 8px rgba(200,160,64,.5); }
  50% { box-shadow: inset 0 0 14px rgba(255,215,120,.8), 0 0 6px rgba(255,215,120,.35); }
}
.skill-col { position: relative; }
.skill-col::before { content: ""; position: absolute; top: 34px; bottom: 8px; left: 50%; width: 1px; background: rgba(120,96,50,.18); pointer-events: none; }

.xp-wrap { width: 560px; height: 10px; margin-top: 8px; position: relative; border-radius: 4px; overflow: hidden; background: #0c0a06; border: 1px solid #3a3020; }
.xp-fill { height: 100%; width: 20%; background: linear-gradient(90deg, #7a5a1a, #d8a830); }
.xp-text { position: absolute; inset: 0; text-align: center; font-size: 9px; line-height: 10px; color: #d8c8a0; text-shadow: 0 1px 1px #000; }

#top-right { position: fixed; top: 12px; right: 12px; width: 200px; z-index: 10; display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
.wt-label { font-size: 12px; color: #ffd76a; text-align: right; text-shadow: 0 1px 2px #000; }
.gold-label { font-size: 12px; color: #e8c040; text-align: right; text-shadow: 0 1px 2px #000; }
.log-box { height: 190px; overflow-y: auto; padding: 6px 8px; border-radius: 4px;
  background: rgba(10,8,6,.55); border: 1px solid rgba(90,74,42,.5);
  display: flex; flex-direction: column; justify-content: flex-end; scrollbar-width: none; }
.log-line { font-size: 11px; line-height: 1.55; color: #c8b89a; text-shadow: 0 1px 1px #000; }
.log-line.gold { color: #ffd76a; } .log-line.sys { color: #7fb8e8; }

#zone-banner { position: fixed; top: 24%; left: 50%; transform: translateX(-50%); font-size: 40px; letter-spacing: 8px;
  color: #ffd76a; text-shadow: 0 0 16px #ff8c00, 0 2px 4px #000; opacity: 0; transition: opacity .8s; pointer-events: none; z-index: 30; font-weight: bold; }
#zone-banner.show { opacity: 1; }

/* ---------- 面板通用 ---------- */
#panels { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 20; }
/* 空面板层必须放行鼠标给画布；仅在面板打开时拦截 */
#panels:not(:empty) { pointer-events: auto; }
.panel { width: 1060px; max-width: 96vw; max-height: 86vh; display: flex; flex-direction: column;
  background: linear-gradient(#241c12, #171208); border: 2px solid #6a5430; border-radius: 8px;
  box-shadow: 0 0 0 1px #000, 0 12px 60px rgba(0,0,0,.9); }
.panel-head { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid #4a3a20; }
.panel-title { font-size: 16px; color: #ffd76a; font-weight: bold; flex: 1; }
.panel-title .hl { color: #8fe87f; }
.panel-close { font-size: 12px; color: #9a8a68; cursor: pointer; }
.panel-body { padding: 14px; overflow-y: auto; }
.panel-body::-webkit-scrollbar { width: 8px; } .panel-body::-webkit-scrollbar-thumb { background: #4a3a20; border-radius: 4px; }
.locked-msg { text-align: center; color: #9a8a68; padding: 60px 0; font-size: 15px; }

/* 角色 */
.stat-table { width: 100%; border-collapse: collapse; }
.stat-table td { padding: 6px 10px; border-bottom: 1px solid rgba(90,74,42,.25); font-size: 13px; }
.stat-table td.v { text-align: right; color: #ffd76a; }

/* 技能树 */
.bar-assign { display: flex; gap: 8px; margin-bottom: 8px; }
.ba-slot { flex: 1; padding: 6px 4px; text-align: center; border: 1px solid #4a3a20; border-radius: 4px; background: #171008; cursor: pointer; }
.ba-slot.pick { border-color: #ffd76a; box-shadow: 0 0 10px rgba(255,215,106,.4); }
.ba-key { display: block; font-size: 10px; color: #8a7a58; }
.ba-name { display: block; font-size: 12px; color: #d8ccae; }
.ba-tip { font-size: 12px; color: #8fe87f; margin-bottom: 8px; }
.skill-cols { display: flex; gap: 8px; }
.skill-col { flex: 1; background: rgba(0,0,0,.25); border: 1px solid #3a2c18; border-radius: 5px; padding: 8px 6px; }
.col-title { text-align: center; font-size: 12px; color: #c8a860; margin-bottom: 8px; line-height: 1.5; }
.col-title.locked { color: #6a5c44; }
.skill-node { display: flex; align-items: center; gap: 6px; padding: 5px 6px; margin-bottom: 5px; border-radius: 4px;
  border: 1px solid #3a2c18; background: #140f08; cursor: pointer; }
.skill-node.learned { border-color: #8a6430; background: #241a0c; }
.skill-node.locked { opacity: .45; }
.sn-icon { font-size: 16px; width: 20px; text-align: center; }
.sn-name { flex: 1; font-size: 12px; }
.sn-rank { font-size: 11px; color: #8a7a58; }

/* 巅峰 */
.peak-grid { display: grid; gap: 3px; width: fit-content; margin: 0 auto; }
.peak-cell { display: flex; align-items: center; justify-content: center; font-size: 11px; border-radius: 4px;
  border: 1px solid #3a2c18; background: #140f08; color: #8a7a58; cursor: pointer; }
.peak-cell.t-start { border-color: #c8a040; color: #ffd76a; }
.peak-cell.t-magic { color: #6a8aff; }
.peak-cell.t-rare { color: #e8c040; }
.peak-cell.t-glyph { color: #4ae04a; border-radius: 50%; }
.peak-cell.t-legend { color: #e88a3a; }
.peak-cell.t-gate { color: #c89aff; }
.peak-cell.on { background: #2a2010; border-color: #c8a040; box-shadow: inset 0 0 8px rgba(200,160,64,.5); }
.peak-legend { margin-top: 10px; font-size: 11px; color: #8a7a58; text-align: center; line-height: 1.6; }
.glyph-picker, .gp-item { margin-top: 8px; }
.gp-title { color: #ffd76a; font-size: 13px; margin: 8px 0; }
.gp-item { padding: 7px 9px; border: 1px solid #3a2c18; border-radius: 4px; background: #140f08; cursor: pointer; font-size: 12px; }
.gp-item:hover { border-color: #8a6430; }
.gp-item span { color: #8fe87f; font-size: 11px; }
.gp-desc { color: #a89878; font-size: 11px; margin-top: 2px; }

/* 背包 */
.inv-wrap { display: flex; flex-wrap: wrap; gap: 14px; }
.equip-area { display: grid; grid-template-columns: repeat(2, 118px); gap: 6px; align-content: start; }
.bag-area { display: grid; grid-template-columns: repeat(6, 86px); gap: 6px; align-content: start; }
.inv-cell { position: relative; min-height: 62px; padding: 4px 5px; border-radius: 4px; border: 1px solid #3a2c18; background: #120d08; cursor: pointer; overflow: hidden; }
.inv-cell.filled:hover { border-color: #8a6430; }
.inv-cell.q-legendary { border-color: #a86428; } .inv-cell.q-unique { border-color: #8a6a38; } .inv-cell.q-rare { border-color: #9a8428; } .inv-cell.q-magic { border-color: #4a5a9a; }
.cell-empty { color: #5a4c34; font-size: 11px; text-align: center; padding-top: 18px; }
.cell-name { font-size: 11px; line-height: 1.35; }
.cell-ip { font-size: 10px; color: #6a5c44; }
.inv-detail { flex: 1; min-width: 330px; max-width: 400px; padding: 14px; background: rgba(0,0,0,.3); border: 1px solid #3a2c18; border-radius: 5px; font-size: 13px; line-height: 1.75; }
/* 背包网格（暗黑式）：小格 + 物品跨格覆盖层 + 选中高亮 */
.bag-area { position: relative; gap: 0; }
.inv-cell.gcell { width: 34px; height: 30px; min-height: 30px; padding: 0; }
.inv-cell.gcell.sel { border-color: #ffd76a; box-shadow: 0 0 10px rgba(255,215,106,.55); }
.grid-ic { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.it-name { font-size: 16px; font-weight: bold; }
.it-sub { font-size: 11px; color: #8a7a58; margin-bottom: 8px; }
.it-req { font-size: 11px; margin-bottom: 6px; }
.cls-mech { font-size: 12px; color: #c8a860; line-height: 1.7; padding: 7px 10px; margin-bottom: 10px;
  background: rgba(120,90,40,.12); border: 1px solid rgba(140,110,60,.35); border-radius: 5px; }
.attr-respec { float: right; font-size: 11px; color: #e8c86a; cursor: pointer; padding: 1px 8px;
  border: 1px solid #6a5430; border-radius: 4px; }
.attr-respec:hover { border-color: #c8a040; color: #ffd76a; }
.it-affix { color: #9ab8e8; }
.it-uniq, .it-aspect { color: #e8a03a; }
.it-gem { color: #4ae04a; }
.it-empty { color: #6a5c44; text-align: center; padding: 40px 0; }
.it-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.btn { padding: 5px 12px; background: linear-gradient(#4a3a1e, #2c2210); border: 1px solid #8a6430; border-radius: 4px; color: #e8c86a; font-size: 12px; cursor: pointer; }
.btn:hover { background: linear-gradient(#5a4824, #3a2c14); }
.btn.disabled { opacity: .4; pointer-events: none; }

/* 城镇 NPC 列表 */
.npc-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-bottom: 1px solid rgba(90,74,42,.25); }
.npc-row span:first-child { flex: 1; font-size: 13px; }
.npc-sub { font-size: 11px; color: #8a7a58; }

/* 区域选择 */
.zone-wt { display: flex; gap: 8px; margin-bottom: 12px; }
.wt-opt { flex: 1; padding: 8px; text-align: center; border: 1px solid #4a3a20; border-radius: 4px; background: #171008; cursor: pointer; font-size: 12px; }
.wt-opt.cur { border-color: #ffd76a; color: #ffd76a; }
.wt-opt.locked { opacity: .4; }
.zone-opt { padding: 10px 12px; margin-bottom: 8px; border: 1px solid #3a2c18; border-radius: 5px; background: #140f08; cursor: pointer; }
.zone-opt:hover { border-color: #8a6430; }
.zo-name { color: #ffd76a; font-size: 15px; }
.zo-lv { color: #8fe87f; font-size: 12px; }
.zo-desc { font-size: 12px; color: #a89878; margin-top: 3px; }
.zo-sub { font-size: 11px; color: #6a5c44; margin-top: 3px; }

/* tooltip */
#tooltip { position: fixed; z-index: 60; display: none; max-width: 270px; padding: 9px 11px; pointer-events: none;
  background: rgba(8,6,4,.96); border: 1px solid #6a5430; border-radius: 5px; box-shadow: 0 6px 20px rgba(0,0,0,.8); }
.tip-title { font-size: 13px; color: #ffd76a; font-weight: bold; margin-bottom: 4px; }
.tip-cl { color: #8a7a58; font-size: 11px; }
.tip-desc { font-size: 12px; color: #c8b89a; line-height: 1.6; }
.tip-cost { font-size: 11px; color: #7ab8ff; margin-top: 4px; }
.tip-cd { font-size: 11px; color: #b89830; }
.tip-rank { font-size: 11px; color: #8fe87f; margin-top: 3px; }

/* ---------- 任务追踪（左上） ---------- */
#quest-tracker { position: fixed; top: 12px; left: 12px; width: 230px; z-index: 10; pointer-events: none;
  padding: 8px 12px; border-radius: 5px; background: rgba(10,8,6,.55); border: 1px solid rgba(140,110,60,.45); }
.qt-ch { font-size: 12px; color: #ffd76a; font-weight: bold; margin-bottom: 3px; text-shadow: 0 1px 2px #000; }
.qt-obj { font-size: 11px; color: #c8b89a; line-height: 1.5; text-shadow: 0 1px 1px #000; }

/* ---------- 对话框 ---------- */
#dialog { position: fixed; inset: 0; z-index: 55; display: flex; align-items: flex-end; justify-content: center;
  background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.45)); }
.dialog-box { width: 760px; max-width: 92vw; margin-bottom: 130px; padding: 16px 20px 14px; cursor: pointer;
  background: linear-gradient(#241c12f2, #171208fa); border: 2px solid #6a5430; border-radius: 8px;
  box-shadow: 0 0 0 1px #000, 0 14px 60px rgba(0,0,0,.9); }
.dlg-name { font-size: 15px; font-weight: bold; margin-bottom: 6px; letter-spacing: 1px; }
.dlg-text { font-size: 14px; line-height: 1.85; color: #e2d6b8; min-height: 52px; }
.dlg-text b { margin-right: 4px; }
.dlg-foot { text-align: right; font-size: 11px; color: #8a7a58; }
.dlg-actions { display: flex; gap: 10px; margin-top: 10px; justify-content: flex-end; }
.dlg-btn { padding: 6px 16px; font-size: 13px; color: #ffd76a; background: linear-gradient(#5a3a1a, #3a2410);
  border: 1px solid #8a6430; border-radius: 4px; cursor: pointer; }
.dlg-btn:hover { border-color: #c8a040; }
.dlg-btn.dim { color: #9a8a68; }

/* ---------- 属性加点 / 负重 ---------- */
.attr-box { margin-bottom: 12px; padding: 10px 12px; background: rgba(0,0,0,.25); border: 1px solid #3a2c18; border-radius: 5px; }
.attr-head { font-size: 13px; color: #c8a860; margin-bottom: 8px; }
.attr-head .hl { color: #8fe87f; }
.attr-row-wrap { display: flex; gap: 10px; }
.attr-cell { flex: 1; text-align: center; padding: 8px 4px; background: #140f08; border: 1px solid #3a2c18; border-radius: 5px; }
.attr-name { font-size: 13px; color: #e8dcc0; }
.attr-val { font-size: 17px; color: #ffd76a; font-weight: bold; margin: 3px 0; }
.attr-alloc { font-size: 10px; color: #8fe87f; font-weight: normal; }
.attr-desc { font-size: 10px; color: #8a7a58; min-height: 14px; margin-bottom: 6px; }
.attr-plus { width: 30px; padding: 2px 0 !important; font-size: 14px !important; }
.attr-plus:disabled { opacity: .35; pointer-events: none; }
.load-box { margin-bottom: 12px; padding: 8px 12px; background: rgba(0,0,0,.25); border: 1px solid #3a2c18; border-radius: 5px; }
.load-head { font-size: 12px; color: #c8b89a; margin-bottom: 6px; }
.load-bar { height: 8px; border-radius: 4px; background: #0c0a06; border: 1px solid #3a3020; overflow: hidden; }
.load-fill { height: 100%; background: linear-gradient(90deg, #6a8a4a, #9ab060); transition: width .2s; }
.load-fill.heavy { background: linear-gradient(90deg, #a08030, #d0a840); }
.load-fill.over { background: linear-gradient(90deg, #a03020, #e05038); }

/* ---------- 技能强化分支 ---------- */
.upg-box { margin: -2px 0 6px 26px; }
.upg-opt { display: flex; align-items: baseline; gap: 8px; padding: 4px 8px; margin-bottom: 3px; font-size: 11px;
  border: 1px dashed #4a3a20; border-radius: 4px; background: #100c07; cursor: pointer; color: #a89878; }
.upg-opt b { color: #c8a860; }
.upg-opt:hover { border-color: #8a6430; }
.upg-opt.chosen { border-style: solid; border-color: #8fe87f; background: #16220f; color: #cfe8c0; }
.upg-opt.chosen b { color: #8fe87f; }

/* ---------- 仓库 ---------- */
.stash-sec { margin-bottom: 12px; }
.stash-title { font-size: 13px; color: #ffd76a; margin-bottom: 6px; }
/* 商店与雇佣 */
.shop-sec { margin-bottom: 14px; }
.shop-row { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-bottom: 1px solid rgba(90,74,42,.25); font-size: 13px; }
.shop-row span:first-child { flex: 1; }
.hire-row { padding: 10px 6px; }
.qt-side { margin-top: 4px; font-size: 11px; color: #8fd8a8; text-shadow: 0 1px 1px #000; }

/* ---------- 设置音量滑条 ---------- */
.set-sec { font-size: 12px; color: #9a8a68; margin: 8px 0 2px; letter-spacing: 2px; }
.vol-slider { width: 150px; accent-color: #c8a040; }

/* ---------- 区域章节锁 ---------- */
.zone-opt.zlocked { opacity: .5; }
.zone-opt.zlocked:hover { border-color: #3a2c18; }
.zo-lock { font-size: 11px; color: #ff9a6a; margin-left: 8px; }

/* ===== 物品跨格覆盖层 / 拖拽 / 铁匠铺分页 / 套装 ===== */
.bag-item { position: absolute; box-sizing: border-box; border-radius: 5px; border: 1px solid #6a5430;
  background: linear-gradient(160deg, rgba(38,28,16,.92), rgba(18,13,8,.92)); cursor: grab; z-index: 2; overflow: visible; }
.bag-item:hover { border-color: #c8a050; box-shadow: 0 0 10px rgba(230,180,90,.35); z-index: 3; }
.bag-item.sel { border-color: #ffd76a; box-shadow: 0 0 12px rgba(255,215,106,.55); }
.bag-item .bname { position: absolute; left: 4px; top: 1px; right: 3px; font-size: 10px; color: #d8c8a0;
  text-shadow: 0 1px 2px #000, 0 0 4px #000; pointer-events: none; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.bag-item.q-legendary { border-color: #a86428; } .bag-item.q-unique { border-color: #8a6a38; }
.bag-item.q-rare { border-color: #9a8428; } .bag-item.q-magic { border-color: #4a5a9a; }
.bag-item.q-set { border-color: #2e9e5b; }
.inv-cell.q-set { border-color: #2e9e5b; box-shadow: inset 0 0 10px rgba(74,222,128,.25); }
.bag-cell-hover { background: rgba(140,190,120,.28) !important; }
.drag-ghost { position: fixed; z-index: 2000; pointer-events: none; opacity: .92;
  border: 1px solid #c8a050; border-radius: 5px; background: rgba(24,18,10,.9);
  box-shadow: 0 8px 18px rgba(0,0,0,.6); }
.drag-ghost.drop-ok { border-color: #8fe87f; box-shadow: 0 0 14px rgba(120,230,120,.5); }
.drag-ghost.drop-bad { border-color: #ff7a6a; box-shadow: 0 0 14px rgba(255,110,90,.5); }
.set-strip { flex-basis: 100%; box-sizing: border-box; margin-bottom: 2px; padding: 6px 10px; font-size: 12px;
  background: rgba(30,60,35,.18); border: 1px solid rgba(74,222,128,.3); border-radius: 5px; }
.set-strip .strip-title { display: none; }
.set-line { display: inline-block; margin-right: 18px; }
.set-line b { margin-right: 6px; }
.set-parts span { margin-right: 10px; font-size: 11px; }
.set-on { color: #4ade80; } .set-off { color: #5a6a56; }
.set-none { color: #5a6a56; font-size: 11px; }
.it-setline { margin: 4px 0 2px; font-weight: bold; }
.it-setbonus { font-size: 12px; }
.it-hint { color: #7a6a4c; font-size: 11px; }
.tab-row { display: flex; gap: 6px; margin-bottom: 10px; }
.tab-btn { flex: 1; padding: 8px 0; background: #241a0e; border: 1px solid #4a3a20; border-radius: 4px;
  color: #c8b088; cursor: pointer; font-size: 13px; }
.tab-btn:hover { border-color: #8a6430; color: #e8d0a0; }
.tab-btn.on { background: #3a2a14; color: #ffd76a; border-color: #8a6430; }
.mats-line { padding: 6px 10px; margin-bottom: 8px; background: rgba(20,30,45,.4);
  border: 1px solid #3a4a5a; border-radius: 4px; font-size: 13px; }
.tab-note { color: #8a7a58; font-size: 12px; margin: 4px 0 8px; }
.craft-row { align-items: flex-start; }
.craft-desc { color: #9a8a68; font-size: 11px; }
.craft-cost { color: #c8a860; font-size: 11px; margin-top: 2px; }
.gp-empty { opacity: .45; }

/* ===== 物品悬停提示框 / 人物属性面板 / 装备差分 / 镶嵌弹窗 ===== */
#item-tip { display: none; position: fixed; z-index: 2500; max-width: 330px; padding: 10px 12px;
  background: linear-gradient(170deg, rgba(22,16,9,.97), rgba(12,9,5,.97));
  border: 1px solid #6a5430; border-radius: 6px; box-shadow: 0 10px 26px rgba(0,0,0,.65);
  font-size: 12px; line-height: 1.7; pointer-events: none; }
.char-stats { font-size: 12px; line-height: 1.7; }
.cs-sec { margin: 10px 0 4px; padding-bottom: 3px; color: #e8c86a; font-weight: bold;
  border-bottom: 1px solid rgba(140,110,60,.35); }
.cs-row { display: flex; justify-content: space-between; }
.cs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.cs-cell { display: flex; justify-content: space-between; }
.cs-cell span, .cs-row span { color: #9a8a68; }
.cs-cell b, .cs-row b { color: #e8dcc0; font-weight: normal; }
/* 悬停装备时：变化直接并入原属性行 */
.cs-row.up b, .cs-cell.up b { color: #8fe87f; }
.cs-row.down b, .cs-cell.down b { color: #ff8a6a; }
#socket-modal { position: fixed; inset: 0; z-index: 2400; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center; }
.socket-box { width: 460px; max-height: 80vh; overflow: auto; padding: 14px 16px;
  background: linear-gradient(170deg, #241a0e, #171008); border: 1px solid #8a6430; border-radius: 8px; }

/* ===== AI 素材接入：对话框立绘 / 雇佣头像 ===== */
.dialog-box { display: flex; align-items: stretch; gap: 0; }
.dlg-portrait { width: 158px; height: calc(100% + 30px); margin: -16px 12px -14px -20px;
  object-fit: cover; object-position: top 50% 0; border-right: 1px solid #6a5430;
  border-radius: 6px 0 0 6px; flex: 0 0 auto; background: #14100a; filter: saturate(.92); }
.dlg-main { flex: 1; min-width: 0; }
.hire-face { width: 52px; height: 52px; object-fit: cover; object-position: top; border-radius: 5px;
  border: 1px solid #6a5430; background: #14100a; flex: 0 0 auto; }
.hire-row { display: flex; align-items: center; }

/* ===== T-053 存档导出/导入文本框（设置面板） ===== */
.save-io { display: none; width: 100%; height: 58px; margin: 6px 0 2px; padding: 6px 8px;
  background: #14100a; color: #d8c9a3; border: 1px solid #6a5430; border-radius: 5px;
  font: 11px/1.4 Consolas, monospace; resize: none; }
