/* 《修仙传 Online · 2D 联机版》页游风 UI */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: #14100d;
  color: #f0e3c8;
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  font-size: 14px;
  user-select: none;
}
.hidden { display: none !important; }
#game { position: fixed; inset: 0; }
#cv { position: absolute; inset: 0; display: block; cursor: crosshair; }

/* ============ 登录 ============ */
#login {
  position: fixed; inset: 0; z-index: 200;
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(120,86,44,.30), transparent 65%),
    radial-gradient(700px 420px at 85% 100%, rgba(120,90,30,.18), transparent 60%),
    #14100d;
  display: flex; align-items: center; justify-content: center;
}
.login-box { text-align: center; width: min(520px, 92vw); }
.login-logo {
  font-size: 46px; letter-spacing: 6px;
  background: linear-gradient(180deg, #f8ecc8 15%, #e8c45a 45%, #a8842a 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 26px rgba(201,162,39,.45));
  animation: logoFloat 4.5s ease-in-out infinite;
}
@keyframes logoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.login-logo span { font-size: 19px; color: #c9a227; margin-left: 10px; letter-spacing: 2px; }
.login-sub { margin-top: 12px; color: #b39a72; letter-spacing: 4px; }
.invite-note { margin-top: 18px; color: #f0d98c; min-height: 20px; }
.login-row { margin-top: 30px; display: flex; gap: 10px; justify-content: center; }
.login-row input {
  width: 240px; padding: 11px 14px; border-radius: 8px; text-align: center;
  background: #241a12; border: 1px solid #6b5330; color: #f0e6c8;
  font-family: inherit; font-size: 16px; letter-spacing: 2px; outline: none;
}
.login-row input:focus { border-color: #c9a227; box-shadow: 0 0 12px rgba(201,162,39,.25); }
.login-row + .login-row { margin-top: 14px; }
.pick-title { margin-top: 26px; font-size: 20px; letter-spacing: 6px; color: #f0e6c8; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.dao-row input.dao-input { flex: 1 1 auto; text-align: center; letter-spacing: 2px; }
.pg-btn.dice {
  width: 46px; flex: 0 0 46px; font-size: 17px; letter-spacing: 0; color: #f0e6c8;
  background: linear-gradient(180deg, #4a3a22, #2a2013); border: 1px solid #8a6a2a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 3px 8px rgba(0,0,0,.5);
}
.pg-btn.dice:hover { border-color: #e8c45a; color: #fff2c8; }
.pg-btn.dice:active { transform: translateY(1px) rotate(-8deg); }
.login-error { margin-top: 12px; color: #e88a8a; min-height: 20px; }
.login-info { margin-top: 6px; color: #b39a72; font-size: 13px; }
.login-tip { margin-top: 34px; color: #7a6a52; font-size: 12px; letter-spacing: 1px; }

/* ============ 通用按钮 ============ */
.pg-btn {
  padding: 6px 14px; border-radius: 7px; cursor: pointer;
  background: linear-gradient(#382f22, #2a2018);
  border: 1px solid #6b5330; color: #e0d0ae;
  font-family: inherit; font-size: 14px; transition: all .15s ease;
}
.pg-btn:hover:not(:disabled) { border-color: #c9a227; color: #f4ecd2; box-shadow: 0 0 10px rgba(201,162,39,.25); }
.pg-btn:disabled { opacity: .42; cursor: not-allowed; }
.pg-btn.primary { border-color: #8a7a2e; color: #f0d98c; background: linear-gradient(#2c2a1d, #1f1d14); }
.pg-btn.danger { border-color: #7a3a28; color: #f0b090; background: linear-gradient(#2c211d, #201714); }
.pg-btn.big { padding: 11px 26px; font-size: 16px; letter-spacing: 3px; }
.pg-btn.xs { padding: 3px 10px; font-size: 12px; }

/* ============ HUD ============ */
.pg-hud {
  position: absolute; z-index: 10;
  background: linear-gradient(rgba(36,26,16,.88), rgba(27, 21, 14,.88));
  border: 1px solid #4c402f; border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(4px);
  pointer-events: auto;
}
.pg-hud::before {
  content: ''; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,162,39,.45), transparent);
  pointer-events: none;
}
/* 左侧纵列：角色信息 / 世界妖王 / 任务追踪，走文档流堆叠，彼此不会遮挡 */
#hud-left {
  position: absolute; left: 10px; top: 10px; width: 300px; z-index: 10;
  display: flex; flex-direction: column; gap: 8px;
}
#hud-left > .pg-hud { position: static; width: 100%; }
#hud-tl { padding: 10px 12px; }
.hud-row1 { display: flex; align-items: center; gap: 10px; }
.pg-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: 0 0 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #f0e6c8; background: #2a2018;
  border: 2px solid #6b5330;
}
.elem-金 { border-color: #e8c45a; box-shadow: 0 0 14px rgba(232,196,90,.35) inset, 0 0 8px rgba(232,196,90,.3); }
.elem-木 { border-color: #5fc06a; box-shadow: 0 0 14px rgba(107,196,124,.3) inset, 0 0 8px rgba(107,196,124,.25); }
.elem-水 { border-color: #7fc9b4; box-shadow: 0 0 14px rgba(127,201,180,.3) inset, 0 0 8px rgba(127,201,180,.25); }
.elem-火 { border-color: #e8704a; box-shadow: 0 0 14px rgba(232,112,74,.3) inset, 0 0 8px rgba(232,112,74,.25); }
.elem-土 { border-color: #c8a05a; box-shadow: 0 0 14px rgba(200,160,90,.3) inset, 0 0 8px rgba(200,160,90,.25); }
.hud-id { flex: 1; min-width: 0; }
.hud-line1 { display: flex; align-items: center; gap: 8px; }
#hud-name { font-size: 17px; color: #f0e6c8; letter-spacing: 1px; }
.hud-line2 { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.realm { color: #f0d98c; font-size: 13px; }
.elems { display: flex; gap: 4px; }
.elem-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1px solid #00000055; }
.elem-dot.elem-金 { background: #e8c45a; }
.elem-dot.elem-木 { background: #5fc06a; }
.elem-dot.elem-水 { background: #7fc9b4; }
.elem-dot.elem-火 { background: #e8704a; }
.elem-dot.elem-土 { background: #c8a05a; }
.hud-stone { text-align: center; color: #c9a227; }
.hud-stone b { display: block; color: #f0d98c; font-size: 15px; }
.coin {
  display: inline-block; width: 20px; height: 20px; line-height: 20px; border-radius: 50%;
  background: #4a3a10; border: 1px solid #c9a227; color: #f0d98c; font-size: 11px;
}
.bar {
  position: relative; height: 15px; border-radius: 8px; background: #241a12;
  overflow: hidden; border: 1px solid #453321; margin-top: 5px;
}
.bar i { display: block; height: 100%; transition: width .2s ease; position: relative; }
.bar i::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.02) 55%);
  pointer-events: none;
}
.bar span {
  position: absolute; inset: 0; text-align: center; font-size: 10.5px; line-height: 15px;
  color: #f7ecd4; text-shadow: 0 1px 2px rgba(0,0,0,.9); letter-spacing: .5px;
}
.bar.hp i { background: linear-gradient(90deg, #7c2f2a, #c05a4a); }
.bar.mp i { background: linear-gradient(90deg, #2f5a4e, #5fb3a0); }
.bar.exp i { background: linear-gradient(90deg, #7c6a1f, #d4af37); }
#break-box { margin-top: 8px; text-align: center; }
#break-btn { width: 100%; padding: 7px 0; letter-spacing: 8px; font-size: 15px; }
.pulse { animation: pulse 1.4s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(240,144,96,.35); }
  50% { box-shadow: 0 0 20px rgba(240,144,96,.85); }
}

#hud-tr { top: 10px; right: 10px; padding: 8px 10px; width: max-content; max-width: 300px; }
.map-line { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
#hud-map { color: #f0e6c8; letter-spacing: 1px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hud-online, #hud-ping { flex: 0 0 auto; }
.dim { color: #b39a72; font-size: 11.5px; }
#minimap { display: block; width: 100%; min-width: 176px; aspect-ratio: 176 / 126; height: auto; border-radius: 6px; border: 1px solid #453321; }
#world-map-btn { flex: 1 1 auto; }
.hud-tr-btns { display: flex; gap: 6px; margin-top: 5px; }
#fold-btn { flex: 0 0 auto; }
.world-map-canvas { display: block; width: 100%; max-width: 960px; aspect-ratio: 960 / 800; max-height: calc(94vh - 150px); height: auto; margin: 0 auto; border-radius: 8px; border: 1px solid #3a2a1a; background: #141210; }

#right-btns {
  position: absolute; right: 10px; top: 218px; z-index: 101;
  display: grid; grid-template-columns: repeat(2, 46px); gap: 9px;
}
/* 法器牌：厚边 + 落地投影 + 内高光，按下整块下沉 */
.rb {
  position: relative; width: 46px; height: 46px; border-radius: 11px; cursor: pointer;
  font-family: inherit; font-size: 19px; color: #e7d9b4;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 42%),
    radial-gradient(120% 90% at 50% 12%, #5b4e39 0%, #3a3023 46%, #251d15 100%);
  border: 1px solid #7a6a4e;
  box-shadow:
    0 5px 0 #17120d,
    0 9px 16px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -6px 10px rgba(0, 0, 0, .45);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .7);
  transition: transform .09s ease, box-shadow .12s ease, color .15s ease;
}
.rb::after {
  content: ''; position: absolute; inset: 3px; border-radius: 8px; pointer-events: none;
  border: 1px solid rgba(201, 162, 39, .26);
}
.rb:hover {
  color: #ffe9b0; transform: translateY(-1px);
  box-shadow: 0 6px 0 #17120d, 0 11px 20px rgba(0, 0, 0, .6),
    inset 0 1px 0 rgba(255, 255, 255, .26), inset 0 -6px 10px rgba(0, 0, 0, .45),
    0 0 16px rgba(201, 162, 39, .35);
}
.rb:active, .rb.on {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #17120d, 0 2px 6px rgba(0, 0, 0, .5), inset 0 2px 8px rgba(0, 0, 0, .6);
}
.rb.on { color: #ffe9b0; border-color: #c9a227; }

#quest-track { padding: 9px 12px; }
.qt-title { color: #f0d98c; font-size: 13px; letter-spacing: 1px; }
.qt-prog { color: #a6d8c0; font-size: 12px; margin-top: 4px; }
.qt-area { color: #b39a72; font-size: 11.5px; margin-top: 3px; }
.qt-nav { margin-top: 7px; padding-top: 6px; border-top: 1px dashed #453321; color: #8fd8c4; font-size: 12px; display: flex; gap: 6px; align-items: center; justify-content: space-between; }

/* 世界妖王卡（左侧纵列，角色信息下方） */
.wboss-box { padding: 8px 10px; text-align: center; background: linear-gradient(rgba(32,14,18,.9), rgba(20,10,14,.9)); border-color: #5a2a33; }
.wboss-box .wb-tag { font-size: 11px; color: #e0a8a8; letter-spacing: 1px; }
.wboss-box .wb-name { font-size: 14px; color: #ffd27a; margin: 2px 0; text-shadow: 0 0 10px rgba(220,80,60,.45); }
.wboss-box .wb-loc { font-size: 11.5px; color: #c8b090; margin-bottom: 5px; }
.wboss-box .wb-cd { font-size: 17px; color: #f0e6c8; font-variant-numeric: tabular-nums; }

/* ============ 聊天 ============ */
#chatbox { left: 10px; bottom: 10px; width: 340px; height: 196px; display: flex; flex-direction: column; padding: 6px 8px; }
#chat-tabs { display: flex; gap: 6px; margin-bottom: 4px; }
.ctab {
  background: none; border: none; color: #b39a72; cursor: pointer;
  font-family: inherit; font-size: 12.5px; padding: 2px 8px; border-radius: 6px;
}
.ctab.active { color: #f0d98c; background: rgba(201,162,39,.12); }
#chat-log { flex: 1; overflow-y: auto; font-size: 12.5px; line-height: 1.7; }
.cl { color: #e8cb98; word-break: break-all; }
.cl b { color: #9fd8c6; }
.cl.mine b { color: #f0d98c; }
.cl.near b { color: #9fe8b0; }
.cl.sys { color: #c2a87f; }
.cl.sys.gold { color: #f0d98c; }
.cl.sys.purple { color: #c8a0e8; }
.cl.sys.green { color: #96d6b8; }
.cl.sys.warn { color: #f0a184; }
/* 聊天里的可点击目标（点击自动寻路前往） */
.cl-go {
  color: #ffe08a; cursor: pointer; font-weight: 600;
  text-decoration: underline dotted #c9a227; text-underline-offset: 3px;
}
.cl-go:hover { color: #fff2c0; text-shadow: 0 0 10px rgba(255, 224, 138, .6); }
.chat-input-row { display: flex; gap: 6px; margin-top: 5px; }
#chat-input {
  flex: 1; background: #1f1811; border: 1px solid #453321; border-radius: 6px;
  color: #f0e3c8; padding: 5px 9px; font-family: inherit; font-size: 12.5px; outline: none;
}
#chat-input:focus { border-color: #c9a227; }

/* ============ 技能栏 ============ */
#skillbar {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  z-index: 10; display: flex; gap: 8px; align-items: flex-end;
}
.slot {
  position: relative; width: 62px; height: 62px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(#382e21, #271f16);
  border: 1px solid #6b5330; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 3px 10px rgba(0,0,0,.4);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; transition: all .12s ease;
}
.slot:hover { border-color: #c9a227; box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 0 14px rgba(201,162,39,.35); }
.slot:active { transform: scale(.94); }
.slot b { font-size: 12.5px; color: #f7ecd4; font-weight: 500; line-height: 1.25; }
.slot small { font-size: 10px; color: #b39a72; margin-top: 2px; }
.slot .cd {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0%;
  background: rgba(18,13,9,.72); pointer-events: none; transition: height .1s linear;
}
.slot.atk { border-color: #6a5530; }
.slot.pot { border-color: #574b37; }
.slot.auto.on { border-color: #4f9a80; background: linear-gradient(#352c20, #271f16); }
.slot.auto.on b { color: #96d6b8; }
.slot.rest { border-color: #5e503b; }
.slot.empty { opacity: .6; cursor: default; }
.slot.skill .ic { display: block; width: 30px; height: 30px; margin-bottom: 1px; }
.slot.skill .ic canvas { display: block; width: 30px; height: 30px; }
.slot.skill.gap { opacity: .45; border-style: dashed; cursor: default; }
.slot.drop-hi { border-color: #ffd87a; box-shadow: 0 0 0 2px rgba(232,196,90,.5), 0 0 18px rgba(232,196,90,.5); opacity: 1; }

/* 功法面板：技能栏格 + 功法图标网格 */
.sk-bar { display: flex; gap: 8px; margin: 8px 0 4px; flex-wrap: wrap; }
.sk-slot {
  position: relative; width: 62px; height: 66px; border-radius: 10px;
  background: linear-gradient(#332a1e, #241c14); border: 1px solid #6b5330;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; text-align: center;
}
.sk-slot em { position: absolute; left: 4px; top: 2px; font-style: normal; font-size: 10px; color: #b39a72; }
.sk-slot b { font-size: 11px; line-height: 1.2; color: #f0e3c8; }
.sk-slot .ic canvas { display: block; width: 34px; height: 34px; }
.sk-slot.gap { border-style: dashed; opacity: .55; }
.sk-slot.sel { border-color: #ffd87a; box-shadow: 0 0 0 2px rgba(232,196,90,.45), 0 0 14px rgba(232,196,90,.4); opacity: 1; }
.sk-slot.dragging, .sk-cell.dragging { opacity: .35; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.sk-cell {
  position: relative; padding: 8px 6px 7px; border-radius: 11px; text-align: center; cursor: pointer;
  background: linear-gradient(#2c2519, #1d1811); border: 1px solid #5b462a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.sk-cell:hover { border-color: #c9a227; box-shadow: 0 0 12px rgba(201,162,39,.28); }
.sk-cell.on { border-color: #4f9a80; }
.sk-cell .ic canvas { display: block; width: 42px; height: 42px; margin: 0 auto; }
.sk-cell b { display: block; font-size: 12px; color: #f0e3c8; margin-top: 3px; }
.sk-cell small { display: block; font-size: 10.5px; color: #b39a72; margin-top: 1px; }
.sk-cell .key { position: absolute; right: 5px; top: 3px; font-style: normal; font-size: 10px; color: #96d6b8; }
.sk-ops { display: flex; gap: 4px; justify-content: center; margin-top: 5px; flex-wrap: wrap; }

/* ============ 公告 / 弹窗 / 提示 ============ */
.pg-announce {
  position: absolute; top: 12%; left: 50%; transform: translateX(-50%) translateY(-16px);
  z-index: 40; padding: 8px 26px; border-radius: 24px;
  background: rgba(36, 28, 20,.92); border: 1px solid #8a7a2e;
  color: #f0d98c; letter-spacing: 1px; opacity: 0; pointer-events: none;
  transition: all .3s ease; white-space: nowrap; max-width: 90vw; overflow: hidden;
}
.pg-announce.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.pg-announce.break, .pg-announce.boss { border-color: #7a3a28; color: #f0b090; }
.pg-announce.admin { border-color: #8a7a2e; color: #f0d98c; }
.pg-announce.level { border-color: #4f9a80; color: #96d6b8; }
#modal {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(16,12,8,.66); display: flex; align-items: center; justify-content: center;
}
.pg-modal {
  width: min(440px, 92vw); background: #271f16; border: 1px solid #6b5330; border-radius: 12px;
  padding: 18px 20px; box-shadow: 0 24px 70px rgba(0,0,0,.65); animation: pop .18s ease;
}
/* 宽版弹窗（世界地图等大幅面内容）：横版、超高时可滚动 */
.pg-modal.wide { width: min(1160px, 96vw); max-height: 94vh; overflow-y: auto; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.pg-modal-title, .pg-win-title { text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.pg-modal-title { font-size: 17px; color: #f0e6c8; letter-spacing: 2px; margin-bottom: 10px; }
.pg-modal-body { color: #d3bd94; font-size: 14px; line-height: 1.9; }
.pg-modal-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.break-opt { display: block; width: 100%; margin-bottom: 8px; text-align: left; }
.break-opt small { display: block; margin-top: 2px; font-size: 11px; letter-spacing: 0; }
.warn-txt { color: #e5825f; }
#toasts { position: fixed; right: 128px; bottom: 120px; z-index: 130; display: flex; flex-direction: column; gap: 8px; max-width: 330px; }
.pg-toast {
  background: rgba(39, 31, 22,.96); border: 1px solid #6b5330; border-left: 3px solid #c2a87f;
  border-radius: 8px; padding: 9px 13px; font-size: 13px; color: #f0e3c8;
  box-shadow: 0 8px 24px rgba(0,0,0,.55); animation: slideIn .2s ease; transition: opacity .4s, transform .4s;
}
.pg-toast.ok { border-left-color: #4f9a80; }
.pg-toast.warn { border-left-color: #c9a227; }
.pg-toast.out { opacity: 0; transform: translateX(20px); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
#death { position: fixed; inset: 0; z-index: 90; background: rgba(30,6,6,.45); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.death-box { text-align: center; }
.death-title { font-size: 34px; letter-spacing: 12px; color: #f0a184; text-shadow: 0 0 30px rgba(200,60,60,.5); }
.death-sub { margin-top: 10px; color: #d8b0b0; letter-spacing: 2px; }

/* ============ 功能窗口（独立小窗 · 木框铜角拟物） ============ */
#windows { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.pg-win {
  position: absolute; width: min(430px, 92vw); max-height: 78vh;
  display: flex; flex-direction: column; pointer-events: auto;
  background: linear-gradient(168deg, #30281c, #221b13 72%);
  border: 1px solid #6b5a3e; border-radius: 12px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .62), inset 0 1px 0 rgba(255, 255, 255, .07);
  animation: pop .16s ease;
}
.pg-win::before {
  content: ''; position: absolute; inset: 0; border-radius: 12px; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, .16);
}
.pg-win-head {
  display: flex; align-items: center; gap: 8px; padding: 9px 11px; cursor: move;
  border-radius: 11px 11px 0 0; border-bottom: 1px solid #55492c;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, #3a3222, #241f14);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .35);
  user-select: none; flex: 0 0 auto;
}
.pg-win-title { color: #f0d98c; font-size: 14.5px; letter-spacing: 3px; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.pg-win-grip { flex: 1; height: 3px; margin: 0 6px; border-radius: 2px; background: linear-gradient(90deg, rgba(201, 162, 39, .5), rgba(201, 162, 39, .05)); }
.pg-win-close {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer; flex: 0 0 22px;
  border: 1px solid #6a5a34; color: #e0cf9a; font-size: 12px; line-height: 1; font-family: inherit;
  background: radial-gradient(circle at 34% 28%, #6a5a34, #2a2415 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 2px 4px rgba(0, 0, 0, .5);
}
.pg-win-close:hover { color: #fff; border-color: #a03a3a; background: radial-gradient(circle at 34% 28%, #7a3a28, #3a1a15 70%); }
.pg-win-body { padding: 10px 14px 14px; overflow-y: auto; }
.sec-title {
  color: #f0d98c; font-size: 14px; letter-spacing: 2px; margin: 12px 0 6px;
  border-left: 3px solid #c9a227; padding-left: 8px;
  display: flex; align-items: center; gap: 10px;
}
.sec-title:first-child { margin-top: 0; }
/* 背包格子（图标 + 数量 + 品质边框，拟物凹槽） */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; }
.equip-grid { margin-bottom: 4px; }
.inv-cell {
  position: relative; aspect-ratio: 1 / 1; border-radius: 10px; cursor: pointer;
  background: radial-gradient(120% 100% at 50% 15%, #382f22 0%, #261e15 60%, #17120d 100%);
  border: 1px solid #544835;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .6), inset 0 -1px 0 rgba(255, 255, 255, .05), 0 2px 5px rgba(0, 0, 0, .4);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  transition: transform .1s ease, box-shadow .12s ease;
}
.inv-cell:hover { transform: translateY(-2px); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .5), 0 6px 14px rgba(0, 0, 0, .55), 0 0 12px rgba(201, 162, 39, .28); }
.inv-cell:active { transform: translateY(1px); }
.inv-cell .ic { display: block; width: 84%; height: 84%; }
.inv-cell .ic canvas { display: block; width: 100%; height: 100%; }
.inv-cell .ct {
  position: absolute; right: 3px; bottom: 2px; font-size: 11px; font-style: normal;
  color: #ffe9b0; text-shadow: 0 1px 2px #000, 0 0 4px #000;
}
.inv-cell .badge {
  position: absolute; left: 3px; top: 2px; font-size: 10px; font-style: normal; padding: 0 3px;
  border-radius: 4px; color: #17120d; background: #d9b45a; text-shadow: none;
}
.inv-cell.blank { cursor: default; border-style: dashed; }
.inv-cell.blank .hole { color: #75654b; font-size: 12px; font-style: normal; letter-spacing: 1px; }
.inv-cell.q0 { border-color: #7a6a52; }
.inv-cell.q1 { border-color: #58a894; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .6), 0 0 9px rgba(79, 154, 176, .3); }
.inv-cell.q2 { border-color: #9a6fd0; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .6), 0 0 10px rgba(154, 111, 208, .34); }
.inv-cell.q3 { border-color: #e0b24a; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .6), 0 0 13px rgba(224, 178, 74, .42); }

/* 与身上装备的属性对比角标 */
.inv-cell .dv {
  position: absolute; right: 2px; top: 2px; width: 16px; height: 16px; line-height: 16px;
  text-align: center; font-size: 11px; font-weight: 700; font-style: normal;
  border-radius: 50%; text-shadow: none;
}
.inv-cell .dv.good { color: #1a140d; background: #6ee28a; box-shadow: 0 0 9px rgba(110, 226, 138, .65); }
.inv-cell .dv.bad { color: #2a0606; background: #ff8a7a; box-shadow: 0 0 9px rgba(255, 138, 122, .6); }
.inv-cell .dv.mix { color: #241a02; background: #f0c96a; box-shadow: 0 0 9px rgba(240, 201, 106, .6); }
.inv-cell .ct.poor { color: #ff9a8a; }
.inv-cell .own {
  position: absolute; left: 4px; bottom: 2px; font-size: 10.5px; font-style: normal;
  color: #a6d8c0; text-shadow: 0 1px 2px #000;
}
.inv-cell.shop { cursor: copy; }

/* 右键菜单 */
.tip {
  position: fixed; z-index: 200; max-width: 292px; pointer-events: none;
  background: linear-gradient(160deg, rgba(51, 42, 30,.98), rgba(27, 21, 14,.98));
  border: 1px solid #6b5a3e; border-radius: 10px; padding: 10px 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08);
  font-size: 12.5px; color: #f5d7a1; line-height: 1.55;
}
.tip.hidden { display: none; }
.tip-h { display: flex; align-items: baseline; gap: 8px; border-bottom: 1px solid #544734; padding-bottom: 6px; margin-bottom: 6px; }
.tip-h b { font-size: 15px; letter-spacing: 1px; }
.tip-h span { color: #c2a87f; font-size: 11.5px; margin-left: auto; }
.tip-b { margin-bottom: 5px; }
.tip-b b { color: #f0e6c8; }
.tip-b i { color: #b39a72; font-style: normal; font-size: 11.5px; }
.tip-r { display: flex; gap: 10px; }
.tip-r span { color: #c2a87f; }
.tip-r b { margin-left: auto; color: #f5ead2; font-weight: 600; }
.tip-r b.warn { color: #e5825f; }
.tip-delta { margin: 5px 0; padding: 4px 7px; border-radius: 6px; background: rgba(79,154,128,.16); border: 1px solid rgba(79,154,128,.4); color: #9fdfc0; }
.tip-delta.bad { background: rgba(160,70,60,.16); border-color: rgba(190,90,74,.45); color: #f0a89a; }
.tip-delta.mix { background: rgba(180,150,60,.14); border-color: rgba(201,162,39,.42); color: #f0d98c; }
.tip-desc { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #4d4130; color: #b9a279; font-style: italic; }
.tip-key { margin-top: 5px; color: #867456; font-size: 11px; }
.tip .dim { color: #b39a72; }

.ctx {
  position: fixed; z-index: 160; min-width: 158px; padding: 5px;
  background: linear-gradient(168deg, #352c20, #221b13 75%);
  border: 1px solid #7a6a4e; border-radius: 9px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .66), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.ctx-title {
  color: #f0d98c; font-size: 12.5px; letter-spacing: 1px; padding: 4px 8px 6px;
  border-bottom: 1px solid #4b3a26; margin-bottom: 4px;
}
.ctx-i {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: none; border: none; border-radius: 6px; padding: 6px 8px;
  color: #e0d0ae; font-family: inherit; font-size: 13px;
}
.ctx-i:hover { background: rgba(201, 162, 39, .16); color: #ffe9b0; }
.item-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px dashed #392f22;
}
.item-row:last-child { border-bottom: none; }
.item-info { flex: 1; min-width: 0; }
.item-desc { color: #b39a72; font-size: 12px; }
.cnt { color: #d3bd94; margin-left: 6px; font-size: 12px; }
.row { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.hint { color: #c2a87f; font-size: 13px; margin: 6px 0; line-height: 1.8; }
.gold { color: #f0d98c; }
.owned { color: #96d6b8; font-size: 12px; }
.q0 { color: #ddc291; }
.q1 { color: #86cbb4; }
.q2 { color: #c8a0e8; }
.q3 { color: #f0d98c; }
.mats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.mat { font-size: 12px; padding: 2px 8px; border-radius: 5px; border: 1px solid #453321; }
.mat.have { color: #96d6b8; border-color: #493e2d; }
.mat.lack { color: #d97a5f; border-color: #4a2f2f; }
.mat-src { font-size: 12.5px; line-height: 1.9; }
.mat-src b { color: #f0e3c8; }
.invite-url {
  margin-top: 6px; padding: 8px 10px; background: #1d1710; border: 1px dashed #6b5330;
  border-radius: 6px; color: #9fd8c6; font-size: 12.5px; word-break: break-all; user-select: text;
}
.end-text { color: #d3bd94; line-height: 2.1; }

@media (max-width: 820px) {
  #hud-left { width: 240px; }
  #chatbox { width: 280px; height: 150px; }
  #quest-track { display: none; }
  .slot { width: 54px; height: 54px; }
  .cls-grid, .attr-grid { grid-template-columns: 1fr; }
}

/* ============ 参考官网资料新增：职业 / 队伍 / 加点 / 排行榜 ============ */
.tag.cls { color: #c8a0e8; border-color: #574b37; }
#party-bar {
  left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 10;
  display: flex; gap: 12px; align-items: center; padding: 5px 14px;
}
#party-bar .pt-title { color: #f0d98c; font-size: 12px; letter-spacing: 2px; }
#party-bar .pt-m { color: #f6d8a2; font-size: 12.5px; }
#party-bar .pt-m i { color: #c2a87f; font-size: 10px; margin-left: 4px; font-style: normal; }
.cls-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.cls-card {
  border: 1px solid #453321; border-radius: 10px; padding: 10px 12px;
  background: rgba(44,33,20,.6); display: flex; flex-direction: column; gap: 6px;
}
.cls-card:hover { border-color: #c9a227; }
.cls-card .pg-btn { margin-top: auto; }
.cls-name { font-size: 17px; color: #f0d98c; letter-spacing: 2px; }
.cls-weapon { color: #d3bd94; font-size: 12px; }
.cls-desc { color: #c2a87f; font-size: 12px; line-height: 1.7; min-height: 60px; }
.cls-br { color: #c8a0e8; font-size: 11.5px; }
.attr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.attr-item { border: 1px solid #453321; border-radius: 10px; padding: 8px 10px; background: rgba(44,33,20,.5); }
.ai-name { color: #f0e6c8; display: flex; justify-content: space-between; font-size: 14px; }
.ai-name span { color: #f0d98c; }

/* 属性面板：境界 / 战斗属性 / 当前装备 */
.lv-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lv-now { color: #f0d98c; font-size: 21px; letter-spacing: 2px; text-shadow: 0 0 14px rgba(240,217,140,.35); }
.lv-meta { color: #d3bd94; font-size: 12.5px; margin-top: 4px; line-height: 1.8; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; margin-top: 6px; }
.stat-cell {
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px;
  padding: 7px 10px; border-radius: 8px; border: 1px solid #4b3a26;
  background: linear-gradient(160deg, rgba(58,44,26,.7), rgba(36,26,16,.7));
}
.stat-cell .sc-k { color: #c2a87f; font-size: 12.5px; }
.stat-cell .sc-v { color: #f0e6c8; font-size: 15px; }
.eq-line { padding: 7px 10px; border-radius: 8px; border: 1px solid #4b3a26; background: rgba(44,33,20,.5); margin-top: 6px; }
.eq-line .eq-slot { color: #c2a87f; font-size: 12px; margin-right: 8px; border: 1px solid #5a452c; border-radius: 5px; padding: 1px 6px; }
.eq-line .eq-tag { color: #b39a72; font-size: 11.5px; margin-left: 8px; }
.eq-line .eq-stat { color: #a6d8c0; font-size: 12.5px; margin-top: 4px; }
.root-card { padding: 8px 11px; border-radius: 8px; border: 1px solid #5a452c; background: rgba(44,33,20,.5); display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.root-card b { font-size: 15px; letter-spacing: 1px; }
.root-card span { color: #cfe0d6; font-size: 12.5px; }
.root-card .hint { flex-basis: 100%; }
.counter { margin-top: 7px; padding: 7px 11px; border-radius: 8px; background: rgba(36, 29, 20,.55); border: 1px dashed #52402a; color: #e6d9a8; font-size: 13px; letter-spacing: 1px; }
.counter .dim { display: block; margin-top: 3px; letter-spacing: 0; }
.exp-hint { color: #c2a87f; font-size: 11.5px; margin-top: 4px; line-height: 1.5; }
.eq-ops { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.ai-eff { color: #c2a87f; font-size: 11.5px; margin: 4px 0 6px; line-height: 1.6; }
.rank-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.rank-table th, .rank-table td { padding: 6px 10px; text-align: left; font-size: 13px; border-bottom: 1px solid #332a1e; }
.rank-table th { color: #c2a87f; font-weight: 500; background: #282117; }
.rank-table tr.self td { color: #f0d98c; }

/* ============ 视觉精修：仙侠质感（登录 / HUD / 面板 / 技能栏 / NPC） ============ */
body { background: #120d08; }

/* 画面暗角，聚焦中心 */
#game::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: radial-gradient(120% 80% at 50% 45%, rgba(0,0,0,0) 55%, rgba(0,0,0,.42) 100%);
}
#cv { z-index: 0; }
.pg-hud, #skillbar, #right-btns, #chatbox, #party-bar, #quest-track, #announce { z-index: 10; }
/* 世界地图打开期间隐藏 HUD 框架（body.wm-open 由 ui.js 切换），避免按钮/聊天/技能栏压在地图上；#toasts 保持 130 浮在弹窗之上 */
body.wm-open .pg-hud, body.wm-open #skillbar, body.wm-open #right-btns, body.wm-open #windows { visibility: hidden; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: linear-gradient(#6b5330, #453321); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #c9a227; }
::-webkit-scrollbar-track { background: rgba(22, 16, 11,.6); }
::selection { background: rgba(201,162,39,.35); }

/* 登录：仙山云海背景 */
#login { overflow: hidden; }
.login-bg {
  position: absolute; inset: 0;
  background: url('/img/login_bg.jpg') center/cover no-repeat;
  transform: scale(1.04);
  animation: slowPan 40s ease-in-out infinite alternate;
}
@keyframes slowPan { from { transform: scale(1.04) translateX(-1%) } to { transform: scale(1.08) translateX(1%) } }
.login-veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 50% 40%, rgba(18,14,9,.25), rgba(18,14,9,.82) 75%),
    linear-gradient(rgba(18,13,9,.35), rgba(14,11,7,.92));
}
/* 云雾漂移层 */
.login-clouds {
  position: absolute; inset: -20%; pointer-events: none; z-index: 1;
  background:
    radial-gradient(46% 20% at 24% 32%, rgba(196,168,124,.10), transparent 70%),
    radial-gradient(40% 16% at 70% 20%, rgba(196,168,124,.08), transparent 70%),
    radial-gradient(52% 22% at 56% 66%, rgba(170,140,96,.09), transparent 70%);
  animation: cloudDrift 60s ease-in-out infinite alternate;
}
@keyframes cloudDrift {
  from { transform: translateX(-3%) translateY(0); }
  to { transform: translateX(3%) translateY(-1.5%); }
}
/* 飘浮灵光 */
.login-motes { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.login-motes i {
  position: absolute; bottom: -12px; width: 5px; height: 5px; border-radius: 50%;
  background: rgba(240,217,140,.65);
  box-shadow: 0 0 10px 2px rgba(240,217,140,.5);
  opacity: 0;
  animation: moteRise linear infinite;
}
.login-motes i:nth-child(1) { left: 6%; animation-duration: 13s; animation-delay: 0s; }
.login-motes i:nth-child(2) { left: 14%; animation-duration: 17s; animation-delay: 3s; width: 3px; height: 3px; }
.login-motes i:nth-child(3) { left: 23%; animation-duration: 11s; animation-delay: 6s; }
.login-motes i:nth-child(4) { left: 31%; animation-duration: 19s; animation-delay: 1.5s; width: 4px; height: 4px; }
.login-motes i:nth-child(5) { left: 40%; animation-duration: 14s; animation-delay: 8s; }
.login-motes i:nth-child(6) { left: 49%; animation-duration: 16s; animation-delay: 4.5s; width: 3px; height: 3px; }
.login-motes i:nth-child(7) { left: 58%; animation-duration: 12s; animation-delay: 10s; }
.login-motes i:nth-child(8) { left: 66%; animation-duration: 18s; animation-delay: 2.2s; width: 4px; height: 4px; }
.login-motes i:nth-child(9) { left: 74%; animation-duration: 13.5s; animation-delay: 7s; }
.login-motes i:nth-child(10) { left: 83%; animation-duration: 15s; animation-delay: 0.8s; width: 3px; height: 3px; }
.login-motes i:nth-child(11) { left: 90%; animation-duration: 20s; animation-delay: 5.5s; }
.login-motes i:nth-child(12) { left: 96%; animation-duration: 12.5s; animation-delay: 9s; width: 4px; height: 4px; }
@keyframes moteRise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  8% { opacity: .85; }
  50% { transform: translateY(-46vh) translateX(18px); opacity: .6; }
  92% { opacity: .3; }
  100% { transform: translateY(-96vh) translateX(-14px); opacity: 0; }
}
.login-box {
  position: relative; z-index: 2;
  background: rgba(24,18,12,.55); border: 1px solid rgba(201,162,39,.35);
  border-radius: 18px; padding: 34px 30px 26px;
  box-shadow: 0 30px 90px rgba(0,0,0,.75), inset 0 0 60px rgba(201,162,39,.06);
  backdrop-filter: blur(6px);
}
.login-logo {
  font-size: 50px; letter-spacing: 8px; color: #f6ecd0;
  text-shadow: 0 0 46px rgba(201,162,39,.55), 0 3px 0 rgba(0,0,0,.5);
  animation: titleGlow 4.5s ease-in-out infinite;
}
@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 34px rgba(201,162,39,.4), 0 3px 0 rgba(0,0,0,.5); }
  50% { text-shadow: 0 0 60px rgba(240,217,140,.75), 0 3px 0 rgba(0,0,0,.5); }
}
.login-sub { color: #d1b789; letter-spacing: 6px; }
.login-row input {
  background: rgba(26, 20, 13,.85); border: 1px solid #665841;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.5);
}
.login-row input:focus { border-color: #e8c45a; box-shadow: 0 0 0 2px rgba(232,196,90,.15), inset 0 2px 8px rgba(0,0,0,.5); }
.login-tip { color: #8d7b5b; }

/* 按钮：玉质描金 */
.pg-btn {
  background: linear-gradient(#443929, #2d251a);
  border: 1px solid #64563f; color: #f8daa3;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 2px 6px rgba(0,0,0,.35);
  position: relative; overflow: hidden;
}
.pg-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,.18), rgba(255,255,255,0) 55%);
  opacity: 0; transition: opacity .18s;
}
.pg-btn:hover:not(:disabled)::before { opacity: 1; }
.pg-btn:hover:not(:disabled) {
  border-color: #e0bb4a; color: #fff6dc; transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(224,187,74,.32), inset 0 1px 0 rgba(255,255,255,.1);
}
.pg-btn:active:not(:disabled) { transform: translateY(0); }
.pg-btn.primary {
  border-color: #a08a34; color: #ffeec2;
  background: linear-gradient(#5a4c1e, #33290f);
  box-shadow: 0 0 14px rgba(201,162,39,.22), inset 0 1px 0 rgba(255,235,170,.18);
}
.pg-btn.danger { border-color: #a05a44; background: linear-gradient(#4a2a22, #2a1713); }
.pg-btn.big { box-shadow: 0 0 20px rgba(201,162,39,.3), inset 0 1px 0 rgba(255,235,170,.2); }

/* HUD 面板：玉牌质感 */
.pg-hud {
  background: linear-gradient(160deg, rgba(42, 34, 24,.92), rgba(24, 18, 12,.94));
  border: 1px solid rgba(158, 137, 102,.45);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(6px);
}
#hud-tl { border-color: rgba(201,162,39,.35); }
.pg-avatar {
  position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #52402a, #241d14 70%);
  box-shadow: 0 0 0 2px rgba(0,0,0,.35), 0 4px 12px rgba(0,0,0,.5);
}
.pg-avatar::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: inset 0 0 18px rgba(0,0,0,.6);
}
.bar { height: 16px; border-radius: 9px; border-color: #5a452c; box-shadow: inset 0 2px 6px rgba(0,0,0,.6); }
.bar i { position: relative; }
.bar i::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 45%;
  background: linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,0));
  border-radius: 9px 9px 0 0;
}
.bar.hp i { background: linear-gradient(90deg, #7c2f2a, #d05a4a 70%, #e87a62); }
.bar.mp i { background: linear-gradient(90deg, #2f5a4e, #5fb3a0 70%, #6fd0c0); }
.bar.exp i { background: linear-gradient(90deg, #7c6a1f, #d4af37 70%, #f0d070); }
#minimap { border-color: rgba(158, 137, 102,.45); box-shadow: inset 0 0 20px rgba(0,0,0,.6); }

/* 技能栏 */
.slot {
  background: linear-gradient(160deg, #453321, #201a12 75%);
  border-color: #6a5b43;
  box-shadow: 0 4px 14px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.07);
}
.slot::before {
  content: ''; position: absolute; inset: 0; border-radius: 12px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0) 40%);
}
.slot:hover { transform: translateY(-2px); }
.slot b { text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.slot.atk { border-color: #8a6c34; background: linear-gradient(160deg, #3a3222, #1a1712 75%); }
.slot.pot { border-color: #6a4a7a; background: linear-gradient(160deg, #433829, #211a12 75%); }
.slot.auto.on { border-color: #59a88c; background: linear-gradient(160deg, #3a3023, #221b13 75%); box-shadow: 0 0 16px rgba(89,168,140,.35); }
.slot.rest { border-color: #5a4a34; background: linear-gradient(160deg, #2b2118, #1b1512 75%); }
.slot.off { opacity: .45; filter: grayscale(.5); }
.slot .cd { background: linear-gradient(rgba(18,13,9,.85), rgba(18,13,9,.6)); }
.attr-item, .cls-card { background: linear-gradient(160deg, rgba(58,44,26,.75), rgba(36,26,16,.75)); border-color: #5a452c; }
.item-row { border-bottom-color: #3d3325; }
.item-row:hover { background: rgba(90, 76, 56,.14); }
.pg-toast { backdrop-filter: blur(4px); }
.pg-announce { box-shadow: 0 8px 30px rgba(0,0,0,.6); backdrop-filter: blur(4px); }

/* NPC 对话 */
.npc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.npc-face {
  width: 46px; height: 46px; border-radius: 10px; flex: 0 0 46px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #f6ecc8;
  border: 1px solid #6a5636; background: linear-gradient(150deg, #3a2f1c, #1a1610);
}
.npc-face.role-teleport { border-color: #3f7a70; background: linear-gradient(150deg, #2f2418, #1a1410); color: #fadca4; }
.npc-face.role-heal { border-color: #3f7a58; background: linear-gradient(150deg, #22382a, #101a14); color: #c8f0d0; }
.npc-face.role-talk { border-color: #6a5488; background: linear-gradient(150deg, #423728, #231b13); color: #fedfa7; }
.npc-face.role-bounty { border-color: #8a5a30; background: linear-gradient(150deg, #40271a, #1c1210); color: #f5dcc0; }
.npc-talk {
  margin: 12px 0 8px; padding: 11px 13px; border-radius: 9px; font-size: 14px; line-height: 1.75;
  color: #e6dcc0; background: linear-gradient(160deg, rgba(48,40,26,.7), rgba(20,18,14,.7));
  border: 1px solid #5a4a2a; border-left: 3px solid #c9a227;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.npc-name { font-size: 18px; color: #f0e6c8; letter-spacing: 2px; }
.npc-title { color: #c2a87f; font-size: 12.5px; margin-top: 2px; }
.tp-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.tp-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  background: linear-gradient(150deg, rgba(70, 59, 43,.6), rgba(32, 25, 17,.6));
  border: 1px solid #534734;
}
.tp-row b { color: #f5ead2; }
.tp-row span { color: #c2a87f; font-size: 12.5px; margin-left: auto; }
.tp-row.here { border-color: rgba(201,162,39,.5); }
.tp-row.here span { color: #f0d98c; }
.tp-row .pg-btn { margin-left: 8px; }
.sec-title .pg-btn { margin-left: auto; }

/* ============ 视觉精修 ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(22, 16, 11,.6); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: linear-gradient(#6b5330, #413627); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #685942; }
.pg-modal-title::after {
  content: ''; display: block; height: 1px; margin-top: 8px;
  background: linear-gradient(90deg, rgba(201,162,39,.55), transparent);
}

.pg-btn { box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.pg-btn.primary { background: linear-gradient(#37331f, #221f12); }
#minimap { box-shadow: 0 3px 12px rgba(0,0,0,.45); }
#hud-map { font-size: 15px; }
.slot b, .rb, #hud-name { text-shadow: 0 1px 2px rgba(0,0,0,.55); }
/* ============ 触屏与窄屏（移动端） ============ */
body.touch { user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
body.touch #cv { touch-action: none; }
body.compact #wboss-box, body.compact #quest-track, body.compact #med-box { display: none; }
body.compact #right-btns { grid-template-columns: repeat(2, 38px); gap: 6px; }
body.compact .rb { width: 38px; height: 38px; font-size: 16px; border-radius: 9px; }
body.compact #skillbar .slot { width: 48px; height: 48px; }
body.compact #skillbar .slot small { font-size: 9.5px; }
@media (max-width: 880px), (pointer: coarse) {
  #hud-tl { max-width: 54vw; }
  #hud-tr { max-width: 44vw; padding: 6px 8px; }
  #minimap { min-width: 118px; }
  .pg-win { max-width: 96vw; }
  .pg-win-body { max-height: 60vh; overflow-y: auto; }
  #chat { width: min(70vw, 420px); }
  #toasts { right: 74px; max-width: 52vw; }
}
