/* DWDemo · 鎏金夜阙：午夜蓝半透明绸面、细金线勾边、角花、圆形技能与装备槽、玉色点缀。
   华丽只用在边框和标题，内容区保持安静、易读。 */
:root {
  --night: rgba(10, 17, 36, .9); --night2: rgba(19, 30, 58, .86); --deep: #060a18; --inset: rgba(6, 10, 24, .6);
  --gold: #d8b46a; --gold-hi: #fbe7b0; --gold-lo: #7a6232; --line: rgba(216, 180, 106, .28);
  --txt: #e7e2d4; --mute: #8d93a8; --jade: #7fe0c8; --ok: #7fe0c8; --bad: #ff8a7a; --warn: #ff9a7a;
  --r-normal: #d6d6d0; --r-magic: #86acff; --r-rare: #f2d36a; --r-exalted: #ff9a4d; --r-legendary: #ffad5a; --r-currency: #f0dca0;
  --ui: -apple-system, 'SF Pro Text', 'Helvetica Neue', 'PingFang SC', sans-serif;
  --title: 'ZCOOL XiaoWei', 'Noto Serif SC', 'Songti SC', serif; --body: 'Noto Serif SC', 'Songti SC', 'STSong', serif; --num: 'Marcellus', 'Noto Serif SC', serif;
  --c-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M2 38V14C2 7 7 2 14 2h24' fill='none' stroke='%23d8b46a' stroke-width='1.5'/%3E%3Cpath d='M7 38V18c0-6 5-11 11-11h20' fill='none' stroke='%23d8b46a' stroke-opacity='.45'/%3E%3Ccircle cx='7' cy='7' r='2.5' fill='%23fbe7b0'/%3E%3Cpath d='M14 2c0 6-6 12-12 12' fill='none' stroke='%23fbe7b0' stroke-width='1'/%3E%3C/svg%3E");
  --c-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='translate(40 0) scale(-1 1)'%3E%3Cpath d='M2 38V14C2 7 7 2 14 2h24' fill='none' stroke='%23d8b46a' stroke-width='1.5'/%3E%3Cpath d='M7 38V18c0-6 5-11 11-11h20' fill='none' stroke='%23d8b46a' stroke-opacity='.45'/%3E%3Ccircle cx='7' cy='7' r='2.5' fill='%23fbe7b0'/%3E%3Cpath d='M14 2c0 6-6 12-12 12' fill='none' stroke='%23fbe7b0' stroke-width='1'/%3E%3C/g%3E%3C/svg%3E");
  --c-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='translate(0 40) scale(1 -1)'%3E%3Cpath d='M2 38V14C2 7 7 2 14 2h24' fill='none' stroke='%23d8b46a' stroke-width='1.5'/%3E%3Cpath d='M7 38V18c0-6 5-11 11-11h20' fill='none' stroke='%23d8b46a' stroke-opacity='.45'/%3E%3Ccircle cx='7' cy='7' r='2.5' fill='%23fbe7b0'/%3E%3Cpath d='M14 2c0 6-6 12-12 12' fill='none' stroke='%23fbe7b0' stroke-width='1'/%3E%3C/g%3E%3C/svg%3E");
  --c-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='translate(40 40) scale(-1 -1)'%3E%3Cpath d='M2 38V14C2 7 7 2 14 2h24' fill='none' stroke='%23d8b46a' stroke-width='1.5'/%3E%3Cpath d='M7 38V18c0-6 5-11 11-11h20' fill='none' stroke='%23d8b46a' stroke-opacity='.45'/%3E%3Ccircle cx='7' cy='7' r='2.5' fill='%23fbe7b0'/%3E%3Cpath d='M14 2c0 6-6 12-12 12' fill='none' stroke='%23fbe7b0' stroke-width='1'/%3E%3C/g%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--deep); color: var(--txt); font: 14px/1.55 var(--body); overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, h5, p, ul, ol, dl, dd { margin: 0; padding: 0; } ul, ol { list-style: none; }
kbd { font: 11px/1 var(--num); color: var(--gold); }
:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 3px; }
.hint { color: var(--mute); font-size: 12.5px; } .hint.center { text-align: center; margin: 6px 0; }
.g { position: fixed; inset: 0; }
select { font: inherit; color: var(--txt); background: var(--deep); border: 1px solid var(--gold-lo); border-radius: 12px; padding: 3px 8px; }

/* ---------- icons: game-icons masks painted with theme gradients (glyph fallback offline) ---------- */
.gi { display: block; width: 100%; height: 100%; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; background: var(--gg, linear-gradient(160deg, #f1ece2, #8d877b)); font-style: normal; }
.gi.r-normal { --gg: linear-gradient(160deg, #f1ece2, #8d877b); } .gi.r-magic { --gg: linear-gradient(160deg, #e0ecff, #4f7fd6); }
.gi.r-rare { --gg: linear-gradient(160deg, #fff3b8, #c9962a); } .gi.r-exalted { --gg: linear-gradient(160deg, #ffe0c0, #e0742a); }
.gi.r-legendary { --gg: linear-gradient(160deg, #fff0d0, #ff9a3a 50%, #b0360c); } .gi.r-currency { --gg: linear-gradient(160deg, #fff4cc, #c9a04a); }
.gi.el-cold { --gg: linear-gradient(160deg, #ffffff, #8fd8ff 45%, #2e78c8); } .gi.el-fire { --gg: linear-gradient(160deg, #fff0b0, #ff8a3a 50%, #b0300c); }
.gi.el-light { --gg: linear-gradient(160deg, #fffbe0, #ffe066 50%, #c09a10); } .gi.el-chaos { --gg: linear-gradient(160deg, #f4e4ff, #b088ff 50%, #5a2aa8); }
.gi.el-phys { --gg: linear-gradient(160deg, #f6eedc, #c0a880 60%, #7a6448); } .gi.el-gold { --gg: linear-gradient(160deg, #fff6d8, #d8b46a 60%, #8a6a2a); }
.gi.ly-core { --gg: linear-gradient(160deg, #fff0d0, #ff9a3a); } .gi.ly-link { --gg: linear-gradient(160deg, #f0e0ff, #a87ae0); } .gi.ly-form { --gg: linear-gradient(160deg, #e0f6ff, #6ac0e8); }
.gi.ghost { --gg: linear-gradient(#3a4466, #232a42); }
.no-icons .gi { -webkit-mask: none; mask: none; background: none; display: grid; place-items: center; }
.no-icons .gi::before { content: attr(data-g); font: 700 1.1em var(--title); color: var(--gold); }

/* ---------- the panel: night silk, gold rule, corner flourishes, crest on top ---------- */
.panel { position: relative; background: linear-gradient(180deg, var(--night2), var(--night)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(216, 180, 106, .55); border-radius: 3px; box-shadow: inset 0 0 0 4px rgba(10, 18, 38, .55), inset 0 0 0 5px rgba(216, 180, 106, .22), 0 24px 60px rgba(0, 0, 10, .7); }
.panel::after { content: ""; position: absolute; inset: -3px; pointer-events: none;
  background: var(--c-tl) top left / 34px no-repeat, var(--c-tr) top right / 34px no-repeat, var(--c-bl) bottom left / 34px no-repeat, var(--c-br) bottom right / 34px no-repeat; }
.panel::before { content: ""; position: absolute; left: 50%; top: -8px; width: 130px; height: 16px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(circle at 50% 50%, var(--gold-hi) 0 3px, transparent 4px), linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent) center / 100% 1px no-repeat; }
.ttl { font: 400 24px var(--title); color: var(--gold-hi); letter-spacing: .45em; text-align: center; text-shadow: 0 0 16px rgba(251, 231, 176, .3); margin-bottom: 14px; }
.sub { font: 400 16px var(--title); color: var(--gold-hi); letter-spacing: .3em; margin: 16px 0 8px; }
.sub small { font: 12px var(--body); letter-spacing: 0; color: var(--mute); margin-left: 8px; }

/* ---------- buttons ---------- */
.orn-btn { position: relative; padding: 8px 22px; color: var(--gold-hi); font: 400 15px var(--title); letter-spacing: .2em; border: 1px solid var(--gold-lo); border-radius: 18px;
  background: linear-gradient(180deg, rgba(30, 42, 78, .9), rgba(8, 12, 28, .95)); box-shadow: inset 0 0 0 3px rgba(6, 10, 24, .8), inset 0 0 0 4px rgba(216, 180, 106, .25); transition: box-shadow .15s, filter .15s; }
.orn-btn:hover:not(:disabled) { box-shadow: inset 0 0 0 3px rgba(6, 10, 24, .8), inset 0 0 0 4px var(--gold), 0 0 14px rgba(251, 231, 176, .3); }
.orn-btn:disabled { opacity: .45; cursor: default; }
.orn-btn.primary { color: #2a1a06; background: linear-gradient(180deg, #fbe7b0, #c9a052 55%, #8a6a2a); border-color: var(--gold-hi); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 14px rgba(0, 0, 0, .5); text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }
.orn-btn.primary:hover:not(:disabled) { filter: brightness(1.08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 22px rgba(251, 231, 176, .55); }
.orn-btn.big { padding: 14px 40px; font-size: 20px; letter-spacing: .3em; border-radius: 28px; }
.orn-btn.sm { padding: 4px 14px; font-size: 13px; letter-spacing: .1em; }
.orn-btn.ghost { background: transparent; box-shadow: none; }
.orn-btn.danger { color: #ffb0a0; border-color: #6a2a22; }
.x { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--gold-lo); color: var(--gold); font-size: 18px; line-height: 1; }
.x:hover { border-color: var(--gold-hi); color: var(--gold-hi); }

/* ---------- 3D stage ---------- */
.stage { position: absolute; inset: 0; outline: none; }
.overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.camp-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, #1c2a52 0%, transparent 70%), radial-gradient(ellipse 60% 40% at 50% 110%, #2a1a10 0%, transparent 70%), linear-gradient(#0a1022, #05070f); }
.camp-bg .glow { position: absolute; left: 50%; top: 58%; width: 900px; height: 900px; margin: -450px; border-radius: 50%; background: radial-gradient(circle, rgba(216, 180, 106, .12), transparent 60%); }
.camp-bg .mist { position: absolute; left: -20%; width: 140%; height: 40%; background: radial-gradient(ellipse at 50% 50%, rgba(127, 160, 220, .08), transparent 60%); animation: drift 40s linear infinite alternate; }
.camp-bg .m1 { top: 20%; } .camp-bg .m2 { top: 55%; animation-duration: 55s; animation-direction: alternate-reverse; }
@keyframes drift { to { transform: translateX(12%); } }

/* ---------- camp ---------- */
.topbar { position: absolute; left: 24px; top: 20px; right: 110px; display: flex; align-items: center; gap: 16px; }
.crest { width: 60px; height: 60px; padding: 12px; border-radius: 50%; border: 1px solid var(--gold); background: radial-gradient(circle, #1e2a4e, #060a18); box-shadow: 0 0 0 4px rgba(6, 10, 24, .8), 0 0 0 5px var(--gold-lo), 0 0 22px rgba(216, 180, 106, .25); }
.who h1 { font: 400 30px/1 var(--title); color: var(--gold-hi); letter-spacing: .5em; }
.who p { color: var(--mute); margin-top: 6px; }
.facts { display: flex; gap: 22px; margin-left: auto; }
.facts span { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--mute); }
.facts b { font: 22px/1.1 var(--num); color: var(--gold-hi); }
.device { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); display: grid; grid-template-columns: minmax(520px, 1.35fr) minmax(320px, 1fr); gap: 28px; width: min(1180px, calc(100vw - 160px)); }
.device-core, .device-req { padding: 26px 28px 24px; }
.tiers { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px 8px; margin-bottom: 18px; }
.tiers button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 50% 50% 8px 8px; background: radial-gradient(circle at 50% 30%, rgba(30, 42, 78, .9), rgba(6, 10, 24, .9)); box-shadow: inset 0 0 0 1px var(--gold-lo); transition: box-shadow .15s, transform .15s; }
.tiers button b { font: 18px/1 var(--num); color: var(--txt); }
.tiers button small { font-size: 10px; color: var(--mute); }
.tiers button.band-1, .tiers button.band-3 { background: radial-gradient(circle at 50% 30%, rgba(40, 52, 92, .9), rgba(8, 12, 28, .9)); }
.tiers button:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--gold); transform: translateY(-2px); }
.tiers button.on { box-shadow: inset 0 0 0 1px var(--gold-hi), 0 0 18px rgba(251, 231, 176, .35); background: radial-gradient(circle at 50% 30%, #5a4520, #1a1208); }
.tiers button.on b { color: var(--gold-hi); }
.tiers button:disabled { opacity: .28; cursor: default; }
.fams { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
.fams button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px 10px; border-radius: 3px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s; }
.fams button .gi { width: 34px; height: 34px; }
.fams button b { font: 400 16px var(--title); letter-spacing: .2em; }
.fams button.on { box-shadow: inset 0 0 0 1px var(--gold-hi), 0 0 14px rgba(251, 231, 176, .25); }
.fams button.on b { color: var(--gold-hi); }
.mix { display: flex; width: 100%; height: 4px; border-radius: 2px; overflow: hidden; }
.pressure { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 22px; background: var(--line); border: 1px solid var(--line); }
.pressure div { padding: 8px 12px; background: rgba(8, 13, 30, .95); }
.pressure dt { font-size: 11px; color: var(--mute); } .pressure dd { font: 17px var(--num); color: var(--txt); } .pressure dd.warn { color: var(--warn); }
.device-core .orn-btn.big { display: block; margin: 0 auto; }
.req { margin-bottom: 18px; }
.req li { display: grid; grid-template-columns: 16px 1fr auto; gap: 4px 10px; align-items: baseline; padding: 8px 2px; border-bottom: 1px solid rgba(216, 180, 106, .14); }
.req li i { width: 8px; height: 8px; transform: rotate(45deg); align-self: center; }
.req li.ok i { background: var(--jade); box-shadow: 0 0 8px var(--jade); } .req li.bad i { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.req li b { font: 15px var(--num); } .req li.bad b { color: var(--bad); }
.req li em { grid-column: 2 / -1; font-style: normal; font-size: 11.5px; color: var(--mute); }
.roles { display: flex; flex-direction: column; gap: 10px; }
.roles .orn-btn { align-self: flex-start; }
.role { display: grid; grid-template-columns: 42px 1fr 46px; gap: 4px 10px; align-items: center; }
.role span { font: 16px var(--title); color: var(--gold-hi); }
.meter { height: 6px; background: var(--deep); border: 1px solid var(--gold-lo); border-radius: 3px; overflow: hidden; } .meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); }
.role b { font: 16px var(--num); text-align: right; } .role small { grid-column: 2 / -1; color: var(--mute); font-size: 12px; }
.role-lean { color: var(--mute); font-size: 12px; }

/* ---------- rail ---------- */
.rail { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 14px; z-index: 30; }
.rail button { position: relative; width: 62px; height: 62px; border-radius: 50%; padding: 14px; background: radial-gradient(circle at 50% 35%, #1e2a4e, #060a18);
  box-shadow: 0 0 0 1px var(--gold-lo), 0 0 0 4px rgba(6, 10, 24, .9), 0 0 0 5px rgba(216, 180, 106, .3), 0 6px 16px rgba(0, 0, 0, .6); transition: box-shadow .15s, transform .15s; }
.rail button b { position: absolute; right: 74px; top: 50%; transform: translateY(-50%); white-space: nowrap; font: 400 15px var(--title); color: var(--gold-hi); letter-spacing: .2em; opacity: 0; pointer-events: none; transition: opacity .15s; text-shadow: 0 2px 6px #000; }
.rail button kbd { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); padding: 1px 6px; background: var(--deep); border: 1px solid var(--gold-lo); border-radius: 8px; font-size: 10px; }
.rail button:hover { transform: scale(1.06); } .rail button:hover b { opacity: 1; }
.rail button.on { box-shadow: 0 0 0 1px var(--gold-hi), 0 0 0 4px rgba(6, 10, 24, .9), 0 0 0 5px var(--gold), 0 0 22px rgba(251, 231, 176, .45); }
.in-run .rail { top: 44%; } .in-run .rail button { width: 50px; height: 50px; padding: 11px; }

/* ---------- windows ---------- */
.win { position: absolute; display: flex; flex-direction: column; z-index: 25; max-height: calc(100vh - 40px); }
.win-left { left: 20px; top: 20px; bottom: 20px; width: 440px; }
.win-right { right: 104px; top: 20px; width: 476px; max-height: calc(100vh - 40px); }
.win-center { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(1040px, calc(100vw - 260px)); height: min(820px, calc(100vh - 60px)); z-index: 28; }
.win-head { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 18px 20px 10px; position: relative; }
.win-head h2 { font: 400 24px var(--title); color: var(--gold-hi); letter-spacing: .5em; text-shadow: 0 0 16px rgba(251, 231, 176, .3); }
.win-head .x { position: absolute; right: 16px; top: 14px; }
.win-head .count { position: absolute; left: 22px; top: 22px; font-size: 12px; color: var(--mute); }
.win-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 22px 18px; scrollbar-width: thin; scrollbar-color: var(--gold-lo) transparent; }

/* character */
.hero-card { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.portrait { width: 58px; height: 58px; padding: 12px; border-radius: 50%; border: 1px solid var(--gold); background: radial-gradient(circle, #1e2a4e, #060a18); flex: none; }
.hero-card h3 { font: 400 22px var(--title); color: var(--gold-hi); letter-spacing: .2em; } .hero-card p { color: var(--mute); font-size: 12.5px; }
.doll { display: grid; grid-template-columns: repeat(5, 62px); gap: 24px 14px; justify-content: center; padding: 6px 0 18px; }
.slot { position: relative; width: 62px; height: 62px; padding: 12px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, rgba(30, 42, 78, .95), rgba(6, 10, 24, .95)); box-shadow: 0 0 0 1px var(--gold-lo); transition: box-shadow .15s; }
.slot small { position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); font-size: 10px; color: var(--mute); white-space: nowrap; }
.slot:hover { box-shadow: 0 0 0 1px var(--gold-hi), 0 0 0 4px rgba(251, 231, 176, .18); }
.slot.r-magic { box-shadow: 0 0 0 1px #4a6ab0; } .slot.r-rare { box-shadow: 0 0 0 1px #b09a42; } .slot.r-exalted { box-shadow: 0 0 0 1px #c06a2a; }
.slot.r-legendary { box-shadow: 0 0 0 1px var(--r-legendary), 0 0 16px rgba(255, 173, 90, .45); }
.slot.drop { box-shadow: 0 0 0 2px var(--jade), 0 0 18px rgba(127, 224, 200, .5); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; padding: 6px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { display: flex; justify-content: space-between; padding: 3px 0; } .stats dt { color: var(--mute); font-size: 12.5px; } .stats dd { font: 14px var(--num); }
.barpick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.barslot { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 22px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); }
.barico { width: 30px; height: 30px; padding: 5px; border-radius: 50%; background: var(--deep); box-shadow: 0 0 0 1px var(--gold-lo); flex: none; }
.barslot select { flex: 1; min-width: 0; border: 0; background: transparent; }
.ladder { display: flex; }
.ladder li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; color: var(--mute); cursor: help; }
.ladder li i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--gold-lo); background: var(--deep); z-index: 1; }
.ladder li small { font: 10px var(--num); }
.ladder li:not(:last-child)::after { content: ""; position: absolute; top: 7px; left: 50%; width: 100%; height: 1px; background: var(--gold-lo); }
.ladder li.done { color: var(--txt); } .ladder li.done i { background: radial-gradient(circle, var(--gold-hi), var(--gold)); }
.ladder li.done:not(:last-child)::after { background: linear-gradient(90deg, var(--gold), var(--gold-lo)); }
.ladder li.now { color: var(--gold-hi); } .ladder li.now i { box-shadow: 0 0 0 3px rgba(251, 231, 176, .25), 0 0 14px var(--gold-hi); }
.ladder li.next i { border-color: var(--gold); border-style: dashed; }
.ladder-now { margin-top: 8px; padding: 8px 12px; font-size: 12.5px; color: #d8d2c0; background: var(--inset); border-left: 2px solid var(--gold); }
.traits { display: flex; flex-direction: column; gap: 3px; }
.trait { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 3px; background: var(--inset); box-shadow: inset 0 0 0 1px rgba(216, 180, 106, .12); }
.trait .gi { width: 18px; height: 18px; }
.trait p { font-size: 12.5px; color: #cfd2da; }
.trait em { font: 10px var(--num); font-style: normal; color: var(--mute); white-space: nowrap; }
.trait.l-core { box-shadow: inset 0 0 0 1px rgba(255, 173, 90, .45); background: linear-gradient(90deg, rgba(255, 173, 90, .12), var(--inset)); } .trait.l-core p { color: #ffd8b0; }
.trait.l-link p { color: #e0d0ff; }

/* bag */
.grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.cell { position: relative; aspect-ratio: 1; padding: 8px; border-radius: 3px; background: radial-gradient(circle at 50% 35%, rgba(30, 42, 78, .85), rgba(6, 10, 24, .92)); box-shadow: inset 0 0 0 1px rgba(216, 180, 106, .18); transition: box-shadow .12s, transform .12s; }
.cell b { position: absolute; right: 3px; top: 1px; font: 9px var(--num); color: var(--mute); }
.cell-skill { position: absolute; left: 4px; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 6px var(--jade); }
.cell:not(.empty):hover { box-shadow: inset 0 0 0 1px var(--gold-hi); transform: translateY(-1px); }
.cell.r-magic { box-shadow: inset 0 0 0 1px #4a6ab0; } .cell.r-rare { box-shadow: inset 0 0 0 1px #b09a42; } .cell.r-exalted { box-shadow: inset 0 0 0 1px #c06a2a; }
.cell.r-legendary { box-shadow: inset 0 0 0 1px var(--r-legendary), inset 0 0 16px rgba(255, 173, 90, .35); }
.cell.on { outline: 1px solid var(--gold-hi); outline-offset: 2px; }
.cell.empty { cursor: default; opacity: .6; }
.bag-actions { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; }
.bag-actions .sel { flex: 1; color: var(--gold-hi); font: 15px var(--title); }
.wallet { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.wallet span { display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 4px; border-radius: 14px; background: var(--inset); }
.wallet .gi { width: 22px; height: 22px; } .wallet b { font: 14px var(--num); }

/* craft */
.craft { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; height: 100%; }
.craft-item { display: flex; justify-content: center; align-items: flex-start; overflow: auto; }
.craft-side { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.anvil { width: 86px; height: 86px; padding: 18px; border-radius: 50%; background: radial-gradient(circle, #2a2a40, #060a18); box-shadow: 0 0 0 1px var(--gold), 0 0 30px rgba(216, 180, 106, .25); }
.craft-sel { text-align: center; color: var(--mute); font-size: 12.5px; }
.orbs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.orb-cur { position: relative; display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 10px; text-align: left; padding: 8px 10px; border-radius: 26px 6px 6px 26px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s; }
.orb-cur .gi { grid-row: 1 / 3; width: 40px; height: 40px; }
.orb-cur b { font: 15px var(--title); color: var(--gold-hi); letter-spacing: .1em; }
.orb-cur em { position: absolute; right: 12px; top: 8px; font: 14px var(--num); font-style: normal; color: var(--txt); }
.orb-cur small { font-size: 11px; color: var(--mute); line-height: 1.35; }
.orb-cur:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--gold-hi), 0 0 12px rgba(251, 231, 176, .2); }
.orb-cur:disabled { opacity: .4; cursor: default; }
.craftlog { color: var(--jade); text-align: center; }

/* builds */
.bd { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; }
.bd-list { display: flex; flex-direction: column; gap: 6px; }
.bd-list button { width: 100%; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; text-align: left; padding: 8px 10px; border-radius: 22px 4px 4px 22px; background: var(--inset); box-shadow: inset 0 0 0 1px rgba(216, 180, 106, .14); }
.bd-list .gi { grid-row: 1 / 3; width: 34px; height: 34px; }
.bd-list b { font: 16px var(--title); letter-spacing: .1em; } .bd-list small { font-size: 11px; color: var(--mute); }
.bd-list button.on { box-shadow: inset 0 0 0 1px var(--gold-hi); background: linear-gradient(90deg, rgba(216, 180, 106, .16), var(--inset)); }
.bd-list button.current b::after { content: " · 当前"; font: 11px var(--body); color: var(--jade); }
.bd-detail h3 { font: 400 26px var(--title); color: var(--gold-hi); letter-spacing: .2em; } .bd-detail h3 small { font: 13px var(--body); color: var(--mute); letter-spacing: 0; }
.bd-summary { color: #cfd2da; margin: 6px 0 14px; }
.bd-stages { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.bd-stages li { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 10px 14px; border-radius: 3px; background: var(--inset); box-shadow: inset 0 0 0 1px rgba(216, 180, 106, .16); }
.bd-stages li.current { box-shadow: inset 0 0 0 1px var(--jade); }
.st-num { display: flex; flex-direction: column; align-items: center; }
.st-num b { font: 18px var(--title); color: var(--gold-hi); } .st-num small { font: 11px var(--num); color: var(--mute); }
.st-body h4 { font: 400 17px var(--title); color: var(--txt); letter-spacing: .1em; } .st-body h4 small { font: 11.5px var(--body); color: var(--mute); letter-spacing: 0; margin-left: 6px; }
.st-body p { font-size: 13px; color: #cfd2da; margin-top: 2px; }
.st-keys { color: var(--mute) !important; font-size: 12px !important; } .st-keys em { font-style: normal; color: var(--gold); margin-right: 6px; }

/* codex */
.codex .hint { margin-bottom: 14px; }
.codex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.lcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 14px 12px; text-align: center; border-radius: 3px; background: radial-gradient(ellipse at 50% 0%, rgba(255, 173, 90, .16), transparent 60%), var(--inset); box-shadow: inset 0 0 0 1px rgba(255, 173, 90, .35); }
.lcard-icon { width: 60px; height: 60px; padding: 11px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 173, 90, .2), #060a18); box-shadow: 0 0 0 1px var(--r-legendary), 0 0 18px rgba(255, 173, 90, .35); margin-bottom: 4px; }
.lcard h4 { font: 400 20px var(--title); color: #ffc58a; letter-spacing: .25em; }
.lcard-slot { font-size: 11.5px; color: var(--mute); }
.lcard-text { font-size: 12.5px; color: #ffd8b0; flex: 1; }
.lcard-flavor { font-size: 11.5px; color: var(--gold); font-style: italic; margin-bottom: 6px; }
.lcard.th-cold { box-shadow: inset 0 0 0 1px rgba(143, 216, 255, .35); } .lcard.th-lightning { box-shadow: inset 0 0 0 1px rgba(255, 224, 102, .35); }

/* ---------- item tooltip ---------- */
.tipwrap { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; }
.itip { position: relative; width: 360px; padding-bottom: 12px; background: linear-gradient(180deg, rgba(19, 30, 58, .97), rgba(8, 12, 28, .98)); border: 1px solid rgba(216, 180, 106, .6); border-radius: 3px; box-shadow: inset 0 0 0 4px rgba(6, 10, 24, .6), inset 0 0 0 5px rgba(216, 180, 106, .2), 0 18px 50px rgba(0, 0, 0, .75); }
.itip::after { content: ""; position: absolute; inset: -3px; pointer-events: none; background: var(--c-tl) top left / 28px no-repeat, var(--c-tr) top right / 28px no-repeat, var(--c-bl) bottom left / 28px no-repeat, var(--c-br) bottom right / 28px no-repeat; }
.itip.inline { width: min(420px, 100%); }
.itip-head { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 16px 10px; text-align: center; border-bottom: 1px solid var(--line); }
.itip-icon { width: 64px; height: 64px; padding: 12px; border-radius: 50%; background: radial-gradient(circle, rgba(30, 42, 78, .9), #060a18); box-shadow: 0 0 0 1px var(--gold-lo); }
.itip h3 { font: 400 24px var(--title); letter-spacing: .2em; color: var(--r-normal); }
.itip-head p { font-size: 12px; color: var(--mute); } .itip-preset { color: var(--jade) !important; }
.itip.r-magic h3 { color: var(--r-magic); } .itip.r-rare h3 { color: var(--r-rare); } .itip.r-exalted h3 { color: var(--r-exalted); }
.itip.r-legendary { border-color: rgba(255, 173, 90, .8); }
.itip.r-legendary .itip-head { background: radial-gradient(ellipse at 50% 0%, rgba(255, 173, 90, .3), transparent 70%); }
.itip.r-legendary h3 { color: #ffc58a; text-shadow: 0 0 16px rgba(255, 173, 90, .55); }
.itip.r-legendary .itip-icon { box-shadow: 0 0 0 1px var(--r-legendary), 0 0 22px rgba(255, 173, 90, .4); }
.itip-base { margin: 8px 16px 0; text-align: center; font-size: 12.5px; color: #c8ccd4; }
.itip-legend { margin: 10px 16px 4px; padding: 8px 10px; text-align: center; color: #ffd8aa; font-size: 13px; border-top: 1px solid rgba(255, 173, 90, .35); border-bottom: 1px solid rgba(255, 173, 90, .35); }
.itip-legend b { display: block; font: 400 13px var(--title); letter-spacing: .3em; color: var(--r-legendary); }
.itip-traits, .itip-lines { margin: 8px 14px 0; display: flex; flex-direction: column; gap: 2px; }
.itip-traits li { display: grid; grid-template-columns: 16px 1fr auto; gap: 8px; align-items: center; padding: 3px 4px; border-radius: 2px; font-size: 13px; }
.itip-traits .gi { width: 15px; height: 15px; }
.itip-traits .l-core span { color: #ffd0a0; } .itip-traits .l-link span { color: #dccaff; } .itip-traits .l-form span { color: #c4e8ff; }
.itip-skill span { color: var(--gold-hi); }
.itip-traits em, .itip-lines em { font: 11px var(--num); font-style: normal; color: var(--mute); white-space: nowrap; }
.itip-lines { padding-top: 6px; border-top: 1px solid rgba(216, 180, 106, .14); }
.itip-lines li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 4px; border-radius: 2px; color: #a8c4ff; font-size: 13px; }
.itip li.pick { cursor: pointer; } .itip li.pick:hover { background: rgba(216, 180, 106, .1); }
.itip li.on { background: rgba(216, 180, 106, .18); box-shadow: inset 0 0 0 1px var(--gold); }
.itip li.sealed em b { color: var(--gold-hi); }
.itip-flavor { margin: 10px 16px 0; text-align: center; color: var(--gold); font-size: 12px; font-style: italic; }
.itip-cmp { margin: 10px 14px 0; padding-top: 8px; border-top: 1px dashed rgba(216, 180, 106, .25); }
.itip-cmp h4 { font: 400 12px var(--body); color: var(--mute); margin-bottom: 2px; } .itip-cmp p { font-size: 12px; color: #8a90a2; }

/* ---------- run HUD ---------- */
.plate { position: absolute; left: 20px; top: 18px; display: flex; align-items: center; min-width: 330px; border-radius: 34px 3px 3px 34px; z-index: 10; }
.plate::before { display: none; }
.plate-tier { width: 62px; height: 62px; margin: 4px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 26px/1 var(--num); color: var(--gold-hi); border: 1px solid var(--gold); background: radial-gradient(circle, #1e2a4e, #080e20); }
.plate-tier small { font-size: 11px; }
.plate-body { flex: 1; padding: 6px 12px; }
.plate-body h2 { font: 400 20px var(--title); color: var(--gold-hi); letter-spacing: .4em; }
.plate-bar { height: 2px; margin: 5px 0; background: rgba(216, 180, 106, .2); } .plate-bar i { display: block; height: 100%; background: var(--gold-hi); box-shadow: 0 0 6px var(--gold-hi); }
.plate-body p { display: flex; gap: 12px; font: 12px var(--num); color: var(--mute); } .plate-body .warn { color: var(--warn); }
.plate-leave { align-self: stretch; padding: 0 16px; border-left: 1px solid var(--line); color: var(--mute); font-family: var(--title); letter-spacing: .2em; }
.plate-leave:hover { color: var(--gold-hi); }
.minimap { position: absolute; right: 22px; top: 18px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(18, 30, 60, .78), rgba(6, 10, 24, .92)); box-shadow: 0 0 0 1px var(--gold), 0 0 0 6px rgba(10, 18, 38, .85), 0 0 0 7px var(--gold-lo), 0 10px 30px #000; z-index: 10; }
.minimap canvas { width: 100%; height: 100%; border-radius: 50%; }
.in-run .rail { right: 14px; }
.bossbar { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); width: min(760px, 48vw); z-index: 10; }
.bossbar h3 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 5px; font: 400 17px var(--body); color: #f0e8d6; letter-spacing: .12em; text-shadow: 0 1px 3px #000; }
.bossbar h3 small { font-size: 11px; color: rgba(216, 190, 130, .85); letter-spacing: .05em; }
.bossbar h3 em { font-style: normal; font-size: 12px; color: #ff6a5a; margin-left: auto; }
.bossbar-track { position: relative; height: 9px; background: rgba(10, 8, 6, .75); border: 1px solid rgba(190, 170, 120, .55); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
.bossbar-track i { position: absolute; left: 0; top: 0; bottom: 0; }
.bossbar-track .life { background: linear-gradient(180deg, #b8262a, #8a1418); transition: width .1s; }
.bossbar-track .ghost { background: #d8b47a; opacity: .75; transition: width .6s ease-in .5s; }
.bossbar-track .es { top: auto; bottom: 100%; height: 2px; margin-bottom: 1px; background: #a8e8d8; }
.bossbar.enraged .bossbar-track { border-color: #c83a2a; }
.combo { position: absolute; left: 50%; top: 104px; transform: translateX(-50%); display: flex; align-items: baseline; gap: 8px; pointer-events: none; z-index: 9; }
.combo b { display: inline-block; font: 60px/1 var(--num); color: var(--gold-hi); text-shadow: 0 0 20px rgba(251, 231, 176, .55), 0 3px 6px #000; }
.combo span { font: 22px var(--title); letter-spacing: .4em; color: var(--txt); text-shadow: 0 2px 6px #000; }
.combo small { font-size: 12px; color: var(--jade); }
.combo.hot b { color: #ffd59a; text-shadow: 0 0 26px #ff9a3a, 0 3px 6px #000; }
.clearflash { position: absolute; left: 50%; top: 172px; transform: translateX(-50%); display: none; white-space: nowrap; text-align: center; font: 44px var(--title); letter-spacing: .9em; color: #fff7e0; text-shadow: 0 0 24px var(--gold), 0 0 52px #ffad5a; pointer-events: none; z-index: 9; }
.clearflash small { display: block; font: 13px var(--num); letter-spacing: .2em; color: var(--gold-hi); }
/* HUD after Elden Ring: thin flat bars and the skill cross in the bottom-left; boss bar low in the centre; kills bottom-right */
.in-run::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 220px; pointer-events: none; background: linear-gradient(transparent, rgba(0, 0, 0, .45)); z-index: 5; }
.er-left { position: absolute; left: 34px; bottom: 40px; z-index: 10; display: flex; flex-direction: column; gap: 14px; }
.buffs { display: flex; flex-wrap: wrap; gap: 5px; max-width: 420px; min-height: 18px; }
.buff { display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 7px; font-size: 11px; color: var(--c, #e8e2d2); background: rgba(0, 0, 0, .55); border: 1px solid rgba(190, 170, 120, .35); }
.buff .gi { width: 12px; height: 12px; } .buff sub { font: 600 10px var(--ui); color: #e8d6a8; vertical-align: baseline; }
.er-bars { display: grid; grid-template-columns: auto auto; align-items: center; justify-content: start; column-gap: 10px; row-gap: 5px; }
.er-bar { position: relative; height: 9px; background: rgba(10, 8, 6, .72); border: 1px solid rgba(190, 170, 120, .55); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 2px 8px rgba(0, 0, 0, .5); }
.er-bar.mana { height: 7px; }
.er-bar i { position: absolute; left: 0; top: 0; bottom: 0; }
.er-bar .fill { transition: width .1s linear; }
.er-bar.life .fill { background: linear-gradient(180deg, #b8262a, #8a1418); }
.er-bar.life .ghost { background: #d8b47a; opacity: .75; transition: width .6s ease-in .5s; }
.er-bar.life .es { top: auto; bottom: 100%; height: 2px; margin-bottom: 1px; background: #a8e8d8; }
.er-bar.mana .fill { background: linear-gradient(180deg, #3c62c8, #26429a); }
.er-bar.low { animation: lowpulse 1s ease-in-out infinite; }
@keyframes lowpulse { 50% { box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 0 14px rgba(220, 40, 40, .8); } }
.er-num { font: 500 11px/1 var(--ui); font-variant-numeric: tabular-nums; color: rgba(240, 232, 214, .75); text-shadow: 0 1px 2px #000; }
.er-num em { font-style: normal; color: #a8e8d8; }
.er-cross { position: relative; width: 168px; height: 168px; margin-top: 2px; }
.er-cross .skill { position: absolute; width: 56px; height: 56px; padding: 10px; background: rgba(8, 7, 6, .7); border: 1px solid rgba(190, 170, 120, .5); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .7), 0 3px 10px rgba(0, 0, 0, .5); transition: border-color .15s, box-shadow .15s; }
.er-cross .pos-1 { left: 56px; top: 0; } .er-cross .pos-2 { left: 0; top: 56px; } .er-cross .pos-3 { left: 112px; top: 56px; } .er-cross .pos-4 { left: 56px; top: 112px; }
.er-cross .skill.empty { opacity: .45; cursor: default; }
.er-cross .skill.on { border-color: #f0e2b4; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .7), 0 0 12px rgba(240, 226, 180, .35); }
.er-cross .skill.channel { animation: chan .5s ease-in-out infinite alternate; }
@keyframes chan { to { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .7), 0 0 16px rgba(127, 224, 200, .55); } }
.er-cross .cd { position: absolute; inset: 0; background: conic-gradient(rgba(0, 0, 0, .72) calc(var(--p) * 360deg), transparent 0); }
.er-cross kbd { position: absolute; right: 3px; bottom: 2px; font: 600 9px/1 var(--ui); color: rgba(240, 226, 180, .55); }
.er-skill-name { position: absolute; left: 0; right: 0; bottom: -22px; text-align: center; white-space: nowrap; font: 400 13px var(--body); color: #f0e8d6; letter-spacing: .1em; text-shadow: 0 1px 3px #000; }
.er-right { position: absolute; right: 34px; bottom: 34px; z-index: 10; display: flex; align-items: baseline; gap: 6px; padding: 6px 14px; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .55) 30%); border-bottom: 1px solid rgba(190, 170, 120, .45); }
.er-right b { font: 500 22px var(--ui); font-variant-numeric: tabular-nums; color: #f0e8d6; }
.er-right small { font-size: 12px; color: rgba(240, 232, 214, .6); }
.toasts { position: absolute; right: 34px; bottom: 90px; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; pointer-events: none; z-index: 12; }
.toasts p { display: flex; align-items: center; gap: 8px; padding: 4px 14px 4px 6px; font-size: 13px; border-radius: 16px 3px 3px 16px; background: rgba(8, 12, 28, .9); box-shadow: inset 0 0 0 1px var(--gold-lo); animation: toast .25s ease-out; }
.toasts .gi { width: 24px; height: 24px; }
.toasts .r-magic { color: var(--r-magic); } .toasts .r-rare { color: var(--r-rare); } .toasts .r-exalted { color: var(--r-exalted); }
.toasts .r-legendary { color: #ffc58a; box-shadow: inset 0 0 0 1px var(--r-legendary), 0 0 14px rgba(255, 173, 90, .4); }
.toasts .cur { color: var(--r-currency); } .toasts .good { color: var(--jade); } .toasts .bad { color: var(--bad); }
@keyframes toast { from { opacity: 0; transform: translateX(20px); } }
.legend-drop { position: absolute; left: 50%; top: 34%; transform: translateX(-50%); text-align: center; pointer-events: none; z-index: 12; animation: legend 2.6s ease-out forwards; }
.legend-drop small { display: block; font: 14px var(--title); letter-spacing: .6em; color: var(--r-legendary); }
.legend-drop b { font: 400 46px var(--title); letter-spacing: .3em; color: #ffd59a; text-shadow: 0 0 30px #ff9a3a, 0 0 60px rgba(255, 138, 58, .6), 0 3px 6px #000; }
@keyframes legend { 0% { opacity: 0; transform: translateX(-50%) scale(1.4); } 12% { opacity: 1; transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
.result { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 460px; padding: 30px 32px 26px; text-align: center; z-index: 40; }
.result h2 { font: 400 32px var(--title); color: var(--gold-hi); letter-spacing: .2em; margin-bottom: 18px; text-shadow: 0 0 18px rgba(251, 231, 176, .4); }
.result.failed h2 { color: #ff9a8a; }
.result dl { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-bottom: 16px; background: var(--line); border: 1px solid var(--line); }
.result dl div { padding: 8px; background: rgba(8, 13, 30, .95); } .result dt { font-size: 11px; color: var(--mute); } .result dd { font: 22px var(--num); color: var(--txt); }
.result p { color: #cfd2da; margin-bottom: 18px; }

/* ---------- health bars & floating numbers over the 3D scene ---------- */
.hb { position: absolute; left: 0; top: 0; width: 64px; margin-left: -32px; margin-top: -10px; pointer-events: none; }
.hb-hero { width: 84px; margin-left: -42px; } .hb-elite { width: 90px; margin-left: -45px; } .hb-boss { display: none; }
.hb-bar { position: relative; height: 5px; background: rgba(20, 8, 8, .85); border: 1px solid rgba(0, 0, 0, .7); border-radius: 3px; overflow: hidden; }
.hb-bar i, .hb-bar b { position: absolute; inset: 0 auto 0 0; }
.hb-bar i { background: linear-gradient(180deg, #ff6a5a, #a8201a); z-index: 1; } .hb-hero .hb-bar i { background: linear-gradient(180deg, #8af0b0, #2a9a5a); } .hb-elite .hb-bar i { background: linear-gradient(180deg, #ffe08a, #c08a1a); }
.hb-bar b { background: rgba(255, 255, 255, .45); }
.hb-elite .hb-bar { border-color: var(--gold-lo); }
.hb-es { height: 3px; background: rgba(6, 10, 24, .8); margin-bottom: 1px; border-radius: 2px; overflow: hidden; } .hb-es i { display: block; height: 100%; background: var(--jade); }
.hb-st { display: flex; gap: 2px; justify-content: center; min-height: 14px; }
.hb-st span { font-size: 10px; line-height: 13px; padding: 0 3px; border-radius: 7px; background: rgba(0, 0, 0, .6); color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.hb-st sub { font-size: 8px; }
.hb-name { font: 11px var(--title); text-align: center; color: #ffd9a0; text-shadow: 0 1px 3px #000; white-space: nowrap; letter-spacing: .1em; }
.ft { position: absolute; left: 0; top: 0; font: 16px var(--num); text-shadow: 0 1px 2px #000, 0 0 5px #000; pointer-events: none; white-space: nowrap; color: #fff; }
.ft.crit { color: var(--gold-hi); font-size: 22px; text-shadow: 0 0 10px rgba(255, 173, 90, .8), 0 1px 2px #000; }
.ft.hurt { color: #ff7a6a; }

.credit { position: absolute; left: 12px; bottom: 6px; font-size: 10px; color: var(--mute); opacity: .5; pointer-events: none; }
.in-run .credit { display: none; }

@media (max-width: 1100px) {
  .device { grid-template-columns: 1fr; top: 54%; overflow: auto; max-height: calc(100vh - 120px); }
  .win-left { width: min(440px, calc(100vw - 120px)); }
  .win-right { width: min(476px, calc(100vw - 120px)); }
  .tiers { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .vital.low .fill, .camp-bg .mist, .skill.channel, .toasts p, .legend-drop { animation: none; } }

/* ---------- ground loot labels (PoE-like plates that follow the drop) ---------- */
.lt-layer { position: absolute; inset: 0; pointer-events: none; }
.lt { position: absolute; left: 0; top: 0; padding: 1px 9px 2px; font: 500 12.5px/1.45 var(--body); white-space: nowrap; pointer-events: auto; cursor: pointer; user-select: none;
  color: var(--c, #d6d6d0); background: rgba(5, 7, 14, .84); border: 1px solid color-mix(in srgb, var(--c, #d6d6d0) 55%, transparent); border-radius: 2px;
  text-shadow: 0 1px 1px #000; animation: lt-in .22s ease-out; will-change: transform; }
.lt::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: var(--thread, 0px); background: linear-gradient(var(--c), transparent); opacity: .55; pointer-events: none; }
.lt:hover { background: rgba(26, 32, 54, .96); border-color: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 45%, transparent); z-index: 2; }
.lt.target { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 12px color-mix(in srgb, var(--c) 60%, transparent); }
.lt.r-normal { --c: #cfcfc8; opacity: .85; } .lt.r-magic { --c: #8eb4ff; } .lt.r-rare { --c: #f6d86c; }
.lt.r-exalted { --c: #ffa25a; background: rgba(40, 18, 6, .88); font-weight: 600; }
.lt.r-legendary { --c: #ff8a3a; padding: 2px 12px 3px; font: 600 14px/1.45 var(--title); letter-spacing: .08em; color: #2a1004; text-shadow: none;
  background: linear-gradient(180deg, #ffd9a0, #ff9a3a 60%, #d8601a); border-color: #fff0d0; box-shadow: 0 0 16px rgba(255, 140, 50, .7); animation: lt-in .3s ease-out, lt-pulse 1.6s ease-in-out infinite alternate; }
.lt.r-legendary::after { width: 2px; opacity: .9; }
.lt.r-currency { --c: #e6d8ac; } .lt.r-currency.g2 { --c: #8fe8d8; } .lt.r-currency.g3 { --c: #f8bcd6; background: rgba(36, 10, 26, .88); }
@keyframes lt-in { from { opacity: 0; filter: brightness(2.2); } to { opacity: 1; filter: none; } }
@keyframes lt-pulse { to { box-shadow: 0 0 26px rgba(255, 160, 70, .95); } }

/* ---------- atlas: seeded star map of node-linked maps ---------- */
.atlas { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.atlas.dragging { cursor: grabbing; }
.atlas-svg { width: 100%; height: 100%; display: block; }
.atlas .rings circle { fill: none; stroke: rgba(216, 180, 106, .14); stroke-width: 1.2; stroke-dasharray: 2 10; }
.atlas .rings text { fill: rgba(216, 180, 106, .35); font: 20px var(--num); text-anchor: middle; letter-spacing: .2em; }
.atlas .region-name { font: 64px var(--title); text-anchor: middle; dominant-baseline: middle; opacity: .2; letter-spacing: .1em; pointer-events: none; }
.atlas .fog { fill: #04060d; opacity: .9; pointer-events: none; }
.atlas .roads line { stroke-linecap: round; }
.atlas .roads .done { stroke: var(--gold); stroke-width: 3; opacity: .85; filter: drop-shadow(0 0 4px rgba(251, 231, 176, .5)); }
.atlas .roads .open { stroke: var(--gold-hi); stroke-width: 2; stroke-dasharray: 7 7; opacity: .7; animation: road 1.2s linear infinite; }
.atlas .roads .seen { stroke: rgba(216, 180, 106, .28); stroke-width: 1.5; stroke-dasharray: 3 9; }
@keyframes road { to { stroke-dashoffset: -14; } }
.atlas .landmark { opacity: .45; pointer-events: none; }
.atlas .node { cursor: pointer; }
.atlas .node .halo { fill: none; stroke: none; }
.atlas .node .ring { fill: #0b1226; stroke: var(--hue); stroke-width: 2; transition: r .15s; }
.atlas .node .tier { fill: var(--txt); font: 13px var(--num); text-anchor: middle; pointer-events: none; }
.atlas .node .tier-sm { fill: var(--mute); font: 12px var(--num); text-anchor: middle; pointer-events: none; }
.atlas .node .name { fill: var(--gold-hi); font: 15px var(--title); text-anchor: middle; letter-spacing: .15em; paint-order: stroke; stroke: #04060d; stroke-width: 4px; pointer-events: none; }
.atlas .node.st-seen { opacity: .5; }
.atlas .node.st-seen .ring { stroke-dasharray: 3 3; }
.atlas .node.st-done .ring { fill: var(--gold); stroke: var(--gold-hi); }
.atlas .node.st-done .tier { fill: #2a1a06; font-weight: 700; }
.atlas .node.st-open .halo { stroke: var(--gold-hi); stroke-width: 1.5; opacity: .7; animation: halo 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.atlas .node.st-open .ring { filter: drop-shadow(0 0 6px var(--hue)); }
@keyframes halo { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.atlas .node.k-boss .ring { stroke-width: 3; fill: #1a0e1c; }
.atlas .node.k-boss.st-done .ring { fill: var(--gold); }
.atlas .node.k-corrupt .ring { stroke: #c06aff; fill: #1a0a26; }
.atlas .node.k-vault .ring { stroke: var(--gold-hi); }
.atlas .node:hover .ring { stroke: #fff; }
.atlas .node.sel .ring { stroke: #fff; stroke-width: 3; filter: drop-shadow(0 0 10px rgba(255, 255, 255, .7)); }
.atlas .node.sel .halo { stroke: #fff; stroke-width: 1; opacity: 1; animation: none; }
.atlas .here-mark { fill: var(--jade); filter: drop-shadow(0 0 6px var(--jade)); }

.atlas-card { position: absolute; left: 24px; top: 104px; bottom: 24px; width: 400px; display: flex; flex-direction: column; z-index: 5; }
.ac-head { display: flex; gap: 14px; align-items: center; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.ac-icon { width: 54px; height: 54px; flex: none; display: grid; place-items: center; padding: 11px; border-radius: 50%; border: 2px solid var(--hue); background: radial-gradient(circle, #1e2a4e, #060a18); box-shadow: 0 0 16px color-mix(in srgb, var(--hue) 40%, transparent); }
.ac-icon b { font: 22px var(--num); color: var(--gold-hi); }
.ac-head h2 { font: 400 24px var(--title); color: var(--gold-hi); letter-spacing: .25em; }
.ac-head p { color: var(--mute); font-size: 12.5px; margin-top: 2px; }
.ac-head .st-open { color: var(--jade); } .ac-head .st-done { color: var(--gold); } .ac-head .st-seen { color: var(--bad); }
.ac-body { flex: 1; overflow-y: auto; padding: 14px 22px; scrollbar-width: thin; scrollbar-color: var(--gold-lo) transparent; }
.ac-kind { padding: 8px 12px; margin-bottom: 10px; font-size: 13px; background: rgba(216, 180, 106, .08); border-left: 2px solid var(--gold); }
.ac-kind b { font: 15px var(--title); color: var(--gold-hi); margin-right: 8px; letter-spacing: .1em; }
.ac-mods { margin-bottom: 10px; } .ac-mods li { color: var(--r-magic); font-size: 13px; padding: 1px 0; } .ac-mods li::before { content: "◆ "; font-size: 9px; vertical-align: 2px; color: var(--gold-lo); }
.ac-loot { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--mute); margin-bottom: 12px; } .ac-loot b { font: 15px var(--num); color: var(--txt); }
.atlas-card .pressure { margin-bottom: 4px; } .atlas-card .pressure div { padding: 6px 10px; } .atlas-card .pressure dd { font-size: 15px; }
.atlas-card .req li { padding: 5px 2px; }
.atlas-card .sub { margin-top: 12px; }
.ac-foot { padding: 14px 22px 20px; border-top: 1px solid var(--line); display: flex; justify-content: center; }
.ac-foot .orn-btn.big { width: 100%; }
.atlas-foot { position: absolute; right: 110px; bottom: 24px; display: flex; align-items: center; gap: 18px; padding: 8px 16px; background: linear-gradient(90deg, transparent, rgba(4, 6, 13, .8) 20%); border-bottom: 1px solid var(--gold-lo); z-index: 5; font-size: 12.5px; color: var(--mute); }
.atlas-foot b { font: 17px var(--num); color: var(--gold-hi); }
.atlas-foot ul { display: flex; gap: 12px; } .atlas-foot li { display: flex; align-items: center; gap: 4px; } .atlas-foot .gi { width: 16px; height: 16px; }
.g:not(.in-run) .topbar { z-index: 6; pointer-events: none; } .g:not(.in-run) .topbar button { pointer-events: auto; }
.atlas .stars circle { opacity: .45; animation: twinkle 3s ease-in-out infinite alternate; pointer-events: none; }
.atlas .stars circle:nth-child(3n) { animation-duration: 4.4s; } .atlas .stars circle:nth-child(4n+1) { animation-delay: -2s; }
@keyframes twinkle { from { opacity: .18; } to { opacity: .6; } }
.atlas .region-name { opacity: .16; }
.atlas.far .node .name, .atlas.far .node .tier-sm { display: none; }
.atlas.far .node.sel .name { display: block; font-size: 24px; }
.er-right .er-hint { position: absolute; right: 14px; top: 100%; margin-top: 4px; white-space: nowrap; font-size: 11px; color: rgba(240, 232, 214, .4); }

/* ---------- atlas window (rail · M) ---------- */
.atlas-win { position: absolute; inset: 0; z-index: 20;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, #142042 0%, transparent 70%), radial-gradient(ellipse 60% 40% at 50% 110%, #22160e 0%, transparent 70%), linear-gradient(#070c1a, #03050b); }
.atlas-top { position: absolute; left: 24px; right: 110px; top: 22px; z-index: 6; display: flex; align-items: center; gap: 18px; pointer-events: none; }
.atlas-top h2 { font: 400 30px/1 var(--title); color: var(--gold-hi); letter-spacing: .5em; text-shadow: 0 0 18px rgba(251, 231, 176, .3); }
.atlas-top span { color: var(--mute); font-size: 13px; }
.atlas-top .x { margin-left: auto; pointer-events: auto; width: 36px; height: 36px; font-size: 22px; background: rgba(6, 10, 24, .8); }
.atlas-win .atlas-card { top: 84px; }

/* ---------- waystones ---------- */
.gi.w-normal { --gg: linear-gradient(160deg, #f4efe4, #8d877b); } .gi.w-magic { --gg: linear-gradient(160deg, #e0ecff, #4f7fd6); } .gi.w-rare { --gg: linear-gradient(160deg, #fff3b8, #c9962a); }
.ws { position: relative; width: 46px; height: 46px; padding: 8px; border-radius: 6px; background: radial-gradient(circle at 50% 35%, #1a2444, #060a18); box-shadow: inset 0 0 0 1px var(--gold-lo); transition: box-shadow .15s, transform .15s; }
.ws b { position: absolute; right: 3px; bottom: 1px; font: 13px/1 var(--num); color: var(--txt); text-shadow: 0 1px 2px #000; }
.ws.w-magic { box-shadow: inset 0 0 0 1px rgba(134, 172, 255, .6); } .ws.w-rare { box-shadow: inset 0 0 0 1px rgba(242, 211, 106, .7); }
.ws:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--gold-hi); }
.ws.on { box-shadow: inset 0 0 0 2px var(--gold-hi), 0 0 14px rgba(251, 231, 176, .45); }
.ws-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-none { color: var(--bad); font-size: 13px; padding: 10px 0; }
.ws-mods { margin-top: 8px; } .ws-tier { margin-top: 6px; color: var(--warn); font-size: 12.5px; }
.ac-stone { padding: 0 22px 10px; border-top: 1px solid var(--line); }
.ac-stone .sub { margin-top: 10px; }
.hub { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); width: min(720px, calc(100vw - 200px)); padding: 30px 34px 30px; text-align: center; }
.hub-lead { color: var(--mute); font-size: 13.5px; max-width: 34em; margin: 0 auto 18px; }
.ws-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-height: 220px; overflow-y: auto; padding: 4px; margin-bottom: 16px; }
.hub-count { color: var(--mute); font-size: 13px; margin-bottom: 18px; } .hub-count b { font: 17px var(--num); color: var(--gold-hi); }
.lt.r-waystone { --c: #d9cfbf; background: rgba(20, 16, 10, .9); } .lt.r-waystone.w-magic { --c: #8eb4ff; } .lt.r-waystone.w-rare { --c: #f6d86c; }
.toasts .w-magic { color: var(--r-magic); } .toasts .w-rare { color: var(--r-rare); } .toasts .w-normal { color: var(--txt); }
.topbar a.orn-btn { text-decoration: none; pointer-events: auto; }

/* ---------- talent board (rail · P) ---------- */
.tal-win { position: absolute; inset: 0; z-index: 20; background: radial-gradient(ellipse 60% 50% at 50% 45%, #141c3a 0%, transparent 70%), linear-gradient(#070b18, #03050b); }
.tal-board { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.tal-board.dragging { cursor: grabbing; }
.tal-board svg { width: 100%; height: 100%; display: block; }
.tal-domain { font: 72px var(--title); text-anchor: middle; dominant-baseline: middle; opacity: .22; letter-spacing: .1em; pointer-events: none; }
.tal-edges line { stroke: rgba(141, 147, 168, .22); stroke-width: 4; stroke-linecap: round; }
.tal-edges line.open { stroke: rgba(216, 180, 106, .45); stroke-width: 4; }
.tal-edges line.on { stroke: var(--gold-hi); stroke-width: 6; filter: drop-shadow(0 0 6px rgba(251, 231, 176, .6)); }
.tn { cursor: pointer; }
.tn circle, .tn polygon { fill: #0c1328; stroke: #3c4664; stroke-width: 3; transition: fill .15s, stroke .15s; }
.tn .outer { fill: none; stroke: #4a5272; stroke-width: 2.5; }
.tn.s-open circle, .tn.s-open polygon { stroke: var(--gold); }
.tn.s-open .outer { stroke: var(--gold-lo); }
.tn.s-on circle, .tn.s-on polygon { fill: var(--gold); stroke: var(--gold-hi); filter: drop-shadow(0 0 8px rgba(251, 231, 176, .7)); }
.tn.s-on .outer { fill: none; stroke: var(--gold-hi); }
.tn:hover circle, .tn:hover polygon { stroke: #fff; }
.tn.k-notable circle:not(.outer) { fill: #1a1630; }
.tn.k-notable.s-on circle:not(.outer) { fill: #f2c46a; }
.tn.k-trait polygon { fill: #0e1a30; stroke-width: 3.5; }
.tn.k-trait.ly-form polygon { stroke: #6ac0e8; } .tn.k-trait.ly-link polygon { stroke: #b088ff; }
.tn.k-trait.s-on.ly-form polygon { fill: #4aa0d0; stroke: #d8f2ff; } .tn.k-trait.s-on.ly-link polygon { fill: #8a5ae0; stroke: #efe0ff; }
.tn.k-trait text { fill: #e7e2d4; font: 16px var(--title); text-anchor: middle; pointer-events: none; }
.tn.k-keystone circle:not(.outer) { fill: #2a1408; stroke: #ff9a3a; stroke-width: 4; }
.tn.k-keystone .outer { stroke: #8a4a1a; stroke-width: 3; }
.tn.k-keystone .star { fill: #ffad5a; pointer-events: none; }
.tn.k-keystone.s-on circle:not(.outer) { fill: #ff8a2a; stroke: #fff0d0; } .tn.k-keystone.s-on .star { fill: #2a1004; }
.tn.k-start circle:not(.outer) { fill: #0f2a2a; stroke: var(--jade); } .tn.k-start .outer { stroke: var(--jade); }
.tn .halo { fill: none !important; stroke: var(--jade) !important; stroke-width: 3; animation: halo 1.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.tal-board.far .tal-domain { opacity: .3; }
.tal-side { position: absolute; left: 24px; top: 84px; bottom: 24px; width: 330px; padding: 20px 22px; display: flex; flex-direction: column; z-index: 5; }
.tal-points { color: var(--mute); font-size: 12.5px; margin-bottom: 10px; } .tal-points b { font: 26px var(--num); color: var(--gold-hi); margin-right: 6px; } .tal-points small { display: block; }
.tal-search { padding: 6px 12px; font: 13px var(--body); color: var(--txt); background: var(--inset); border: 1px solid var(--gold-lo); border-radius: 16px; margin-bottom: 8px; }
.tal-sum { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--gold-lo) transparent; }
.tal-sum p { font-size: 12.5px; padding: 2px 0; }
.tal-sum .sp-keystone { color: #ffbd7a; } .tal-sum .sp-trait { color: #c8b0ff; } .tal-sum .st { color: var(--txt); }
.tal-msg { color: var(--warn); font-size: 12.5px; margin: 8px 0; }
.tal-side .orn-btn { align-self: flex-start; margin-top: 10px; }
.tal-tip { position: fixed; z-index: 40; max-width: 320px; padding: 10px 14px; pointer-events: none; background: rgba(8, 12, 28, .96); border: 1px solid var(--gold-lo); border-radius: 3px; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); }
.tal-tip h4 { font: 400 17px var(--title); color: var(--gold-hi); letter-spacing: .08em; margin-bottom: 4px; }
.tal-tip h4 small { font: 11px var(--body); color: var(--mute); margin-left: 8px; letter-spacing: 0; }
.tal-tip p { font-size: 13px; color: var(--r-magic); } .tal-tip em { display: block; margin-top: 6px; font-size: 11.5px; font-style: normal; color: var(--mute); }
.tal-tip.s-open em { color: var(--jade); }

/* ---------- account screen ---------- */
.acc { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse 70% 50% at 50% 0%, #1c2a52 0%, transparent 70%), radial-gradient(ellipse 60% 40% at 50% 110%, #2a1a10 0%, transparent 70%), linear-gradient(#0a1022, #05070f); }
.acc-panel { width: min(680px, calc(100vw - 40px)); max-height: calc(100vh - 60px); overflow-y: auto; padding: 30px 34px 28px; }
.acc-lead { color: var(--mute); text-align: center; font-size: 13.5px; margin-bottom: 18px; }
.acc-warn { color: var(--warn); text-align: center; margin-bottom: 14px; }
.acc-list li { display: flex; align-items: center; gap: 8px; padding: 12px 14px; margin-bottom: 8px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); border-radius: 3px; }
.acc-list li.last { box-shadow: inset 0 0 0 1px var(--gold); }
.acc-list li:hover { box-shadow: inset 0 0 0 1px var(--gold-hi); }
.acc-main { flex: 1; min-width: 0; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.acc-main b { font: 400 19px var(--title); color: var(--gold-hi); letter-spacing: .1em; }
.acc-main small { grid-column: 1; color: var(--mute); font-size: 12px; }
.acc-main em { grid-row: 1; grid-column: 2; font-style: normal; font-size: 12px; color: var(--mute); }
.acc-list input, .acc-new input { padding: 6px 12px; font: 14px var(--body); color: var(--txt); background: rgba(4, 6, 13, .7); border: 1px solid var(--gold-lo); border-radius: 16px; }
.acc-confirm { color: var(--bad); font-size: 13px; }
.acc-empty { color: var(--mute); justify-content: center; }
.acc-new { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.acc-new input { flex: 1; min-width: 160px; }
.acc-msg { color: var(--bad); margin-top: 10px; font-size: 13px; }

/* ---------- base lines (1–3) on ground plates, toasts and tooltips ---------- */
.lt .pips { font-style: normal; font-size: 9px; letter-spacing: 1px; margin-right: 5px; color: var(--c); vertical-align: 1px; }
.lt.b2 { border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: inset 0 0 8px color-mix(in srgb, var(--c) 22%, transparent); font-weight: 600; }
.lt.b3 { padding: 2px 12px 3px; font-weight: 700; color: color-mix(in srgb, var(--c) 75%, #fff); border: 1px solid #ffe08a; overflow: visible;
  background: linear-gradient(100deg, rgba(40, 28, 6, .94) 30%, rgba(120, 90, 30, .95) 50%, rgba(40, 28, 6, .94) 70%) 0 0 / 260% 100%;
  box-shadow: 0 0 0 1px rgba(255, 224, 138, .35), 0 0 16px rgba(255, 210, 110, .55); animation: lt-in .3s ease-out, lt-shine 2.4s linear infinite; }
.lt.b3.r-normal { opacity: 1; color: #f2ecdc; }
.lt.b3 .pips { color: #fff1b8; text-shadow: 0 0 6px #ffd56a; }
.lt.b3::before { content: ""; position: absolute; left: 50%; bottom: calc(100% + 1px); width: 6px; height: 70px; transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(to top, rgba(255, 226, 140, .55), transparent); filter: blur(2px); animation: lt-beam 1.8s ease-in-out infinite alternate; }
.lt.b3.r-legendary { color: #2a1004; background: linear-gradient(100deg, #ffd9a0 30%, #fff3d6 50%, #ffd9a0 70%) 0 0 / 260% 100%; }
@keyframes lt-shine { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@keyframes lt-beam { from { opacity: .45; height: 56px; } to { opacity: .9; height: 80px; } }
.toasts p.b2 { box-shadow: inset 0 0 0 1px currentColor; }
.toasts p.b3 { color: #ffe08a; background: linear-gradient(90deg, rgba(60, 40, 8, .95), rgba(8, 12, 28, .92)); box-shadow: inset 0 0 0 1px #ffe08a, 0 0 18px rgba(255, 210, 110, .5); font-weight: 600; }
.itip-bl { letter-spacing: .04em; } .itip-bl i { font-style: normal; font-size: 10px; margin-left: 2px; color: rgba(200, 190, 160, .3); }
.itip-bl i.on { color: var(--gold-hi); } .itip-bl.b3 i.on { color: #ffe08a; text-shadow: 0 0 6px rgba(255, 213, 106, .8); }

/* ---------- boss portal ---------- */
.lt.lt-portal { --c: #7ff0e0; z-index: 3; display: flex; flex-direction: column; align-items: center; padding: 4px 14px 5px; background: rgba(4, 22, 26, .9); border-color: #7ff0e0;
  box-shadow: 0 0 18px rgba(110, 240, 225, .45); animation: lt-in .4s ease-out, portal-pulse 1.8s ease-in-out infinite alternate; }
.lt.lt-portal span { font: 600 15px var(--title); letter-spacing: .2em; color: #d8fff8; }
.lt.lt-portal small { font-size: 11px; color: #8fd8cc; }
.lt.lt-portal::after { display: none; }
@keyframes portal-pulse { to { box-shadow: 0 0 28px rgba(110, 240, 225, .75); } }
.cleared-banner { position: absolute; left: 50%; top: 92px; width: max-content; max-width: calc(100vw - 40px); transform: translateX(-50%); z-index: 20; pointer-events: none; text-align: center; padding: 14px 40px 12px;
  background: radial-gradient(ellipse at 50% 50%, rgba(8, 13, 30, .85), rgba(8, 13, 30, 0) 75%); animation: banner-in .6s ease-out, banner-out .8s ease-in 6.2s forwards; }
.cleared-banner h2 { font: 400 34px var(--title); color: var(--gold-hi); letter-spacing: .3em; text-shadow: 0 0 22px rgba(251, 231, 176, .5); }
.cleared-banner p { font: 15px var(--num); color: #e8e2cf; margin: 4px 0 6px; }
.cleared-banner small { color: #8fd8cc; font-size: 12.5px; }
@keyframes banner-in { from { opacity: 0; transform: translate(-50%, -12px); } }
@keyframes banner-out { to { opacity: 0; } }

/* ---------- atlas card: waystone grid ---------- */
.ws-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 8px; }
.ws-grid .ws { width: auto; height: auto; aspect-ratio: 1; cursor: pointer; }
.ws-grid .ws:hover:not(:disabled) { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--gold-hi), 0 0 10px rgba(251, 231, 176, .25); }
.ws-grid .ws.on { box-shadow: inset 0 0 0 2px var(--gold-hi), 0 0 14px rgba(251, 231, 176, .5); }
.ws-grid .ws.low { opacity: .32; filter: grayscale(.7); cursor: not-allowed; }
.ws-grid .ws.empty { background: rgba(4, 6, 13, .55); box-shadow: inset 0 0 0 1px rgba(201, 168, 106, .12); cursor: default; }
.ws-grid .ws:disabled { opacity: 1; } .ws-grid .ws.low:disabled { opacity: .32; }
.ws-sum { padding: 10px 0 2px; font-size: 13px; color: var(--mute); } .ws-sum b { color: var(--gold-hi); font-weight: 600; }
.ws-sum b.w-magic { color: var(--r-magic); } .ws-sum b.w-rare { color: var(--r-rare); } .ws-sum.bad { color: var(--bad); }

/* ---------- skill bar slots (drop targets) and the skills panel beside the character ---------- */
.barslot { cursor: default; transition: box-shadow .15s, background .15s; }
.barslot.filled { cursor: grab; }
.barslot b { flex: 1; min-width: 0; font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barslot:not(.filled) b { color: var(--mute); font-weight: 400; }
.barslot.drop, .er-cross .skill.drop { box-shadow: inset 0 0 0 2px var(--gold-hi), 0 0 14px rgba(251, 231, 176, .45); background: rgba(60, 46, 18, .6); }
.win-skills { left: 474px; top: 20px; width: 300px; max-height: calc(100vh - 40px); }
.win-skills .hint { margin-bottom: 10px; }
.skill-cards { display: flex; flex-direction: column; gap: 6px; }
.skill-card { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 4px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); cursor: grab; user-select: none; transition: box-shadow .15s, transform .15s; }
.skill-card:hover { box-shadow: inset 0 0 0 1px var(--gold), 0 0 10px rgba(251, 231, 176, .18); transform: translateX(2px); }
.skill-card:active { cursor: grabbing; }
.skill-card.on { box-shadow: inset 0 0 0 1px var(--gold-lo); }
.sc-ico { width: 42px; height: 42px; padding: 7px; flex: none; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #1a2444, #060a18); box-shadow: 0 0 0 1px var(--gold-lo); }
.sc-body { flex: 1; min-width: 0; }
.sc-body h4 { font: 400 15px var(--title); letter-spacing: .08em; color: var(--gold-hi); }
.sc-body p { font-size: 12px; color: #c9cbd3; }
.sc-body small { display: block; font-size: 11px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-key { position: absolute; top: 6px; right: 8px; }
@media (max-width: 1100px) { .win-skills { left: auto; right: 20px; } }

/* ---------- skill cells (bar + skills panel) and the skill tooltip ---------- */
.barpick { display: grid; grid-template-columns: repeat(4, minmax(0, 74px)); justify-content: space-around; gap: 10px; }
.bar-cell, .skill-cell { position: relative; aspect-ratio: 1; padding: 14%; border-radius: 6px; background: radial-gradient(circle at 50% 35%, #1a2444, #060a18);
  box-shadow: inset 0 0 0 1px var(--gold-lo); transition: box-shadow .15s, transform .15s; user-select: none; }
.bar-cell .gi, .skill-cell .gi { width: 100%; height: 100%; }
.bar-cell.filled, .skill-cell:not(.empty) { cursor: grab; }
.bar-cell:hover.filled, .skill-cell:not(.empty):hover { box-shadow: inset 0 0 0 1px var(--gold-hi), 0 0 12px rgba(251, 231, 176, .3); transform: translateY(-1px); }
.bar-cell kbd { position: absolute; left: 4px; top: 3px; }
.bar-cell small { position: absolute; left: 0; right: 0; bottom: -18px; text-align: center; font-size: 11.5px; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-cell:not(.filled) small { color: var(--mute); }
.barpick { margin-bottom: 18px; }
.bar-cell.drop { box-shadow: inset 0 0 0 2px var(--gold-hi), 0 0 14px rgba(251, 231, 176, .45); background: radial-gradient(circle at 50% 35%, #3a2c10, #0a0a12); }
.skill-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.skill-cell.empty { background: rgba(4, 6, 13, .55); box-shadow: inset 0 0 0 1px rgba(201, 168, 106, .12); }
.skill-cell.on { box-shadow: inset 0 0 0 1px var(--gold); }
.skill-cell kbd { position: absolute; right: 3px; bottom: 2px; }
.win-skills { width: 330px; }
.stip { position: fixed; z-index: 80; width: 280px; pointer-events: none; padding: 12px 14px 10px; border-radius: 4px; background: linear-gradient(180deg, rgba(14, 20, 42, .98), rgba(6, 9, 20, .98));
  box-shadow: 0 0 0 1px var(--gold-lo), 0 12px 30px rgba(0, 0, 0, .55); animation: toast .15s ease-out; }
.stip header { display: flex; gap: 10px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.stip-ico { width: 44px; height: 44px; padding: 7px; flex: none; border-radius: 6px; background: radial-gradient(circle at 50% 35%, #1a2444, #060a18); box-shadow: inset 0 0 0 1px var(--gold-lo); }
.stip-ico .gi { width: 100%; height: 100%; }
.stip h3 { font: 400 18px var(--title); letter-spacing: .1em; color: var(--gold-hi); }
.stip header p { font-size: 12px; color: var(--mute); }
.stip-desc { margin: 8px 0 6px; font-size: 13px; line-height: 1.55; color: #dcdde3; }
.stip dl div { display: flex; justify-content: space-between; padding: 2px 0; font-size: 12.5px; } .stip dt { color: var(--mute); } .stip dd { font-family: var(--num); color: var(--txt); }
.stip-from { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--mute); }

/* ---------- shared tooltip for waystones / currency / skills (same frame as equipment) ---------- */
.itip.thing { width: 320px; }
.itip.thing .itip-icon .gi { width: 100%; height: 100%; }
.itip.thing.w-normal h3 { color: var(--txt); } .itip.thing.w-magic h3 { color: var(--r-magic); } .itip.thing.w-rare h3 { color: var(--r-rare); }
.itip.thing.r-currency h3 { color: var(--r-currency); }
.itip.thing[class*="el-"] h3 { color: var(--gold-hi); }
.thing-desc { margin: 10px 16px 0; font-size: 13px; line-height: 1.6; color: #d8dae2; }
.thing-rows { margin: 10px 16px 0; padding: 6px 10px; background: var(--inset); border-radius: 2px; box-shadow: inset 0 0 0 1px var(--line); }
.thing-rows div { display: flex; justify-content: space-between; padding: 2px 0; font-size: 12.5px; } .thing-rows dt { color: var(--mute); } .thing-rows dd { font-family: var(--num); color: var(--txt); }
.thing-note { margin: 10px 16px 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--jade); }
.itip.thing .itip-lines li span { color: var(--r-magic); }

/* ---------- currency: bag stacks and the strip inside the item tooltip (Ctrl pins it) ---------- */
.cur-stacks { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cell.cur { box-shadow: inset 0 0 0 1px rgba(230, 216, 172, .35); }
.cell.cur em, .cur-cell b { position: absolute; right: 3px; bottom: 1px; font: 11px var(--num); font-style: normal; color: #f2e8c8; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.tipwrap.pinned { pointer-events: auto; }
.tipwrap.pinned .itip { box-shadow: 0 0 0 1px var(--gold-hi), 0 0 24px rgba(251, 231, 176, .25), 0 18px 50px rgba(0, 0, 0, .75); }
.itip-cur { margin: 12px 14px 0; padding-top: 10px; border-top: 1px solid var(--line); }
.itip-cur header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.itip-cur header b { font: 400 14px var(--title); letter-spacing: .2em; color: var(--gold-hi); }
.itip-cur header small { flex: 1; font-size: 11.5px; color: var(--mute); }
.itip-cur.pinned header small { color: var(--jade); }
.itip-cur header .x { position: static; width: 22px; height: 22px; font-size: 14px; }
.cur-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.cur-cell { position: relative; aspect-ratio: 1; padding: 5px; border-radius: 3px; background: radial-gradient(circle at 50% 35%, rgba(30, 42, 78, .85), rgba(6, 10, 24, .92)); box-shadow: inset 0 0 0 1px rgba(230, 216, 172, .25); }
.cur-cell .gi { width: 100%; height: 100%; }
.itip-cur.pinned .cur-cell { cursor: pointer; } .itip-cur.pinned .cur-cell:hover { box-shadow: inset 0 0 0 1px var(--gold-hi); }
.cur-cell.on { box-shadow: inset 0 0 0 2px var(--gold-hi), 0 0 12px rgba(251, 231, 176, .55); background: radial-gradient(circle at 50% 35%, #4a3a14, #120c04); }
.cur-act { margin-top: 8px; text-align: center; }
.cur-msg { margin-top: 6px; font-size: 12.5px; color: var(--jade); text-align: center; }
.itip li.target { cursor: pointer; box-shadow: inset 0 0 0 1px rgba(251, 231, 176, .35); background: rgba(251, 231, 176, .06); }
.itip li.target:hover { box-shadow: inset 0 0 0 1px var(--gold-hi); background: rgba(251, 231, 176, .14); }
.cur-grid { position: relative; }
.cur-peek { position: absolute; z-index: 3; width: 220px; transform: translate(-50%, calc(-100% - 8px)); padding: 8px 10px; border-radius: 3px; pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 28, 54, .99), rgba(8, 12, 26, .99)); box-shadow: 0 0 0 1px var(--gold-lo), 0 8px 22px rgba(0, 0, 0, .6); }
.cur-peek b { font: 400 15px var(--title); letter-spacing: .1em; color: var(--r-currency); } .cur-peek small { float: right; font: 11px var(--num); color: var(--mute); margin-top: 3px; }
.cur-peek p { margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: #dcdde3; }
.cur-peek em { display: block; margin-top: 4px; font-style: normal; font-size: 11.5px; color: var(--jade); }

/* ---------- main quest: tracker, story cards, quest log, atlas marks ---------- */
.qtrack { position: absolute; left: 24px; bottom: 28px; z-index: 14; width: 300px; padding: 12px 14px 10px; cursor: pointer;
  background: linear-gradient(90deg, rgba(8, 12, 28, .88), rgba(8, 12, 28, .55) 80%, transparent); border-left: 2px solid var(--gold); transition: background .2s; }
.qtrack:hover { background: linear-gradient(90deg, rgba(20, 26, 50, .95), rgba(8, 12, 28, .6) 80%, transparent); }
.qtrack.inrun { top: 116px; bottom: auto; width: 290px; }
.qtrack header small { display: block; font-size: 11px; color: var(--mute); letter-spacing: .08em; }
.qtrack header b { font: 400 19px var(--title); letter-spacing: .16em; color: var(--gold-hi); }
.qtrack ul { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.qtrack li, .ql-steps li { display: grid; grid-template-columns: 12px 1fr auto; gap: 7px; align-items: baseline; font-size: 12.5px; color: #e2e2ea; }
.qtrack li i, .ql-steps li i { width: 8px; height: 8px; transform: rotate(45deg) translateY(-1px); border: 1px solid var(--gold); }
.qtrack li em, .ql-steps li em { font: 11.5px var(--num); font-style: normal; color: var(--gold-hi); }
.qtrack li.done, .ql-steps li.done { color: var(--mute); text-decoration: line-through; text-decoration-color: rgba(200, 190, 160, .4); }
.qtrack li.done i, .ql-steps li.done i { background: var(--jade); border-color: var(--jade); }
.qready { margin-top: 6px; font-size: 12.5px; color: var(--jade); animation: portal-pulse 1.4s ease-in-out infinite alternate; }
.toasts.camp { bottom: 40px; }
.toasts p.quest { color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--gold); background: linear-gradient(90deg, rgba(60, 44, 12, .95), rgba(8, 12, 28, .92)); }
.toasts p.quest.big { font-size: 15px; padding: 7px 16px 7px 8px; }
.story { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, rgba(10, 16, 36, .7), rgba(2, 3, 8, .92)); animation: story-fade .5s ease-out; }
@keyframes story-fade { from { opacity: 0; } }
.story-card { width: min(620px, calc(100vw - 40px)); max-height: calc(100vh - 60px); overflow-y: auto; padding: 34px 40px 30px; text-align: center; }
.story-ch { display: block; font-size: 12px; letter-spacing: .2em; color: var(--mute); }
.story-card h2 { margin: 6px 0 18px; font: 400 38px var(--title); letter-spacing: .4em; color: var(--gold-hi); text-shadow: 0 0 22px rgba(251, 231, 176, .35); }
.story-text { text-align: left; }
.story-text p { margin-bottom: 12px; font-size: 15px; line-height: 1.9; color: #e4e2da; text-indent: 2em; animation: story-in .9s ease-out both; }
@keyframes story-in { from { opacity: 0; transform: translateY(8px); } }
.story-text p:nth-child(2) { animation-delay: .35s; } .story-text p:nth-child(3) { animation-delay: .7s; } .story-text p:nth-child(4) { animation-delay: 1.05s; } .story-text p:nth-child(5) { animation-delay: 1.4s; }
.story-goals { text-align: left; margin: 0 0 20px; display: flex; flex-direction: column; gap: 4px; }
.story-goals li { font-size: 13px; color: #cfd2da; padding-left: 16px; position: relative; }
.story-goals li::before { content: "◇"; position: absolute; left: 0; color: var(--gold); }
.story-reward { margin-bottom: 20px; font-size: 13.5px; color: var(--r-currency); line-height: 1.8; }
.story-card .sub { text-align: left; }
.questlog { display: grid; grid-template-columns: 190px 1fr; gap: 20px; min-height: 0; }
.ql-list { display: flex; flex-direction: column; gap: 6px; }
.ql-list button { width: 100%; display: grid; grid-template-columns: 1fr auto; text-align: left; padding: 8px 12px; border-radius: 3px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); }
.ql-list button small { grid-column: 1 / 3; font-size: 11px; color: var(--mute); }
.ql-list button b { font: 400 16px var(--title); letter-spacing: .1em; color: var(--txt); } .ql-list button em { font: 11px var(--num); font-style: normal; color: var(--mute); align-self: center; }
.ql-list button.done b { color: var(--mute); } .ql-list button.now { box-shadow: inset 0 0 0 1px var(--gold); } .ql-list button.now b { color: var(--gold-hi); }
.ql-list button.on { background: rgba(60, 46, 18, .5); box-shadow: inset 0 0 0 1px var(--gold-hi); }
.ql-list button.locked { opacity: .45; cursor: default; }
.ql-body { min-width: 0; overflow-y: auto; padding-right: 6px; }
.ql-body h3 { margin: 4px 0 14px; font: 400 30px var(--title); letter-spacing: .3em; color: var(--gold-hi); }
.ql-steps { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.ql-steps li { font-size: 13.5px; }
.ql-end { grid-column: 1 / 3; color: var(--jade); text-align: center; }
.atlas .node .qmark circle { fill: #e9b84a; stroke: #fff3cf; stroke-width: 1.2; }
.atlas .node .qmark text { font: 700 11px var(--num); fill: #2a1a06; text-anchor: middle; }
.atlas .node.quest .halo { stroke: #e9b84a; stroke-opacity: .7; }
/* atlas nodes no longer print a tier: a small core marks the node instead (the waystone sets the tier) */
.atlas .node .core { fill: var(--gold-hi); opacity: .85; pointer-events: none; }
.atlas .node.st-done .core { fill: #2a1a06; } .atlas .node.st-open .core { fill: #fbe7b0; }

/* ============ home / stash / bag 5×12 / town portal / experience ============ */
:root { --cs: clamp(28px, calc((100vw - 220px) / 27), 38px); }
.topbar { justify-content: flex-end; left: auto; }
.qtrack { top: 20px; bottom: auto; }                       /* where the camp crest used to be */
.grid.g12, .grid.g10 { gap: 3px; justify-content: center; }
.grid.g12 { grid-template-columns: repeat(12, var(--cs)); }
.grid.g10 { grid-template-columns: repeat(10, var(--cs)); }
.grid.g12 .cell, .grid.g10 .cell { padding: 4px; }
.grid.g12 .cell b, .grid.g10 .cell b { font-size: 8px; right: 2px; top: 0; }
.grid.g12 .cell.cur em { font-size: 10px; }
.win-right { width: auto; }
.win-head .count.full { color: var(--bad); }

/* home: the map device and the stash chest side by side */
.home { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); display: flex; align-items: stretch; gap: 22px; }
.home .hub { position: relative; left: auto; top: auto; transform: none; width: min(640px, calc(100vw - 480px)); }
.chest { width: 210px; padding: 28px 18px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: pointer; text-align: center; transition: box-shadow .15s, transform .15s; }
.chest .gi { width: 92px; height: 92px; filter: drop-shadow(0 0 14px rgba(251, 231, 176, .35)); }
.chest p { color: var(--mute); font-size: 12.5px; } .chest p b { font: 15px var(--num); color: var(--gold-hi); }
.chest small { color: var(--mute); font-size: 11px; letter-spacing: .2em; }
.chest:hover, .chest.on { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--gold-hi), 0 0 26px rgba(251, 231, 176, .25); }
.home-left { position: absolute; left: 34px; bottom: 44px; z-index: 10; display: flex; align-items: flex-end; gap: 22px; }
.home-left .facts { margin: 0; gap: 18px; }

/* the town portal, right next to the skill cross (and at home, beside the facts) */
.tp-btn { position: absolute; left: 186px; bottom: 6px; width: 54px; height: 54px; padding: 11px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #24315c, #070b1c); border: 1px solid var(--gold); box-shadow: 0 0 0 3px rgba(6, 10, 24, .85), 0 0 0 4px var(--gold-lo), 0 0 18px rgba(127, 170, 255, .25); transition: transform .15s, box-shadow .15s; }
.tp-btn:hover:not(:disabled) { transform: scale(1.07); box-shadow: 0 0 0 3px rgba(6, 10, 24, .85), 0 0 0 4px var(--gold-hi), 0 0 24px rgba(127, 170, 255, .5); }
.tp-btn:disabled { opacity: .35; cursor: default; }
.tp-btn kbd { position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); padding: 0 5px; font-size: 10px; background: var(--deep); border: 1px solid var(--gold-lo); border-radius: 7px; }
.tp-btn small { position: absolute; left: 50%; top: 100%; margin-top: 10px; transform: translateX(-50%); white-space: nowrap; font: 12px var(--title); letter-spacing: .2em; color: var(--gold-hi); text-shadow: 0 1px 4px #000; }
.tp-btn.big { position: relative; left: auto; bottom: auto; width: 66px; height: 66px; padding: 13px; animation: tpglow 1.6s ease-in-out infinite alternate; }
.tp-btn.big small { letter-spacing: .08em; }
@keyframes tpglow { to { box-shadow: 0 0 0 3px rgba(6, 10, 24, .85), 0 0 0 4px var(--gold-hi), 0 0 30px rgba(127, 170, 255, .6); } }

/* experience: the thin bar along the bottom-left edge, under the vitals */
.er-left { bottom: 44px; }
.xpbar { position: absolute; left: 34px; bottom: 14px; z-index: 11; width: min(440px, calc(100vw - 200px)); display: flex; align-items: center; gap: 6px; pointer-events: auto; }
.xpbar b { font: 18px/1 var(--num); color: var(--gold-hi); text-shadow: 0 0 8px rgba(251, 231, 176, .35); }
.xpbar > small { font-size: 11px; color: var(--mute); margin-right: 4px; }
.xp-track { position: relative; flex: 1; height: 6px; background: rgba(6, 10, 24, .85); box-shadow: inset 0 0 0 1px rgba(216, 180, 106, .35); border-radius: 1px; }
.xp-track i { position: absolute; left: 1px; top: 1px; bottom: 1px; max-width: calc(100% - 2px); background: linear-gradient(90deg, #8a6a2c, #e8c47a); box-shadow: 0 0 6px rgba(232, 196, 122, .5); transition: width .3s; }
.xp-track span { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(6, 10, 24, .8); }
.xpbar em { font: 11px var(--num); font-style: normal; color: var(--mute); min-width: 34px; text-align: right; }

/* stash window */
.win-vault { width: auto; bottom: auto; max-height: calc(100vh - 40px); }
.vtabs { display: flex; gap: 3px; padding: 0 22px 8px; flex-wrap: wrap; }
.vtabs button { position: relative; padding: 5px 12px 4px; font: 13px var(--title); letter-spacing: .12em; color: var(--mute); border-radius: 3px 3px 0 0; background: rgba(6, 10, 24, .7); box-shadow: inset 0 0 0 1px rgba(216, 180, 106, .2); }
.vtabs button small { margin-left: 4px; font: 10px var(--num); color: var(--mute); opacity: .7; }
.vtabs button:hover { color: var(--gold-hi); }
.vtabs button.on { color: var(--gold-hi); background: linear-gradient(#24315c, #0c1430); box-shadow: inset 0 0 0 1px var(--gold), inset 0 -2px 0 var(--gold-hi); }
.vtabs button.drop { box-shadow: inset 0 0 0 1px var(--jade); color: var(--jade); }
.vcur { display: flex; flex-direction: column; gap: 14px; width: calc(var(--cs) * 12 + 33px); padding: 14px 10px; border-radius: 4px; background: radial-gradient(ellipse at 50% 0%, rgba(60, 48, 22, .35), transparent 70%), rgba(4, 6, 14, .55); box-shadow: inset 0 0 0 1px rgba(216, 180, 106, .18); }
.vcur-group h4 { font: 12px var(--title); letter-spacing: .4em; color: var(--gold); text-align: center; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.vcur-group h4::before, .vcur-group h4::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-lo), transparent); }
.vcur-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.vcur-slot { position: relative; width: 82px; padding: 8px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 4px; background: radial-gradient(circle at 50% 30%, rgba(40, 50, 86, .9), rgba(6, 10, 24, .95)); box-shadow: inset 0 0 0 1px rgba(230, 216, 172, .35); transition: transform .12s, box-shadow .12s; }
.vcur-slot .gi { width: 40px; height: 40px; }
.vcur-slot em { font: 14px var(--num); font-style: normal; color: #f2e8c8; }
.vcur-slot small { font-size: 11px; color: var(--mute); }
.vcur-slot:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--gold-hi), 0 0 10px rgba(251, 231, 176, .2); }
.vcur-slot.none { opacity: .4; } .vcur-slot.none .gi { filter: grayscale(.8); }
.vfoot { display: flex; align-items: center; gap: 12px; margin-top: 12px; } .vfoot .hint { margin: 0; font-size: 12px; }
.vleg { display: grid; grid-template-columns: repeat(6, 72px); gap: 6px; justify-content: center; }
.vleg-slot { position: relative; height: 82px; padding: 6px 3px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 3px; background: radial-gradient(circle at 50% 30%, rgba(70, 40, 18, .75), rgba(8, 8, 16, .95)); box-shadow: inset 0 0 0 1px rgba(255, 173, 90, .45); }
.vleg-slot .gi { width: 34px; height: 34px; }
.vleg-slot small { font-size: 10.5px; color: #ffc58a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.vleg-slot em { font: 10px var(--num); font-style: normal; color: var(--mute); }
.vleg-slot.none { opacity: .35; filter: grayscale(.9); }
.vleg-slot.on, .vleg-slot:hover { box-shadow: inset 0 0 0 1px #ffc58a, 0 0 14px rgba(255, 173, 90, .35); }
.vleg-open { margin-top: 12px; } .vleg-open h4 { font: 15px var(--title); color: #ffc58a; letter-spacing: .1em; margin-bottom: 6px; } .vleg-open h4 small { font: 11px var(--body, inherit); color: var(--mute); letter-spacing: 0; margin-left: 6px; }
.credit { left: auto; right: 110px; }
.vcur { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px 18px; }
.vcur-group:first-child { flex-basis: 100%; }
.vcur-slot { width: 72px; padding: 6px 3px 5px; } .vcur-slot .gi { width: 34px; height: 34px; } .vcur-slot em { font-size: 13px; }
.vcur-row { gap: 8px; }
.vleg { grid-template-columns: repeat(5, 1fr); width: calc(var(--cs) * 12 + 33px); } .vleg-slot { height: 74px; }
.er-left, .home-left { bottom: 52px; }
.tp-btn.big small { left: 100%; top: 50%; margin: 0 0 0 14px; transform: translateY(-50%); font-size: 13px; }

/* ============ minimap → big map, settings ============ */
.minimap { right: 104px; padding: 0; cursor: pointer; transition: box-shadow .15s; }
.minimap:hover { box-shadow: 0 0 0 1px var(--gold-hi), 0 0 0 6px rgba(10, 18, 38, .85), 0 0 0 7px var(--gold), 0 10px 30px #000; }
.minimap small { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); padding: 0 6px; font-size: 10px; color: var(--mute); background: var(--deep); border: 1px solid var(--gold-lo); border-radius: 8px; }
.bigmap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 26; width: min(78vh, 78vw); display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer;
  padding: 14px; border-radius: 6px; background: radial-gradient(ellipse at center, rgba(8, 12, 28, .55), rgba(4, 6, 14, .25) 70%, transparent); }
.bigmap canvas { width: 100%; aspect-ratio: 1; filter: drop-shadow(0 0 12px rgba(0, 0, 0, .8)); }
.bigmap footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 12px; color: var(--mute); text-shadow: 0 1px 3px #000; }
.bigmap footer span { display: flex; align-items: center; gap: 5px; } .bigmap footer em { font-style: normal; opacity: .7; }
.bigmap footer i { width: 8px; height: 8px; display: inline-block; }
.d-you { background: #7fe0c8; clip-path: polygon(100% 50%, 0 0, 0 100%); } .d-mob { background: #d0584f; } .d-elite { background: #ffd27a; } .d-boss { background: #ff6a4a; } .d-loot { background: #fbe7b0; border-radius: 50%; } .d-portal { border: 2px solid #8fb8ff; border-radius: 50%; }

.rail { gap: min(14px, calc((100vh - 40px) / 10 - 52px)); }
.rail button { width: min(62px, calc((100vh - 60px) / 10 - 8px)); height: min(62px, calc((100vh - 60px) / 10 - 8px)); padding: min(14px, 1.6vh); }

.win-center.c-settings { width: min(760px, calc(100vw - 260px)); height: auto; max-height: calc(100vh - 60px); }
.settings { display: flex; flex-direction: column; gap: 12px; }
.stabs { display: flex; gap: 4px; justify-content: center; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.stabs button { padding: 6px 18px; font: 15px var(--title); letter-spacing: .2em; color: var(--mute); border-radius: 3px; }
.stabs button:hover { color: var(--gold-hi); }
.stabs button.on { color: var(--gold-hi); background: linear-gradient(#24315c, #0c1430); box-shadow: inset 0 0 0 1px var(--gold), inset 0 -2px 0 var(--gold-hi); }
.srows { display: flex; flex-direction: column; }
.srow { display: grid; grid-template-columns: 210px 1fr 56px; align-items: center; gap: 14px; padding: 9px 6px; border-bottom: 1px solid rgba(216, 180, 106, .1); cursor: default; }
.srow > span { font-size: 14px; color: var(--txt, #e6dcc4); display: flex; flex-direction: column; }
.srow > span small { font-size: 11px; color: var(--mute); margin-top: 2px; }
.srow > b { font: 13px var(--num); color: var(--gold-hi); text-align: right; }
.srow input[type=range] { width: 100%; accent-color: var(--gold); }
.srow input[type=checkbox] { justify-self: start; width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; }
.srow kbd { justify-self: start; padding: 2px 10px; font: 12px var(--num); color: var(--gold-hi); background: var(--deep); border: 1px solid var(--gold-lo); border-radius: 4px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { padding: 4px 12px; font-size: 12.5px; color: var(--mute); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(216, 180, 106, .25); }
.seg button.on { color: #1a1206; background: linear-gradient(#f5d99a, #c9a055); box-shadow: none; }
.sfoot { display: flex; align-items: center; gap: 12px; padding-top: 6px; } .sfoot .hint { margin: 0; font-size: 12px; }

/* UI scale (settings · 界面缩放): every HUD layer except the 3D view */
.g > :not(.stage):not(.camp-bg) { zoom: var(--ui, 1); }

/* bag: multi-select + right-click menu */
.cell.sel { box-shadow: inset 0 0 0 2px var(--jade), 0 0 10px rgba(127, 224, 200, .35); }
.ctxmenu { position: fixed; z-index: 60; min-width: 170px; padding: 6px; display: flex; flex-direction: column; gap: 2px; border-radius: 4px;
  background: linear-gradient(#141d3a, #080d1e); box-shadow: inset 0 0 0 1px var(--gold-lo), 0 10px 28px rgba(0, 0, 0, .7); }
.ctxmenu header { padding: 4px 8px 6px; font-size: 12px; color: var(--gold-hi); border-bottom: 1px solid var(--line); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.ctxmenu button { text-align: left; padding: 6px 10px; font-size: 13px; color: var(--txt, #e6dcc4); border-radius: 3px; }
.ctxmenu button:hover { background: rgba(216, 180, 106, .14); color: var(--gold-hi); }
.ctxmenu button.danger { color: #ff9a8a; } .ctxmenu button.sure { background: rgba(200, 60, 50, .25); }

/* home (初始地牢): name plates over NPCs and the stash, the hint along the bottom */
.lt.lt-station { --c: var(--gold-hi); z-index: 3; display: flex; flex-direction: column; align-items: center; padding: 3px 12px 4px; background: rgba(14, 12, 6, .82); border-color: var(--gold-lo); }
.lt.lt-station span { font: 600 14px var(--title); letter-spacing: .18em; color: var(--gold-hi); }
.lt.lt-station small { font-size: 10.5px; color: var(--mute); }
.lt.lt-station:hover, .lt.lt-station.target { border-color: var(--gold-hi); box-shadow: 0 0 12px rgba(251, 231, 176, .35); }
.lt.lt-stash { --c: #ffd27a; }
.hub-hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 9; font-size: 12px; color: var(--mute); text-shadow: 0 1px 4px #000; pointer-events: none; white-space: nowrap; }

.hub-hint { bottom: 46px; }
@media (max-width: 1180px) { .hub-hint { display: none; } }
/* at home the minimap sits top-right: the account / editor / update buttons line up under it */
.g:not(.in-run) .topbar { top: 262px; right: 104px; left: auto; flex-direction: column; align-items: flex-end; gap: 6px; }
.ac-body .ws-mods { margin-top: 2px; }
.ac-stone { padding-top: 12px; }
.ac-stone .ws-grid { max-height: 260px; overflow-y: auto; margin-top: 0; scrollbar-width: thin; scrollbar-color: var(--gold-lo) transparent; }
/* the node's base numbers: one per line, label left, value right */
.ac-loot { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.ac-loot span { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--mute); }
.ac-loot b { font: 15px var(--num); color: var(--gold-hi); }

/* ============ map device: waystone in the middle, five scarab slots around it ============ */
.gi.scarab { --gg: linear-gradient(160deg, #fff, var(--sc, #f2d27a) 55%, #3a2a10); }
.mdev { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.dev-ring { position: relative; width: 196px; height: 196px; flex: none; border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 180, 106, .14), rgba(6, 10, 24, .2) 62%, transparent 70%), repeating-conic-gradient(from 0deg, rgba(216, 180, 106, .18) 0 2deg, transparent 2deg 36deg);
  box-shadow: inset 0 0 0 1px rgba(216, 180, 106, .3), inset 0 0 0 46px rgba(6, 10, 24, .35); }
.dev-core { position: absolute; left: 50%; top: 50%; width: 70px; height: 70px; margin: -35px 0 0 -35px; padding: 14px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #2a3a68, #070b1c); box-shadow: 0 0 0 1px var(--gold), 0 0 0 4px rgba(6, 10, 24, .9), 0 0 0 5px var(--gold-lo), 0 0 22px rgba(251, 231, 176, .25); }
.dev-core b { position: absolute; right: 8px; bottom: 6px; font: 13px var(--num); color: var(--gold-hi); }
.dev-core small { font-size: 11px; color: var(--mute); line-height: 1.2; }
.dev-core.empty { opacity: .8; }
.dev-slot { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; padding: 9px; border-radius: 50%;
  transform: rotate(var(--a)) translateY(-74px) rotate(calc(-1 * var(--a)));
  background: radial-gradient(circle at 50% 35%, #1e2a4e, #060a18); box-shadow: 0 0 0 1px var(--gold-lo), 0 0 14px color-mix(in srgb, var(--sc) 45%, transparent); transition: box-shadow .15s; }
.dev-slot:hover { box-shadow: 0 0 0 1px var(--gold-hi), 0 0 16px color-mix(in srgb, var(--sc) 60%, transparent); }
.dev-slot.empty i { font-style: normal; font-size: 20px; line-height: 28px; color: var(--gold-lo); }
.sc-inv { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start; max-height: 196px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--gold-lo) transparent; }
.sc-cell { position: relative; width: 44px; height: 44px; padding: 7px; border-radius: 4px; background: radial-gradient(circle at 50% 35%, rgba(30, 42, 78, .85), rgba(6, 10, 24, .92)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sc) 55%, transparent); }
.sc-cell:hover { box-shadow: inset 0 0 0 1px var(--sc), 0 0 10px color-mix(in srgb, var(--sc) 40%, transparent); }
.sc-cell b { position: absolute; right: 3px; bottom: 1px; font: 11px var(--num); color: #f2e8c8; text-shadow: 0 1px 2px #000; }
.sc-cell small { position: absolute; left: 3px; top: 1px; font-size: 9px; color: var(--mute); }
.sc-inv .ws-none { width: 100%; }
.sc-mods li { color: var(--sc) !important; }
.lt.r-scarab { --c: #ffd27a; }
.atlas-win { background-color: #050811; }
/* drop targets light up while something is dragged over them */
.dev-core.drop, .dev-slot.drop { box-shadow: 0 0 0 2px var(--jade), 0 0 18px rgba(127, 224, 200, .5); }
[draggable="true"] { cursor: grab; } [draggable="true"]:active { cursor: grabbing; }

/* ============ map device panel (redesign): affixes up top, the rune circle, usable waystones ============ */
.atlas-card { width: 440px; }
.ac-body { display: flex; flex-direction: column; gap: 14px; }
.ac-h { display: flex; align-items: baseline; gap: 8px; font: 400 15px var(--title); letter-spacing: .3em; color: var(--gold-hi); margin-bottom: 8px; }
.ac-h small { font: 11px var(--body, inherit); letter-spacing: 0; color: var(--mute); }
.ac-h::after { content: ''; flex: 1; height: 1px; align-self: center; background: linear-gradient(90deg, var(--gold-lo), transparent); }
/* affixes: every line, tagged with where it comes from */
.affix-list { display: flex; flex-direction: column; gap: 4px; }
.affix-list li { display: flex; align-items: baseline; gap: 10px; padding: 6px 10px; border-radius: 3px; font-size: 13.5px; color: #dfe6ff;
  background: linear-gradient(90deg, rgba(30, 44, 86, .7), rgba(10, 16, 34, .3)); box-shadow: inset 2px 0 0 var(--tagc, var(--gold)); }
.affix-list em { flex: none; min-width: 38px; font: 11px var(--title); font-style: normal; letter-spacing: .12em; color: var(--tagc, var(--gold)); }
.affix-list .src-kind { --tagc: #ffd27a; color: var(--gold-hi); } .affix-list .src-node { --tagc: #8fb8ff; } .affix-list .src-stone { --tagc: #9fd8ff; }
.affix-list .src-sigil { --tagc: var(--sc); } .affix-list .src-none { --tagc: var(--mute); color: var(--mute); font-size: 12.5px; }
.ac-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; margin-top: 10px; padding: 8px 10px; border-radius: 3px; background: rgba(4, 7, 16, .55); box-shadow: inset 0 0 0 1px rgba(216, 180, 106, .14); }
.ac-totals div { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--mute); }
.ac-totals dd { font: 13px var(--num); color: var(--txt, #cfd6e6); opacity: .65; }
.ac-totals .up dt { color: var(--txt, #e6dcc4); } .ac-totals .up dd { color: var(--gold-hi); opacity: 1; text-shadow: 0 0 8px rgba(251, 231, 176, .35); }

/* the rune circle */
.sigil { --sg-c: #6a7aa8; position: relative; width: 300px; max-width: 100%; aspect-ratio: 1; margin: 0 auto; }
.sigil.lit.w-normal { --sg-c: #e8e2cf; } .sigil.lit.w-magic { --sg-c: #7fa8ff; } .sigil.lit.w-rare { --sg-c: #ffd75e; } .sigil.lit.free { --sg-c: #7fe0c8; }
.sigil-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sigil-art .ln { fill: none; stroke: var(--sg-c); stroke-width: 1.4; opacity: .75; }
.sigil-art .ln.thin { stroke-width: .7; opacity: .45; }
.sigil-art .ln.star { stroke-width: 1.1; opacity: .55; }
.sigil-art .ln.penta { stroke-width: 1; opacity: .4; stroke-dasharray: 4 5; }
.sigil-art .tick { stroke: var(--sg-c); stroke-width: 1; opacity: .5; }
.sigil-art .runes { fill: var(--sg-c); font-size: 13px; letter-spacing: 3px; opacity: .7; }
.sigil-art .node { fill: var(--sg-c); opacity: .8; }
.sigil-art .ring { transform-origin: 150px 150px; transform-box: view-box; }
.sigil.lit .ring.r1 { animation: sg-spin 60s linear infinite; } .sigil.lit .ring.r2 { animation: sg-spin 40s linear infinite reverse; }
.sigil.lit .ring.r3 { animation: sg-spin 90s linear infinite; }
.sigil.lit .sigil-art { filter: drop-shadow(0 0 6px var(--sg-c)); }
.sigil.dark .sigil-art { opacity: .55; }
@keyframes sg-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sigil .ring { animation: none !important; } }
.sigil-core { position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; padding: 6%;
  display: grid; place-items: center; background: radial-gradient(circle at 50% 38%, rgba(40, 54, 100, .95), rgba(6, 10, 24, .96));
  box-shadow: 0 0 0 1px var(--sg-c), 0 0 0 5px rgba(6, 10, 24, .85), 0 0 0 6px color-mix(in srgb, var(--sg-c) 40%, transparent), 0 0 30px color-mix(in srgb, var(--sg-c) 45%, transparent); }
.sigil-core .gi { width: 70%; height: 70%; }
.sigil-core b { position: absolute; bottom: 10%; font: 12px var(--num); color: var(--gold-hi); text-shadow: 0 1px 3px #000; }
.sigil-core small { font-size: 11px; color: var(--mute); text-align: center; line-height: 1.3; }
.sigil.drop .sigil-core { box-shadow: 0 0 0 2px var(--jade), 0 0 26px rgba(127, 224, 200, .6); }
.sigil-slot { position: absolute; width: 15%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; padding: 2.6%;
  background: radial-gradient(circle at 50% 35%, #1e2a4e, #060a18); box-shadow: 0 0 0 1px var(--sg-c), 0 0 0 3px rgba(6, 10, 24, .85), 0 0 16px color-mix(in srgb, var(--sc) 70%, transparent); transition: box-shadow .15s, transform .15s; }
.sigil-slot.empty i { font: 12px var(--num); font-style: normal; color: color-mix(in srgb, var(--sg-c) 70%, transparent); }
.sigil-slot:hover { transform: translate(-50%, -50%) scale(1.08); }
.sigil-slot.drop { box-shadow: 0 0 0 2px var(--jade), 0 0 18px rgba(127, 224, 200, .6); }
.ac-stones .ws-grid { max-height: 150px; }

/* device card: fixed parts only (rune circle, waystones, start); the affixes grow in their own panel beside it */
.atlas-card .ac-body { overflow: hidden; gap: 10px; }
.atlas-card .ac-device { flex: none; }
.atlas-card .ac-stones { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.atlas-card .ac-stones .ws-grid { flex: 1; min-height: 64px; max-height: none; overflow-y: auto; align-content: start; }
.atlas-card .sigil { width: min(300px, calc(100vh - 470px)); min-width: 200px; }
.atlas-affix { position: absolute; left: 480px; top: 104px; width: 330px; max-height: calc(100vh - 128px); z-index: 5; padding: 18px 18px 16px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--gold-lo) transparent; }
.atlas-affix .ac-totals { grid-template-columns: 1fr; }
.cell.ws-cell.w-magic { box-shadow: inset 0 0 0 1px #4a6ab0; } .cell.ws-cell.w-rare { box-shadow: inset 0 0 0 1px #b09a42; } .cell.ws-cell.w-normal { box-shadow: inset 0 0 0 1px rgba(216, 180, 106, .3); }

/* own icons (design/icons → public/assets/icons) */
.gi.gi-img { -webkit-mask: none; mask: none; background: var(--img) center / contain no-repeat; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .55)); }   /* painted icons carry their own transparency (build-icons.py cuts the dark backdrop) */
.no-icons .gi.gi-own:not(.gi-img) { -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; background: var(--gg, linear-gradient(160deg, #f1ece2, #8d877b)); }
.no-icons .gi.gi-own::before { content: none; }
.no-icons .gi.gi-img { background: var(--img) center / contain no-repeat; }
.hb-st span { display: inline-flex; align-items: center; gap: 1px; padding: 1px 3px; }
.st-ic { display: inline-block; width: 11px; height: 11px; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; background: var(--c); }

/* 星契三阶共用一张图：品阶用光晕区分 */
.gi.gi-img.sg-t0 { filter: saturate(.7) brightness(.85); }
.gi.gi-img.sg-t1 { filter: drop-shadow(0 0 3px var(--sc, #f2d27a)); }
.gi.gi-img.sg-t2 { filter: drop-shadow(0 0 4px var(--sc, #f2d27a)) drop-shadow(0 0 8px var(--sc, #f2d27a)) brightness(1.12); }

/* 钉住的提示：关闭按钮在整个面板的右上角 */
.itip .itip-x { position: absolute; top: 8px; right: 8px; z-index: 2; width: 24px; height: 24px; font-size: 14px; }

/* 夜阙城：镇民头顶的对话气泡 */
.lt.lt-say { z-index: 4; max-width: 220px; padding: 5px 10px 6px; font-size: 12.5px; line-height: 1.45; color: #2a2016; white-space: normal; text-align: left;
  background: #f3ead6; border: 1px solid #b89a62; border-radius: 10px; box-shadow: 0 3px 10px rgba(0, 0, 0, .45); pointer-events: none; text-shadow: none; cursor: default; }
.lt.lt-say::after { content: ''; position: absolute; left: 50%; top: 100%; width: 0; height: 0; margin-left: -6px; background: none; opacity: 1; border: 6px solid transparent; border-bottom: 0; border-top-color: #f3ead6; }
.lt.lt-say b { display: block; font-size: 11px; letter-spacing: .12em; color: #8a5a1a; }

/* 传奇图鉴：主人一行，点「来历」整张卡展开读故事 */
.lcard .lcard-owner { font-size: 11.5px; color: var(--gold-lo, #b89a62); letter-spacing: .08em; margin: 2px 0 6px; }
.lcard.open { grid-column: 1 / -1; }
.lcard .lcard-lore { margin: 4px 0 10px; padding: 10px 14px; max-width: 46em; background: rgba(0, 0, 0, .25); border-left: 2px solid var(--gold-lo, #b89a62); }
.lcard .lcard-lore p { margin: 0 0 .7em; font-size: 13.5px; line-height: 1.85; color: #d8d0bc; }
.lcard .lcard-btns { display: flex; gap: 8px; }

/* 有任务的人：头顶「！」，NPC 名牌上也有 */
.lt.lt-mark { z-index: 4; padding: 0 7px 1px; font: 700 18px/1.2 var(--title); color: #ffd75e; background: rgba(20, 14, 4, .85); border-color: #d8b46a; border-radius: 50%; pointer-events: none; cursor: default;
  animation: mark-bob 1.6s ease-in-out infinite; text-shadow: 0 0 6px rgba(255, 200, 80, .8); }
.lt.lt-mark::after { display: none; }
@keyframes mark-bob { 50% { margin-top: -5px; } }
.lt.lt-station.has-quest::before { content: '！'; position: absolute; left: 50%; top: -24px; transform: translateX(-50%); font: 700 18px/1 var(--title); color: #ffd75e; text-shadow: 0 0 6px rgba(255, 200, 80, .8); animation: mark-bob 1.6s ease-in-out infinite; }
/* 任务栏里的支线、任务面板的支线列表 */
.qtrack .qside { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(216, 180, 106, .25); }
.qtrack .qside b { font-size: 14px; }
.ql-side { grid-column: 1 / -1; margin-top: 18px; }
.ql-side > ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.ql-side > ul > li { padding: 10px 12px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(216, 180, 106, .22); border-radius: 3px; }
.ql-side > ul > li.done { opacity: .6; }
.ql-side > ul > li.offer { border-color: rgba(255, 215, 94, .6); }
.ql-side header { display: flex; align-items: baseline; gap: 8px; }
.ql-side header em { font-style: normal; font-size: 11px; color: var(--mute); }
.ql-side header b { flex: 1; color: var(--gold-hi); }
.ql-side header small { font-size: 11px; color: #ffd75e; }
.ql-side .ql-ask { margin: 6px 0; font-size: 12.5px; line-height: 1.6; color: #d8d0bc; }
.ql-side ol { margin: 4px 0 6px 18px; padding: 0; font-size: 12.5px; color: var(--mute); }
.ql-side ol li.done { text-decoration: line-through; opacity: .7; }

/* 追踪：小地图下面一行目标和距离；任务栏里正在追踪的那条标金 */
.track-tip { position: absolute; right: 104px; top: 228px; z-index: 10; box-sizing: border-box; width: 200px; margin: 0; text-align: center; padding: 3px 10px; font-size: 12px; line-height: 1.4; color: #ffd75e; background: rgba(8, 10, 20, .78); border: 1px solid rgba(216, 180, 106, .4); border-radius: 2px;
  cursor: pointer; pointer-events: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-tip em { font-style: normal; margin-left: 6px; color: var(--mute); }
.qtrack header { cursor: pointer; }
.qtrack header.tracked b::before { content: '◆ '; color: #ffd75e; font-size: .8em; }

/* 地上的星银和物资 */
.lt.silver { --c: #e8e8f0; }
.lt.mat span { color: var(--c); }

/* 世界循环：钱包、商会、布告板、冒险者公会 */
.facts .silver b { color: #e8e8f0; }
.purse { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 6px 12px 8px; margin: 0 0 6px; border-bottom: 1px solid rgba(216, 180, 106, .18); font-size: 12px; }
.purse .pv, .world-top .pv { font: 600 16px var(--title); color: #e8e8f0; }
.purse .pv small, .world-top .pv small { font-size: 11px; margin-left: 3px; color: var(--mute); font-weight: 400; }
.purse .pm { color: var(--c); }
.purse .pm b { color: #e8e0cc; }
.world { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: auto; }
.world-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.world-top span { color: var(--mute); font-size: 12.5px; flex: 1; }
.mat-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mat-table th { text-align: left; font-weight: 400; color: var(--mute); padding: 4px 6px; border-bottom: 1px solid rgba(216, 180, 106, .2); }
.mat-table td { padding: 3px 6px; border-bottom: 1px solid rgba(255, 255, 255, .04); }
.mat-table tr.none td { opacity: .55; }
.mat-table .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.mat-table small { color: var(--mute); }
button.mini { margin-right: 4px; padding: 1px 7px; font-size: 11.5px; color: var(--gold-hi); background: rgba(0, 0, 0, .3); border: 1px solid rgba(216, 180, 106, .4); border-radius: 2px; cursor: pointer; }
button.mini:disabled { opacity: .35; cursor: default; }
.factions { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.factions article { padding: 8px 10px; background: rgba(0, 0, 0, .22); border-left: 2px solid var(--c); font-size: 12px; }
.factions header { display: flex; gap: 8px; align-items: baseline; }
.factions header b { color: var(--c); font-size: 13.5px; }
.factions header em { font-style: normal; color: #e8e0cc; }
.factions header small { margin-left: auto; color: var(--mute); }
.factions .rep { position: relative; height: 6px; margin: 6px 0; background: rgba(255, 255, 255, .08); }
.factions .rep i { position: absolute; inset: 0 auto 0 0; background: var(--c); }
.factions .rep span { position: absolute; right: 0; top: -15px; font-size: 10.5px; color: var(--mute); }
.factions p { margin: 2px 0; color: #d8d0bc; } .factions p.next { color: var(--mute); }
.contracts, .mercs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.contracts li, .mercs li { padding: 8px 10px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(216, 180, 106, .18); border-radius: 2px; font-size: 12.5px; }
.contracts li.taken { border-color: var(--c); }
.contracts header, .mercs header { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.contracts header em { font-style: normal; font-size: 11px; color: var(--c); }
.contracts header b, .mercs header b { color: var(--gold-hi); }
.contracts header small, .mercs header small { margin-left: auto; color: #ffd75e; }
.contracts p, .mercs p { margin: 4px 0; color: #d8d0bc; }
.mercs header em { font-style: normal; color: var(--mute); font-size: 11.5px; }
.mercs .trip { color: #9fd8ff; } .mercs li.out { border-color: rgba(159, 216, 255, .5); }
.mercs li.locked { opacity: .5; }
.btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.btns select { max-width: 100%; padding: 2px 4px; font-size: 12px; color: #e8e0cc; background: #0e1424; border: 1px solid rgba(216, 180, 106, .35); }
.fallen span { display: inline-block; margin-right: 12px; color: var(--mute); font-size: 12px; }

/* 天赋花费 */
.tal-purse { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: var(--mute); }
.tal-purse b { color: #e8e8f0; }
.tal-cost { list-style: none; padding: 0; margin: 6px 0; font-size: 12px; }
.tal-cost li { display: flex; gap: 8px; } .tal-cost li b { margin-left: auto; color: #e8e8f0; } .tal-cost li small { color: var(--mute); min-width: 4em; text-align: right; }
.tal-cost li.short b { color: #ff7a6a; }

/* 图集上的委托和出征 */
.atlas-svg .cmark rect { fill: #2a1e08; stroke: #ffd75e; stroke-width: 1.5; }
.atlas-svg .cmark text { fill: #ffd75e; font-size: 9px; text-anchor: middle; }
.atlas-svg .mmark circle { fill: #0c1a2a; stroke: #9fd8ff; stroke-width: 1.5; }
.atlas-svg .mmark text { fill: #9fd8ff; font-size: 9px; text-anchor: middle; }
.atlas-svg .merc-name { fill: #9fd8ff; font-size: 11px; text-anchor: middle; paint-order: stroke; stroke: #05080f; stroke-width: 3px; }
/* painted icons have no backdrop any more: let them fill the cell */
.gi.gi-img { transform: scale(1.18); }
.cell .gi.gi-img, .cur-cell .gi.gi-img { transform: scale(1.32); }
