/* Sunmere / precision artificer instruments. Layout rules remain below. */
:root {
  --frame: #101920;
  --plate: #24333d;
  --recess: #0b131a;
  --brass: #e8c26a;
  --brass-edge: #917849;
  --brass-light: #f6df9f;
  --teal: #5fe0d0;
  --teal-dim: #246e70;
  --metal-text: #e1e9e8;
  --metal-muted: #a3b6bc;
  --engraving: rgba(232,194,106,.22);
  --grain: repeating-linear-gradient(0deg, rgba(177,205,217,.025) 0 1px, transparent 1px 4px);
  --metal: linear-gradient(155deg, #2c3b45, #18232c 48%, #111b23);
  --socket-shadow: inset 0 2px 6px #000b, inset 0 -1px 0 #dcecf01a;
  --key-shadow: inset 0 1px 0 #f4e3ab40, inset 0 -2px 0 #0009, 0 2px 3px #0006;
  --cut-key: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
  --gold: var(--brass);
  --gold-d: var(--brass-edge);
  --ink: var(--metal-text);
  --panel: var(--frame);
}
/* ---------------- shared panel look ---------------- */
.window { position: absolute; min-width: 260px; background: linear-gradient(180deg, rgba(38, 28, 18, .96), rgba(20, 15, 10, .96));
  border: 2px solid #8a6a30; border-radius: 6px; box-shadow: 0 8px 30px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,220,140,.15); color: var(--ink); z-index: 20; font-family: var(--font-body); }
.window .wh { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; cursor: move;
  background: linear-gradient(180deg, #5a4220, #3a2a14); border-bottom: 1px solid #8a6a30; font: 700 14px var(--font-head); color: var(--gold); letter-spacing: 1px; }
.window .wx { background: none !important; border: 0 !important; box-shadow: none !important; color: #e8c26a !important; cursor: pointer; font-size: 14px; padding: 0 4px !important; }
.window .wb { padding: 10px 12px; max-height: 70vh; overflow: auto; }
.window button, .login button, .death button, .tf-actions button, .invite-pop button, .claim button { font: 700 13px var(--font-head); color: #2a1a06; background: linear-gradient(180deg, #ffe08a, #c8902a); border: 1px solid #6a4a14; border-radius: 4px; padding: 6px 14px; cursor: pointer; box-shadow: 0 2px 0 #4a3010; }
.window button:hover, .login button:hover, .tf-actions button:hover, .invite-pop button:hover { filter: brightness(1.12); }
.tooltip { position: fixed; display: none; z-index: 60; max-width: 300px; padding: 8px 10px; background: rgba(12, 10, 18, .95); border: 1px solid #6a6a8a; border-radius: 5px; color: #e8e4d8; font: 13px var(--font-body); pointer-events: none; box-shadow: 0 4px 16px rgba(0,0,0,.6); }
.tt-name { font: 700 15px var(--font-head); margin-bottom: 3px; }
.tt-row { display: flex; justify-content: space-between; gap: 16px; color: #d8d0c0; }
.tt-desc { color: #ffd870; margin-top: 4px; }
.tt-req { color: #ff6050; }
.tt-stat { color: #fff; }
.tt-sub, .tt-hint { color: #a8a0a0; font-size: 12px; margin-top: 3px; }

/* ---------------- login ---------------- */
.login { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 26px 20px 30px; pointer-events: none; transition: opacity .5s; z-index: 30; font-family: var(--font-body); }
.login.out { opacity: 0; }
.login > * { pointer-events: auto; }
.login-title { text-align: center; text-shadow: 0 3px 0 #3a2208, 0 0 40px rgba(255,200,100,.35); }
.login-title .t1 { font: 800 72px var(--font-head); color: var(--gold); letter-spacing: 8px; line-height: 1; }
.login-title .t2 { font: 700 20px var(--font-head); color: #f3e2bf; letter-spacing: 14px; }
.login-classes { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; }
.cls-card { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 10px; width: 230px; padding: 7px; text-align: left; cursor: pointer;
  background: linear-gradient(90deg, rgba(30,22,14,.92), rgba(30,22,14,.6)) !important; border: 1px solid #5a4422 !important; border-left: 4px solid var(--cc) !important; border-radius: 5px; color: var(--ink) !important; box-shadow: none !important; font-family: var(--font-body) !important; }
.cls-card img { grid-row: span 2; width: 52px; height: 52px; border-radius: 4px; border: 1px solid #000; }
.cls-card .cn { font: 700 17px var(--font-head); color: var(--cc); }
.cls-card .cr { font-size: 12px; opacity: .8; }
.cls-card.on { background: linear-gradient(90deg, rgba(90,66,30,.95), rgba(40,30,18,.75)) !important; border-color: #e8c26a !important; box-shadow: 0 0 18px rgba(232,194,106,.35) !important; }
.login-panel { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); width: 340px; padding: 18px; background: linear-gradient(180deg, rgba(30,22,14,.94), rgba(18,13,9,.94)); border: 2px solid #8a6a30; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.cls-name { font: 800 30px var(--font-head); }
.cls-role { color: #e8c26a; font-weight: 700; margin-bottom: 8px; }
.cls-desc { font-size: 15px; line-height: 1.4; }
.cls-weapon { margin-top: 6px; font-size: 13px; opacity: .75; }
.cls-skills { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin: 12px 0; }
.cls-skills img { width: 100%; border-radius: 3px; border: 1px solid #000; }
.login-panel label { display: block; font: 700 12px var(--font-head); color: var(--gold); margin-bottom: 4px; letter-spacing: 1px; }
.name-in { width: 100%; padding: 9px 10px; font: 600 16px var(--font-body); background: #0e0a07; color: #fff; border: 1px solid #8a6a30; border-radius: 4px; outline: none; }
.enter-btn { width: 100%; margin-top: 12px; padding: 11px !important; font-size: 17px !important; letter-spacing: 2px; }
.login-note { margin-top: 10px; font-size: 12px; opacity: .7; }

/* ---------------- HUD ---------------- */
.hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-body); }
.hud > * { pointer-events: auto; }
.hud .plates, .hud .floats, .hud .zone-banner, .hud .err-text, .hud .quest-tracker { pointer-events: none; }
.unit { position: absolute; top: 14px; display: flex; gap: 8px; align-items: center; padding: 6px 10px 6px 6px; background: linear-gradient(180deg, rgba(30,22,14,.88), rgba(16,12,8,.88)); border: 2px solid #7a5a28; border-radius: 40px 8px 8px 40px; }
.player-frame { left: 14px; }
.target-frame { left: 330px; }
.unit.hidden { display: none; }
.unit.elite { border-color: #ffc040; box-shadow: 0 0 14px rgba(255,190,60,.45); }
.portrait { position: relative; width: 62px; height: 62px; border-radius: 50%; border: 2px solid #c8a050; overflow: visible; flex: none; background: #000; }
.portrait img { width: 100%; height: 100%; border-radius: 50%; }
.portrait .lvl { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); font: 700 12px var(--font-head); background: #1a1208; border: 1px solid #c8a050; border-radius: 8px; padding: 0 6px; color: #ffe8a0; }
.bars { width: 210px; }
.unit .nm { font: 700 15px var(--font-head); color: #fff2d0; margin-bottom: 3px; text-shadow: 0 1px 2px #000; }
.bar { position: relative; height: 16px; margin: 3px 0; background: #120c08; border: 1px solid #000; border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; transition: width .15s; }
.bar.hp i { background: linear-gradient(180deg, #6ae04a, #1e7a12); }
.bar.res i { background: linear-gradient(180deg, #ffe070, #8a6010); }
.target-frame .bar.hp i { background: linear-gradient(180deg, #ff6a4a, #8a1a0a); }
.bar span { position: absolute; inset: 0; text-align: center; font: 700 11px var(--font-body); line-height: 16px; color: #fff; text-shadow: 0 1px 1px #000; }
.unit.low .portrait { box-shadow: 0 0 0 3px rgba(255,40,40,.7); animation: lowpulse 1s infinite; }
@keyframes lowpulse { 50% { box-shadow: 0 0 0 6px rgba(255,40,40,.25); } }
.unit .sub { font-size: 12px; color: #c8b890; }
.buffs { display: flex; gap: 3px; margin-top: 3px; }
.buff { position: relative; width: 22px; height: 22px; }
.buff img { width: 100%; height: 100%; border-radius: 3px; border: 1px solid #3a6aff; box-sizing: border-box; }
.buff.debuff img { border-color: #ff3a3a; }
.buff span { position: absolute; bottom: -3px; right: -2px; font: 700 10px var(--font-body); color: #fff; text-shadow: 0 0 2px #000; }

.minimap { position: absolute; right: 14px; top: 10px; width: 214px; text-align: center; }
.minimap canvas { width: 200px; height: 200px; border-radius: 50%; border: 4px solid #8a6a30; box-shadow: 0 0 0 2px #2a1c0c, 0 6px 20px rgba(0,0,0,.6); background: #1a2a14; cursor: pointer; }
.zone-name { font: 700 14px var(--font-head); color: #ffe8a0; text-shadow: 0 1px 3px #000; margin-bottom: 4px; }
.coords { font-size: 11px; color: #e8dcc0; text-shadow: 0 1px 2px #000; }
.quest-tracker { position: absolute; right: 16px; top: 270px; width: 250px; color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.qt-h { font: 700 14px var(--font-head); color: #ffd060; margin-bottom: 4px; }
.qt { margin-bottom: 8px; }
.qt-n { font-weight: 700; color: #ffe070; }
.qt-g { font-size: 13px; color: #f0f0f0; }
.qt.done .qt-n { color: #7aff7a; }

.chat { position: absolute; left: 14px; bottom: 60px; width: 400px; }
.chat-log { height: 170px; overflow-y: auto; padding: 6px 8px; font-size: 14px; text-shadow: 0 1px 2px #000; background: linear-gradient(0deg, rgba(0,0,0,.35), rgba(0,0,0,0)); border-radius: 6px; scrollbar-width: thin; }
.chat-log .cl { margin: 1px 0; }
/* a soft backing that fades in with new lines or on hover, so text never sits bare on bright grass */
.chat-log { transition: background-color .5s ease-out; background-color: rgba(10,8,6,0); }
.chat-log.live, .chat:hover .chat-log { background-color: rgba(10,8,6,.35); }
.chat-log .cl-n { color: #c8b896; opacity: .85; }
.chat-in { width: 100%; margin-top: 4px; padding: 6px 8px; background: rgba(10,8,6,.75); border: 1px solid #5a4422; border-radius: 4px; color: #fff; font: 14px var(--font-body); outline: none; }
.chat-in:focus { border-color: #e8c26a; }

.actionbars { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 4px; padding: 6px 8px; background: linear-gradient(180deg, rgba(40,30,18,.9), rgba(18,13,9,.92)); border: 2px solid #8a6a30; border-radius: 8px; }
.ab { display: flex; gap: 4px; }
.slot { position: relative; width: 48px; height: 48px; border: 1px solid #000; border-radius: 4px; overflow: hidden; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,220,140,.25); transition: transform .06s; }
.slot img { width: 100%; height: 100%; display: block; }
.slot .cd { position: absolute; inset: 0; }
.slot .key { position: absolute; top: 1px; right: 3px; font: 700 11px var(--font-body); color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.slot .cdt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 800 18px var(--font-body); color: #fff; text-shadow: 0 0 3px #000; }
.slot .lock { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.72); font: 700 13px var(--font-head); color: #c8a050; }
.slot.nores img { filter: saturate(.3) brightness(.6) sepia(.4) hue-rotate(-30deg); }
.slot.pressed { transform: scale(.9); box-shadow: 0 0 0 2px #ffe8a0; }
.slot:hover { box-shadow: 0 0 0 2px #ffe8a0; }
.ab.row3 { position: absolute; right: -2px; bottom: 100%; padding: 5px 8px 4px; border: inherit; border-bottom: 0; border-radius: 8px 8px 0 0; background: inherit; box-shadow: inherit; } /* skills 21 to 30 (levels 42 to 65) */
.ab.row3:empty { display: none; }
.castbar { position: absolute; left: 50%; bottom: 168px; transform: translateX(-50%); width: 300px; height: 20px; background: #120c08; border: 2px solid #8a6a30; border-radius: 4px; overflow: hidden; }
.castbar.hidden { display: none; }
.castbar i { display: block; height: 100%; width: 0; background: linear-gradient(180deg, #ffe08a, #c8802a); }
.castbar span { position: absolute; inset: 0; text-align: center; font: 700 12px var(--font-head); line-height: 18px; color: #fff; text-shadow: 0 1px 2px #000; }
.xpbar { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: #0a0806; border-top: 1px solid #5a4422; }
.xpbar i { display: block; height: 100%; background: linear-gradient(180deg, #b47aff, #5a2aa8); transition: width .3s; }
.xpbar span { position: absolute; inset: 0; text-align: center; font: 700 10px var(--font-body); line-height: 14px; color: #fff; text-shadow: 0 1px 1px #000; }
.menubar { position: absolute; right: 14px; bottom: 26px; display: flex; gap: 4px; }
.menubar button { width: 34px; height: 34px; font: 700 14px var(--font-head); color: #ffe8a0; background: linear-gradient(180deg, #4a3618, #22180c); border: 1px solid #8a6a30; border-radius: 5px; cursor: pointer; }
.menubar button:hover { border-color: #ffe08a; }
.menubar button.mb-art { position: relative; padding: 0; overflow: hidden; }
.menubar button.mb-art img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); pointer-events: none; }
.menubar button.mb-art span { position: absolute; right: 1px; bottom: -1px; font-size: 9px; line-height: 1; pointer-events: none; }
.gold-box { position: absolute; right: 16px; bottom: 66px; font-size: 13px; color: #fff; text-shadow: 0 1px 2px #000; }
.m-g { color: #ffd040; } .m-s { color: #d8d8e0; } .m-c { color: #d88a50; }
.err-text { position: absolute; top: 120px; left: 0; right: 0; text-align: center; font: 700 18px var(--font-body); color: #ff3a2a; text-shadow: 0 1px 2px #000; opacity: 0; }
.err-text.show { animation: errfade 1.6s; }
@keyframes errfade { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }
.zone-banner { position: absolute; top: 22%; left: 0; right: 0; text-align: center; opacity: 0; }
.zone-banner.show { animation: zonefade 4s; }
@keyframes zonefade { 0% { opacity: 0; transform: translateY(10px); } 15%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.zb1 { font: 800 46px var(--font-head); color: #ffe8a0; letter-spacing: 4px; text-shadow: 0 3px 0 #3a2208, 0 0 30px rgba(0,0,0,.8); }
.zb2 { font: 700 16px var(--font-head); color: #f3e2bf; text-shadow: 0 2px 4px #000; }
.death { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(ellipse, rgba(0,0,0,.15), rgba(30,0,0,.6)); }
.death.hidden { display: none; }
.d1 { font: 800 48px var(--font-head); color: #ff9a7a; text-shadow: 0 3px 0 #2a0a00; }
.offline-tag { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); font-size: 12px; color: #ffe8a0; background: rgba(0,0,0,.45); padding: 2px 10px; border-radius: 10px; }
.offline-tag.hidden { display: none; }

/* nameplates + floating text */
.plate { position: absolute; left: 0; top: 0; text-align: center; white-space: nowrap; will-change: transform; }
.plate .pn { font: 700 13px var(--font-body); color: #fff; text-shadow: 0 0 3px #000, 0 1px 2px #000; }
.plate .pt { font-size: 11px; color: #e8e0c8; font-weight: 400; }
.plate .pl { color: #ffe8a0; font-size: 11px; }
.plate.hostile .pn { color: #ff7a5a; } .plate.npc .pn { color: #ffe070; } .plate.friendly .pn { color: #8ac8ff; }
.plate.elite .pn { color: #ffb040; }
.plate.dead { opacity: .45 !important; }
.plate .ph { width: 70px; height: 6px; margin: 2px auto 0; background: #1a0a06; border: 1px solid #000; border-radius: 2px; overflow: hidden; }
.plate .ph i { display: block; height: 100%; background: linear-gradient(180deg, #ff6a4a, #a02010); }
.plate.friendly .ph i { background: linear-gradient(180deg, #6ae04a, #1e7a12); }
.plate.targeted .pn { text-decoration: underline; text-decoration-color: #ffe08a; }
.plate.targeted .ph { box-shadow: 0 0 0 1px #ffe08a; }
.ft { position: absolute; left: 0; top: 0; width: 160px; text-align: center; font: 800 20px var(--font-body); color: #fff; text-shadow: 0 0 3px #000, 0 2px 2px #000; will-change: transform; white-space: nowrap; }
.ft.dmg-out { color: #fff3c0; } .ft.dmg-in { color: #ff4a3a; } .ft.heal { color: #6aff6a; } .ft.xp { color: #c88aff; font-size: 16px; } .ft.miss { color: #c8c8c8; font-size: 16px; }
/* damage numbers: heavy, stroked, with a vertical gradient fill (the stroke paints under the fill) */
.ft.dmg-out, .ft.dmg-in, .ft.crit { font-weight: 900; font-size: 24px; letter-spacing: 0.5px; -webkit-text-stroke: 4px #1a0e06; paint-order: stroke fill; text-shadow: 0 2px 2px rgba(0, 0, 0, 0.75); }
.ft.dmg-out { color: #ffe9a8; }
.ft.dmg-in { color: #ff5a44; -webkit-text-stroke-color: #2a0604; }
.ft.crit { font-size: 38px; color: #ffcf40; -webkit-text-stroke: 5px #2a1004; text-shadow: 0 2px 2px rgba(0, 0, 0, 0.75), 0 0 14px rgba(255, 170, 40, 0.55); }
.ft.dmg-in.crit { color: #ff6a4a; }

/* windows content */
.char-head { font: 700 15px var(--font-head); margin-bottom: 8px; }
.equip { display: grid; grid-template-columns: repeat(5, 52px); gap: 6px; margin-bottom: 10px; }
.eslot { width: 52px; height: 52px; border: 1px solid #5a4422; background: #120c08; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 9px; color: #6a5a40; text-transform: uppercase; }
.eslot img, .bslot img, .litem img, .vitem img, .rw img { width: 100%; height: 100%; border: 2px solid #333; border-radius: 4px; box-sizing: border-box; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; font-size: 14px; }
.stats div { display: flex; justify-content: space-between; }
.stats b { color: #ffe8a0; }
.bag-grid { display: grid; grid-template-columns: repeat(5, 48px); gap: 5px; }
.bslot { position: relative; width: 48px; height: 48px; background: #120c08; border: 1px solid #4a3a22; border-radius: 4px; }
.bslot .cnt { position: absolute; bottom: 1px; right: 3px; font: 700 12px var(--font-body); text-shadow: 0 0 2px #000, 0 0 2px #000; }
.bag-gold { margin-top: 8px; text-align: right; }
.bag-hint { margin-top: 4px; font-size: 12px; opacity: .65; }
.w-quests .wb { display: flex; gap: 12px; width: 560px; }
.ql-list { width: 200px; border-right: 1px solid #4a3a22; padding-right: 8px; }
.ql { padding: 4px 6px; cursor: pointer; border-radius: 3px; color: #ffe070; }
.ql.on { background: rgba(232,194,106,.18); }
.ql-empty { font-size: 13px; opacity: .8; }
.ql-detail { flex: 1; }
.ql-detail h3, .w-dialog h3 { font: 700 18px var(--font-head); color: var(--gold); margin: 0 0 6px; }
.ql-detail p, .qtext { line-height: 1.45; color: #e8dcc0; }
.ql-rw, .qrw, .qgoal { margin: 8px 0; font-size: 14px; color: #ffe8a0; }
.w-skills .wb { width: 460px; }
.sk { display: flex; gap: 10px; padding: 6px; border-bottom: 1px solid #3a2a18; cursor: pointer; }
.sk img { width: 44px; height: 44px; border-radius: 4px; flex: none; }
.sk.locked { opacity: .45; }
.sk-key { font-size: 11px; color: #c8a050; }
.sk-d { font-size: 13px; color: #ffd870; }
.sk-m { font-size: 12px; opacity: .7; }
.w-dialog .wb { width: 380px; }
.npc-title { color: #c8a050; font-size: 13px; }
.greet { font-style: italic; color: #e8dcc0; }
.dopt { padding: 7px 8px; margin: 4px 0; background: rgba(255,230,160,.06); border: 1px solid #4a3a22; border-radius: 4px; cursor: pointer; }
.dopt:hover { border-color: #e8c26a; }
.dopt b { color: #f0b020; margin-right: 6px; }
.dopt.active b { color: #9a9a9a; }
.dopt.vendor b { color: #8acc6a; }
.rws { margin: 8px 0; font-size: 13px; }
.rw { display: flex; align-items: center; gap: 8px; padding: 4px; margin: 3px 0; border: 1px solid #3a2a18; border-radius: 4px; cursor: pointer; }
.rw img { width: 36px; height: 36px; }
.rw.on { border-color: #ffe08a; background: rgba(255,224,138,.1); }
.dbtns { display: flex; gap: 8px; margin-top: 10px; }
.vendor { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vitem, .litem { display: flex; align-items: center; gap: 8px; padding: 5px; border: 1px solid #3a2a18; border-radius: 4px; cursor: pointer; }
.vitem img, .litem img { width: 36px; height: 36px; }
.vitem:hover, .litem:hover { border-color: #e8c26a; }
.vp { font-size: 12px; }
.takeall { margin-top: 8px; width: 100%; }
.w-map .wb { padding: 6px; }
.w-map canvas { display: block; border-radius: 4px; }
.help p { margin: 6px 0; line-height: 1.4; width: 420px; }
.help code { color: #ffe08a; }

/* walk-up interaction prompt */
.prompt { position: absolute; left: 50%; bottom: 196px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 7px 16px 7px 8px;
  background: linear-gradient(180deg, rgba(40,30,18,.92), rgba(18,13,9,.92)); border: 1px solid #c8a050; border-radius: 22px; box-shadow: 0 4px 16px rgba(0,0,0,.5);
  font: 700 15px var(--font-body); color: #fff2d0; text-shadow: 0 1px 2px #000; pointer-events: none; animation: promptIn .18s ease-out; }
.prompt.hidden { display: none; }
.prompt .pk { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; font: 800 15px var(--font-head);
  color: #2a1a06; background: linear-gradient(180deg, #ffe8a0, #c8902a); border: 1px solid #6a4a14; box-shadow: 0 2px 0 #4a3010; }
@keyframes promptIn { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* talents */
.menubar button.has-pts { border-color: #7aff7a; box-shadow: 0 0 10px rgba(120,255,120,.6); animation: ptsPulse 1.4s ease-in-out infinite; }
@keyframes ptsPulse { 50% { box-shadow: 0 0 2px rgba(120,255,120,.2); } }

/* achievements */
.w-ach .wb { width: 660px; }
.ach-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ach-pts b { font: 700 20px var(--font-head); color: #ffc040; }
.ach-head select { background: #120c08; color: #ffe8a0; border: 1px solid #6a5030; border-radius: 4px; padding: 3px 6px; font: 13px var(--font-body); margin-left: 6px; }
.ach-body { display: flex; gap: 10px; }
.ach-cats { width: 150px; flex: none; }
.ach-cat { display: flex; justify-content: space-between; padding: 7px 8px; margin-bottom: 4px; border: 1px solid #3a2a18; border-radius: 4px; cursor: pointer; color: #ffe8a0; }
.ach-cat span { opacity: .7; font-size: 12px; }
.ach-cat.on, .ach-cat:hover { border-color: #e8c26a; background: rgba(232,194,106,.12); }
.ach-list { flex: 1; max-height: min(470px, calc(100vh - 290px)); overflow-y: auto; padding-right: 4px; }
.ach { display: flex; gap: 10px; align-items: center; padding: 7px; margin-bottom: 6px; border: 1px solid #3a2a18; border-radius: 5px; background: rgba(0,0,0,.25); opacity: .72; }
.ach.done { opacity: 1; border-color: #8a6a30; background: linear-gradient(90deg, rgba(255,192,64,.14), rgba(0,0,0,.2)); }
.ach-ic { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--font-head); color: #3a2608; background: radial-gradient(circle at 35% 30%, #fff2c0, #e8b040 55%, #8a5a18); border: 2px solid #5a3a10; filter: grayscale(1) brightness(.7); }
.ach.done .ach-ic { filter: none; box-shadow: 0 0 10px rgba(255,192,64,.45); }
.ach-tx { flex: 1; }
.ach-tx b { color: #ffe8a0; }
.ach-d { font-size: 12.5px; opacity: .85; }
.ach-tt { font-size: 12px; color: #ffc040; }
.ach-when { font-size: 11px; opacity: .6; white-space: nowrap; }
.ach-bar { position: relative; height: 13px; margin-top: 4px; background: #120c08; border: 1px solid #4a3a22; border-radius: 3px; overflow: hidden; }
.ach-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #6ac04a, #2a6a1a); }
.ach-bar span { position: relative; display: block; text-align: center; font: 700 10px/13px var(--font-body); color: #fff; text-shadow: 0 1px 1px #000; }
.ach-toasts { position: absolute; bottom: 250px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; pointer-events: none; z-index: 30; }
.ach-toast { display: flex; gap: 12px; align-items: center; min-width: 360px; padding: 10px 16px 10px 10px; background: linear-gradient(180deg, rgba(48,34,16,.96), rgba(20,14,8,.96)); border: 2px solid #e8b040; border-radius: 8px; box-shadow: 0 0 24px rgba(255,192,64,.35), 0 6px 18px rgba(0,0,0,.6); animation: achIn .45s cubic-bezier(.2,1.4,.4,1); transition: opacity .8s, transform .8s; }
.ach-toast.out { opacity: 0; transform: translateY(-14px); }
.ach-toast .at-ic { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 800 17px var(--font-head); color: #3a2608; background: radial-gradient(circle at 35% 30%, #fff2c0, #e8b040 55%, #8a5a18); border: 2px solid #5a3a10; }
.at-h { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #e8b040; }
.at-n { font: 700 19px var(--font-head); color: #fff2c0; }
.at-d { font-size: 12.5px; color: #e8dcc0; }
.at-t { color: #ffc040; margin-left: 4px; }
@keyframes achIn { from { opacity: 0; transform: translateY(-20px) scale(.9); } }
.plate .ptl { color: #ffd890; font-weight: 400; font-size: .92em; }

/* party */
.party-frames { position: absolute; left: 14px; top: 122px; display: flex; flex-direction: column; gap: 6px; }
.pframe { display: flex; gap: 6px; align-items: center; width: 214px; padding: 4px 8px 4px 4px; background: linear-gradient(180deg, rgba(30,22,14,.86), rgba(16,12,8,.86)); border: 1px solid #6a5028; border-radius: 26px 6px 6px 26px; cursor: pointer; pointer-events: auto; }
.pframe.targeted { border-color: #ffe08a; box-shadow: 0 0 8px rgba(255,224,138,.4); }
.pframe.dead { filter: grayscale(1) brightness(.7); }
.pframe.far { opacity: .6; }
.pf-por { position: relative; width: 40px; height: 40px; flex: none; }
.pf-por img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #8a6a30; }
.pf-lvl { position: absolute; right: -4px; bottom: -3px; font: 700 10px var(--font-body); background: #120c08; border: 1px solid #8a6a30; border-radius: 7px; padding: 0 3px; color: #ffe8a0; }
.pf-bars { flex: 1; }
.pf-nm { font: 700 12.5px var(--font-body); color: #fff2d0; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-nm em { font-style: normal; font-weight: 400; font-size: 10.5px; color: #c8b890; margin-left: 5px; }
.pf-lead { color: #ffd060; font-size: 10px; border: 1px solid #ffd060; border-radius: 3px; padding: 0 2px; }
.pf-hp, .pf-res { position: relative; background: #120c08; border: 1px solid #3a2a18; border-radius: 3px; overflow: hidden; }
.pf-hp { height: 12px; margin-top: 2px; }
.pf-res { height: 5px; margin-top: 2px; }
.pf-hp i, .pf-res i { position: absolute; left: 0; top: 0; bottom: 0; }
.pf-hp i { background: linear-gradient(180deg, #5ad04a, #1a6a1a); transition: width .2s; }
.pf-res i { transition: width .2s; }
.pf-hp span { position: relative; display: block; text-align: center; font: 700 9.5px/12px var(--font-body); color: #fff; text-shadow: 0 1px 1px #000; }
.invite-pop { position: absolute; top: 22%; left: 50%; transform: translateX(-50%); padding: 14px 18px; background: linear-gradient(180deg, rgba(38,28,18,.97), rgba(20,15,10,.97)); border: 2px solid #c8a050; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.6); font-size: 15px; z-index: 40; pointer-events: auto; }
.invite-pop.hidden, .tf-actions.hidden { display: none; }
.tf-actions { position: absolute; left: 352px; top: 104px; pointer-events: auto; }
.tf-actions button { font-size: 12px; padding: 3px 10px; }
.dopt.hire { display: flex; gap: 10px; align-items: center; }
.dopt.hire img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #8a6a30; flex: none; }
.dopt.hire > div { flex: 1; }
.dopt.hire.cur { border-color: #7aff7a; }
.hire-role { font-size: 12px; color: #c8b890; }
.hire-d { font-size: 12.5px; opacity: .85; }
.hire-cost { font-size: 12.5px; white-space: nowrap; }

/* HUD layering: world nameplates and floating text stay under the frames, minimap and bars */
.hud .plates { z-index: 0; }
.hud .floats { z-index: 1; }
.hud .minimap, .hud .unit, .hud .party-frames, .hud .actionbars, .hud .menubar, .hud .chat, .hud .quest-tracker, .hud .tf-actions, .hud .castbar, .hud .xpbar, .hud .gold-box { z-index: 3; }
.pf-leave { align-self: flex-start; margin-left: 46px; font: 700 11px var(--font-head); color: #ffe8a0; background: linear-gradient(180deg, #4a3618, #22180c); border: 1px solid #8a6a30; border-radius: 4px; padding: 2px 8px; cursor: pointer; pointer-events: auto; opacity: .8; }
.pf-leave:hover { opacity: 1; border-color: #ffe08a; }
/* dark scrollbars everywhere in the UI */
#ui ::-webkit-scrollbar { width: 7px; height: 7px; }
#ui ::-webkit-scrollbar-track { background: rgba(0,0,0,.25); border-radius: 4px; }
#ui ::-webkit-scrollbar-thumb { background: #6a5030; border-radius: 4px; }
#ui ::-webkit-scrollbar-thumb:hover { background: #8a6a30; }
#ui * { scrollbar-color: #6a5030 rgba(0,0,0,.2); }

/* gear comparison */
.tt-cmp { margin-top: 6px; padding-top: 5px; border-top: 1px solid #4a4a6a; }
.tt-up { color: #5aff5a; }
.tt-down { color: #ff5a4a; }
.tt-verdict { font-weight: 700; margin-top: 2px; }
.bup { position: absolute; left: 2px; top: 2px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 9px solid #5aff5a; filter: drop-shadow(0 0 2px #000); }
.char-head .ilvl { display: block; font: 13px var(--font-body); color: #c8b890; text-transform: none; letter-spacing: 0; margin-top: 2px; }

/* options */
.w-opts .wb { width: 380px; }
.w-opts h4 { font: 700 15px var(--font-head); color: var(--gold); margin: 10px 0 4px; border-bottom: 1px solid #3a2a18; padding-bottom: 2px; }
.w-opts h4:first-child { margin-top: 0; }
.opt { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 14px; }
.opt > span { width: 110px; flex: none; }
.opt input[type=range] { flex: 1; accent-color: #e8b040; }
.opt.chk { gap: 8px; cursor: pointer; }
.opt.chk input { accent-color: #e8b040; width: 16px; height: 16px; }
.o-q, .o-s, .o-pf { display: flex; gap: 5px; flex-wrap: wrap; }
.w-opts .o-q button, .w-opts .o-s button, .w-opts .o-pf button { padding: 4px 10px; font-size: 12px; filter: grayscale(.7) brightness(.75); }
.w-opts .o-q button.on, .w-opts .o-s button.on, .w-opts .o-pf button.on { filter: none; }
.o-note { font-size: 12px; opacity: .75; margin: 2px 0 6px 120px; }
.o-note a { color: #ffd060; cursor: pointer; text-decoration: underline; }
.o-keys { font-size: 12px; opacity: .8; line-height: 1.5; margin-top: 10px; }
/* interface size: panels only (nameplates and floating numbers follow the 3D world, windows stay draggable) */
.hud .unit, .hud .party-frames, .hud .minimap, .hud .actionbars, .hud .menubar, .hud .chat, .hud .quest-tracker, .hud .xpbar, .hud .castbar, .hud .gold-box, .hud .tf-actions { zoom: var(--ui-scale, 1); }

/* reputation */
.rep-list h4 { font: 700 14px var(--font-head); color: var(--gold); margin: 10px 0 4px; border-bottom: 1px solid #3a2a18; }
.rep { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 13px; }
.rep > span { width: 104px; flex: none; }
.rep-bar { position: relative; flex: 1; height: 15px; background: #120c08; border: 1px solid #4a3a22; border-radius: 3px; overflow: hidden; }
.rep-bar i { position: absolute; left: 0; top: 0; bottom: 0; }
.rep-bar b { position: relative; display: block; text-align: center; font: 700 10.5px/15px var(--font-body); color: #fff; text-shadow: 0 1px 1px #000; }
.rep-shop { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vitem.locked { opacity: .5; cursor: default; }

.hud .quest-tracker .qt { pointer-events: auto; cursor: pointer; border-radius: 4px; padding: 1px 4px; }
.hud .quest-tracker .qt:hover { background: rgba(255,224,138,.12); }

.tt-set { margin-top: 6px; padding-top: 4px; border-top: 1px solid #4a4a6a; font-size: 12.5px; }
.tt-setn { color: #ffd060; font-weight: 700; }
.tt-have { color: #fff2c0; }
.tt-miss { color: #8a8a8a; }

.store-grid { grid-template-columns: repeat(6, 48px); }

.invite-pop .dc-h { font: 700 18px var(--font-head); color: var(--gold); margin-bottom: 4px; }
.invite-pop .dc-t { font-size: 13px; max-width: 360px; opacity: .9; }
.invite-pop .h { background: linear-gradient(180deg, #ffb070, #c85a2a) !important; }

/* crafting */
.craft-list { max-height: min(400px, calc(100vh - 420px)); overflow-y: auto; }
.craft { display: flex; gap: 8px; align-items: center; padding: 6px; margin: 4px 0; border: 1px solid #3a2a18; border-radius: 4px; }
.craft img { width: 40px; height: 40px; border: 2px solid; border-radius: 4px; }
.craft.cant { opacity: .7; }
.cr-tx { flex: 1; }
.cr-n { font-size: 12px; }
.cn-ok { color: #8aff7a; }
.cn-no { color: #c88a7a; }
.cr-c { font-size: 12px; opacity: .8; }
.window .cr-b { padding: 4px 12px; }
.window .cr-b[disabled] { filter: grayscale(1); opacity: .5; cursor: default; }

.w-map canvas { max-height: calc(100vh - 230px); width: auto; height: auto; max-width: 100%; }

/* runabout paints */
.paints { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 6px 0; }
.paints .qrw { grid-column: 1 / -1; margin: 0; }
.paint { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border: 1px solid #3a2a18; border-radius: 4px; cursor: pointer; font-size: 13px; }
.paint i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid #000; flex: none; }
.paint em { display: block; font-style: normal; font-size: 10.5px; opacity: .7; }
.paint.on { border-color: #ffe08a; background: rgba(255,224,138,.1); }
.paint.locked { opacity: .45; cursor: default; }

/* valley journal */
.w-journal .wb { width: 660px; }
.jr-head { margin-bottom: 6px; opacity: .8; }
.jr-body { display: flex; gap: 10px; }
.jr-list { width: 230px; flex: none; max-height: min(460px, calc(100vh - 280px)); overflow-y: auto; padding-right: 4px; }
.jr { display: flex; justify-content: space-between; padding: 4px 7px; border-radius: 3px; cursor: pointer; font-size: 13px; }
.jr em { font-style: normal; opacity: .6; font-size: 12px; }
.jr.on, .jr:hover:not(.unknown) { background: rgba(232,194,106,.15); }
.jr.unknown { color: #6a6058; cursor: default; }
.t-elite span, .jr-tag.t-elite { color: #ffb050; } .t-rare span, .jr-tag.t-rare { color: #c8d8ff; } .t-boss span, .jr-tag.t-boss { color: #ff7a5a; }
.jr-detail { flex: 1; }
.jr-detail h3 { font: 700 19px var(--font-head); color: var(--gold); margin: 0 0 2px; }
.jr-tag { font-size: 13px; margin-bottom: 8px; color: #c8b890; }
.jr-row { margin: 6px 0; font-size: 13.5px; }
.jr-row b { color: #ffe8a0; margin-right: 4px; }
.jr-ab { font-size: 13px; margin: 3px 0; color: #ffb090; }
.jr-drops { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; }
.jr-drop { cursor: help; }
.jr-kills { margin-top: 10px; opacity: .8; font-size: 13px; }
.menubar button { width: 30px !important; height: 30px !important; font-size: 13px !important; }

.pet-list h4 { font: 700 14px var(--font-head); color: var(--gold); margin: 10px 0 4px; border-bottom: 1px solid #3a2a18; }
.pet-list { display: flex; flex-wrap: wrap; gap: 4px; }
.pet-list h4 { width: 100%; }
.petb { padding: 3px 8px; border: 1px solid #4a3a22; border-radius: 10px; font-size: 12px; cursor: pointer; }
.petb.on { border-color: #7aff7a; color: #b8ffb0; }
.petb.locked { opacity: .4; cursor: default; }
.w-char .pet-list, .w-char .rep-list { max-width: 372px; }

/* saved characters on the login screen */
.login-chars { margin-bottom: 10px; display: flex; flex-direction: column; gap: 4px; max-height: 264px; overflow-y: auto; }
.char-pick { display: flex; gap: 8px; align-items: center; padding: 4px 6px; background: rgba(255,230,160,.05); border: 1px solid #4a3a22; border-radius: 5px; cursor: pointer; text-align: left; color: #f4ead2; font: 13px var(--font-body); }
.char-pick img { width: 30px; height: 30px; border-radius: 4px; }
.char-pick b { display: block; color: var(--cc); font: 700 14px var(--font-head); }
.char-pick em { font-style: normal; font-size: 12px; opacity: .8; }
.char-pick:hover, .char-pick.on { border-color: #e8c26a; background: rgba(232,194,106,.14); }

.login .char-pick { background: rgba(30,22,14,.88) !important; color: #f4ead2 !important; box-shadow: none !important; border: 1px solid #5a4628 !important; padding: 4px 8px !important; font: 13px var(--font-body) !important; text-transform: none !important; letter-spacing: 0 !important; }
.login .char-pick:hover, .login .char-pick.on { border-color: #e8c26a !important; background: rgba(70,52,26,.92) !important; }
.login .char-pick em { color: #d8c8a0; }

/* Google sign-in, the Local / Online choice and online characters (only when client/config.js sets them up) */
.login .hidden { display: none !important; }
.login-acct { margin: 2px 0 10px; padding: 8px; border: 1px solid #5a4628; border-radius: 6px; background: rgba(10,16,22,.55); display: flex; flex-direction: column; gap: 7px; }
.login .acct-row { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.login .acct-row .g-in { flex: 1; }
.login .acct-who { flex: 1; font-size: 13px; color: #d8c8a0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.login .acct-who b { color: #f4ead2; }
.login .g-out { padding: 4px 10px !important; font-size: 12px !important; }
.login .srv-row { display: flex; align-items: center; gap: 8px; }
.login .srv-row label { margin: 0 !important; }
.login .srv-seg { flex: 1; display: flex; }
.login .srv-seg button { flex: 1; border-radius: 0 !important; padding: 5px 8px !important; font-size: 12px !important; background: rgba(30,22,14,.9) !important; color: #d8c8a0 !important; box-shadow: none !important; border: 1px solid #5a4628 !important; }
.login .srv-seg button:first-child { border-radius: 4px 0 0 4px !important; }
.login .srv-seg button:last-child { border-radius: 0 4px 4px 0 !important; border-left: 0 !important; }
.login .srv-seg button.on { background: linear-gradient(180deg, #ffe08a, #c8902a) !important; color: #2a1a06 !important; border-color: #6a4a14 !important; }
.login .srv-in { width: 100%; box-sizing: border-box; padding: 6px 8px; font: 600 13px var(--font-body); background: var(--recess, #0e0a07); color: var(--metal-text, #fff); border: 1px solid var(--brass-edge, #8a6a30); border-radius: 2px; box-shadow: var(--socket-shadow, none); outline: none; }
/* with the account box the panel can outgrow a short window: it scrolls instead of running off the top */
.login-panel:has(.login-acct) { max-height: calc(100vh - 24px); overflow-y: auto; box-sizing: border-box; }
.login-panel:has(.login-acct) .login-chars { max-height: 236px; }
.login-panel:has(.login-acct) .enter-btn { position: sticky; bottom: 0; z-index: 1; }
.login .char-row { display: flex; gap: 4px; align-items: stretch; }
.login .char-row .char-pick { flex: 1; min-width: 0; }
.login .char-del { padding: 2px 8px !important; font-size: 11px !important; background: rgba(60,20,16,.85) !important; color: #f0c0b0 !important; border: 1px solid #7a3a2a !important; box-shadow: none !important; }
.login .char-del.sure { background: #a83a28 !important; color: #fff !important; }
.login .chars-note { font-size: 12px; color: #c8b890; padding: 2px 2px 4px; }
.login-err { margin-top: 8px; padding: 6px 8px; border: 1px solid #8a3a2a; border-radius: 4px; background: rgba(70,20,14,.7); color: #ffd0c0; font-size: 12.5px; }
.login .off-btn { width: 100%; margin-top: 6px; padding: 6px !important; font-size: 13px !important; background: rgba(30,22,14,.9) !important; color: #e8d8b0 !important; border: 1px solid #5a4628 !important; box-shadow: none !important; }
html.phone .login .acct-row, html.phone .login .srv-seg button { min-height: 40px; }
html.phone .login .srv-in { min-height: 40px; }

.cls-colours label { margin-top: 8px; }
.cv-row { display: flex; gap: 6px; margin-bottom: 10px; }
.login .cv { width: 34px !important; height: 22px; padding: 0 !important; border: 2px solid #5a4628 !important; border-radius: 4px; box-shadow: none !important; cursor: pointer; }
.login .cv.on { border-color: #ffe08a !important; box-shadow: 0 0 8px rgba(255,224,138,.6) !important; }

.repair-row { padding: 6px 4px 2px; text-align: center; }
.repair-row .repair { width: 100%; }
.repair-ok { font-size: 12px; color: #a8c890; }
.dura { margin-top: 4px; font-size: 12px; color: #ffc860; text-shadow: 0 1px 2px #000; display: flex; align-items: center; justify-content: center; gap: 4px; }
.dura.hidden { display: none; }
.dura img { width: 18px; height: 18px; border-radius: 3px; }
.dura.bad { color: #ff6a50; }
.eslot img.broken { filter: grayscale(0.8) brightness(0.7); }
.eslot img.worn { box-shadow: 0 0 6px rgba(255,170,60,.7); }
.repair-row .repair b { color: #ffd98a; text-shadow: 0 1px 2px #000; }
.dura:not(.hidden) { background: rgba(18, 12, 6, 0.78); border: 1px solid #5a4628; border-radius: 4px; padding: 2px 8px; margin: 4px auto 0; width: max-content; }

.tf-actions button + button { margin-left: 6px; }
.target-frame.duel-foe .nm, .duel-foe .tf-name { color: #ff8a60 !important; }

.post-tabs { display: flex; gap: 6px; margin: 4px 0 8px; }
.post-tabs button { flex: 1; opacity: .75; }
.post-tabs button.on { opacity: 1; box-shadow: 0 0 8px rgba(255,224,138,.5); }
.mlist { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.mrow { padding: 6px 8px; border: 1px solid #4a3a22; border-radius: 4px; background: rgba(40,28,14,.6); cursor: pointer; display: flex; flex-direction: column; }
.mrow:hover { border-color: #b8913e; }
.mrow b { color: #e8dcc0; font-weight: 600; }
.mrow span { font-size: 12px; color: #a8987a; }
.mrow.new b { color: #ffe08a; }
.mrow.new b::before { content: '\2022 '; color: #ffe08a; }
.letter .l-head { display: flex; flex-direction: column; margin-bottom: 6px; }
.letter .l-head b { color: #ffe08a; font-size: 15px; }
.letter .l-head span { font-size: 12px; color: #a8987a; }
.letter .l-body { background: #e8dcc0; color: #3a2a14; padding: 10px 12px; border-radius: 3px; font-family: Georgia, serif; font-size: 14px; line-height: 1.45; min-height: 70px; max-height: 220px; overflow-y: auto; }
.letter .l-att { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.letter .l-att .take { margin-left: auto; }
.l-item { display: flex; align-items: center; gap: 6px; }
.l-item img, .p-att img { width: 32px; height: 32px; border: 2px solid; border-radius: 4px; }
.compose { display: flex; flex-direction: column; gap: 6px; }
.compose label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #c8b48a; }
.compose label input { flex: 1; }
.compose input, .compose textarea { background: #1a120a; border: 1px solid #5a4628; color: #f4ead2; border-radius: 3px; padding: 4px 6px; font: inherit; font-size: 13px; }
.compose textarea { height: 90px; resize: none; }
.p-row { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #c8b48a; }
.p-row input { width: 52px; }
.p-row i { font-style: normal; margin-right: 6px; }
.p-att { min-height: 36px; }
.p-att .hint, .compose .hint { font-size: 12px; color: #8a7a5a; }
.p-un { color: #ff9a70; cursor: pointer; margin-left: 6px; font-size: 12px; }
.post-note { margin: 4px auto 0; width: max-content; font-size: 12px; color: #ffe08a; background: rgba(18,12,6,.78); border: 1px solid #8a6a2a; border-radius: 4px; padding: 2px 8px; text-shadow: 0 1px 2px #000; }
.post-note.hidden { display: none; }

.bslot.attached { outline: 2px solid #ffe08a; outline-offset: -2px; opacity: .55; }

.tr-list { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.tr-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border: 1px solid #4a3a22; border-radius: 4px; background: rgba(40,28,14,.6); }
.tr-row.done { opacity: .55; }
.tr-ic { width: 32px; height: 32px; border: 2px solid #6a5a3a; border-radius: 4px; }
.tr-mid { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tr-mid b { color: #e8dcc0; font-weight: 600; font-size: 14px; }
.tr-mid span { font-size: 12px; color: #a8987a; }
.tr-end { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.tr-pay { font-size: 12px; color: #e8dcc0; white-space: nowrap; }
.tr-end button { padding: 3px 10px; font-size: 12px; }
.tr-end button[disabled] { opacity: .45; cursor: default; }
.tr-h { margin: 8px 0 4px; color: #ffe08a; font-size: 13px; letter-spacing: .04em; }
.tr-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; padding: 8px; border: 1px dashed #5a4628; border-radius: 4px; }
.tr-form select, .tr-form input { background: #1a120a; border: 1px solid #5a4628; color: #f4ead2; border-radius: 3px; padding: 3px 5px; font: inherit; font-size: 13px; }
.tr-form input { width: 64px; }
.tr-form label { font-size: 12px; color: #c8b48a; display: flex; align-items: center; gap: 4px; }
.tr-sum { width: 100%; font-size: 12px; color: #a8987a; }
.tr-form .post { margin-left: auto; }

.claims { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); display: flex; flex-direction: column-reverse; gap: 6px; z-index: 32; pointer-events: none; } /* above .toasts (31): a find's toast never covers a Claim button */
.claim { pointer-events: auto; display: flex; align-items: center; gap: 8px; width: 340px; padding: 6px 8px; background: linear-gradient(180deg, rgba(40,28,14,.95), rgba(22,15,8,.95)); border: 1px solid #8a6a2a; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.6); }
.claim img { width: 40px; height: 40px; border: 2px solid; border-radius: 5px; }
.claim .c-mid { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.claim .c-mid b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.claim .c-mid span { font-size: 11px; color: #a8987a; }
.claim .c-bar { height: 4px; background: #2a1e10; border-radius: 2px; margin-top: 4px; overflow: hidden; }
.claim .c-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #c8902a, #ffe08a); }
.claim .c-btns { display: flex; flex-direction: column; gap: 3px; }
.claim .c-btns button { padding: 2px 10px; font-size: 12px; }
.claim .c-btns button.pass { filter: grayscale(.6) brightness(.85); }

.xpbar .rest { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, rgba(90,150,255,.55), rgba(40,80,180,.55)); transition: width .3s; }
.xpbar i { position: relative; }

.menubar .recall-btn.cooling { filter: grayscale(.8) brightness(.6); }
.dopt.muted { opacity: .6; cursor: default; }
.menubar { gap: 2px; } .menubar button { width: 27px !important; font-size: 12px !important; }
@media (max-width: 1200px) { .menubar { bottom: 74px; } }

.qrw.mk2 { margin-top: 8px; } .qrw.mk2 .up { margin-left: 8px; padding: 3px 12px; }


.minimap { position: absolute; }
.mm-zoom { position: absolute; left: 6px; top: 176px; display: flex; flex-direction: column; gap: 2px; }
.mm-zoom button { width: 20px; height: 20px; padding: 0; font: 700 14px/18px var(--font-head); color: #ffe8a0; background: linear-gradient(180deg, #4a3618, #22180c); border: 1px solid #8a6a30; border-radius: 50%; cursor: pointer; }
.mm-zoom button:hover { border-color: #ffe08a; }
.w-map canvas { cursor: crosshair; }
.map-hint { margin: 0 0 6px; text-align: center; }

.prof-bar { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; font-size: 13px; color: #c8b48a; }
.prof-bar .pb { flex: 1; position: relative; height: 16px; background: #1a120a; border: 1px solid #5a4628; border-radius: 3px; overflow: hidden; }
.prof-bar .pb i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #7ac0ff, #2a5aa8); }
.prof-bar .pb b { position: relative; display: block; text-align: center; font-size: 11px; line-height: 16px; color: #fff; text-shadow: 0 1px 1px #000; }
.pc { margin-left: 8px; padding: 0 5px; border-radius: 3px; font-size: 11px; font-weight: 700; }
.pc-orange { background: #c8641a; color: #fff; } .pc-yellow { background: #d8b02a; color: #2a1a06; } .pc-green { background: #3a9a3a; color: #fff; }
.pc-grey { background: #6a6a6a; color: #ddd; } .pc-red { background: #8a2020; color: #fff; }

.o-kb { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; }
.o-kb .kb { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #c8b48a; }
.o-kb .kb button { min-width: 64px; padding: 2px 8px; font-size: 12px; }
.o-kb .kb button.wait { filter: hue-rotate(160deg) brightness(1.1); }
.o-kreset { cursor: pointer; color: #ffc860; }

.tf-actions button.on { box-shadow: 0 0 8px rgba(255,224,138,.8); filter: brightness(1.15); }
.tf-actions button:not(.on)[data-a="order"] { filter: grayscale(.5) brightness(.85); }

.invite-pop button.t { background: linear-gradient(180deg, #b8d0ff, #4a6ac8); color: #0a1430; }

.w-meter { width: 280px; }
.mt-tabs { display: flex; gap: 4px; margin-bottom: 4px; }
.mt-tabs button { flex: 1; padding: 3px 4px !important; font-size: 11px !important; opacity: .7; filter: grayscale(.4); }
.mt-tabs button.on { opacity: 1; filter: none; }
.mt-seg .mt-reset { flex: 0 0 auto; opacity: 1; filter: none; }
.mt-rows { display: flex; flex-direction: column; gap: 3px; margin: 6px 0; max-height: 220px; overflow-y: auto; }
.mt-row { position: relative; height: 20px; background: #1a120a; border: 1px solid #3a2a16; border-radius: 3px; overflow: hidden; display: flex; align-items: center; justify-content: space-between; padding: 0 6px; font-size: 12px; color: #fff; text-shadow: 0 1px 1px #000; }
.mt-row i { position: absolute; left: 0; top: 0; bottom: 0; opacity: .55; }
.mt-row span, .mt-row b { position: relative; }
.mt-row b { font-weight: 600; } .mt-row em { font-style: normal; color: #d8c8a8; font-size: 11px; margin-left: 4px; }

.qt-more { font-size: 11px; color: #a8987a; font-weight: 400; margin-left: 6px; }
.ql.untracked { opacity: .6; }
.ql-track { margin-top: 8px; font-size: 13px; }

.w-news { width: 560px; }
.news-date { font-size: 12px; color: #a8987a; margin: -4px 0 8px; }
.news-list { max-height: 440px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.news-it { display: flex; flex-direction: column; padding: 5px 8px; border-left: 3px solid #c8902a; background: rgba(40,28,14,.5); border-radius: 0 4px 4px 0; }
.news-it b { color: #ffe08a; font-size: 13px; }
.news-it span { font-size: 12.5px; color: #e8dcc0; line-height: 1.4; }
.news-btn { padding: 3px 12px !important; font-size: 12px !important; }

.plate .pg { font-size: 10px; color: #8aff9a; text-shadow: 0 1px 2px #000; }
.guild-box h4 span { font-size: 11px; color: #a8987a; font-weight: 400; margin-left: 6px; }
.g-roster { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; margin: 4px 0; }
.g-roster em { font-style: normal; color: #a8987a; font-size: 11px; }
.g-new { display: flex; gap: 6px; align-items: center; }
.g-new input { flex: 1; background: #1a120a; border: 1px solid #5a4628; color: #f4ead2; border-radius: 3px; padding: 4px 6px; font: inherit; font-size: 13px; }
.g-new button { padding: 4px 10px !important; font-size: 12px !important; }
.news-list h3 { margin: 10px 0 2px; } .news-list h3:first-child { margin-top: 0; }

#ui.ui-hidden > * { visibility: hidden !important; }

.ladder .mt-row.me { border-color: #ffe08a; box-shadow: 0 0 6px rgba(255,224,138,.5); }
.ladder .mt-row { height: 22px; }

.stats-list { display: flex; flex-direction: column; gap: 2px; }
.st-row { display: flex; justify-content: space-between; padding: 4px 8px; font-size: 13px; color: #e8dcc0; border-bottom: 1px solid rgba(90,70,40,.4); }
.st-row b { color: #ffe08a; font-weight: 600; }
.st-h { margin: 10px 0 4px; color: #ffe08a; }

.tooltip { min-width: 230px; max-width: 320px; background: linear-gradient(180deg, rgba(14,18,32,.97), rgba(8,10,20,.97)) !important; border: 1px solid #5a6a9a !important; box-shadow: 0 6px 24px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.04); }
.tt-name { font: 700 16px var(--font-head); margin-bottom: 1px; text-shadow: 0 1px 2px #000; }
.tt-name.q4 { text-shadow: 0 0 10px rgba(180,90,255,.55), 0 1px 2px #000; }
.tt-name.q5 { text-shadow: 0 0 12px rgba(255,194,58,.7), 0 1px 2px #000; }
.tt-base { color: #c8bce0; font-size: 12px; margin-top: -1px; }
.tt-leg { color: #ffc23a; font-size: 12px; font-weight: 700; }
.tt-ilvl { color: #ffd060; font-size: 12.5px; margin: 1px 0 3px; }
.tt-eq { color: #3ad65a; }
.tt-sell { color: #d8d0c0; font-size: 12px; margin-top: 4px; }
.repair-row { display: flex; flex-direction: column; gap: 4px; }
.repair-row .selljunk { width: 100%; filter: saturate(.6); }

.w-loot { width: 290px; }
.loot-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.litem { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 4px; background: linear-gradient(90deg, rgba(40,32,20,.75), rgba(20,16,10,.4)); border: 1px solid rgba(90,70,40,.45); cursor: pointer; }
.litem:hover { border-color: #ffe08a; background: linear-gradient(90deg, rgba(70,56,30,.85), rgba(30,24,14,.5)); }
.litem.q3 { box-shadow: inset 3px 0 0 #3a8aff; } .litem.q4 { box-shadow: inset 3px 0 0 #b45aff, 0 0 10px rgba(180,90,255,.25); } .litem.q5 { box-shadow: inset 3px 0 0 #ffc23a, 0 0 12px rgba(255,194,58,.35); }
.li-ic { position: relative; width: 44px; height: 44px; border: 2px solid #6a5a3a; border-radius: 5px; overflow: hidden; flex: 0 0 auto; }
.li-ic img { width: 100%; height: 100%; display: block; }
.li-ic .cnt { position: absolute; right: 2px; bottom: 0; font: 700 12px var(--font-body); color: #fff; text-shadow: 0 1px 2px #000; }
.coin-ic { background: radial-gradient(circle at 40% 35%, #fff4b8, #e2b444 45%, #7a5212); border-color: #b8913e; border-radius: 50%; width: 38px; height: 38px; margin: 3px; }
.li-tx { display: flex; flex-direction: column; min-width: 0; }
.li-tx b { font: 600 14px var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; }
.li-tx em { font-style: normal; font-size: 11.5px; color: #a8987a; }
.w-loot .takeall { width: 100%; }
.plate .lootname { font-weight: 700; background: rgba(6,4,2,.72); border: 1px solid rgba(255,255,255,.12); border-radius: 3px; padding: 0 5px; text-shadow: 0 1px 2px #000; }
.toasts { position: absolute; left: 50%; bottom: 210px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 31; pointer-events: none; }
.ltoast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 300px; padding: 8px 14px 8px 8px; background: linear-gradient(180deg, rgba(30,24,14,.96), rgba(14,10,6,.96)); border: 1px solid #6a5a3a; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.6); animation: ltIn .35s ease-out; transition: opacity .6s, transform .6s; }
.ltoast.out { opacity: 0; transform: translateY(10px); }
.ltoast img { width: 48px; height: 48px; border: 2px solid; border-radius: 6px; }
.ltoast div { display: flex; flex-direction: column; }
.ltoast .lt-k { font-size: 11px; color: #c8b48a; letter-spacing: .08em; text-transform: uppercase; }
.ltoast b { font: 700 15px var(--font-head); text-shadow: 0 1px 2px #000; }
.ltoast em { font-style: normal; font-size: 12px; color: #a8987a; }
.ltoast.q4 { border-color: #b45aff; box-shadow: 0 0 22px rgba(180,90,255,.45), 0 6px 20px rgba(0,0,0,.6); }
.ltoast.q5 { border-color: #ffc23a; box-shadow: 0 0 28px rgba(255,194,58,.6), 0 6px 20px rgba(0,0,0,.6); }
.ltoast.q3 { border-color: #3a8aff; }
@keyframes ltIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }

.w-char { width: 460px; }
.doll-wrap { display: flex; gap: 8px; align-items: stretch; margin-bottom: 10px; }
.doll-col { display: flex; flex-direction: column; gap: 6px; }
.doll-col .eslot { width: 54px; height: 54px; }
.doll-col .eslot span { font-size: 8.5px; text-align: center; line-height: 1.1; padding: 0 2px; }
.eslot .eglyph { width: 68%; height: 68%; color: #d8c49a; opacity: .3; filter: drop-shadow(0 1px 0 rgba(0,0,0,.8)); }
.eslot:not(:has(img)) { box-shadow: inset 0 1px 0 rgba(255,220,160,.07), inset 0 -1px 0 rgba(0,0,0,.6); }
.eslot:not(:has(img)):hover .eglyph { opacity: .55; }
.doll-col .eslot.q3 { box-shadow: 0 0 8px rgba(58,138,255,.45); } .doll-col .eslot.q4 { box-shadow: 0 0 10px rgba(180,90,255,.6); } .doll-col .eslot.q5 { box-shadow: 0 0 12px rgba(255,194,58,.7); }
.doll { position: relative; flex: 1; border: 1px solid #4a3a22; border-radius: 6px; overflow: hidden; background: radial-gradient(ellipse at 50% 38%, #4a3a26 0%, #241a10 55%, #120c06 100%); }
.doll canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.doll-hint { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: rgba(232,220,192,.55); pointer-events: none; }
.w-char .pet-list, .w-char .rep-list { max-width: none !important; }
.doll { flex: 0 0 236px; height: 294px; }
.w-char { width: auto; }
.w-char .wb { width: 392px; }
.toasts { left: 18px !important; bottom: 340px !important; transform: none !important; align-items: flex-start; }

.bag-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 12px; color: #a8987a; }
.bag-top .bsort { padding: 2px 12px !important; font-size: 12px !important; }
.bslot { position: relative; }
.bslot.bq0 img { filter: grayscale(.7) brightness(.75); }
.bslot.bq2 { box-shadow: 0 0 6px rgba(58,214,90,.35); }
.bslot.bq3 { box-shadow: 0 0 8px rgba(58,138,255,.55); }
.bslot.bq4 { box-shadow: 0 0 10px rgba(180,90,255,.7); }
.bslot.bq5 { box-shadow: 0 0 12px rgba(255,194,58,.85); animation: legPulse 2.2s ease-in-out infinite; }
@keyframes legPulse { 50% { box-shadow: 0 0 18px rgba(255,194,58,1); } }
.bslot.cant img { filter: sepia(1) hue-rotate(-40deg) saturate(3) brightness(.6); }
.bslot .bil { position: absolute; left: 2px; top: 1px; font: 700 10px var(--font-body); color: #fff; text-shadow: 0 0 3px #000, 0 1px 1px #000; pointer-events: none; }
.bslot .bil { top: auto !important; bottom: 1px; left: 3px; }

.vgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; max-height: 330px; overflow-y: auto; padding-right: 2px; }
.vcard { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 4px; background: linear-gradient(90deg, rgba(40,32,20,.75), rgba(20,16,10,.4)); border: 1px solid rgba(90,70,40,.45); cursor: pointer; min-width: 0; }
.vcard:hover { border-color: #ffe08a; }
.vcard.lack { opacity: .55; }
.vcard.lack .vprice { color: #ff7a5a; }
.vcard .li-tx > b { font-size: 13px; }
.vprice { font-size: 12px; color: #e8dcc0; }
.w-dialog:has(.vgrid) { width: 470px; }
/* loot toasts: a small stack above the right end of the action bar, sliding in from the right */
.toasts { left: auto !important; right: calc(50% - 330px); transform: none !important; bottom: 196px !important; top: auto; align-items: flex-end !important; flex-direction: column; }
.toasts .ltoast { min-width: 0; max-width: 340px; padding: 6px 12px 6px 6px; animation: ltSlide .18s cubic-bezier(.22,.61,.36,1); }
.toasts .ltoast img { width: 40px; height: 40px; }
.toasts .ltoast.stack .lt-row { display: flex; flex-direction: row; gap: 4px; margin: 3px 0 2px; }
.toasts .ltoast.stack .lt-row img { width: 30px; height: 30px; border-width: 1px; }
.toasts .ltoast.stack { padding-left: 12px; }
.toasts .ltoast.out { transform: translateX(14px); }
@keyframes ltSlide { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
.vcard .li-tx > b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.15; }
.vcard .li-tx { flex: 1; }
.vgrid { width: 100%; }
.vprice b { display: inline !important; }
.w-dialog:has(.vgrid) { width: 540px !important; }
.w-dialog .wb:has(.vgrid) { width: 520px; } .w-dialog:has(.vgrid) { width: auto !important; }
.tip-cmp { opacity: .96; border-color: #8a7a5a !important; } .tt-cur { font-size: 11px; color: #a8a0a0; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 3px; }

.tt-sock { color: #a8a0a0; font-size: 12.5px; display: flex; align-items: center; gap: 5px; }
.tt-sock.full { color: #e8dcc0; }
.tt-sock i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid #8a7a5a; background: #1a140c; }
.tt-sock i.gem-red { background: #d83a2a; } .tt-sock i.gem-grey { background: #9a9aa2; } .tt-sock i.gem-green { background: #5ac83a; }
.tt-sock i.gem-blue { background: #3a8aff; } .tt-sock i.gem-gold { background: #e8b030; } .tt-sock i.gem-amber { background: #e88a2a; }

.target-frame { position: absolute; }
.tf-auras { position: absolute; left: 96px; top: 100%; margin-top: 3px; display: flex; gap: 3px; }
.tf-auras .aura { position: relative; width: 26px; height: 26px; border-radius: 4px; overflow: hidden; border: 1px solid #3a8a3a; }
.tf-auras .aura.debuff { border-color: #c83a2a; }
.tf-auras .aura img { width: 100%; height: 100%; display: block; }
.tf-auras .aura span { position: absolute; right: 1px; bottom: -1px; font: 700 10px var(--font-body); color: #fff; text-shadow: 0 0 3px #000, 0 1px 1px #000; }
.tf-cast { position: absolute; left: 96px; right: 14px; top: calc(100% + 32px); height: 14px; background: #120a06; border: 1px solid #8a5a2a; border-radius: 3px; overflow: hidden; }
.tf-cast i { display: block; height: 100%; width: 0; background: linear-gradient(180deg, #ffb040, #c85a10); }
.tf-cast span { position: absolute; inset: 0; text-align: center; font: 700 10px/14px var(--font-body); color: #fff; text-shadow: 0 1px 2px #000; }
.tf-cast.hidden { display: none; }

.jr-portrait { float: right; width: 96px; height: 96px; border-radius: 50%; border: 2px solid #8a6a2a; box-shadow: 0 0 10px rgba(0,0,0,.6); margin: 0 0 6px 10px; }

.ach-ic, .at-ic { background-size: cover !important; background-position: center !important; position: relative; color: transparent !important; filter: grayscale(.85) brightness(.7); }
.ach.done .ach-ic, .at-ic { filter: none; }
.ach-ic span, .at-ic span { position: absolute; right: -4px; bottom: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #2a1a08; border: 1px solid #c8902a; color: #ffe08a; font: 700 10.5px/16px var(--font-body); text-align: center; }
.at-ic { width: 52px !important; height: 52px !important; border-radius: 50%; }

.look-row { display: flex; align-items: center; justify-content: space-between; margin: 8px 0; font-size: 13px; color: #c8b48a; }
.look-row select { background: #1a120a; border: 1px solid #5a4628; color: #f4ead2; border-radius: 3px; padding: 3px 6px; font: inherit; }

/* ---- the Main Story */
.crest { width: 15px; height: 18px; vertical-align: -4px; margin-right: 5px; flex: none; filter: drop-shadow(0 1px 1px #000); }
.msq-box { pointer-events: auto; cursor: pointer; margin: 0 0 10px; padding: 6px 8px 7px; border-radius: 6px; background: linear-gradient(90deg, rgba(122,20,8,.55), rgba(122,20,8,.08)); border-left: 3px solid #e2552a; }
.msq-box:hover { background: linear-gradient(90deg, rgba(150,30,10,.7), rgba(150,30,10,.12)); }
.msq-h { display: flex; align-items: center; gap: 2px; font: 700 13px var(--font-head); color: #ffb48a; letter-spacing: .04em; }
.msq-h span { white-space: nowrap; }
.msq-ch { font-size: 11px; color: #f0c8a8; letter-spacing: .04em; margin: 1px 0 0 20px; }
.msq-n { font-weight: 700; color: #ffe0b0; margin-top: 2px; }
.msq-g { font-size: 13px; color: #f4ece0; }
.msq-box.ready .msq-n { color: #9aff8a; }
.msq-box.level .msq-g, .msq-box.end .msq-g { color: #d8c8b0; font-style: italic; }
.qt.msq .qt-n { color: #ffc8a0; }
.ql.msq { color: #ffb48a; }
.ql .crest { width: 12px; height: 15px; }
.msq-rib { display: flex; align-items: center; font: 700 12px var(--font-head); color: #ffb48a; letter-spacing: .05em; padding: 4px 8px; margin-bottom: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(160,36,14,.45), transparent); }
.dopt.msq { border-color: #a8401c; background: linear-gradient(90deg, rgba(160,36,14,.32), rgba(255,230,160,.04)); display: flex; align-items: center; }
.dopt.msq:hover { border-color: #ff8a50; }
.dopt.msq.active { opacity: .85; }
.msq-tag { margin-left: auto; font: 700 10px var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: #ffb48a; opacity: .9; }
.w-quests .wb { display: block; width: 640px; }
.ql-body { display: flex; gap: 12px; }
.ql-tabs { margin-bottom: 8px; }
.ql-tabs button { display: inline-flex; align-items: center; }
.ql-note { font-size: 12px; opacity: .7; align-self: center; }
.sl-list { width: 220px; }
.sl-part { font: 700 11px var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: #c8a878; margin: 8px 0 3px; }
.sl-part:first-child { margin-top: 0; }
.sl-part span { display: block; font: 400 12px var(--font-body); letter-spacing: 0; text-transform: none; color: #f0e0c0; font-style: italic; }
.sl-ch { display: flex; align-items: baseline; gap: 6px; padding: 4px 6px; border-radius: 3px; cursor: pointer; color: #ffe8c0; font-size: 13px; }
.sl-ch b { width: 12px; text-align: center; color: #ff8a50; flex: none; }
.sl-ch.done b { color: #7ae07a; }
.sl-ch em { margin-left: auto; font-style: normal; font-size: 11px; opacity: .65; white-space: nowrap; }
.sl-ch.locked { opacity: .5; }
.sl-ch.on { background: rgba(226,85,42,.22); }
.sl-detail { max-height: 470px; overflow-y: auto; padding-right: 4px; }
.sl-art { position: relative; height: 110px; border-radius: 6px; background-size: cover; background-position: center 40%; border: 1px solid #6a4a22; overflow: hidden; margin-bottom: 8px; }
.sl-art > div { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 6px; background: linear-gradient(transparent, rgba(10,6,2,.85)); }
.sl-art em { font: 400 11px var(--font-body); color: #f0d0b0; font-style: normal; letter-spacing: .06em; }
.sl-art h3 { margin: 0; text-shadow: 0 1px 3px #000; }
.sl-blurb { font-style: italic; color: #e8d8b8; margin: 0 0 10px; }
.sl-steps { display: flex; flex-direction: column; gap: 6px; }
.sl-step { display: flex; gap: 8px; align-items: flex-start; }
.sl-step > b { width: 15px; text-align: center; flex: none; color: #7ae07a; }
.sl-step > .crest { margin-top: 1px; }
.sl-step span { font-weight: 700; color: #ffe0b0; }
.sl-step span i { font-weight: 400; font-style: normal; font-size: 11px; opacity: .7; margin-left: 4px; }
.sl-step p { margin: 2px 0 0; font-size: 13px; line-height: 1.4; color: #d8ccb4; }
.sl-step.done span { color: #c8bca0; }
.sl-step.cur { padding: 6px 8px; border-radius: 5px; background: rgba(160,36,14,.22); border: 1px solid #8a3418; }
.sl-step.cur p { color: #efe4cc; }
.sl-step .sl-next { color: #ffc890; font-weight: 700; }
.sl-step.missed > b { color: #c8a878; }
.sl-step.missed p { font-style: italic; }
.sl-more, .sl-locked, .sl-end { margin-top: 8px; font-size: 13px; font-style: italic; color: #c8b48a; }
.sl-end { padding: 8px 10px; border-radius: 5px; background: rgba(232,194,106,.1); color: #f0e0b8; }
/* chapter title cards (and region banners) */
.story-card { position: absolute; left: 50%; top: 13%; width: 720px; height: 236px; margin-left: -360px; pointer-events: none; z-index: 6; opacity: 0; animation: storycard 7s ease forwards; }
.story-card .sc-art { position: absolute; inset: 0; background-size: cover; background-position: center 45%; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%); }
.story-card .sc-txt { position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; text-shadow: 0 2px 4px #000, 0 0 12px #000, 0 0 22px rgba(0,0,0,.8); }
.sc-top { font: 700 13px var(--font-head); letter-spacing: .22em; text-transform: uppercase; color: #ffb48a; }
.sc-title { font: 700 34px var(--font-head); color: #ffe6a8; margin: 2px 0; }
.sc-sub { font: italic 15px var(--font-body); color: #f4ead2; max-width: 560px; margin: 0 auto; }
@keyframes storycard { 0% { opacity: 0; transform: translateY(8px); } 10% { opacity: 1; transform: none; } 82% { opacity: 1; } 100% { opacity: 0; } }

/* dialog options share the .vendor class with the wares grid: keep them as plain rows */
.dopt.vendor { display: block; }

/* ---- quest pages: parchment, the region's painting, reward cards */
.w-dialog .wb.parch { width: 430px; padding: 0 16px 14px; color: #3a2a18; background:
  radial-gradient(ellipse at 30% 20%, rgba(255,248,226,.55), transparent 60%),
  radial-gradient(ellipse at 80% 90%, rgba(150,110,60,.22), transparent 55%),
  repeating-linear-gradient(97deg, rgba(120,90,50,.035) 0 2px, transparent 2px 5px),
  linear-gradient(180deg, #ecdfc2, #dcc8a0); box-shadow: inset 0 0 30px rgba(110,70,30,.35); }
.parch .qp-head { position: relative; height: 112px; margin: 0 -16px 10px; background-size: cover; background-position: center 45%; }
.parch .qp-head::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,12,6,.05) 30%, rgba(20,12,6,.35) 65%, #e6d7b6 100%); }
.parch .qp-who { position: absolute; left: 16px; bottom: 12px; z-index: 1; display: flex; flex-direction: column; text-shadow: 0 1px 3px #000, 0 0 10px rgba(0,0,0,.8); }
.parch .qp-who b { font: 700 19px var(--font-head); color: #ffe6a8; }
.parch .qp-who span { font-size: 12px; color: #f0dcb4; letter-spacing: .05em; }
.parch .msq-rib { background: linear-gradient(90deg, #8a2410, #b04420 65%, rgba(176,68,32,0)); color: #ffe6c0; }
.parch .qp-title { font: 700 21px var(--font-head); color: #5a1e0a; margin: 4px 0 6px; }
.parch .qp-text { line-height: 1.5; margin: 0 0 10px; color: #3a2a18; font-size: 14.5px; }
.parch .qp-obj { padding: 7px 10px; border-left: 3px solid #8a5a20; background: rgba(120,80,30,.1); border-radius: 0 4px 4px 0; font-weight: 700; color: #3a2410; font-size: 14px; }
.parch .qp-obj span { display: block; font: 700 10px var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: #8a5a20; margin-bottom: 1px; }
.parch .qp-sec { margin: 12px 0 6px; font: 700 12px var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: #6a4418; display: flex; align-items: center; gap: 8px; }
.parch .qp-sec::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(106,68,24,.5), transparent); }
.parch .qp-pay { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; }
.parch .qp-xp { font-weight: 700; color: #5a2a8a; }
.parch .qp-money { font-weight: 700; color: #3a2a18; }
.parch .qp-money .m-g { color: #a07800; } .parch .qp-money .m-s { color: #707070; } .parch .qp-money .m-c { color: #9a5a28; }
.parch .qp-rep { font-size: 12px; color: #6a5030; font-style: italic; }
.parch .qp-pick { margin: 10px 0 5px; font-size: 13px; color: #6a5030; font-style: italic; }
.parch .qp-cards { display: grid; gap: 6px; }
.parch .rcard { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 6px; background: rgba(255,250,236,.55); border: 1px solid rgba(110,80,40,.35); cursor: pointer; transition: background .12s, box-shadow .12s; }
.parch .rcard:hover { background: rgba(255,250,236,.85); }
.parch .rcard.on { border-color: var(--qc); box-shadow: 0 0 0 1px var(--qc), 0 0 12px color-mix(in srgb, var(--qc) 55%, transparent); background: rgba(255,252,242,.9); }
.parch .rcard img { width: 48px; height: 48px; border-radius: 5px; border: 2px solid var(--qc); box-shadow: 0 0 8px color-mix(in srgb, var(--qc) 60%, transparent); flex: none; background: #2a1e12; }
.parch .rcard div { display: flex; flex-direction: column; min-width: 0; }
.parch .rcard b { font: 700 14px var(--font-head); color: var(--qi); }
.parch .rcard span { font-size: 12px; color: #6a5030; }
.parch .rcard em { font-style: normal; font-size: 12.5px; color: #1e5a12; font-weight: 700; }
.parch .dbtns { margin-top: 14px; }
/* quest pages: compact enough that Accept is always in view */
.w-dialog .wb.parch { max-height: 82vh; }
.parch .qp-head { height: 88px; margin-bottom: 8px; }
.parch .qp-who b { font-size: 17px; }
.parch .qp-title { font-size: 19px; margin: 2px 0 4px; }
.parch .qp-text { font-size: 14px; line-height: 1.45; margin-bottom: 8px; }
.parch .qp-obj { padding: 5px 9px; font-size: 13.5px; }
.parch .qp-sec { margin: 9px 0 4px; }
.parch .qp-pick { margin: 6px 0 4px; }
.parch .qp-cards { gap: 5px; }
.parch .rcard { padding: 4px 7px; }
.parch .rcard img { width: 42px; height: 42px; }
.parch .dbtns { margin-top: 10px; }

/* ---- story scenes: letterbox bars and a line of narration; the HUD steps aside */
#ui.in-scene > .hud > *:not(.story-card) { opacity: 0; transition: opacity .5s; pointer-events: none !important; }
.scene-bars { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.scene-bars .sb-top, .scene-bars .sb-bot { position: absolute; left: 0; right: 0; height: 0; background: #000; transition: height .7s ease; pointer-events: auto; cursor: pointer; }
.scene-bars .sb-top { top: 0; } .scene-bars .sb-bot { bottom: 0; display: flex; align-items: center; justify-content: center; }
.scene-bars.on .sb-top { height: 11vh; } .scene-bars.on .sb-bot { height: 15vh; }
.sb-line { max-width: 900px; padding: 0 40px; text-align: center; font: italic 19px/1.5 var(--font-body); color: #f4e6c8; opacity: 0; transform: translateY(6px); transition: opacity 1.1s, transform 1.1s; text-shadow: 0 0 10px rgba(255,200,120,.15); }
.scene-bars.say .sb-line { opacity: 1; transform: none; }
.sb-skip { position: absolute; right: 18px; bottom: 10px; font: 11px var(--font-body); color: #8a7a60; opacity: 0; transition: opacity 1s .8s; }
.scene-bars.on .sb-skip { opacity: .8; }
#ui.in-scene > .window { opacity: 0; transition: opacity .5s; pointer-events: none; }

/* ---- the greeting page on parchment */
.parch .qp-greet { font-style: italic; color: #4a3420; margin: 2px 0 10px; line-height: 1.45; }
.parch .qp-opts .dopt { background: rgba(255,250,236,.5); border: 1px solid rgba(110,80,40,.32); color: #2a1e10; }
.parch .qp-opts .dopt:hover { background: rgba(255,250,236,.92); border-color: #8a5a20; }
.parch .qp-opts .dopt b { color: #a06800; }
.parch .qp-opts .dopt.vendor b { color: #2a7a10; }
.parch .qp-opts .dopt.travel b { color: #1a4a9a; }
.parch .qp-opts .dopt.active b { color: #7a7a7a; }
.parch .qp-opts .dopt span[style] { color: #8a5a10 !important; opacity: 1 !important; }
.parch .qp-opts .dopt.msq { background: linear-gradient(90deg, rgba(176,48,20,.2), rgba(255,250,236,.55)); border-color: #b04420; }
.parch .qp-opts .msq-tag { color: #9a2a10; }
/* ---- quest complete */
.qdone-banner { position: absolute; left: 0; right: 0; top: 30%; text-align: center; pointer-events: none; z-index: 5; animation: qdone 3.6s ease forwards; text-shadow: 0 2px 4px #000, 0 0 14px rgba(0,0,0,.8); }
.qdone-banner .qd1 { font: 700 30px var(--font-head); color: #ffd860; letter-spacing: .06em; display: inline-flex; align-items: center; }
.qdone-banner .qd1 .crest { width: 24px; height: 29px; margin-right: 8px; }
.qdone-banner .qd2 { font: italic 17px var(--font-body); color: #f4ead2; margin-top: 2px; }
.qdone-banner.msq .qd1 { color: #ffb48a; }
@keyframes qdone { 0% { opacity: 0; transform: scale(.94); } 10% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
/* ---- previously in the Main Story */
.story-recap { position: absolute; left: 50%; top: 96px; width: 420px; margin-left: -210px; z-index: 6; border-radius: 8px; border: 2px solid #8a6a30; box-shadow: 0 8px 30px rgba(0,0,0,.55); padding: 10px 14px 12px !important; cursor: pointer; animation: recapin .6s ease; transition: opacity .6s, transform .6s; }
.story-recap.out { opacity: 0; transform: translateY(-8px); }
.story-recap .sr-h { display: flex; align-items: center; font: 700 13px var(--font-head); letter-spacing: .08em; color: #8a2410; text-transform: uppercase; }
.story-recap .sr-x { margin-left: auto; background: none !important; border: 0 !important; box-shadow: none !important; color: #6a4418 !important; font-size: 18px !important; padding: 0 4px !important; cursor: pointer; }
.story-recap .sr-ch { font: 700 16px var(--font-head); color: #5a1e0a; margin: 4px 0 2px; }
.story-recap p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.45; color: #3a2a18; font-style: italic; }
.story-recap .sr-next { font-size: 13.5px; color: #2a1e10; }
.story-recap .sr-next b { color: #8a2410; }
@keyframes recapin { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
/* ---- quest log groups */
.ql-grp { font: 700 11px var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: #c8a878; margin: 8px 0 2px; padding-bottom: 2px; border-bottom: 1px solid rgba(200,168,120,.25); }
.ql-grp:first-child { margin-top: 0; }
/* the recap card shares the dialog's parchment */
.story-recap { color: #3a2a18; background:
  radial-gradient(ellipse at 30% 20%, rgba(255,248,226,.55), transparent 60%),
  radial-gradient(ellipse at 80% 90%, rgba(150,110,60,.22), transparent 55%),
  repeating-linear-gradient(97deg, rgba(120,90,50,.035) 0 2px, transparent 2px 5px),
  linear-gradient(180deg, #ecdfc2, #dcc8a0); }

/* ---- Dungeons & Loot guide */
.dg-grp { font: 700 11px var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: #c8a878; margin: 8px 0 2px; padding-bottom: 2px; border-bottom: 1px solid rgba(200,168,120,.25); }
.dg-grp:first-child { margin-top: 0; }
.dg-detail { max-height: min(470px, calc(100vh - 250px)); overflow-y: auto; padding-right: 4px; }
.dg-head { position: relative; height: 96px; border-radius: 6px; background-size: cover; background-position: center 45%; border: 1px solid #6a4a22; overflow: hidden; margin-bottom: 10px; }
.dg-head > div { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 10px 6px; background: linear-gradient(transparent, rgba(10,6,2,.9)); }
.dg-head h3 { margin: 0 !important; text-shadow: 0 1px 3px #000; }
.dg-head span { font-size: 12px; color: #f0d8b0; }
.dg-foe { margin: 0 0 12px; }
.dg-fh { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.dg-por { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #8a6a30; object-fit: cover; }
.dg-fh b { font: 700 14px var(--font-head); color: #ffe0b0; }
.dg-fh em { display: block; font-style: normal; font-size: 11px; color: #c8a878; }
.dg-loot { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.dg-none { font-size: 12px; color: #a89878; }
.lcard { display: flex; gap: 7px; align-items: center; padding: 4px 6px; border-radius: 5px; background: rgba(255,230,160,.05); border: 1px solid #3a2a18; min-width: 0; }
.lcard:hover { border-color: var(--qc); background: rgba(255,230,160,.1); }
.lcard img { width: 36px; height: 36px; border-radius: 4px; border: 2px solid var(--qc); box-shadow: 0 0 6px color-mix(in srgb, var(--qc) 50%, transparent); flex: none; }
.lcard div { min-width: 0; }
.lcard b { display: block; font-size: 13px; color: var(--qc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard span { font-size: 11px; color: #b8a888; }
.dg-set { margin-top: 6px; padding-top: 8px; border-top: 1px solid #3a2a18; }
.dg-sh { font: 700 14px var(--font-head); color: #8acc6a; margin-bottom: 5px; }
.dg-sh span { font: 400 12px var(--font-body); color: #b8a888; margin-left: 8px; }
.dg-bonus { margin-top: 6px; font-size: 13px; color: #8acc6a; }
.dg-legs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dg-leg { padding: 6px; border: 1px solid #5a3a10; border-radius: 6px; background: rgba(255,128,0,.06); }
.dg-leg p { margin: 5px 2px 0; font-size: 12px; line-height: 1.35; color: #ffcf8a; }
.dg-leg .dg-for { color: #b8a888; }
.dg-detail { max-height: min(440px, calc(100vh - 300px)); }
.dg-list { max-height: min(440px, calc(100vh - 300px)); }
.dg-detail { overflow-x: hidden; }
.dg-loot, .dg-legs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* ---- the Armory (Valley Journal) */
.ar-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 12px; color: #b8a888; }
.ar-head span { flex: 1; font-style: italic; }
.ar-bar { position: relative; width: 220px; height: 18px; border-radius: 9px; background: #1a120a; border: 1px solid #6a4a22; overflow: hidden; }
.ar-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #6a3aa8, #b45aff); }
.ar-bar b { position: absolute; inset: 0; text-align: center; font: 700 11px/16px var(--font-body); color: #fff; text-shadow: 0 1px 2px #000; }
.ar-grp { margin-bottom: 10px; }
.ar-gh { display: flex; font: 700 12px var(--font-head); letter-spacing: .06em; color: #e8c890; margin-bottom: 4px; padding-bottom: 2px; border-bottom: 1px solid rgba(200,168,120,.2); }
.ar-gh em { margin-left: auto; font: 400 11px var(--font-body); font-style: normal; color: #a89878; }
.ar-tiles { display: flex; flex-wrap: wrap; gap: 5px; }
.ar-tile { position: relative; width: 44px; height: 44px; border-radius: 5px; border: 2px solid var(--qc); overflow: hidden; background: #1a120a; cursor: default; }
.ar-tile img { width: 100%; height: 100%; display: block; }
.ar-tile.got { box-shadow: 0 0 6px color-mix(in srgb, var(--qc) 55%, transparent); }
.ar-tile.miss { border-color: #3a3026; }
.ar-tile.miss img { filter: grayscale(1) brightness(.22); }
.ar-tile.miss b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 18px var(--font-head); color: #6a5a48; }
.ar-tile:hover { outline: 1px solid #e8c26a; }
.tt-src { margin-top: 5px; padding-top: 4px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; color: #c8b490; font-style: italic; }
.tt-notyet { color: #8a8a8a; font-size: 12px; margin-top: 3px; }

/* ---- Reforging */
.tt-rf { color: #ffd060; font-size: 13px; }
.rf-list { display: flex; flex-direction: column; gap: 5px; max-height: 52vh; overflow-y: auto; }
.rf-row { display: flex; gap: 8px; align-items: center; padding: 5px 7px; border: 1px solid #3a2a18; border-radius: 5px; background: rgba(255,230,160,.04); }
.rf-row img { width: 40px; height: 40px; border: 2px solid; border-radius: 4px; flex: none; }
.rf-tx { flex: 1; display: flex; flex-direction: column; min-width: 0; font-size: 12px; color: #c8b490; }
.rf-tx b { font: 700 13px var(--font-head); }
.rf-tx i { color: #7ae07a; font-style: normal; }
.rf-worn { font-size: 10px; color: #8acc6a; text-transform: uppercase; letter-spacing: .08em; }
.rf-done { color: #e8c26a; font-style: italic; }
.rf-cost em { font-style: normal; }
.rf-row.cant .rf-b, .rf-b[disabled] { filter: grayscale(1); opacity: .55; }
.rf-row.full { opacity: .75; }
.rf-list { max-height: none; overflow: visible; }

/* ---- loot history */
.w-loothist .wb { width: 340px; }
.lh-tabs { margin-bottom: 6px; }
.lh-list { display: flex; flex-direction: column; gap: 3px; max-height: 56vh; overflow-y: auto; padding-right: 3px; }
.lh-row { display: flex; gap: 8px; align-items: center; padding: 3px 5px; border-radius: 4px; }
.lh-row:hover { background: rgba(255,230,160,.08); }
.lh-row img { width: 32px; height: 32px; border: 2px solid; border-radius: 4px; flex: none; }
.lh-row div { display: flex; flex-direction: column; min-width: 0; }
.lh-row b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lh-row i { font-style: normal; color: #c8b490; font-size: 12px; }
.lh-row span { font-size: 11px; color: #a89878; }

/* ---- spare rewards (parchment page) */
.parch .sp-card { cursor: default; }
.parch .sp-card > div { flex: 1; }
.parch .sp-buy { flex: none; font-size: 12px !important; padding: 4px 8px !important; white-space: nowrap; }
.parch .sp-buy .m-g, .parch .sp-buy .m-s, .parch .sp-buy .m-c { color: inherit; }

/* the journal's four tabs fit on one line */
.w-journal .wb { width: 720px; }
.w-journal .post-tabs button { white-space: nowrap; font-size: 12px; padding-left: 8px; padding-right: 8px; }

/* ---- bag search */
.bag-search { display: flex; gap: 4px; padding: 8px 12px 0; }
.bag-search input { flex: 1; min-width: 0; padding: 4px 8px; border-radius: 4px; border: 1px solid #6a4a22; background: #1a120a; color: #f4ead2; font: 13px var(--font-body); }
.bag-search input:focus { outline: none; border-color: #e8c26a; }
.bag-search .bs-x { padding: 0 8px !important; }
.bslot.dim { opacity: .2; filter: grayscale(.85); }
.bslot.hit { box-shadow: 0 0 0 2px #e8c26a, 0 0 10px rgba(232,194,106,.55); }


/* ---- Tempest modifiers */
.dc-mods { margin: 6px 0 8px; padding: 6px 8px; border-radius: 5px; background: rgba(90,110,160,.18); border: 1px solid #4a5a7a; font-size: 12px; color: #c8d4ec; }
.dc-mods b { color: #9ab8ff; }
.dc-mods span { color: #e8eeff; font-weight: 700; }
.dc-mods div { margin-top: 3px; color: #a8b4cc; font-style: italic; }
.dg-mods { margin: 0 0 12px; }
.dg-mod { font-size: 13px; color: #c8d4ec; margin: 3px 0; }
.dg-mod b { color: #9ab8ff; margin-right: 4px; }

/* upgrade tags on reward cards */
.up-tag { display: inline-block; margin-top: 2px; font: 700 11px var(--font-body); font-style: normal; color: #2a8a10; letter-spacing: .02em; }
.window:not(.w-dialog) .up-tag, .w-dialog .wb:not(.parch) .up-tag { color: #7ae07a; }

/* item links in chat */
.chat-log .clink { cursor: default; font-weight: 700; pointer-events: auto; }
.chat-log .clink:hover { text-decoration: underline; }

/* unsocketing */
.us-gem { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12px; color: #c8d8f0; }
.us-gem i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.us-gem .us-b { margin-left: auto; font-size: 11px !important; padding: 2px 8px !important; white-space: nowrap; }
.us-gem i { border: 1px solid #8a7a5a; background: #1a140c; }
.us-gem i.gem-red { background: #d83a2a; } .us-gem i.gem-grey { background: #9a9aa2; } .us-gem i.gem-green { background: #5ac83a; }
.us-gem i.gem-blue { background: #3a8aff; } .us-gem i.gem-gold { background: #e8b030; } .us-gem i.gem-amber { background: #e88a2a; }

/* ---- Collections (Valley Journal) */
.w-journal .wb { width: 800px; }
.co-sec { margin-bottom: 12px; }
.co-sec .dg-sh span { font: 400 12px var(--font-body); color: #b8a888; margin-left: 8px; }
.co-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.co-card { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: 6px; border: 1px solid #3a2a18; background: rgba(255,230,160,.04); min-width: 0; }
.co-card img { width: 44px; height: 44px; border-radius: 6px; border: 2px solid #8a6a30; flex: none; }
.co-card .co-sw { width: 44px; height: 44px; border-radius: 8px; border: 2px solid #8a6a30; flex: none; display: block; }
.co-card div { display: flex; flex-direction: column; min-width: 0; }
.co-card b { font: 700 13px var(--font-head); color: #ffe0b0; }
.co-card span { font-size: 11.5px; color: #b8a888; line-height: 1.35; }
.co-card em { font-size: 11px; font-style: italic; color: #8a7a68; margin-top: 2px; }
.co-card em.co-ok { color: #8acc6a; font-style: normal; }
.co-card.miss img, .co-card.miss .co-sw { filter: grayscale(1) brightness(.45); }
.co-card.miss b { color: #a89878; }
.co-card .co-pet { align-self: flex-start; margin-top: 4px; font-size: 11px !important; padding: 2px 10px !important; }

/* achievement tracking */
.ach-trk { margin-top: 4px; font-size: 11px !important; padding: 2px 8px !important; filter: saturate(.6); }
.ach-trk.on { filter: none; box-shadow: 0 0 0 1px #ffe08a; }
.hud .quest-tracker .qt.at .qt-n { color: #ffc860; }

.store-search { padding: 0 0 8px; }

/* boss abilities in the guide */
.dg-ab { font-size: 12px; color: #d8c8b0; margin: 0 0 3px 48px; }
.dg-ab b { color: #ffb070; font-weight: 700; }
.dg-ab i { color: #b8a888; }
/* sets in the character window */
.cs-sets { margin-top: 8px; padding-top: 6px; border-top: 1px solid #3a2a18; }
.cs-sets h4 { margin: 0 0 4px; font: 700 12px var(--font-head); letter-spacing: .08em; color: #c8a878; text-transform: uppercase; }
.cs-set { font-size: 12.5px; margin-bottom: 5px; }
.cs-set b { color: #8acc6a; } .cs-set span { color: #b8a888; font-size: 12px; }
.cs-set .cs-off { color: #7a7066; }

/* the bigger world map scales down to fit instead of scrolling */
.w-map canvas { max-height: min(calc(100vh - 230px), calc(70vh - 48px)); }

/* raid lockout line in the dungeon rides list */
.tr-lock { display: block; font-size: 11px; color: #c8b890; }
.tr-lock i { color: #a09080; font-style: normal; }
.tr-lock em { color: #8ae07a; font-style: normal; }

/* wardrobe box in the character window */
.wardrobe { margin-top: 8px; padding: 6px 8px; border: 1px solid rgba(200,160,80,0.35); border-radius: 6px; background: rgba(30,22,14,0.45); }
.wardrobe h4 { margin: 0 0 4px; font-family: Cinzel, serif; color: #f0d090; font-size: 13px; }
.wardrobe h4 span { float: right; font-family: sans-serif; font-weight: 400; font-size: 11px; color: #b8a888; }
.wardrobe .look-row.off { opacity: 0.45; }
.wardrobe .wd-hint { font-size: 11px; color: #a89878; margin-top: 3px; }

/* group finder */
.mu-party { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 8px; }
.mu-party label { display: block; font-family: Cinzel, serif; color: #f0d090; font-size: 12px; margin-bottom: 3px; }
.mu-m { display: block; padding: 2px 6px; margin: 2px 0; border-left: 3px solid var(--rc, #888); background: rgba(30,22,14,0.5); font-size: 12px; }
.mu-m em { font-style: normal; color: var(--rc, #ccc); font-size: 11px; float: right; }

/* another player's homestead */
.w-homeview .wb { min-width: 320px; }
.w-homeview h4 { font-family: Cinzel, serif; color: #f0d090; margin: 6px 0 4px; }
.hv-row { padding: 2px 4px; font-size: 13px; color: #e8dcc0; }
.hv-row.none { color: #9a8a70; font-style: italic; }
/* the runabout's three marks, side by side (yours lit, the ones you have passed dimmed) */
.mk-table { display: grid; gap: 4px; margin: 8px 0; }
.mk-row { display: grid; grid-template-columns: 64px 92px 1fr; gap: 2px 10px; padding: 5px 8px; border: 1px solid rgba(120, 90, 50, 0.35); border-radius: 4px; background: rgba(255, 245, 220, 0.25); font-size: 13px; }
.mk-row b { font-family: Cinzel, serif; }
.mk-row em { font-style: normal; opacity: 0.85; }
.mk-row i { grid-column: 2 / 4; font-size: 11px; opacity: 0.7; }
.mk-row.on { border-color: #c89a3a; background: rgba(255, 220, 140, 0.45); box-shadow: 0 0 0 1px #e8c060 inset; }
.mk-row.past { opacity: 0.55; }

/* ======================================================================
   ARTIFICER SKIN — visual overrides, deliberately separate from HUD geometry
   ====================================================================== */

/* Frames: milled rim, engraved inset and four straight brass corner caps. */
.window, .login-panel, .invite-pop, .claim, .story-recap {
  background: var(--grain), var(--metal);
  color: var(--metal-text);
  border-color: var(--brass-edge);
  border-radius: 2px;
  box-shadow: 0 12px 28px #0009, inset 0 1px 0 #e0eff047,
    inset 0 -2px 0 #000b, inset 0 0 0 4px var(--frame), inset 0 0 0 5px var(--engraving);
}
.window { max-width: calc(100vw - 24px); font-size: 14px; }
.window::before, .window::after {
  content: ''; position: absolute; width: 13px; height: 13px;
  pointer-events: none; z-index: 2; border-color: var(--brass); border-style: solid;
}
.window::before { top: -2px; left: -2px; border-width: 2px 0 0 2px; }
.window::after { bottom: -2px; right: -2px; border-width: 0 2px 2px 0; }
.window .wh {
  position: relative; gap: 12px; color: var(--brass-light);
  background: linear-gradient(90deg, #0b131a, #26343b 55%, #111c24);
  border-bottom: 1px solid var(--teal-dim);
  box-shadow: inset 0 1px 0 #e7d7a126, inset 0 -3px 0 #060c11,
    inset 0 -4px 0 #5fe0d045;
  text-shadow: 0 -1px 0 #000, 0 1px 5px #e8c26a38;
}
.window .wh > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window .wh::after {
  content: ''; position: absolute; right: 45px; top: 8px; width: 3px; height: 3px;
  border-radius: 50%; background: var(--brass-edge);
  box-shadow: -7px 0 0 var(--brass-edge), 0 1px 1px #000;
  pointer-events: none;
}
.window .wb { background: var(--grain), linear-gradient(110deg, #17232cf5, #101920f5); }
.window .wb, .window .wb * { box-sizing: border-box; min-width: 0; }
.window .wb { max-width: 100%; overflow-wrap: anywhere; }
.window .wb > * { max-width: 100%; }
.window :is(.ql-detail, .jr-detail, .ach-list, .ach-tx, .cr-tx, .tr-mid, .rf-tx, .li-tx) { min-width: 0; }
.window :is(.vendor, .vgrid, .rep-shop, .paints, .stats, .dg-loot, .dg-legs) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.window :is(.dbtns, .post-tabs, .o-q, .o-s, .tl-head, .tr-form, .ach-head) { flex-wrap: wrap; }
.window :is(.ql-list, .jr-list, .ach-cats) { flex-shrink: 1; }
.window img { flex-shrink: 0; }

/* Machined keys. No geometry changes to the action bar or menu. */
.window button, .login button, .death button, .tf-actions button,
.invite-pop button, .claim button, .menubar button, .pf-leave {
  background: linear-gradient(180deg, #384650, #1c2932 48%, #172029);
  color: var(--brass-light); border-color: var(--brass-edge); border-radius: 2px;
  clip-path: var(--cut-key); box-shadow: var(--key-shadow);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}
.window button:hover, .login button:hover, .death button:hover, .tf-actions button:hover,
.invite-pop button:hover, .claim button:hover, .menubar button:hover, .pf-leave:hover {
  filter: none; border-color: var(--teal); transform: translateY(-1px);
  box-shadow: var(--key-shadow), inset 0 0 8px #5fe0d030;
}
.window button:active, .login button:active, .menubar button:active,
.invite-pop button:active, .claim button:active, .tf-actions button:active {
  transform: translateY(1px); box-shadow: inset 0 2px 5px #000a;
}
#ui button:focus-visible, #ui [tabindex]:focus-visible {
  outline: 2px solid var(--teal); outline-offset: -3px;
}
.window button:disabled { opacity: .45; transform: none; cursor: default; filter: none; }
.window :is(.takeall, .acc, .accept, .buy, .hs-buy, .sp-buy, .claimb, .send, .post, .fill),
.login .enter-btn, .invite-pop .h, .invite-pop .ok {
  background: linear-gradient(180deg, #f4d991, #cfac60 48%, #9e7b3d) !important;
  color: #1a252b; border-color: var(--brass-light); text-shadow: 0 1px 0 #fff4;
}
.window .wx {
  flex: 0 0 22px; width: 22px; height: 22px; padding: 0 !important;
  background: linear-gradient(#394650, #15212b) !important;
  border: 1px solid var(--brass-edge) !important; border-radius: 2px;
  box-shadow: var(--key-shadow) !important; color: var(--brass-light) !important;
  line-height: 18px;
}
.window .wx:hover { border-color: var(--teal) !important; color: var(--teal) !important; }
.window :is(.post-tabs, .tl-sets, .mt-tabs, .o-q, .o-s) button { filter: none; opacity: 1; }
.window button.on, .tf-actions button.on {
  color: var(--teal); border-color: var(--teal-dim); filter: none;
  background: linear-gradient(180deg, #293e47, #14272e);
  box-shadow: var(--key-shadow), inset 0 -2px 0 var(--teal), inset 0 -7px 12px #5fe0d020;
}
.window .post-tabs button { flex: 1 1 auto; }

/* Recessed compartments and selectable ledger rows. */
.window :is(.tl-path, .ach, .dopt, .rw, .vitem, .litem, .vcard, .craft,
.rf-row, .tr-row, .mrow, .paint, .lcard, .co-card, .dg-leg, .dc-mods, .wardrobe-box) {
  background: var(--grain), linear-gradient(180deg, #111b23, #19262e);
  border-color: #46514f; border-radius: 2px;
  box-shadow: inset 0 1px 3px #0007, inset 0 -1px 0 #c9e6eb0b;
}
.window :is(.dopt, .rw, .vitem, .litem, .vcard, .mrow, .paint, .ach-cat, .ql, .jr, .lh-row) {
  transition: border-color 150ms, background-color 150ms;
}
.window :is(.dopt, .rw, .vitem, .litem, .vcard, .mrow, .paint, .ach-cat):hover {
  border-color: var(--teal); background-color: #20363d;
}
.window :is(.ql.on, .jr.on, .ach-cat.on, .paint.on, .rw.on, .sl-ch.on) {
  background: linear-gradient(90deg, #24505780, #172a33);
  box-shadow: inset 2px 0 0 var(--teal); color: var(--teal);
}
.window :is(h3, h4, .char-head, .tl-ph b, .ach-tx b, .st-row b, .tr-h) { color: var(--brass-light); }
.window :is(.li-tx em, .lh-row i, .lh-row span, .rf-tx, .jr-tag, .ar-head, .bag-top, .npc-title) { color: var(--metal-muted); }
.window :is(.ql-detail p, .qtext, .greet, .jr-row, .news-it span) { color: var(--metal-text); }
.window :is(.ql-list, .tl-ph, .st-row, .rep-list h4, .w-opts h4, .dg-set) { border-color: var(--engraving); }
.window :is(input:not([type=range]):not([type=checkbox]), select, textarea), .chat-in, .name-in {
  background: var(--recess); color: var(--metal-text); border-color: var(--brass-edge);
  border-radius: 2px; box-shadow: var(--socket-shadow); max-width: 100%;
}
#ui :is(input, select, textarea):focus { outline: 1px solid var(--teal); outline-offset: -1px; border-color: var(--teal); }
#ui :is(input[type=range], input[type=checkbox]) { accent-color: var(--teal); }

/* Sockets preserve the exact rarity colours from shared/data.js. */
.eslot, .bslot, .slot, .tl, .li-ic, .ar-tile {
  background: var(--recess); border-radius: 2px; box-shadow: var(--socket-shadow);
}
.eslot, .bslot { border-color: #52605b; }
.eslot:not(:has(img)) { box-shadow: var(--socket-shadow); }
:is(.eslot, .bslot, .li-ic) > img { border-radius: 2px; }
.bslot.bq0, .eslot.q0, .litem.q0 { --socket-quality: #9d9d9d; }
.bslot.bq1, .eslot.q1, .litem.q1 { --socket-quality: #ffffff; }
.eslot.q2, .litem.q2 { --socket-quality: #3ad65a; }
/* Overlay the socket bevel so full-size item artwork cannot cover it. */
.eslot:has(img)::after, .bslot:has(img)::after, .li-ic:has(img)::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: 2px;
  box-shadow: inset 0 0 8px color-mix(in srgb, var(--socket-quality, transparent) 45%, transparent), inset 0 1px 0 #eefaff2b, inset 0 -2px 3px #0008;
}
.eslot { position: relative; }
.bslot.bq2 { --socket-quality: #3ad65a; }
.bslot.bq3, .eslot.q3, .litem.q3 { --socket-quality: #3a8aff; }
.bslot.bq4, .eslot.q4, .litem.q4 { --socket-quality: #b45aff; }
.bslot.bq5, .eslot.q5, .litem.q5 { --socket-quality: #ffc23a; }
:is(.bslot.bq2, .bslot.bq3, .bslot.bq4, .bslot.bq5, .doll-col .eslot.q3, .doll-col .eslot.q4, .doll-col .eslot.q5, .litem.q3, .litem.q4, .litem.q5) {
  animation: none; box-shadow: var(--socket-shadow), inset 0 0 12px color-mix(in srgb, var(--socket-quality) 45%, transparent);
}
.slot:hover, .bslot.hit { box-shadow: inset 0 0 0 1px var(--teal), inset 0 0 10px #5fe0d04d; }
.slot { transition: transform 140ms, box-shadow 140ms; }
.slot.pressed { box-shadow: inset 0 2px 8px #000b, inset 0 0 0 1px var(--teal); }
.doll { background: var(--grain), linear-gradient(135deg, #263943, #0b141c); border-color: var(--brass-edge); border-radius: 2px; }

/* HUD plates preserve all existing widths, anchors, spacing and bar heights. */
.unit, .pframe, .actionbars, .prompt, .ach-toast, .ltoast, .offline-tag {
  background: var(--grain), var(--metal); border-radius: 2px;
  border-color: var(--brass-edge); box-shadow: inset 0 1px 0 #d6e9ec30, inset 0 -2px 0 #0009, 0 4px 12px #0006;
}
/* Portraits become square inspection plates, without a ring around the head. */
.portrait, .portrait img, .pf-por img, .jr-portrait, .dg-por { border-radius: 2px; }
.portrait, .pf-por img { border-color: var(--brass-edge); }
.portrait .lvl, .pf-lvl, .tl-r, .tl-req { background: var(--recess); border-color: var(--brass-edge); border-radius: 2px; color: var(--brass-light); }
.unit.low .portrait { animation: none; border-color: #ff6656; box-shadow: inset 0 0 8px #ff665640; }
.menubar button.has-pts { animation: none; border-color: var(--teal); box-shadow: inset 0 -2px 0 var(--teal); }
.pframe.targeted { border-color: var(--teal); box-shadow: inset 2px 0 0 var(--teal); }
.bar, .pf-hp, .pf-res, .castbar, .tf-cast, .xpbar, .ach-bar, .rep-bar, .ar-bar, .pb {
  background: var(--recess); border-color: #52605b; border-radius: 2px; box-shadow: inset 0 1px 4px #000b;
}
.castbar i, .tf-cast i, .xpbar i, .ach-bar i, .ar-bar i, .pb i {
  background: linear-gradient(180deg, #9eede0, #46afaa 45%, #27676e);
  box-shadow: inset 0 1px 0 #e5fff780;
}
.bar i, .pf-hp i, .pf-res i { box-shadow: inset 0 1px 0 #fff5, inset 0 -1px 0 #0005; }
.minimap canvas { border-radius: 2px; border-color: var(--brass-edge); box-shadow: 0 0 0 2px var(--frame), 0 6px 16px #0008, inset 0 0 0 1px var(--brass-light); }
.zone-name, .qt-h, .qt-n { color: var(--brass-light); }
.quest-tracker { background: linear-gradient(90deg, #101920b8, #10192065); box-shadow: inset 2px 0 0 var(--brass-edge); }
.qt-h { border-bottom: 1px solid var(--teal-dim); }
.hud .quest-tracker .qt:hover { background: #5fe0d018; }
.chat-log { border-radius: 2px; background-image: linear-gradient(0deg, #1019209c, #1019200a); box-shadow: inset 1px 0 0 var(--engraving); }
.chat-log.live, .chat:hover .chat-log { background-color: #101920b3; }
.plate .ph { background: var(--recess); border-color: #52605b; border-radius: 1px; }
.plate.targeted .ph { box-shadow: 0 0 0 1px var(--teal); }
.plate.targeted .pn { text-decoration-color: var(--teal); }
.plate .lootname { background: #0b131ae6; border-radius: 1px; }
.ft { text-shadow: 0 1px 2px #071018, 0 2px 3px #000; }
.ft.dmg-out, .ft.crit { -webkit-text-stroke-color: #101920; }

/* Quest and mail pages are engraved slate ledgers as well. Existing artwork
   remains untouched; this skin introduces no images or decorative symbols. */
.w-dialog .wb.parch, .story-recap {
  color: var(--metal-text); background: var(--grain), linear-gradient(120deg, #1d2c36, #101920);
  box-shadow: inset 0 0 0 1px var(--engraving);
}
.parch :is(.qp-text, .qp-greet, .qp-obj, .qp-money), .story-recap :is(p, .sr-next) { color: var(--metal-text); }
.parch :is(.qp-title, .qp-sec, .qp-obj span), .story-recap :is(.sr-h, .sr-ch, .sr-next b) { color: var(--brass-light); }
.parch :is(.qp-rep, .qp-pick, .rcard span) { color: var(--metal-muted); }
.parch .qp-xp, .parch .rcard em { color: var(--teal); }
.parch .qp-obj { background: var(--recess); border-color: var(--teal-dim); border-radius: 1px; box-shadow: var(--socket-shadow); }
.parch .qp-head::after { background: linear-gradient(180deg, transparent 30%, #101920 100%); }
.parch .rcard, .parch .qp-opts .dopt { background: #101c25; border-color: #52605b; border-radius: 2px; color: var(--metal-text); }
.parch .rcard:hover, .parch .qp-opts .dopt:hover { background: #20363d; border-color: var(--teal); }
.parch .rcard.on { background: #20363d; border-color: var(--qc); }
.parch .qp-opts .dopt span[style] { color: var(--brass) !important; }
.letter .l-body { background: var(--recess); color: var(--metal-text); font-family: var(--font-body); box-shadow: var(--socket-shadow); }
.ach-ic, .at-ic { border-radius: 2px; }

/* Compact inspection tooltips and brass scrollbar rails. */
.tooltip {
  background: var(--grain), linear-gradient(145deg, #15212b, #080e14) !important;
  border-color: var(--brass-edge) !important; border-radius: 0; clip-path: var(--cut-key);
  box-shadow: inset 0 0 0 3px #080e14, inset 0 0 0 4px var(--engraving), 0 5px 14px #000a;
  color: var(--metal-text); overflow-wrap: anywhere; max-width: min(320px, calc(100vw - 16px));
}
.tt-desc, .tt-ilvl { color: var(--brass-light); }
.tt-sub, .tt-hint, .tt-base { color: var(--metal-muted); }
#ui * { scrollbar-width: thin; scrollbar-color: var(--brass-edge) var(--recess); }
#ui ::-webkit-scrollbar { width: 6px; height: 6px; }
#ui ::-webkit-scrollbar-track { background: var(--recess); }
#ui ::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #5d5036, #b69b5d, #71603c); border: 1px solid var(--recess); border-radius: 1px; }
#ui ::-webkit-scrollbar-thumb:hover { background: var(--brass); }

/* Loot pickup and history deliberately have independent dimensions. */
.w-loot .wb { width: 100%; }
.w-loot .loot-list, .w-loot .litem { width: 100%; min-width: 0; }
.w-loot .li-tx { flex: 1 1 0; }
.w-loot .li-tx em { overflow-wrap: anywhere; }
.w-loothist .lh-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.w-loothist .lh-tabs button { flex: 1 1 auto; padding: 6px 7px; font-size: 12px; white-space: nowrap; }
.lh-row > div { flex: 1; }
.lh-row span { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  #ui button, .slot, .window :is(.dopt, .rw, .vitem, .litem, .vcard, .mrow, .paint, .ach-cat, .ql, .jr, .lh-row) { transition: none; }
}
/* Secondary instruments and the login selection plates. */
.mm-zoom button { background: var(--metal); color: var(--brass-light); border-color: var(--brass-edge); border-radius: 2px; box-shadow: var(--key-shadow); }
.mm-zoom button:hover { border-color: var(--teal); }
.msq-box, .dura:not(.hidden), .post-note, .news-it {
  background: var(--grain), var(--metal); border-color: var(--brass-edge); border-radius: 2px;
  box-shadow: inset 2px 0 0 var(--teal-dim);
}
.msq-h, .msq-n { color: var(--brass-light); }
.claim .c-bar { background: var(--recess); }
.claim .c-bar i, .prof-bar .pb i { background: linear-gradient(180deg, #9eede0, #46afaa 45%, #27676e); }
.login .cls-card, .login .char-pick {
  background: var(--grain), var(--metal) !important; border-radius: 2px;
  border-color: var(--brass-edge) !important; box-shadow: var(--key-shadow) !important;
}
.login .cls-card { border-left-color: var(--cc) !important; }
.login .cls-card.on, .login .char-pick.on, .login .char-pick:hover {
  background: linear-gradient(110deg, #29444b, #17232c) !important;
  border-color: var(--teal) !important; box-shadow: inset 0 -2px 0 var(--teal) !important;
}
.login .cls-card.on { border-left-color: var(--cc) !important; }
.login .char-pick em { color: var(--metal-muted); }
/* Plated currency marker, built only from straight bevels. */
.coin-ic { border-radius: 50%; clip-path: none; background: radial-gradient(circle at 38% 32%, #fff6c4, #f0c860 30%, #c8922c 62%, #6e4a12); border: 2px solid #8a6424; box-shadow: inset 0 0 0 3px rgba(255,236,170,.35), inset 0 -3px 5px rgba(60,30,0,.45), 0 2px 4px rgba(0,0,0,.5); }

/* ARTIFICER INSTRUMENTS — same anchors and dimensions as the original HUD. */
.unit, .pframe {
  background: var(--grain), linear-gradient(115deg, #354650f5, #15212bf5 48%, #101920ed);
  box-shadow: inset 0 1px 0 #dceff052, inset 0 0 0 3px #080f1666,
    inset 0 -3px 0 #0008, 0 5px 12px #0007;
}
.unit .nm, .pf-nm { color: var(--brass-light); text-shadow: 0 1px 2px #000; }
.unit .nm { background: linear-gradient(90deg, #91784938, transparent); box-shadow: 0 1px 0 var(--engraving); }
.unit .sub, .pf-nm em { color: var(--metal-muted); }
.unit.elite { border-color: var(--brass); box-shadow: inset 0 0 0 3px #080f1680, inset 0 -2px 0 var(--brass-edge), 0 5px 12px #0007; }
.portrait { background: var(--metal); box-shadow: inset 0 0 0 3px #080f16, 0 1px 0 #c5d9df45; }
.portrait img, .pf-por img {
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
  object-fit: cover; box-shadow: var(--socket-shadow);
}
.portrait { border-radius: 0; border-color: #65797f; }
.portrait .lvl, .pf-lvl {
  background: linear-gradient(#4c5148, #242c2d); color: var(--brass-light);
  box-shadow: inset 0 1px 0 #fff3, 0 2px 3px #0009;
}
.portrait .lvl::before, .portrait .lvl::after {
  content: ''; position: absolute; top: 50%; width: 2px; height: 2px;
  background: var(--brass); border-radius: 50%; pointer-events: none;
}
.portrait .lvl::before { left: 2px; }
.portrait .lvl::after { right: 2px; }

/* Glass highlights and short calibration ticks overlay the fill, below labels. */
.hud :is(.bar, .pf-hp, .pf-res, .castbar, .tf-cast, .xpbar) {
  border-color: #64736e; background: linear-gradient(#050b10, #15232b);
  box-shadow: inset 0 2px 4px #000, 0 1px 0 #d7eff024;
}
.hud :is(.bar, .pf-hp, .pf-res, .castbar, .tf-cast, .xpbar)::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(#efffff2b, transparent 45%),
    repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), #06111770 calc(10% - 1px) 10%) top / 100% 4px no-repeat;
  box-shadow: inset 0 1px 2px #0007, inset 0 -1px 2px #0009;
}
.hud :is(.bar, .pf-hp, .castbar, .tf-cast, .xpbar) span {
  z-index: 1; color: #fff; text-shadow: 0 1px 2px #000, 1px 0 2px #000, -1px 0 2px #000;
  font-variant-numeric: tabular-nums;
}
.bar.hp i, .pf-hp i { background: linear-gradient(#a3f381, #4bb64d 45%, #226435); }
.bar.res i { background: linear-gradient(#fff0a5, #d4b45c 45%, #806327); }
.target-frame .bar.hp i { background: linear-gradient(#ffac85, #dc604e 45%, #862f2a); }
.castbar { border-color: var(--brass-edge); }
.tf-cast i { background: linear-gradient(#f5daa0, #d29a4b 45%, #85582c); }
.buff, .tf-auras .aura { background: var(--recess); border-radius: 1px; box-shadow: 0 2px 3px #0008; }
.buff img { border-radius: 1px; border-color: #63b8c5; }
.buff.debuff img { border-color: #ee7864; }
.buff::after, .tf-auras .aura::after {
  content: ''; position: absolute; inset: 1px; pointer-events: none;
  box-shadow: inset 0 1px 0 #fff5, inset 0 -2px 3px #0009;
}
.buff span, .tf-auras .aura span { z-index: 1; background: #081018c9; border-radius: 1px; }

.actionbars {
  border-color: #a08a58;
  background: var(--grain), linear-gradient(#44545c, #1e303b 12%, #111c25 85%, #34434b);
  box-shadow: inset 0 1px 0 #eefaff70, inset 0 0 0 3px #071018,
    inset 0 0 0 4px #71807870, 0 6px 15px #0009;
}
.actionbars::before, .actionbars::after {
  content: ''; position: absolute; top: 2px; bottom: 2px; width: 2px;
  background: linear-gradient(var(--brass), #4d4534 25%, #4d4534 75%, var(--brass)); pointer-events: none;
}
.actionbars::before { left: 1px; }
.actionbars::after { right: 1px; }
.slot { border-color: #6c7977; background: var(--recess); }
.slot img { border-radius: 1px; }
/* No changes to .cd / .cdt: preserve the JS cooldown sweep and number layers. */
.slot::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 2px #07101880, inset 0 2px 1px #0009, inset 0 -1px 0 #deeceb40;
}
.slot .key {
  color: #201b12; background: linear-gradient(#f4dfa3, #b69859);
  border-radius: 0 0 1px 1px; padding: 0 2px; text-shadow: 0 1px 0 #fff5;
  box-shadow: 0 1px 2px #000b;
}
.slot:hover { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal), 0 0 6px #5fe0d050; }
.slot.pressed, .slot:active { transform: scale(.96); border-color: var(--brass-light); box-shadow: inset 0 3px 8px #000c; }
.menubar { border-radius: 2px; background: #0b131acc; box-shadow: 0 0 0 3px #101920aa, 0 4px 8px #0006; }
.menubar button { text-shadow: 0 1px 2px #000; box-shadow: var(--key-shadow), inset 0 0 0 2px #07101855; }
.menubar button:active { transform: translateY(1px); }
.xpbar { border-radius: 0; }
.xpbar::after { background-size: auto, 100% 5px !important; }

/* Square bezel behind the round map; nothing overlays the map face. */
.minimap { isolation: isolate; }
.minimap::before {
  content: ''; position: absolute; z-index: -1; left: 0; right: 0; top: 23px; height: 226px; /* holds the coords too */
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  background: var(--grain), var(--metal); border: 1px solid var(--brass-edge);
  box-shadow: inset 0 0 0 3px #111b23, inset 0 0 0 4px #a48b50, inset 0 0 0 6px #34454d;
  pointer-events: none;
}
.minimap canvas { border-radius: 50%; border-color: #5c6e70; box-shadow: 0 1px 0 #d2e2da55; }
.zone-name { background: linear-gradient(#35424a, #17232b); box-shadow: inset 0 1px 0 var(--brass-edge), inset 0 -1px 0 var(--brass-edge); text-shadow: 0 1px 2px #000; }
.coords { position: relative; margin-top: 1px; color: #c9d6d2; font-variant-numeric: tabular-nums; }
.mm-zoom button { clip-path: var(--cut-key); }
.mm-zoom button:active { box-shadow: inset 0 2px 4px #000b; }
.quest-tracker { background: linear-gradient(90deg, #0b131acc, #10192080); box-shadow: inset 1px 0 0 var(--engraving); }
.qt-h, .msq-h {
  color: var(--brass-light); background: linear-gradient(90deg, #91784960, #35434a80);
  box-shadow: inset 0 1px 0 #f6df9f24, inset 0 -1px 0 var(--brass-edge); text-shadow: 0 1px 2px #000;
}
.msq-box { border-left-color: var(--teal); box-shadow: inset 0 0 0 1px #71807850, inset 0 -2px 0 #0007; }
.msq-box:hover { background: var(--grain), linear-gradient(110deg, #29414a, #14232b); }
.msq-ch { color: var(--metal-muted); }
.msq-g, .qt-g { color: var(--metal-text); line-height: 1.35; }
.msq-box.ready .msq-n, .qt.done .qt-n { color: #a3f381; }
.chat-log { background-image: linear-gradient(0deg, #08121bd9, #10192015); box-shadow: inset 1px 0 0 #859c9c35, inset 0 -1px 0 #859c9c35; }
.chat-log.live, .chat:hover .chat-log { background-color: #0b131a99; }
.chat-log .cl-n { color: #bdcace; opacity: 1; }
.chat-in { box-shadow: var(--socket-shadow); border-color: #59675f; }
.chat-in::placeholder { color: #a3b6bc; opacity: 1; }
.prompt { border-color: #708c89; box-shadow: inset 3px 0 0 var(--teal), inset 0 1px 0 #dceff044, 0 4px 12px #0008; }
.prompt .pk { background: linear-gradient(#ead49a, #a38850); color: #17232b; border-radius: 2px; border-color: var(--brass-light); box-shadow: var(--key-shadow); text-shadow: none; }
.ach-toast { border-color: var(--brass); box-shadow: inset 3px 0 0 var(--teal), inset 0 1px 0 #f6df9f55, 0 6px 18px #0009; }
.ach-toast .at-ic, .ltoast img { border-radius: 2px; box-shadow: var(--socket-shadow); }
.ltoast .lt-k { color: var(--brass-light); }
.ltoast em { color: var(--metal-muted); }
.err-text { color: #ff9b89; text-shadow: 0 1px 2px #000, 0 0 5px #000, 0 2px 8px #000; }
.post-note, .dura:not(.hidden), .offline-tag { color: var(--brass-light); box-shadow: inset 2px 0 0 var(--teal), inset 0 1px 0 #f6df9f28, 0 2px 6px #0007; }

/* Full-screen presentation leaves the character preview visible in the centre. */
.login { background: linear-gradient(90deg, #08121b99, transparent 35% 60%, #08121b99), linear-gradient(#08121b88, transparent 30% 75%, #08121baa); }
.login-title { position: relative; text-shadow: 0 3px 0 #071018, 0 7px 20px #000; }
.login-title .t1 { color: var(--brass-light); text-shadow: 0 1px 0 #fff8, 0 3px 0 #685637, 0 6px 18px #000; }
.login-title .t2 { color: #b7d4d4; text-shadow: 0 2px 3px #000; }
.login-title::after { content: ''; display: block; height: 3px; margin-top: 10px; background: linear-gradient(90deg, transparent, var(--brass-edge) 18%, var(--teal) 50%, var(--brass-edge) 82%, transparent); }
.login-panel { box-shadow: inset 0 1px 0 #efffff50, inset 0 0 0 4px #101920, inset 0 0 0 5px var(--engraving), 0 12px 28px #000a; }
.cls-role { color: var(--brass-light); border-bottom: 1px solid var(--engraving); padding-bottom: 6px; }
.cls-desc { color: var(--metal-text); }
.cls-weapon, .login-note { color: #b6c7ca; opacity: 1; }
.login .cls-card, .login .char-pick { box-shadow: inset 0 1px 0 #e1f4f138, inset 0 -3px 0 #0008, inset 4px 0 8px color-mix(in srgb, var(--cc) 25%, transparent), 0 4px 8px #0006 !important; }
.login .cls-card.on, .login .cls-card:hover { border-color: var(--cc) !important; box-shadow: inset 0 1px 0 #efffff55, inset 0 -2px 0 var(--cc), inset 4px 0 12px color-mix(in srgb, var(--cc) 30%, transparent), 0 4px 12px #0009 !important; }
.cls-card img, .char-pick img, .cls-skills img { border-radius: 1px; box-shadow: 0 0 0 1px #76857b66, 0 2px 4px #0009; }
.cls-card .cr { color: #c0ced0; opacity: 1; }
.login .enter-btn { box-shadow: inset 0 1px 0 #fff9, inset 0 0 0 2px #6b552f80, inset 0 -3px 0 #72572e, 0 4px 10px #0009; }
.login .enter-btn:hover { border-color: var(--teal); box-shadow: inset 0 1px 0 #fff9, inset 0 -3px 0 #72572e, 0 0 12px #e8c26a55; }
.login .enter-btn:active { transform: translateY(1px); box-shadow: inset 0 3px 6px #4a361880; }
.death { background: linear-gradient(180deg, #08121ba8, #131a22bd 50%, #25171bdb); color: var(--metal-text); }
.death .d1 { color: #efaf94; text-shadow: 0 2px 0 #472c2b, 0 6px 15px #000; border-bottom: 2px solid var(--brass-edge); box-shadow: 0 1px 0 #050b10; }
.death button { box-shadow: var(--key-shadow), inset 0 -2px 0 var(--teal-dim); }
.death button:hover { border-color: var(--teal); }

/* Override the shared direct-child cap: negative margins include both gutters. */
.w-dialog .wb.parch > .qp-head { width: calc(100% + 32px); max-width: none; background-size: cover; background-repeat: no-repeat; }
.w-dialog .qp-head > img { width: 100%; height: 100%; object-fit: cover; }

@media (prefers-reduced-motion: reduce) {
  .login, .chat-log, .slot, .login button, .mm-zoom button { transition: none; }
  .prompt, .ach-toast, .toasts .ltoast { animation: none; }
}

/* ---------------- nameplates and floating combat text, artificer style (v79) ---------------- */
.plate .pn { font: 700 13px var(--font-body); letter-spacing: .2px; text-shadow: 0 1px 0 #05090d, 0 0 4px #05090dcc, 0 2px 3px #000; }
.plate .pl { display: inline-block; min-width: 14px; padding: 0 3px; margin-right: 2px; font: 700 10px var(--font-body); line-height: 13px; vertical-align: 1px; color: #f3dc9a; background: linear-gradient(#34424a, #141f26); border: 1px solid #8f7745; clip-path: polygon(3px 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%, 0 3px); text-shadow: none; }
/* health sliver: a small gauge tube with tick marks every tenth */
.plate .ph { position: relative; width: 74px; height: 7px; margin: 3px auto 0; padding: 1px; box-sizing: border-box; background: linear-gradient(#0a1116, #18232a); border: 1px solid #5f6f6c; border-radius: 0; clip-path: polygon(3px 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%, 0 3px); box-shadow: 0 1px 2px #000a; }
.plate .ph::after { content: ''; position: absolute; inset: 1px; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), #0008 calc(10% - 1px) 10%); pointer-events: none; }
.plate .ph i { height: 100%; background: linear-gradient(180deg, #ffa58a 0, #e24a2c 45%, #8e1a0c 100%); box-shadow: inset 0 1px 0 #ffffff55; transition: width .18s ease-out; }
.plate.friendly .ph i { background: linear-gradient(180deg, #b6f59a 0, #4fbf38 45%, #1c6a12 100%); }
.plate.elite .ph { border-color: #c8a258; }
/* the target: teal brackets either side of the name and a lit gauge */
.plate.targeted .pn { text-decoration: none; }
.plate.targeted .pn::before, .plate.targeted .pn::after { content: ''; display: inline-block; width: 4px; height: 11px; margin: 0 5px; vertical-align: -1px; border: 2px solid var(--teal, #5fe0d0); box-shadow: 0 0 6px #5fe0d088; }
.plate.targeted .pn::before { border-right: 0; }
.plate.targeted .pn::after { border-left: 0; }
.plate.targeted .ph { border-color: var(--teal, #5fe0d0); box-shadow: 0 0 6px #5fe0d066, 0 1px 2px #000a; }
.plate.npc .pt { color: #cfdad6; letter-spacing: .3px; }
/* floating text: steel-dark outlines, brass for your hits, teal for heals and experience */
.ft { -webkit-text-stroke-color: #0b1218; }
.ft.dmg-out { color: #ffe7a6; }
.ft.crit { color: #ffd04a; -webkit-text-stroke: 5px #0b1218; text-shadow: 0 2px 2px #000c, 0 0 12px #ffb84a99, 0 0 2px #5fe0d0; }
.ft.heal { color: #8af5c8; -webkit-text-stroke: 4px #062018; paint-order: stroke fill; font-weight: 900; }
.ft.xp { color: #7fe8f0; -webkit-text-stroke: 3px #071820; paint-order: stroke fill; }
.ft.miss { color: #c9d4d2; -webkit-text-stroke: 3px #0b1218; paint-order: stroke fill; }

/* quest turn-in: rewards laid out as cards under the banner (v81) */
.qdone-banner:has(.qd-cards) { animation-duration: 4.6s; }
.qdone-banner .qd-cards { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.qdone-banner .qd-card { --qc: #c8a258; display: flex; align-items: center; gap: 8px; min-width: 96px; padding: 6px 12px 6px 6px; text-shadow: 0 1px 2px #000;
  background: linear-gradient(#25333b, #111a20); border: 1px solid #8f7745; box-shadow: inset 0 0 0 1px #0008, 0 0 14px color-mix(in srgb, var(--qc) 35%, transparent), 0 4px 10px #000a;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); opacity: 0; transform: translateY(8px); animation: qdcard .35s ease-out forwards; }
.qdone-banner .qd-card:nth-child(2) { animation-delay: .12s; } .qdone-banner .qd-card:nth-child(3) { animation-delay: .24s; }
.qdone-banner .qd-card b { font: 700 14px var(--font-body); color: #f3e2bf; white-space: nowrap; }
.qdone-banner .qd-card img { width: 44px; height: 44px; border: 2px solid var(--qc); box-sizing: border-box; }
.qdone-banner .qd-coin { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #fff6c4, #f0c860 30%, #c8922c 62%, #6e4a12); border: 2px solid #8a6424; }
.qdone-banner .qd-xp { width: 30px; height: 30px; display: grid; place-items: center; font: 800 11px var(--font-body); color: #062018; background: linear-gradient(#9af0e0, #3fb8a8); clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px); }
@keyframes qdcard { to { opacity: 1; transform: none; } }

/* ======================================================================
   CHARACTER SHEET (v82): tabs, talent sets, a large paper doll between two columns of sockets, grouped stats
   ====================================================================== */
.window.w-char { width: 980px; max-width: none; height: 664px; display: flex; flex-direction: column; }
.window.w-char .wb { width: auto; flex: 1; min-height: 0; max-height: none; overflow: hidden; padding: 14px 16px 14px; }
.w-char .wb.cw-in { animation: cwIn .24s ease-out; }
@keyframes cwIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.w-char .cw-scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #4a5a5c transparent; }
/* the tab strip: machined keys with a lit underline on the open page */
.cw-tabs { display: flex; gap: 6px; padding: 10px 16px 0; background: linear-gradient(180deg, #121c23, #17232c); border-bottom: 1px solid var(--engraving); }
.window .cw-tabs button { flex: 1 1 0; position: relative; padding: 8px 10px 9px !important; font: 700 13.5px var(--font-head); letter-spacing: .06em; color: var(--metal-muted);
  background: linear-gradient(180deg, #2a3740, #18232b) !important; border: 1px solid #3c4a4c; border-bottom: 0; border-radius: 0;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 100%, 0 100%); box-shadow: inset 0 1px 0 #f4e3ab26; transform: none !important; }
.window .cw-tabs button:hover { color: var(--brass-light); background: linear-gradient(180deg, #33434d, #1c2a33) !important; }
.window .cw-tabs button.on { color: var(--brass-light); background: linear-gradient(180deg, #4a3f28, #2a2a22 55%, #17232c) !important; border-color: var(--brass-edge);
  box-shadow: inset 0 1px 0 #ffe7a855, inset 0 -2px 0 var(--brass), 0 0 14px #e8c26a30; text-shadow: 0 0 8px #e8c26a66; }
/* shared headings and rows */
.w-char .cw-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 8px; padding-bottom: 5px; font: 700 14px var(--font-head); letter-spacing: .05em; color: var(--brass-light);
  border-bottom: 1px solid var(--engraving); }
.w-char .cw-h span { font: 400 12px var(--font-body); color: var(--metal-muted); letter-spacing: 0; display: inline-flex; align-items: center; gap: 4px; }
.w-char .cw-note { font-size: 11.5px; color: var(--metal-muted); line-height: 1.35; margin-top: 8px; }
.w-char .cw-none { font-size: 12px; color: #7d8d90; font-style: italic; padding-left: 21px; }
.cw-gem { width: 18px; height: 18px; flex: none; filter: drop-shadow(0 0 4px #5fe0d066); }

/* ---- Equipment page: three columns ---- */
.cw-gear { display: grid; grid-template-columns: 214px minmax(0, 1fr) 252px; gap: 16px; height: 100%; }
.cw-left { display: flex; flex-direction: column; min-height: 0; }
.cw-card { padding: 12px; background: var(--grain), linear-gradient(180deg, #1c2a33, #111b22); border: 1px solid #3c4a4c; box-shadow: inset 0 1px 0 #e0eff01a, inset 0 0 0 1px #0006; margin-bottom: 14px; }
.cw-cc { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.cw-crest { --cc: #e8c26a; flex: none; width: 52px; height: 52px; padding: 3px; background: linear-gradient(145deg, #4a3f28, #15140f); border: 1px solid var(--brass-edge);
  box-shadow: 0 0 0 1px #000, 0 0 12px color-mix(in srgb, var(--cc) 40%, transparent); clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px); }
.cw-crest img, .cw-hcrest img { width: 100%; height: 100%; display: block; }
.cw-who { display: flex; flex-direction: column; min-width: 0; }
.cw-who b { font: 700 17px var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; }
.cw-who i { font-size: 12px; color: var(--brass-light); font-style: normal; opacity: .85; }
.cw-who em { font-size: 11.5px; color: var(--metal-muted); font-style: normal; }
.cw-lvl { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--metal-muted); margin-bottom: 4px; }
.cw-lvl b { color: var(--brass-light); font-size: 15px; }
.cw-xp { position: relative; height: 8px; background: var(--recess); border: 1px solid #3c4a4c; box-shadow: inset 0 1px 3px #000c; overflow: hidden; }
.cw-xp i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #e8d48a, #b28a3a); box-shadow: inset 0 1px 0 #fff6; }
.cw-xp i.rest { background: linear-gradient(180deg, #6ab0e8aa, #2a5a90aa); box-shadow: none; }
.cw-rested { font-size: 11.5px; margin-top: 5px; color: #7d8d90; }
.cw-rested.on { color: #8ac4f0; }
.cw-home { font-size: 11.5px; color: var(--metal-muted); margin-top: 3px; }
.cw-home b { color: var(--metal-text); font-weight: 600; }
.cw-sets { display: flex; flex-direction: column; gap: 6px; }
.cw-set { display: grid; grid-template-columns: 14px 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 10px 7px 8px; cursor: pointer;
  background: linear-gradient(90deg, #1a252c, #141e25); border: 1px solid #2e3a3d; transition: border-color .15s, background .15s, box-shadow .15s; }
.cw-set:hover { border-color: var(--teal-dim); background: linear-gradient(90deg, #20343a, #15232a); }
.cw-set.on { cursor: default; border-color: var(--brass-edge); background: linear-gradient(90deg, #4a3f2866, #1c2a33); box-shadow: inset 3px 0 0 var(--brass), 0 0 12px #e8c26a1f; }
.cw-set.locked { opacity: .45; cursor: default; }
.cw-sn { font: 700 15px var(--font-head); color: var(--brass-light); text-align: center; }
.cw-sic { width: 34px; height: 34px; padding: 2px; border: 1px solid var(--brass-edge); background: #0b131a; box-shadow: inset 0 0 6px #000; }
.cw-sic img { width: 100%; height: 100%; display: block; }
.cw-st { display: flex; flex-direction: column; min-width: 0; }
.cw-st b { font-size: 13px; color: var(--metal-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-st em { font-size: 11px; color: var(--metal-muted); font-style: normal; }
.cw-sil { display: flex; align-items: center; gap: 3px; font-size: 14px; color: var(--teal); }
.cw-sil b { font-weight: 700; } .cw-sil em { font-size: 11px; color: var(--metal-muted); font-style: normal; white-space: nowrap; }
.cw-sil .cw-gem { width: 14px; height: 14px; }

/* centre: header plate, stage and round keys */
.cw-mid { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cw-head { display: flex; align-items: center; gap: 12px; padding: 7px 12px 7px 8px; margin-bottom: 10px; background: linear-gradient(90deg, #22303a, #17232c 60%, #121c23);
  border: 1px solid #3c4a4c; box-shadow: inset 0 1px 0 #e0eff01f, inset 0 -2px 0 #0008; }
.cw-hcrest { --cc: #e8c26a; width: 40px; height: 40px; padding: 2px; flex: none; border: 1px solid var(--brass-edge); background: #0b131a; box-shadow: 0 0 10px color-mix(in srgb, var(--cc) 35%, transparent); }
.cw-hl { display: flex; flex-direction: column; line-height: 1.05; }
.cw-hl em { font: 700 11px var(--font-head); letter-spacing: .22em; text-transform: uppercase; color: var(--metal-muted); font-style: normal; }
.cw-hl b { font: 700 22px var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--brass-light); text-shadow: 0 1px 0 #000, 0 0 12px #e8c26a40; }
.cw-hn { margin-left: auto; text-align: right; display: flex; flex-direction: column; min-width: 0; }
.cw-hn b { font: 600 14px var(--font-body); color: var(--metal-text); }
.cw-hn i { font-size: 11.5px; color: #8acc6a; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-stage { flex: 1; min-height: 0; display: flex; gap: 14px; align-items: stretch; }
.cw-col { display: flex; flex-direction: column; justify-content: space-between; padding: 4px 0; }
.cw-doll { position: relative; flex: 1; min-width: 0; overflow: hidden; border: 1px solid #3c4a4c;
  background: radial-gradient(ellipse 70% 55% at 50% 42%, #2c4148 0%, #172a31 45%, #0a1217 78%, #05090c 100%);
  box-shadow: inset 0 0 40px #000c, inset 0 0 0 1px #0008, 0 0 0 1px #0006; }
.cw-doll::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 46px, #e8c26a08 46px 47px), linear-gradient(180deg, #5fe0d00d, transparent 30%); }
.cw-doll::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 70px 18px #03070acc; }
.cw-floor { position: absolute; left: 12%; right: 12%; bottom: 7%; height: 15%; pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, #e8c26a40 0%, #5fe0d01c 40%, transparent 72%); filter: blur(2px); }
.cw-doll canvas { position: relative; z-index: 1; width: 100%; height: 100%; display: block; object-fit: contain; cursor: grab; }
.cw-doll canvas.held { cursor: grabbing; }
.cw-doll .doll-hint { z-index: 2; bottom: 7px; font-size: 11px; letter-spacing: .04em; color: #a3b6bc99; }
/* the sockets: 64px, quality frame, item level in the corner, a durability gauge on the outer edge */
.window .cw-slot { position: relative; width: 64px; height: 64px; flex: none; display: grid; place-items: center; cursor: default; border: 1px solid #52605b;
  background: radial-gradient(circle at 50% 35%, #1a2830, #0b131a 70%); box-shadow: var(--socket-shadow); transition: box-shadow .15s, transform .15s, border-color .15s; }
.window .cw-slot:has(img) { border-color: color-mix(in srgb, var(--qc, #52605b) 70%, #000); box-shadow: var(--socket-shadow), 0 0 10px color-mix(in srgb, var(--qc, #000) 30%, transparent); }
.window .cw-slot:hover { border-color: var(--teal); box-shadow: var(--socket-shadow), 0 0 14px #5fe0d055; transform: translateY(-1px); }
.window .cw-slot img { width: 100%; height: 100%; border-width: 2px; }
.window .cw-slot.q0 img { filter: grayscale(.6) brightness(.8); }
.cw-slot .eglyph { width: 54%; height: 54%; opacity: .22; color: #c8d8d8; }
.cw-slot.empty:hover .eglyph { opacity: .45; }
.cw-slot .es-lab { position: absolute; bottom: 3px; left: 0; right: 0; text-align: center; font: 600 8.5px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: #6d7d80; }
.cw-slot .es-il { position: absolute; right: 2px; top: 1px; z-index: 2; padding: 0 3px; font: 700 10.5px var(--font-body); color: #f3e2bf; background: #0b131acc; border-radius: 2px; text-shadow: 0 1px 1px #000; }
.cw-slot .es-dur { position: absolute; top: 3px; bottom: 3px; width: 4px; background: #05090c; border: 1px solid #2a3538; display: flex; align-items: flex-end; }
.cw-slot.l .es-dur { left: -8px; } .cw-slot.r .es-dur { right: -8px; }
.cw-slot .es-dur i { display: block; width: 100%; }
.cw-btns { display: flex; justify-content: center; gap: 14px; padding-top: 12px; }
.window .cw-rb { width: 38px; height: 38px; padding: 0 !important; border-radius: 50% !important; clip-path: none !important; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 30%, #3b4a54, #19242c 70%) !important; border: 1px solid var(--brass-edge) !important;
  box-shadow: inset 0 1px 0 #f4e3ab40, inset 0 -2px 3px #000a, 0 0 0 2px #0b131a, 0 0 0 3px #917849aa, 0 3px 6px #0008 !important; }
.window .cw-rb svg { width: 20px; height: 20px; fill: none; stroke: var(--brass-light); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.window .cw-rb:hover { border-color: var(--teal) !important; box-shadow: inset 0 1px 0 #f4e3ab40, 0 0 0 2px #0b131a, 0 0 0 3px var(--teal-dim), 0 0 12px #5fe0d066 !important; }
.window .cw-rb:hover svg { stroke: var(--teal); }

/* right: item level, gauges, stat groups */
.cw-right { min-height: 0; padding-right: 4px; }
.cw-il { display: grid; grid-template-columns: auto auto; justify-content: end; align-items: center; column-gap: 8px; padding: 2px 0 8px; border-bottom: 1px solid var(--engraving); margin-bottom: 10px; }
.cw-il .cw-gem { width: 26px; height: 26px; }
.cw-il b { font: 700 38px/1 var(--font-head); color: var(--teal); text-shadow: 0 0 14px #5fe0d055, 0 2px 2px #000; }
.cw-il span { grid-column: 1 / -1; text-align: right; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--metal-muted); }
.cw-bar { margin-bottom: 8px; }
.cw-bar > div { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 2px; }
.cw-bar > div span { color: var(--metal-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; }
.cw-bar > div b { color: var(--metal-text); font-variant-numeric: tabular-nums; }
.cw-bar > i { display: block; height: 6px; background: var(--recess); border: 1px solid #2e3a3d; box-shadow: inset 0 1px 2px #000c; }
.cw-bar > i u { display: block; height: 100%; background: linear-gradient(90deg, #3c9a3c, #7ae05a); box-shadow: 0 0 6px #7ae05a66; }
.cw-sec { margin-top: 12px; }
.cw-sec h5 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; padding-bottom: 3px; font: 700 13px var(--font-head); letter-spacing: .04em; color: var(--brass-light); border-bottom: 1px solid var(--engraving); }
.cw-sec h5 svg { width: 15px; height: 15px; color: var(--brass); opacity: .85; }
.cw-row { display: flex; justify-content: space-between; gap: 8px; padding: 2px 4px 2px 21px; font-size: 13px; color: var(--metal-text); border-radius: 2px; }
.cw-row:hover { background: #5fe0d012; }
.cw-row b { color: #f3e2bf; font-weight: 600; font-variant-numeric: tabular-nums; }
.w-char .cs-sets { padding-top: 0; border-top: 0; }
.w-char .cs-set { padding-left: 21px; }
.cw-gold { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding: 7px 8px; font-size: 13px; background: #0b131a99; border: 1px solid #2e3a3d; }
.cw-gold span { color: var(--metal-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; }

/* ---- Attributes page ---- */
.cw-attr { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; height: 100%; }
.cw-ledger { min-height: 0; padding-right: 6px; }
.cw-gr { display: grid; grid-template-columns: 44px minmax(0, 1fr) 40px 70px; align-items: center; gap: 10px; padding: 5px 8px; margin-bottom: 4px;
  background: linear-gradient(90deg, #1a252c, #141e2500); border-left: 2px solid #2e3a3d; transition: background .15s, border-color .15s; }
.cw-gr:hover { background: linear-gradient(90deg, #20363d, #15232a40); border-left-color: var(--teal); }
.cw-gr.none { opacity: .55; }
.cw-gi { width: 44px; height: 44px; display: grid; place-items: center; background: var(--recess); box-shadow: var(--socket-shadow); }
.cw-gi img { width: 100%; height: 100%; border: 2px solid #333; box-sizing: border-box; }
.cw-gi .eglyph { width: 60%; height: 60%; opacity: .25; color: #c8d8d8; }
.cw-gt { display: flex; flex-direction: column; min-width: 0; }
.cw-gt em { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--metal-muted); font-style: normal; }
.cw-gt b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-gt small { font-size: 11.5px; color: #a8c8b0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-gl { font: 700 16px var(--font-head); color: var(--teal); text-align: right; }
.cw-gd { height: 6px; background: var(--recess); border: 1px solid #2e3a3d; }
.cw-gd i { display: block; height: 100%; }
.cw-mod { font-size: 12.5px; padding: 2px 4px 2px 21px; color: #b8e6c8; }

/* ---- Wardrobe page: the figure beside the choices ---- */
.cw-look { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; height: 100%; }
.cw-look .cw-stage { height: 100%; }
.window.w-char .wardrobe { margin: 0; padding: 0 4px 0 0; border: 0; background: none; min-height: 0; }
.lk-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.lk-chip { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; background: linear-gradient(180deg, #1c2a33, #111b22); border: 1px solid #3c4a4c; box-shadow: inset 0 1px 0 #e0eff01a; }
.lk-chip b { font: 700 22px var(--font-head); color: var(--teal); }
.lk-chip span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--metal-muted); }
.w-char .wardrobe .look-row { display: grid; grid-template-columns: 34px 110px minmax(0, 1fr); align-items: center; gap: 10px; margin: 0 0 8px; padding: 8px 10px; font-size: 14px; color: var(--metal-text);
  background: linear-gradient(90deg, #1a252c, #141e25); border: 1px solid #2e3a3d; }
.w-char .wardrobe .look-row:hover { border-color: var(--teal-dim); }
.w-char .wardrobe .look-row select { width: 100%; padding: 6px 8px; font-size: 13px; }
.lk-ic { width: 34px; height: 34px; display: grid; place-items: center; background: var(--recess); box-shadow: var(--socket-shadow); }
.lk-ic .eglyph { width: 70%; height: 70%; color: var(--brass); opacity: .6; }
.w-char .wardrobe .wd-hint { font-size: 12px; margin-top: 10px; color: var(--metal-muted); }

/* ---- Reputation page: one card per watch ---- */
.cw-rep { height: 100%; padding-right: 6px; }
.w-char .cw-repgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.w-char .cw-repc { --fc: #e8c26a; display: block; margin: 0; padding: 10px 12px 9px; background: linear-gradient(90deg, color-mix(in srgb, var(--fc) 14%, #141e25), #141e25 60%); border: 1px solid #2e3a3d; border-left: 3px solid var(--fc); }
.cw-rh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.w-char .cw-rh span { font: 700 14.5px var(--font-head); color: var(--metal-text); width: auto; }
.crest-ic { width: 26px; height: 26px; vertical-align: middle; margin: -4px 7px 0 0; border-radius: 4px; }
.cw-rh em { font-size: 12px; font-style: normal; color: var(--fc); filter: brightness(1.3); font-weight: 700; letter-spacing: .04em; }
.w-char .cw-repc .rep-bar { height: 16px; }
.w-char .cw-repc .rep-bar b { line-height: 16px; font-size: 11px; }
.cw-rf { font-size: 11px; color: var(--metal-muted); margin-top: 5px; }

/* ---- Guild & Pets page ---- */
.cw-guild { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; height: 100%; }
.cw-guild > section { min-height: 0; padding-right: 4px; }
.w-char .guild-box { padding: 12px; background: linear-gradient(180deg, #1c2a33, #111b22); border: 1px solid #3c4a4c; }
.w-char .guild-box h4 { margin: 0 0 8px; font: 700 16px var(--font-head); }
.w-char .g-roster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 13px; margin-bottom: 8px; }
.w-char .g-new { display: flex; gap: 8px; margin-top: 8px; } .w-char .g-new input { flex: 1; padding: 6px 8px; }
.w-char .cw-pets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.w-char .cw-pet { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 0; border: 1px solid #2e3a3d; background: linear-gradient(90deg, #1a252c, #141e25); transition: border-color .15s, box-shadow .15s; }
.w-char .cw-pet:not(.locked):hover { border-color: var(--teal); box-shadow: 0 0 10px #5fe0d033; }
.w-char .cw-pet img { width: 40px; height: 40px; border: 1px solid #52605b; flex: none; }
.w-char .cw-pet div { display: flex; flex-direction: column; min-width: 0; }
.w-char .cw-pet b { font-size: 13px; font-weight: 600; color: var(--metal-text); }
.w-char .cw-pet em { font-size: 11px; color: var(--metal-muted); font-style: normal; }
.w-char .cw-pet.on { border-color: #7aff7a99; box-shadow: inset 3px 0 0 #7ae05a; } .w-char .cw-pet.on em { color: #9ae88a; }
.w-char .cw-pet.locked { opacity: .45; } .w-char .cw-pet.locked img { filter: grayscale(1); }

/* ======================================================================
   BACKPACK (v82): bigger sockets, capacity gauge, category tabs; the storehouse shares the look
   ====================================================================== */
.window.w-bags { width: 486px; }
.window.w-bags .wb { max-height: none; overflow: visible; padding: 10px 14px 12px; }
.bag-head { padding: 10px 14px 0; background: linear-gradient(180deg, #17232c, #141f27); }
.bag-cap { display: flex; align-items: center; gap: 10px; }
.bag-cap > svg { width: 30px; height: 30px; flex: none; color: var(--brass); filter: drop-shadow(0 1px 0 #000); }
.bc-tx { flex: 1; min-width: 0; }
.bc-tx > div:first-child { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 3px; }
.bc-tx b { font: 700 13px var(--font-head); color: var(--brass-light); letter-spacing: .05em; }
.bc-n { color: var(--metal-text); font-variant-numeric: tabular-nums; font-weight: 600; }
.bc-bar { height: 7px; background: var(--recess); border: 1px solid #2e3a3d; box-shadow: inset 0 1px 3px #000c; }
.bc-bar i { display: block; height: 100%; background: linear-gradient(180deg, #9eede0, #46afaa 45%, #27676e); box-shadow: 0 0 6px #5fe0d055; transition: width .3s; }
.bag-head.near .bc-bar i { background: linear-gradient(180deg, #ffe7a0, #d8a040 50%, #8a5a18); box-shadow: 0 0 6px #e8c26a66; }
.bag-head.full .bc-bar i { background: linear-gradient(180deg, #ffb09a, #e04a2c 50%, #8a1a0c); box-shadow: 0 0 6px #ff604a77; }
.bag-head.full .bc-n { color: #ff8a6a; }
.bag-head .bag-search { padding: 10px 0 0; gap: 6px; }
.bag-head .bag-search input { padding: 6px 9px; }
.window .bag-head .bsort { padding: 4px 14px !important; font-size: 12.5px !important; }
.bag-cats { display: flex; gap: 3px; margin-top: 10px; border-bottom: 1px solid var(--engraving); }
.window .bag-cats button { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 4px 7px !important; font: 600 12px var(--font-body); color: var(--metal-muted);
  background: linear-gradient(180deg, #24313a, #17222a) !important; border: 1px solid #34413f; border-bottom: 0; border-radius: 0; clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 100%, 0 100%); transform: none !important; box-shadow: none; }
.window .bag-cats button:hover { color: var(--brass-light); }
.window .bag-cats button.on { color: var(--brass-light); background: linear-gradient(180deg, #4a3f28, #1c2a33) !important; border-color: var(--brass-edge); box-shadow: inset 0 -2px 0 var(--brass); }
.bag-cats button i { font-style: normal; font-size: 10.5px; color: var(--teal); opacity: .85; }
.bag-cats button i:empty { display: none; }
.window .bag-grid { --cols: 6; display: grid; grid-template-columns: repeat(var(--cols), 60px); gap: 6px; justify-content: center; padding: 10px; background: #0b131a80; border: 1px solid #26323a; box-shadow: inset 0 2px 8px #0008; }
.window .bag-grid .bslot { width: 60px; height: 60px; border: 1px solid #3e4b4b; transition: box-shadow .15s, opacity .15s, transform .12s, border-color .15s; }
.window .bag-grid .bslot.empty { background: radial-gradient(circle at 50% 40%, #16222a, #0a1116 75%); box-shadow: inset 0 2px 5px #000c, inset 0 -1px 0 #dcecf012; }
.window .bag-grid .bslot.empty::before { content: ''; position: absolute; inset: 8px; border: 1px solid #ffffff08; background: repeating-linear-gradient(45deg, #ffffff06 0 1px, transparent 1px 5px); }
.window .bag-grid .bslot:has(img) { cursor: pointer; border-color: color-mix(in srgb, var(--qc, #3e4b4b) 55%, #000); }
.window .bag-grid .bslot:has(img):hover { transform: translateY(-1px); border-color: var(--teal); box-shadow: 0 0 12px #5fe0d055, inset 0 0 8px #5fe0d033; z-index: 1; }
.window .bag-grid .bslot.bq3 { box-shadow: var(--socket-shadow), 0 0 9px #3a8aff66; }
.window .bag-grid .bslot.bq4 { box-shadow: var(--socket-shadow), 0 0 11px #b45aff7a; }
.window .bag-grid .bslot.bq5 { box-shadow: var(--socket-shadow), 0 0 13px #ffc23a88; }
.window .bag-grid .bslot.void { opacity: .35; }
.window .bag-grid .bslot .cnt { font-size: 13px; right: 4px; bottom: 2px; z-index: 2; }
.window .bag-grid .bslot .bil { z-index: 2; left: 3px; bottom: 2px; padding: 0 3px; font-size: 10.5px; background: #0b131acc; border-radius: 2px; }
.window .bag-grid .bslot .bup { z-index: 2; left: 4px; top: 4px; }
.window .bag-grid .bslot.cant::before { content: ''; position: absolute; inset: 0; z-index: 2; background: #c0302040; pointer-events: none; }
.bag-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 7px 10px; background: #0b131a99; border: 1px solid #2e3a3d; font-size: 13.5px; }
.bag-foot .bag-gold { margin: 0; display: flex; align-items: center; gap: 7px; }
.bg-coin { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #fff6c4, #f0c860 30%, #c8922c 62%, #6e4a12); border: 1px solid #8a6424; box-shadow: 0 0 6px #e8c26a55; }
.bag-free { font-size: 12px; color: var(--metal-muted); }
.window.w-bags .bag-hint { margin-top: 6px; font-size: 11.5px; opacity: .8; color: var(--metal-muted); }
/* the storehouse wears the same pack look */
.w-dialog .wb:has(.store-grid) { width: 470px; }
.window .store-head { padding: 0 0 10px; background: none; }
.window .store-head .bag-search { padding: 10px 0 0; }
.w-char .cw-condh { margin-top: 16px; }
.cw-cond { height: 7px; background: var(--recess); border: 1px solid #2e3a3d; box-shadow: inset 0 1px 3px #000c; }
.cw-cond i { display: block; height: 100%; box-shadow: 0 0 6px #5ad66a55; }
.w-char .cw-note.bad { color: #ff8a6a; }
.window .cw-slot.broke { border-color: #ff3020; box-shadow: var(--socket-shadow), 0 0 10px #ff302066; }
.window .cw-slot.broke::before { content: 'Broken'; position: absolute; left: 0; right: 0; bottom: 2px; z-index: 2; text-align: center; font: 700 9px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: #ff8a6a; text-shadow: 0 1px 2px #000; }
.w-char .guild-box .o-note { margin: 6px 0 0; }
/* ---- r1 polish: the stage canvas fills its frame at its true size; gold sits under the left column; tighter stat groups ---- */
.cw-doll canvas { position: absolute; inset: 0; }
.cw-doll { border-color: #2a3638; background:
  linear-gradient(180deg, transparent 62%, #0d181d 62.4%, #142228 70%, #0a1216 100%),
  radial-gradient(ellipse 62% 50% at 50% 40%, #33505a 0%, #1b3039 42%, #0b151b 76%, #05090c 100%); }
.cw-doll::before { background: repeating-linear-gradient(90deg, transparent 0 46px, #e8c26a07 46px 47px),
  repeating-linear-gradient(180deg, transparent 0 22px, #5fe0d008 22px 23px) 0 62% / 100% 38% no-repeat,
  radial-gradient(ellipse 30% 40% at 50% 0%, #fff4d822, transparent 70%); }
.cw-floor { bottom: 5%; height: 18%; background: radial-gradient(ellipse 50% 50% at 50% 50%, #e8c26a55 0%, #5fe0d022 42%, transparent 72%); }
.w-char .cw-left .cw-gold { margin-top: auto; gap: 8px; justify-content: flex-start; padding: 8px 10px; }
.w-char .cw-left .cw-gold b { margin-left: auto; font-size: 13.5px; }
.w-char .cw-sec { margin-top: 10px; }
.w-char .cw-right .cw-sec:first-of-type { margin-top: 12px; }
.w-char .cw-row { padding-top: 1.5px; padding-bottom: 1.5px; }
.w-char .cs-set > div { font-size: 12px; line-height: 1.3; }
.cw-guild { grid-template-columns: 340px minmax(0, 1fr); }
.w-char .cw-pet { padding: 9px 10px; }
.w-char .cw-pet img { width: 44px; height: 44px; }
.cw-doll .doll-hint { top: 8px; bottom: auto; }
.cw-look { grid-template-columns: 400px minmax(0, 1fr); }
/* the pack grows with its columns (a 42-slot pack is 7 wide) and with the screen: bigger sockets on large displays */
.window.w-bags { width: auto; min-width: 486px; }
.window .bag-grid { grid-template-columns: repeat(var(--cols), var(--bs, 60px)); }
.window .bag-grid .bslot { width: var(--bs, 60px); height: var(--bs, 60px); }
@media (min-width: 1600px) and (min-height: 900px) { .window.w-bags { --bs: 68px; } }
/* ---- r2 polish: bigger sockets beside a wider stage, a ledger that fits without scrolling, pages that fill their frame ---- */
.cw-gear { grid-template-columns: 204px minmax(0, 1fr) 242px; gap: 14px; }
.cw-stage { gap: 12px; }
.cw-col { padding: 2px 0; }
.window .cw-slot { width: 72px; height: 72px; }
.cw-slot .es-il { font-size: 11px; }
.cw-slot.l .es-dur { left: -7px; } .cw-slot.r .es-dur { right: -7px; }
.cw-head { padding-top: 6px; padding-bottom: 6px; }
.cw-btns { padding-top: 10px; }
/* Attributes: ten two-line rows that always fit; durability carries its number */
.cw-attr .cw-ledger { display: flex; flex-direction: column; }
.cw-gr { grid-template-columns: 40px minmax(0, 1fr) 34px 84px; gap: 10px; padding: 3px 8px; margin-bottom: 3px; min-height: 44px; box-sizing: border-box; }
.cw-gi { width: 40px; height: 40px; }
.cw-gt b { font-size: 13.5px; line-height: 1.25; }
.cw-gt small { font-size: 11.5px; line-height: 1.3; }
.cw-gt small em { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--metal-muted); font-style: normal; margin-right: 7px; }
.cw-gl { font-size: 17px; }
.cw-gdw { display: flex; align-items: center; gap: 6px; }
.cw-gdw .cw-gd { flex: 1; }
.cw-gdw small { width: 30px; text-align: right; font-size: 11px; color: var(--metal-muted); font-variant-numeric: tabular-nums; }
.cw-attr .cw-note { margin-top: auto; padding-top: 6px; }
/* Reputation: the cards share out the height of the page */
.cw-rep { display: flex; flex-direction: column; }
.w-char .cw-rep .cw-repgrid { flex: 1; grid-auto-rows: minmax(min-content, 1fr); }
.w-char .cw-repc { display: flex; flex-direction: column; justify-content: center; }
/* Guild & Pets: the guild box runs the full height, pets are larger cards that fill the column */
.cw-guild > section { display: flex; flex-direction: column; }
.w-char .cw-gbox { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 14px; }
.w-char .cw-gbox h4 { color: var(--brass-light); text-shadow: 0 1px 2px #000; }
.w-char .cw-gbox h4 span { font: 600 11px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-left: 6px; }
.cw-gsub { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--metal-muted); padding-bottom: 4px; border-bottom: 1px solid var(--engraving); margin-bottom: 6px; }
.cw-gsub b { color: var(--metal-text); }
.w-char .cw-groster { display: flex; flex-direction: column; gap: 3px; flex: 1; min-height: 60px; margin: 0; }
.cw-gm { --cc: #fff; display: grid; grid-template-columns: 4px minmax(0, 1fr) auto 28px; align-items: center; gap: 9px; padding: 6px 8px; background: linear-gradient(90deg, #1a252c, #141e2500); font-size: 13px; }
.cw-gm i { align-self: stretch; background: var(--cc); box-shadow: 0 0 6px var(--cc); opacity: .85; }
.cw-gm b { color: var(--cc); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-gm span { font-size: 11.5px; color: var(--metal-muted); }
.cw-gm em { font-style: normal; font: 700 13px var(--font-head); color: var(--brass-light); text-align: right; }
.cw-gcmds { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--engraving); display: flex; flex-direction: column; gap: 4px; }
.w-char .cw-gbox .g-new + .cw-gcmds { margin-top: auto; }
.cw-gcmd { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; font-size: 12px; color: var(--metal-muted); }
.cw-gcmd code { font: 600 12px var(--font-body); color: var(--teal); }
.w-char .cw-pets { flex: 1; grid-auto-rows: minmax(64px, 1fr); max-height: 470px; }
.w-char .cw-pet { position: relative; gap: 12px; padding: 10px 12px; }
.w-char .cw-pet img { width: 52px; height: 52px; box-shadow: var(--socket-shadow); }
.w-char .cw-pet b { font-size: 14px; }
.cw-ptag { position: absolute; right: 10px; top: 8px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--metal-muted); }
.w-char .cw-pet.on .cw-ptag { color: #9ae88a; }
.w-char .cw-pet:not(.locked):not(.on) .cw-ptag { color: var(--teal); }
/* Wardrobe: choices breathe a little more */
.w-char .wardrobe .look-row { padding: 10px 12px; margin-bottom: 9px; }
.lk-chip { padding: 10px 4px; }
.w-char .cw-repc { align-items: stretch; gap: 0; }
.w-char .cw-repc > * { width: auto; }
.w-char .cw-groster { padding: 6px; background: #0b131a80; border: 1px solid #26323a; box-shadow: inset 0 2px 8px #0008; }
.cw-gempty { margin: auto 0 4px; padding: 0 6px; text-align: center; font-size: 12px; font-style: italic; color: #7d8d90; }
.w-char .cw-repc .rep-bar { flex: 0 0 auto; height: 16px; }
.w-char .cw-seth { margin-top: 14px; }
.cw-setb { display: flex; flex-direction: column; gap: 6px; }
.w-char .cw-setb .cs-set { padding: 7px 9px; background: linear-gradient(90deg, #1a252c, #141e25); border: 1px solid #2e3a3d; border-left: 2px solid #3ad65a99; }
.cs-sh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; }
.cs-sh b { font-size: 13px; color: #7ae05a; } .cs-sh span { font-size: 11.5px; color: var(--metal-muted); font-variant-numeric: tabular-nums; }
.w-char .cw-setb .cs-set > div:not(.cs-sh) { font-size: 11.5px; line-height: 1.3; }
.w-char .cw-left .cw-gold { margin-top: auto; }
.w-char .cw-left { overflow: hidden; }
/* the pack's sockets fill its frame at every size; filtered-out items fade right back so the matches read at a glance */
.window.w-bags { --bs: 66px; }
@media (min-width: 1600px) and (min-height: 900px) { .window.w-bags { --bs: 68px; } }
@media (max-height: 640px) { .window.w-bags { --bs: 58px; } }
.window .bag-grid .bslot.dim { opacity: .16; filter: grayscale(1); }
.window .bag-grid .bslot.dim :is(.bup, .bil, .cnt) { display: none; }
.window .bag-grid .bslot.dim::after { display: none; }
@media (max-height: 800px) { .window.w-bags.tall { --bs: 58px; } }

/* ======================================================================== touch controls (ui/touch.js)
   Everything here hangs off html.touch (a phone, a tablet or the Android app) or html.phone (a short or narrow screen);
   the desktop never gets either class. */
.tc { position: absolute; inset: 0; pointer-events: none; z-index: 4; --u: 1; }
.tc-safe { position: fixed; visibility: hidden; pointer-events: none; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.tc > * { pointer-events: auto; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.tc .tc-stick { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; opacity: .38; transition: opacity .15s; }
.tc .tc-stick.on { opacity: 1; transition: none; }
.tc-base, .tc-knob { position: absolute; border-radius: 50%; }
.tc-base { width: calc(var(--u) * 132px); height: calc(var(--u) * 132px); left: calc(var(--u) * -66px); top: calc(var(--u) * -66px);
  background: radial-gradient(circle, rgba(10,14,18,.12) 40%, rgba(10,14,18,.45) 70%); border: 2px solid rgba(232,194,106,.55); box-shadow: 0 0 0 1px rgba(0,0,0,.4), inset 0 0 18px rgba(0,0,0,.35); }
.tc-knob { width: calc(var(--u) * 60px); height: calc(var(--u) * 60px); left: calc(var(--u) * -30px); top: calc(var(--u) * -30px);
  background: radial-gradient(circle at 40% 35%, #fff2c8, #e8c26a 45%, #8a6a30); border: 2px solid #3a2a12; box-shadow: 0 3px 10px rgba(0,0,0,.6); }
.tc-stick.run .tc-base { border-color: #ffe08a; box-shadow: 0 0 14px rgba(255,214,120,.55), inset 0 0 18px rgba(0,0,0,.35); }
.tc .tc-wheel { position: absolute; inset: 0; pointer-events: none; }
.tc-sk, .tc-b, .tc-t { position: absolute; left: 0; top: 0; padding: 0; margin: 0; pointer-events: auto; touch-action: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tc-sk { border-radius: 50%; overflow: hidden; border: 2px solid #c8a050; background: #120c08; box-shadow: 0 0 0 2px rgba(0,0,0,.65), 0 4px 12px rgba(0,0,0,.55); }
.tc-sk img { width: 100%; height: 100%; display: block; border-radius: 50%; pointer-events: none; }
.tc-sk.main { border: 3px solid #ffe08a; box-shadow: 0 0 0 2px rgba(0,0,0,.7), 0 0 16px rgba(255,214,120,.35), 0 5px 14px rgba(0,0,0,.6); }
.tc-sk .tc-cd { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.tc-sk .tc-cdt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 800 calc(var(--u) * 20px) var(--font-body); color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; pointer-events: none; }
.tc-sk.nores img { filter: saturate(.25) brightness(.5); }
.tc-sk.nores { border-color: #5a6a8a; }
.tc-sk.pressed { filter: brightness(1.35); }
.tc-sk.tc-page { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; background: linear-gradient(180deg, #2a3a44, #142028); border-color: #708c89; color: #dceff0; }
.tc-sk.tc-page svg { width: 46%; height: 46%; fill: currentColor; }
.tc-sk.tc-page b { font: 800 11px var(--font-body); line-height: 1; }
.tc-b { border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #ffe8a0; background: radial-gradient(circle at 50% 35%, rgba(70,54,30,.92), rgba(24,18,10,.92)); border: 2px solid #8a6a30; box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 4px 10px rgba(0,0,0,.5); }
.tc-b svg { width: 52%; height: 52%; fill: currentColor; stroke: currentColor; pointer-events: none; }
.tc-b.tc-jump svg, .tc-b.tc-dodge svg { width: 56%; height: 56%; }
.tc-b.on { border-color: #ffe08a; color: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 14px rgba(255,214,120,.6); }
.tc-b.none { opacity: .4; }
.tc-b.down, .tc-t.down, .tc-sk:active { filter: brightness(1.4); }
.tc-q { overflow: hidden; }
.tc-q img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; pointer-events: none; }
.tc-q.empty { opacity: .35; }
.tc-q.empty img { visibility: hidden; }
.tc-q .tc-n { position: absolute; right: 2px; bottom: 0; font: 800 12px var(--font-body); color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; }
.tc .tc-top { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 8px); right: calc(env(safe-area-inset-right, 0px) + 14px + 214px * var(--ui-scale, 1) * var(--mmz, 1) + 10px); display: flex; gap: 8px; pointer-events: none; }
.tc-t { position: relative; width: 46px; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #ffe8a0; pointer-events: auto;
  background: linear-gradient(180deg, rgba(58,44,24,.94), rgba(24,18,10,.94)); border: 2px solid #8a6a30; box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 4px 10px rgba(0,0,0,.45); }
.tc-t svg { width: 24px; height: 24px; fill: currentColor; pointer-events: none; }
.tc-t.on { border-color: #ffe08a; color: #fff; }
.tc-dot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: #ff8a40; box-shadow: 0 0 6px #ff8a40; display: none; }
.tc-dot.on { display: block; }
.tc-act { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); transform: translateX(-50%); z-index: 72; display: flex; gap: 8px; padding: 8px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(30,40,48,.97), rgba(14,20,26,.97)); border: 1px solid #708c89; box-shadow: 0 6px 24px rgba(0,0,0,.7); pointer-events: auto; }
.tc-act.hidden { display: none; }
.tc-act button { min-width: 96px; min-height: 46px; padding: 0 16px; font: 700 15px var(--font-head); border-radius: 8px; border: 1px solid #6a4a14; color: #2a1a06; background: linear-gradient(180deg, #ffe08a, #c8902a); }
.tc-act .tc-link, .tc-act .tc-close { color: #e8f0f0; background: linear-gradient(180deg, #34444c, #1c262c); border-color: #4a5c62; }
.tc-act .hidden { display: none; }
.tc-sel { outline: 3px solid #ffe08a !important; outline-offset: -1px; box-shadow: 0 0 14px rgba(255,214,120,.7) !important; z-index: 2; }
.tc-menu { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 14px calc(env(safe-area-inset-right, 0px) + 14px) calc(env(safe-area-inset-bottom, 0px) + 14px) calc(env(safe-area-inset-left, 0px) + 14px);
  background: rgba(6,8,10,.72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.tcm-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 104px)); gap: 10px; }
.tcm-grid button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 86px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(180deg, #2a3a44, #142028); border: 1px solid #4a6066; color: #e8f0f0; box-shadow: inset 0 1px 0 #ffffff14, 0 4px 12px rgba(0,0,0,.5); }
.tcm-grid button b { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; font: 800 17px var(--font-head); color: #2a1a06; background: linear-gradient(180deg, #ffe08a, #c8902a); border: 1px solid #6a4a14; }
.tcm-grid button span { font: 700 13px var(--font-head); letter-spacing: .02em; }
.tcm-x { min-width: 160px; min-height: 46px; font: 700 15px var(--font-head); border-radius: 10px; color: #e8f0f0; background: linear-gradient(180deg, #34444c, #1c262c); border: 1px solid #4a5c62; }
.chat-send { display: none; }

/* --- on any touch device: the touch controls replace the bars, the menu buttons and the key hints */
html.touch .hud .actionbars, html.touch .hud .menubar { display: none !important; }
html.touch .slot .key { display: none; }
html.touch .hud .prompt { pointer-events: auto; cursor: pointer; top: calc(env(safe-area-inset-top, 0px) + 30%); bottom: auto; min-height: 52px; padding: 6px 22px 6px 8px; border-radius: 30px; font-size: 16px; z-index: 5; touch-action: none; }
html.touch .hud .prompt .pk { width: 40px; height: 40px; border-radius: 50%; }
html.touch .hud .prompt .pk svg { width: 26px; height: 26px; fill: none; stroke: currentColor; }
html.touch .hud .prompt.down { filter: brightness(1.3); }
html.touch .cw-doll canvas { touch-action: none; }
html.touch .window .wh { cursor: default; }
html.touch .tooltip { max-width: min(340px, calc(100vw - 16px)); }
html.touch .hud .chat { display: none; }
html.touch .hud.chat-open .chat { display: block; z-index: 6; }
html.touch .hud.chat-open .chat-send { display: block; }
html.touch .hud.chat-open .chat-log { background-color: rgba(10,8,6,.6); }
html.touch .hud .chat .chat-in { min-height: 42px; font-size: 16px; width: calc(100% - 78px); }
html.touch .hud .chat-send { position: absolute; right: 0; bottom: 0; width: 72px; height: 42px; font: 700 14px var(--font-head); border-radius: 6px; color: #2a1a06; background: linear-gradient(180deg, #ffe08a, #c8902a); border: 1px solid #6a4a14; }
html.touch .tc.has-win .tc-wheel, html.touch .tc.has-win .tc-b { visibility: hidden; }

/* --- phones: a small HUD round the edges, so the stick and the wheel have the screen's lower half */
html.phone .hud .unit, html.phone .hud .party-frames, html.phone .hud .tf-actions { zoom: calc(var(--ui-scale, 1) * .8); }
html.phone .hud .player-frame { top: calc(env(safe-area-inset-top, 0px) / .8 + 8px); left: calc(env(safe-area-inset-left, 0px) / .8 + 10px); }
html.phone .hud .target-frame { top: calc(env(safe-area-inset-top, 0px) / .8 + 8px); left: calc(env(safe-area-inset-left, 0px) / .8 + 340px); }
html.phone .tc { --mmz: .66; }
html.phone .hud .minimap { zoom: calc(var(--ui-scale, 1) * .66); top: calc(env(safe-area-inset-top, 0px) / .66 + 10px); right: calc(env(safe-area-inset-right, 0px) / .66 + 12px); }
html.phone .hud .minimap .mm-zoom button { width: 56px; height: 56px; font-size: 26px; }
html.phone .hud .quest-tracker { zoom: calc(var(--ui-scale, 1) * .8); top: calc(env(safe-area-inset-top, 0px) / .8 + 112px); left: calc(env(safe-area-inset-left, 0px) / .8 + 12px); right: auto; width: 270px; max-height: 210px; overflow: hidden; }
html.phone .hud .party-frames { top: 150px; left: calc(env(safe-area-inset-left, 0px) / .8 + 10px); }
html.phone .hud .castbar { zoom: calc(var(--ui-scale, 1) * .75); bottom: 30px; }
html.phone .hud .xpbar { height: 8px; }
html.phone .hud .xpbar span { display: none; }
html.phone .hud .gold-box { display: none; }
html.phone .hud .chat { zoom: 1; left: calc(env(safe-area-inset-left, 0px) + 8px); top: calc(env(safe-area-inset-top, 0px) + 62px); bottom: auto; width: min(440px, 55vw); }
html.phone .hud .chat .chat-log { height: calc(100vh - 160px); max-height: 220px; font-size: 14px; }
html.phone .hud .prompt { font-size: 15px; max-width: 46vw; }
html.phone .hud .err-text { top: 22%; font-size: 15px; }
html.phone .hud .zone-banner { zoom: .6; }
html.phone .hud .offline-tag { zoom: .75; top: auto; left: 38%; bottom: calc(env(safe-area-inset-bottom, 0px) / .75 + 4px); white-space: nowrap; } /* clear of the top buttons */
html.phone .tcm-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); width: min(100%, 760px); gap: 8px; }
html.phone .tcm-grid button { height: 78px; }
@media (max-width: 760px) { html.phone .tcm-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* --- phones: the window sheets (frame, header, close button, tabs, scrolling) are in mobile-panels.css */
html.phone .tooltip { font-size: 13px; max-height: calc(100vh - 80px); overflow: hidden; }
html.phone .tooltip.tip-cmp { display: none !important; }

/* --- phones: the Character sheet. Three columns kept (card and sets | gear round the figure | stats), each scrolling on its own */
html.phone .window.w-char > .wb { padding: 8px 10px !important; overflow: hidden !important; }
html.phone .w-char .cw-left, html.phone .w-char .cw-right { overflow-y: auto !important; overscroll-behavior: contain; padding-right: 2px; }
html.phone .w-char .cw-left .cw-gold { margin-top: 10px; }
html.phone .cw-head { display: none; }
html.phone .cw-mid { position: relative; }
html.phone .cw-stage { gap: 10px; }
html.phone .cw-col { padding: 0; gap: 4px; }
html.phone .cw-doll .doll-hint { top: 4px; }
html.phone .cw-attr { grid-template-columns: minmax(0, 1fr) minmax(200px, 260px); gap: 10px; }
html.phone .cw-attr .cw-ledger, html.phone .cw-attr .cw-right, html.phone .cw-look .wardrobe, html.phone .cw-guild > section, html.phone .cw-rep { overflow-y: auto !important; overscroll-behavior: contain; }
html.phone .cw-look { grid-template-columns: minmax(200px, 38%) minmax(0, 1fr); gap: 12px; }
html.phone .cw-guild { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
html.phone .w-char .cw-repgrid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* --- phones: the Backpack. One header row (capacity, search, sort), the tabs, then a grid as wide as the screen */
html.phone .w-bags > .bag-head { flex: 0 0 auto; display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 6px 10px 0; }
html.phone .w-bags .bag-head .bag-search { padding: 0; }
html.phone .w-bags .bag-cats { grid-column: 1 / -1; margin-top: 6px; overflow-x: auto; scrollbar-width: none; }
html.phone .window.w-bags > .wb { padding: 8px 10px !important; }
html.phone .window.w-bags .bag-foot { margin-top: 8px; }

/* --- phones: every window body uses the full width (the desktop fixes most of them to a column width) */
/* the loot window stays a centred panel over the world */
html.phone .window.w-loot { left: 50% !important; right: auto !important; width: min(440px, calc(100vw - 12px)) !important; transform: translateX(-50%) !important; top: calc(env(safe-area-inset-top, 0px) + 40px) !important; bottom: auto !important; max-height: calc(100vh - 80px) !important; }
html.phone .w-loot .litem { min-height: 48px; }
/* a merchant, the storehouse, the post or a companion's outfit beside the backpack: split the screen, the backpack on the right */
html.phone #ui:has(> .window.w-bags) > .window:is(.w-dialog, .w-outfit) { right: calc(50% + 3px) !important; }
html.phone #ui:has(> .window:is(.w-dialog, .w-outfit)) > .window.w-bags { left: calc(50% + 3px) !important; --bs: 52px; }
html.phone #ui:has(> .window:is(.w-dialog, .w-outfit)) > .window.w-bags > .bag-head { grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
html.phone #ui:has(> .window:is(.w-dialog, .w-outfit)) > .window.w-bags .bag-cats button { font-size: 11px; padding: 4px 2px !important; }
html.phone #ui:has(> .window:is(.w-dialog, .w-outfit)) > .window.w-bags .bag-cats button span { overflow: hidden; text-overflow: ellipsis; }

/* --- phones: the login. Classes on the left and the panel on the right each scroll; Enter World stays in reach at the bottom */
html.phone .login { padding: 0; }
html.phone .login-title { position: absolute; left: calc((216px + 100vw - min(340px, 44vw)) / 2); top: calc(env(safe-area-inset-top, 0px) + 10px); transform: translateX(-50%); }
html.phone .login-title .t1 { font-size: 38px; letter-spacing: 4px; }
html.phone .login-title .t2 { font-size: 12px; letter-spacing: 8px; }
html.phone .login-classes { left: calc(env(safe-area-inset-left, 0px) + 8px); top: 8px; bottom: 8px; transform: none; overflow-y: auto; gap: 6px; padding-right: 4px; overscroll-behavior: contain; }
html.phone .login .cls-card { width: 200px; grid-template-columns: 40px 1fr; padding: 5px 7px; min-height: 52px; }
html.phone .login .cls-card img { width: 40px; height: 40px; }
html.phone .login .cls-card .cn { font-size: 15px; }
html.phone .login .cls-card .cr { font-size: 11px; }
html.phone .login-panel { right: calc(env(safe-area-inset-right, 0px) + 8px); top: 8px; bottom: 8px; transform: none; width: min(340px, 44vw); padding: 12px 14px 0; overflow-y: auto; overscroll-behavior: contain; }
html.phone .login-panel .cls-desc { font-size: 13.5px; }
html.phone .login-panel .cls-skills { grid-template-columns: repeat(13, 1fr); margin: 8px 0; }
html.phone .login-chars { max-height: none; }
html.phone .login .char-pick { min-height: 44px; }
html.phone .login .cv { height: 32px; width: 44px !important; }
html.phone .login .name-in { min-height: 44px; }
html.phone .login .enter-btn { position: sticky; bottom: 0; margin: 10px 0 0; min-height: 50px; box-shadow: 0 -10px 14px rgba(14,20,26,.9), 0 2px 0 #4a3010 !important; }
html.phone .login-note { display: none; }

/* --- phones: the character sheet on the narrowest screens, toasts and banners that fit */
html.phone .w-char .cw-h span { display: none; }
@media (max-width: 820px) { html.phone .cw-attr { grid-template-columns: minmax(0, 1fr) 200px; } }
html.phone .hud .ach-toasts, html.phone .claim, html.phone .story-recap, html.phone .invite-pop { zoom: .7; }
html.phone .scene-bars .sb-line { font-size: 15px; }
/* mood of a foe (game/targetfx.js sets data-mood): passive foes (your level + 2 or lower, not fighting) read yellow */
.plate.hostile[data-mood="passive"] .pn { color: #ffd84a; }
.plate.hostile[data-mood="hostile"] .pn { color: #ff6a4a; }
.plate.targeted .pn { font-size: 14px; text-shadow: 0 0 3px #000, 0 1px 2px #000, 0 0 10px rgba(255, 224, 138, .6); }

/* death panel: above nameplates and toasts; toasts move up and out of its way while you are down */
.hud .death { z-index: 45; }
.hud.is-dead .ach-toasts { bottom: auto; top: 96px; }
.hud.is-dead .toasts { bottom: auto !important; top: 200px; }

/* friendly targets (townsfolk, other players): a green bar, never the red foe bar */
.target-frame.friendly .bar.hp i { background: linear-gradient(#a3f381, #4bb64d 45%, #226435); }
.target-frame.friendly .bar.hp span { color: #eaffe0; }

/* a new character sees only the bar rows it can use */
.hud .ab.all-locked { display: none !important; }
/* the experience bar text is readable */
.hud .xpbar { height: 17px; }
.hud .xpbar span { font-size: 12px; line-height: 17px; }
/* small desktop windows (720p): a shorter, narrower chat so the bars and chat cover less of the world */
@media (max-height: 820px) {
  html:not(.touch) .hud .chat { width: 330px; bottom: 54px; }
  html:not(.touch) .hud .chat-log { height: 108px; font-size: 13px; }
}
/* reward cards sit on the dark slate panel: names in their bright quality colour, not the parchment ink */
.parch .rcard b { color: var(--qc); text-shadow: 0 1px 1px #000c; }

/* windows sit above the HUD bars (the Options window used to run behind the top action-bar row) */
#ui > .window { z-index: 10; }
/* quality buttons stay on one line */
.window .o-q { flex-wrap: nowrap !important; }
.w-opts .o-q button { padding: 4px 8px; white-space: nowrap; }
.w-opts .o-qhint { font-size: 12px; opacity: .8; margin: -2px 0 6px; }

/* ---- HUD layout pass (v100 leftovers) ---- */
/* nameplates: ui.js lays them out (clamped inside the screen, stacked apart, faded behind buildings) */
.plate { transition: none; }
/* top-right column: the letters note is a compact pill with a small envelope; the quest tracker follows the minimap's
   bottom edge (ui.js layoutCorner), so the notes never slide under it */
.post-note { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; }
.post-note b { font-weight: 700; }
.post-note .pn-env { position: relative; flex: 0 0 auto; width: 14px; height: 10px; box-sizing: border-box; border: 1.5px solid currentColor; border-radius: 1px; }
.post-note .pn-env::after { content: ''; position: absolute; left: 1.5px; top: -3px; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.hud .quest-tracker { transition: top .2s ease-out; }
.hud .quest-tracker.squeezed { display: none; }
/* the coin readout sits in its own plate above the menu bar */
html:not(.phone) .hud .gold-box { bottom: 64px; right: 14px; padding: 1px 8px; background: #0b131acc; border: 1px solid #3a4a4e; border-radius: 2px; font-variant-numeric: tabular-nums; }

/* phones: the target frame drops under the top buttons (Chat, Character, Bags, Menu) unless the row is wide enough for
   both; its order buttons follow it down */
html.phone .hud .target-frame { top: calc(env(safe-area-inset-top, 0px) / .8 + 78px); }
html.phone .hud .tf-actions { top: calc(env(safe-area-inset-top, 0px) / .8 + 160px); left: calc(env(safe-area-inset-left, 0px) / .8 + 350px); }
@media (min-width: 900px) {
  html.phone .hud .target-frame { top: calc(env(safe-area-inset-top, 0px) / .8 + 8px); }
  html.phone .hud .tf-actions { top: calc(env(safe-area-inset-top, 0px) / .8 + 92px); }
}
/* phones: the party frames sit right under the player frame; the quest tracker follows them (ui.js layoutCorner) */
html.phone .hud .party-frames { top: calc(env(safe-area-inset-top, 0px) / .8 + 92px); }
/* phones: the minimap's zoom keys, the letters and worn-gear notes stay on the map's own box, clear of the skill wheel
   (its page button sits just under the map) */
html.phone .hud .minimap .coords { display: none; }
html.phone .hud .minimap .mm-zoom { left: auto; right: 2px; top: 150px; }
html.phone .hud .minimap .mm-zoom button { width: 44px; height: 44px; font-size: 22px; }
html.phone .hud .minimap .post-note, html.phone .hud .minimap .dura:not(.hidden) { position: absolute; left: 0; margin: 0; padding: 4px 7px; font-size: 22px; line-height: 26px; }
html.phone .hud .minimap .post-note { top: 30px; }
html.phone .hud .minimap .post-note span { display: none; }
html.phone .hud .minimap .post-note .pn-env { width: 24px; height: 17px; border-width: 2px; }
html.phone .hud .minimap .post-note .pn-env::after { left: 3px; top: -6px; width: 11px; height: 11px; border-width: 0 2px 2px 0; }
html.phone .hud .minimap .dura:not(.hidden) { top: 76px; font-size: 0; }
html.phone .hud .minimap .dura img { width: 28px; height: 28px; }
/* short phones (360-400 tall): a smaller minimap so the skill wheel's page button sits clear under it */
@media (max-height: 400px) {
  html.phone .tc { --mmz: .56; }
  html.phone .hud .minimap { zoom: calc(var(--ui-scale, 1) * .56); top: calc(env(safe-area-inset-top, 0px) / .56 + 8px); right: calc(env(safe-area-inset-right, 0px) / .56 + 12px); }
  html.phone .hud .minimap .zone-name { font-size: 19px; }
  html.phone .hud .minimap::before { height: 214px; }
  html.phone .hud .minimap .mm-zoom button { width: 52px; height: 52px; font-size: 26px; }
  html.phone .hud .minimap .mm-zoom { top: 128px; }
}
/* phones: the inner lists' desktop height caps (100vh minus a desktop header) leave one row on a 360 px screen; let the
   window body scroll instead */
html.phone .ach-list, html.phone .jr-list, html.phone .dg-list, html.phone .dg-detail, html.phone .craft-list { max-height: none; }
/* v101 painted coins, paints, Bounty Board, Muster and homestead art (each falls back to the old look when its file is missing) */
img.coin-im { width: 1.05em !important; height: 1.05em !important; min-width: 0 !important; vertical-align: -0.18em; margin: 0 2px 0 1px; padding: 0; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: none !important; filter: drop-shadow(0 1px 1px rgba(0,0,0,.55)); display: inline-block; flex: none; }
.parch img.coin-im { filter: drop-shadow(0 1px 0 rgba(60,40,10,.35)); }
.bg-coin, .qdone-banner .qd-coin { background: url(/sunmere-play/ui/icons/misc/coin_gold.webp) center/contain no-repeat; border: 0; border-radius: 0; box-shadow: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.bg-coin { width: 20px; height: 20px; }
.qdone-banner .qd-coin { width: 34px; height: 34px; }
.litem .li-ic.coin-ic { background: #1a140c url(/sunmere-play/ui/icons/misc/coin_gold.webp) center/80% no-repeat; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,236,170,.25); }
.co-card img.co-sw.co-paint { object-fit: cover; padding: 0; background: #1a140c; }
.paint img.paint-ic { width: 32px; height: 32px; border-radius: 4px; border: 1px solid #000; flex: none; object-fit: cover; }
.paint.locked img.paint-ic { filter: grayscale(1) brightness(.6); }
.window h3 img.bb-head { width: 30px; height: 30px; vertical-align: middle; margin: -5px 8px 0 0; border-radius: 4px; border: 1px solid #6a5a3a; object-fit: cover; }
img.tr-ic { width: 36px; height: 36px; flex: none; object-fit: cover; box-sizing: border-box; }
img.tr-ic.tr-thumb { object-position: center 40%; background: #1a140c; }
img.tr-ic.tr-boss { border-color: #8a3a24; }
img.tr-ic.tr-feat { border-color: #ffc040; box-shadow: 0 0 6px #ffc04088; }
.tr-row.tr-not { opacity: .6; }
.tr-row.tr-not img.tr-ic { filter: grayscale(1) brightness(.55); }
.hv-row { display: flex; align-items: center; gap: 8px; }
.hv-row .hv-ic { display: block; box-sizing: border-box; background: rgba(0,0,0,.25); width: 36px; height: 36px; flex: none; border: 1px solid #6a5a3a; border-radius: 4px; }
html.phone img.tr-ic { width: 40px; height: 40px; }
html.phone .paint img.paint-ic { width: 36px; height: 36px; }
/* Esc menu bar on the Options window: Resume / Exit game */
.o-exitbar { display: flex; gap: 8px; padding: 8px 10px 4px; }
.o-exitbar button { flex: 1; padding: 7px 10px; font: 700 14px var(--font-head); color: #f3e3c0; background: linear-gradient(#4a3420, #2c1e12); border: 1px solid #8a6a3a; border-radius: 4px; cursor: pointer; }
.o-exitbar button:hover { filter: brightness(1.15); }
.o-exitbar .o-exit { color: #ffd9cf; background: linear-gradient(#6a2418, #3e140c); border-color: #a5523a; }
html.touch .o-exitbar button { min-height: 44px; font-size: 16px; }

/* ======================================================= rarity and upgrades (docs/ai/rarity_upgrade_plan.md A8, B4)
   Prismatic (q 6) has no flat colour: QUALITY[6] (#ff6ad5) is its fallback, and every name or border the UI writes in that
   fallback is painted here with the tempered-steel gradient (--prism, set by ui.js from PRISMATIC_STOPS: straw, bronze,
   peacock, blue). The gradient drifts slowly on desktop only; phones and reduced-motion keep it still. */
:root { --prism: linear-gradient(135deg, #f2d47c, #c58a42, #7a52c8, #3d7fe0, #f2d47c); --prism-glow: rgba(122,82,200,.45); }
:is(b, span, div, em, a, i)[style^="color:#ff6ad5"], .tt-name.q6 {
  background-image: var(--prism); background-size: 160% 100%; background-position: 0% 50%; width: fit-content; max-width: 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #ff6ad5;
  text-shadow: none !important; filter: drop-shadow(0 1px 1px #000c);
}
:is(img, .li-ic)[style*="border-color:#ff6ad5"], .ar-tile.got.aq6 {
  border-color: transparent !important;
  background: linear-gradient(#1a120a, #1a120a) padding-box, var(--prism) border-box; background-size: 100% 100%, 220% 100%; background-position: 0 0, 0% 50%;
}
.ltoast.q6 { border: 2px solid transparent; background: linear-gradient(180deg, rgba(30,24,14,.97), rgba(14,10,6,.97)) padding-box, var(--prism) border-box; background-size: 100% 100%, 220% 100%; box-shadow: 0 0 26px var(--prism-glow), 0 0 12px rgba(242,212,124,.3), 0 6px 20px rgba(0,0,0,.6); }
.claim.q6 { border: 2px solid transparent; background: linear-gradient(180deg, rgba(40,28,14,.97), rgba(22,15,8,.97)) padding-box, var(--prism) border-box; background-size: 100% 100%, 220% 100%; box-shadow: 0 0 20px var(--prism-glow), 0 4px 14px rgba(0,0,0,.6); }
.tooltip:has(> .tt-name.q6) { box-shadow: inset 0 0 0 3px #080e14, inset 0 0 0 4px #7a52c8, 0 0 18px var(--prism-glow), 0 5px 14px #000a !important; }
.tooltip:has(> .tt-name.q6)::before { content: ''; position: absolute; left: 4px; right: 4px; top: 4px; height: 3px; background: var(--prism); pointer-events: none; }
.claim.q5 { border-color: #ffc23a; box-shadow: 0 0 16px rgba(255,194,58,.45), 0 4px 14px rgba(0,0,0,.6); }
.claim.q4 { border-color: #b45aff; }
.claim .c-rar { font-style: normal; font-weight: 700; }
.bslot.bq6, .eslot.q6, .litem.q6 { --socket-quality: #7a52c8; }
:is(.bslot.bq6, .doll-col .eslot.q6, .litem.q6) { animation: none; box-shadow: var(--socket-shadow, 0 0 0 transparent), 0 0 14px var(--prism-glow), inset 0 0 12px rgba(242,212,124,.28); }
.window .bag-grid .bslot.bq6:has(img) { border-color: transparent; background: linear-gradient(#0b131a, #0b131a) padding-box, var(--prism) border-box; box-shadow: var(--socket-shadow), 0 0 14px var(--prism-glow), 0 0 6px rgba(242,212,124,.35); }
.litem.q6 { box-shadow: inset 3px 0 0 #7a52c8, 0 0 12px var(--prism-glow); }
@keyframes prismDrift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes prismDriftB { from { background-position: 0 0, 0% 50%; } to { background-position: 0 0, 100% 50%; } }
html:not(.touch) :is(b, span, div, em, a, i)[style^="color:#ff6ad5"], html:not(.touch) .tt-name.q6 { animation: prismDrift 6s ease-in-out infinite alternate; }
html:not(.touch) :is(img[style*="border-color:#ff6ad5"], .li-ic[style*="border-color:#ff6ad5"], .ar-tile.got.aq6, .claim.q6) { animation: prismDriftB 6s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { :is(b, span, div, em, a, i)[style^="color:#ff6ad5"], .tt-name.q6, img[style*="border-color:#ff6ad5"], .li-ic[style*="border-color:#ff6ad5"], .ar-tile.got.aq6, .claim.q6 { animation: none !important; } }

/* tooltip: rarity word, the upgrade row and its ten pips, bound pieces */
.tt-rar { font-size: 12px; font-weight: 700; margin: 0 0 2px; }
.tt-rar em { font-weight: 400; font-style: italic; color: #a8987a; }
.tt-upg { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: #e8c26a; margin: 1px 0 3px; }
.tt-upg.full span:first-child { color: #ffe8a0; }
.tt-bound { color: #c8b4e8 !important; }
.up-pips { display: inline-flex; gap: 2px; align-items: center; }
.up-pips i { display: block; width: 9px; height: 6px; border-radius: 1px; background: #241c12; border: 1px solid #4a3a26; box-sizing: border-box; }
.up-pips i.heat { border-color: color-mix(in srgb, var(--hc) 70%, #000); background: color-mix(in srgb, var(--hc) 16%, #1a120a); }
.up-pips i.on { background: #d8b25a; border-color: #ffe08a; }
.up-pips i.heat.on { background: var(--hc); border-color: color-mix(in srgb, var(--hc) 60%, #fff); box-shadow: 0 0 4px var(--hc); }
.up-pips i.nx { border-color: #ffe08a; }
/* "+N" on bag cells and the character sheet */
.bslot .bplus { position: absolute; right: 3px; top: 2px; z-index: 2; padding: 0 3px; font: 700 10.5px var(--font-body); color: #ffe08a; background: #0b131acc; border-radius: 2px; text-shadow: 0 1px 1px #000; pointer-events: none; }
.cw-slot .es-up { position: absolute; left: 2px; bottom: 1px; z-index: 2; padding: 0 3px; font: 700 10.5px var(--font-body); color: #ffe08a; background: #0b131acc; border-radius: 2px; pointer-events: none; }
.window .bag-grid .bslot.dim .bplus { display: none; }
/* toasts: an upgrade done, someone's Prismatic find */
.ltoast.lt-upg .up-pips { margin: 3px 0 1px; }
.ltoast.lt-upg .up-pips i { width: 12px; height: 7px; }
.ltoast.lt-news em { max-width: 250px; }

/* ---- the Upgrade window at a smith (B4) */
.w-dialog .wb:has(.ug-wrap) { width: 700px; }
.ug-wrap { display: flex; gap: 10px; align-items: stretch; }
.ug-list { flex: 0 0 250px; display: flex; flex-direction: column; gap: 4px; max-height: 56vh; overflow-y: auto; padding-right: 2px; }
.ug-row { display: flex; gap: 7px; align-items: center; padding: 4px 6px; border: 1px solid #3a2a18; border-radius: 5px; background: rgba(255,230,160,.035); cursor: pointer; }
.ug-row:hover { border-color: #8a6a3a; background: rgba(255,230,160,.07); }
.ug-row.on { border-color: #e8c26a; background: rgba(232,194,106,.12); box-shadow: inset 3px 0 0 #e8c26a; }
.ug-row.full { opacity: .78; }
.ug-row img { width: 36px; height: 36px; border: 2px solid; border-radius: 4px; flex: none; }
.ug-rt { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.ug-rt b { font: 700 12.5px var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ug-rt span { font-size: 11px; color: #a8987a; }
.ug-rt .rf-worn { font-style: normal; }
.ug-detail { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; padding: 8px 10px; border: 1px solid #4a3a26; border-radius: 6px; background: linear-gradient(180deg, rgba(255,230,160,.05), rgba(0,0,0,.15)); }
.ug-head { display: flex; gap: 10px; align-items: center; }
.ug-head img { width: 52px; height: 52px; border: 2px solid; border-radius: 6px; flex: none; }
.ug-head div { display: flex; flex-direction: column; min-width: 0; }
.ug-head b { font: 700 16px var(--font-head); }
.ug-head span { font-size: 12px; color: #a8987a; }
.ug-head em { font-style: normal; font-weight: 700; }
.ug-track { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.ug-pip { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ug-pip i { display: block; width: 100%; height: 14px; border-radius: 3px; background: #1e170e; border: 1px solid #4a3a26; box-sizing: border-box; }
.ug-pip span { font: 700 10.5px var(--font-body); color: #7a6a50; }
.ug-pip.heat i { border-color: color-mix(in srgb, var(--hc) 75%, #000); background: linear-gradient(180deg, color-mix(in srgb, var(--hc) 22%, #1a120a), #1a120a); }
.ug-pip.on i { background: linear-gradient(180deg, #ffe08a, #b8892a); border-color: #ffe08a; }
.ug-pip.heat.on i { background: linear-gradient(180deg, color-mix(in srgb, var(--hc) 70%, #fff), var(--hc)); border-color: color-mix(in srgb, var(--hc) 50%, #fff); box-shadow: 0 0 7px var(--hc); }
.ug-pip.on span { color: #e8c26a; }
.ug-pip.nx i { border: 1px dashed #ffe08a; }
.ug-pip.nx span { color: #ffe08a; }
.ug-note { font-size: 12.5px; color: #c8b490; }
.ug-note b { color: #ffe08a; }
.ug-heat { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; color: var(--hc); font-weight: 700; }
.ug-heat i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--hc); box-shadow: 0 0 5px var(--hc); }
.ug-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 18px; border-top: 1px solid #3a2a18; border-bottom: 1px solid #3a2a18; padding: 4px 0; }
.ug-st { display: grid; grid-template-columns: 1fr 46px 60px 30px; align-items: baseline; font-size: 12.5px; color: #c8b490; }
.ug-st b { color: #f4ead2; text-align: right; }
.ug-st i { font-style: normal; color: #7ae07a; text-align: right; }
.ug-st em { font-style: normal; font-size: 11px; color: #5ac85a; text-align: right; }
.ug-st em.z { color: #5a4a36; }
.ug-cost { display: flex; flex-wrap: wrap; gap: 5px; }
.ug-g, .ug-m { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px 3px 4px; border: 1px solid #4a3a26; border-radius: 5px; background: #120d07; font-size: 12px; color: #c8b490; }
.ug-g { padding-left: 8px; flex-direction: column; align-items: flex-start; gap: 0; }
.ug-g span { font-size: 10.5px; color: #8a7a5e; }
.ug-m img { width: 24px; height: 24px; border: 1px solid; border-radius: 3px; }
.ug-m b { color: #f4ead2; }
.ug-m.no, .ug-g.no { border-color: #7a2a1a; }
.ug-m.no b, .ug-g.no b { color: #ff7a60; }
.ug-m.ok b { color: #9ae08a; }
.ug-tot { font-size: 11.5px; color: #8a7a5e; }
.ug-b { align-self: stretch; padding: 8px 14px !important; font-size: 15px !important; }
.ug-b[disabled] { filter: grayscale(1); opacity: .55; cursor: default; }

/* ---- Armory: best rarity held, and the Tempering meter */
.ar-tile .ar-q { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; pointer-events: none; }
.ar-tile.aq6 .ar-q { background: var(--prism) !important; }
.ar-tile.got.aq6 { box-shadow: 0 0 8px var(--prism-glow); }
.ar-temper { margin: 6px 0 8px; padding: 6px 10px 7px; border: 1px solid #4a3a26; border-radius: 6px; background: rgba(255,230,160,.04); display: flex; flex-direction: column; gap: 4px; }
.at-h { font: 700 13px var(--font-head); color: #e8c26a; }
.at-h span { font: 400 11px var(--font-body); color: #8a7a5e; margin-left: 6px; }
.at-row { display: grid; grid-template-columns: 76px 1fr; gap: 1px 10px; align-items: center; font-size: 12px; }
.at-l { font-weight: 700; }
.at-row em { grid-column: 2; font-style: normal; font-size: 11.5px; color: #a8987a; }
.at-bar { position: relative; height: 8px; border-radius: 4px; background: #120d07; border: 1px solid #3a2a18; overflow: hidden; }
.at-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8a6a20, #ffc23a); }
.at-bar.p i { background: var(--prism); }
.at-bar s { position: absolute; top: 0; bottom: 0; width: 2px; background: #e8c26a99; }
/* ---- Wardrobe: the Prismatic shine and heat-stage rows */
.look-row.lk-prism { box-shadow: inset 3px 0 0 #7a52c8; padding-left: 7px; }
.look-row.lk-heat { box-shadow: inset 3px 0 0 #ff7a1a; padding-left: 7px; }

/* ---- v109 the quest walk: "Travelling to" over the tracker, the quest being walked to, the phone pin under the quest pill */
.hud .quest-tracker .qw-note { pointer-events: auto; display: flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 3px 4px 3px 6px; font-size: 12px; color: #d8c690; border-left: 2px solid #b8a46a; background: #0b131a66; border-radius: 3px; }
.hud .quest-tracker .qw-note span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud .quest-tracker .qw-note b, .qw-pin b { color: #f0e2b8; font-weight: 600; }
.hud .qw-stop { pointer-events: auto; flex: none; font: 600 11px var(--font-ui, inherit); color: #f0e2b8; background: #2a241a; border: 1px solid #8a7a52; border-radius: 3px; padding: 1px 7px; cursor: pointer; }
.hud .qw-stop:hover { background: #3a3222; }
.hud .quest-tracker .qt.qw-on, .hud .quest-tracker .msq-box.qw-on { box-shadow: inset 2px 0 0 #d8c690; background: rgba(216,198,144,.08); }
.qw-pin { display: none; }

/* online stability: the online player count on the login screen, the Reconnecting... banner and the give-up panel */
.login .srv-count { font-size: 11px; color: #9ad89a; white-space: nowrap; }
.login .srv-count::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: #6ac86a; margin-right: 5px; vertical-align: 1px; }
.login .srv-count.off { color: #d8a070; }
.login .srv-count.off::before { background: #a87048; }
.login .srv-count.hidden { display: none; }
.net-banner { position: absolute; left: 50%; top: 44px; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 10px; padding: 7px 16px; pointer-events: none;
  background: rgba(30, 20, 10, .92); border: 1px solid #c8902a; border-radius: 6px; color: #ffe8b0; font: 14px var(--font-body); box-shadow: 0 4px 18px rgba(0,0,0,.6); }
.net-banner .nb-text { color: #c8b890; font-size: 12px; }
.net-banner .nb-dot { width: 9px; height: 9px; border-radius: 2px; background: #ffb040; animation: nb-pulse 1s ease-in-out infinite alternate; }
@keyframes nb-pulse { from { opacity: .25; } to { opacity: 1; } }
.net-banner.failed { top: 34%; flex-direction: column; gap: 8px; padding: 18px 26px; max-width: min(420px, 90vw); text-align: center; pointer-events: auto; border-width: 2px; }
.net-banner.failed b { font-size: 18px; color: #ff9a70; }
.net-banner.failed .nb-text { font-size: 13px; color: #e8d8b0; }
.net-banner .nb-back { margin-top: 4px; padding: 7px 18px; font: 14px var(--font-body); color: #2a1a06; background: linear-gradient(180deg, #ffe08a, #c8902a); border: 1px solid #6a4a14; border-radius: 4px; cursor: pointer; }

/* playing together (v113): the menu on a player, the Players window, inspect and trade (client/ui/social.js) */
.pmenu { position: absolute; z-index: 60; min-width: 170px; padding: 6px; background: linear-gradient(180deg, rgba(38,28,18,.98), rgba(20,15,10,.98)); border: 2px solid #c8a050; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.6); pointer-events: auto; display: flex; flex-direction: column; gap: 2px; }
.pmenu .pm-h { font: 700 15px var(--font-head); color: var(--gold); padding: 2px 8px 6px; border-bottom: 1px solid #5a4422; margin-bottom: 3px; }
.pmenu button { text-align: left; font: 14px var(--font-body); color: #f4ead2; background: none; border: 0; border-radius: 3px; padding: 6px 10px; cursor: pointer; }
.pmenu button:hover { background: #ffe08a22; color: #ffe08a; }
.w-social .wb { width: 470px; max-width: calc(100vw - 40px); }
.so-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.window .so-tabs button { background: #2a2016; color: #e8d8b0; box-shadow: none; }
.window .so-tabs button.on { background: linear-gradient(180deg, #ffe08a, #c8902a); color: #2a1a06; }
.so-bar { display: flex; gap: 6px; margin-bottom: 8px; }
.so-bar input, .pt-gold input { flex: 1; background: #0b0906; color: #f4ead2; border: 1px solid #5a4422; border-radius: 4px; padding: 5px 8px; font: 14px var(--font-body); }
.so-list { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.so-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 4px; background: #ffffff08; cursor: pointer; font-size: 13px; }
.so-row:hover { background: #ffe08a18; }
.so-row.me, .so-row.bot { cursor: default; }
.so-row.off { opacity: .65; }
.so-row > i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.so-row b { min-width: 92px; }
.so-lv { color: #ffe08a; width: 22px; text-align: right; }
.so-cl { color: #c8b48a; width: 74px; }
.so-seen.on { color: #7aff9a; }
.so-note { margin: 0 0 6px; }
.so-all b { width: 104px; min-width: 0; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-all .so-wh { flex: none; width: 110px; }
@media (max-width: 480px) { .so-all b { width: 84px; } .so-all .so-cl { width: 62px; } .so-all .so-wh { width: 84px; } }
.so-wh { flex: 1; color: #a8a08a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-tags em, .in-head em { font-style: normal; font-size: 11px; padding: 1px 5px; margin-left: 3px; border-radius: 3px; background: #ffffff14; color: #c8c0a8; }
.so-tags .t-p { background: #3a5a9a55; color: #9ac8ff; } .so-tags .t-f { background: #2a6a3a55; color: #7aff9a; } .t-g { color: #7aff9a; }
.window .so-btns button { padding: 3px 8px; font-size: 12px; }
.so-hint { margin-top: 6px; font-size: 12px; color: #a8a08a; }
.w-inspect .wb { width: 520px; max-width: calc(100vw - 40px); }
.in-head { margin-bottom: 8px; font: 15px var(--font-head); }
.in-il { font: 13px var(--font-body); color: #c8b48a; margin-top: 2px; } .in-il b { color: #ffe08a; }
.in-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.in-row { display: flex; align-items: center; gap: 8px; padding: 3px; border-radius: 4px; background: #ffffff06; }
.in-row .bslot { width: 38px; height: 38px; flex: none; } .in-row .bslot img { width: 100%; height: 100%; }
.in-row.empty { opacity: .45; }
.in-tx { display: flex; flex-direction: column; font-size: 13px; } .in-tx span { color: #a8a08a; font-size: 12px; }
.w-ptrade .wb { width: 540px; max-width: calc(100vw - 40px); }
.pt-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pt-side { padding: 8px; border: 2px solid #3e3220; border-radius: 6px; background: #0b131a60; transition: border-color .2s, box-shadow .2s; }
.pt-side.ok { border-color: #5ad07a; box-shadow: 0 0 12px #5ad07a55 inset; }
.pt-who { font: 700 15px var(--font-head); margin-bottom: 6px; }
.pt-grid { display: grid; grid-template-columns: repeat(3, 52px); gap: 5px; justify-content: center; }
.pt-grid .bslot, .pt-bag .bslot { width: 52px; height: 52px; position: relative; cursor: pointer; }
.pt-grid .bslot img, .pt-bag .bslot img { width: 100%; height: 100%; }
.pt-grid .pt-empty { border: 1px dashed #4a3c26; border-radius: 4px; cursor: default; }
.pt-gold { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 13px; }
.pt-gold label { color: #c8b48a; margin-right: 4px; white-space: nowrap; }
.pt-gold input { width: 44px; min-width: 0; flex: none; padding: 3px 4px; }
.pt-st { margin-top: 6px; font-size: 12px; color: #a8a08a; } .pt-side.ok .pt-st { color: #7aff9a; font-weight: 700; }
.pt-warn { margin-top: 8px; padding: 6px 8px; border-radius: 4px; background: #6a2a1055; color: #ffb080; font-size: 13px; }
.pt-bagh { margin: 10px 0 4px; font-size: 12px; color: #a8a08a; }
.window .pt-bag.bag-grid { --cols: 8; grid-template-columns: repeat(var(--cols), 52px); max-height: 180px; overflow-y: auto; padding: 6px; }
.window .pt-bag.bag-grid .bslot { width: 52px; height: 52px; }
.pt-btns { align-items: center; margin-top: 10px; }
.pt-purse { flex: 1; font-size: 13px; color: #c8b48a; }
.window .pt-ok[disabled] { background: linear-gradient(180deg, #8ae0a0, #3a9a5a); cursor: default; }
/* v121: "N online" under the minimap, and its list of who is online (social.js ONLINE_UI) */
.on-badge { display: flex; align-items: center; gap: 4px; margin: 3px auto 0; width: max-content; padding: 2px 8px 2px 6px; font: 600 12px/16px var(--font-body); color: var(--brass-light); background: var(--grain), var(--metal); border: 1px solid var(--brass-edge); border-radius: 2px; box-shadow: inset 2px 0 0 var(--teal), inset 0 1px 0 #f6df9f28, 0 2px 6px #0007; cursor: pointer; text-shadow: 0 1px 2px #000; }
.on-badge.hidden { display: none; }
.on-badge:hover, .on-badge.on { border-color: var(--teal); }
.on-badge b { font-weight: 800; font-variant-numeric: tabular-nums; }
.on-badge em { font-style: normal; color: var(--metal-muted); opacity: .8; font-size: 11px; }
.on-dot { width: 7px; height: 7px; border-radius: 50%; background: #7ae08a; box-shadow: 0 0 4px #7ae08acc; flex: none; }
.on-pop { position: fixed; z-index: 55; width: 330px; display: flex; flex-direction: column; background: var(--grain), var(--metal); border: 1px solid var(--brass-edge); border-radius: 2px; box-shadow: inset 0 0 0 1px #111b23, inset 2px 0 0 var(--teal-dim), 0 8px 24px #000a; font: 13px var(--font-body); color: var(--metal-text); pointer-events: auto; }
.on-pop.hidden { display: none; }
.on-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px; color: var(--brass-light); font: 700 13px var(--font-head); background: linear-gradient(90deg, #91784960, #35434a80); box-shadow: inset 0 -1px 0 var(--brass-edge); }
.on-h em { font-style: normal; font-weight: 600; color: var(--metal-muted); font-size: 12px; }
.on-pop button { font: 600 11px var(--font-body); color: var(--brass-light); background: linear-gradient(#34444c, #17232b); border: 1px solid var(--brass-edge); border-radius: 2px; padding: 2px 7px; cursor: pointer; box-shadow: var(--key-shadow); }
.on-pop button:hover:not([disabled]) { border-color: var(--teal); color: #fff; }
.on-pop button[disabled] { opacity: .4; cursor: default; }
.on-list { overflow-y: auto; min-height: 0; flex: 1; padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.on-row { padding: 4px 6px; border-radius: 2px; background: #ffffff08; }
.on-row:hover { background: #5fe0d012; }
.on-row.bot { opacity: .62; }
.on-l1 { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.on-row.bot .on-l1, .on-row.me .on-l1 { cursor: default; }
.on-ci { width: 20px; height: 20px; flex: none; border-radius: 2px; border: 1px solid; object-fit: cover; box-sizing: border-box; }
i.on-ci { border: 0; width: 8px; height: 8px; margin: 0 6px; }
.on-nm { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.on-lv { color: #ffe08a; font-size: 12px; }
.on-tags { margin-left: auto; white-space: nowrap; }
.on-tags em { font-style: normal; font-size: 10px; padding: 0 4px; margin-left: 3px; border-radius: 2px; background: #ffffff14; color: #c8c0a8; }
.on-tags .t-p { background: #3a5a9a55; color: #9ac8ff; } .on-tags .t-f { background: #2a6a3a55; color: #7aff9a; }
.on-l2 { display: flex; align-items: center; gap: 6px; margin-top: 2px; padding-left: 26px; min-height: 20px; }
.on-wh { flex: 1; min-width: 0; color: var(--metal-muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.on-btns { display: flex; gap: 3px; flex: none; }
.on-sep { margin: 4px 2px 1px; font-size: 11px; color: var(--metal-muted); border-top: 1px solid #ffffff14; padding-top: 3px; }
.on-empty { margin: 8px; color: var(--metal-muted); }
html.phone .hud .minimap .on-badge { font-size: 20px; line-height: 26px; padding: 3px 10px; }
/* P15.3 Clear the Rides: the Russet Weald's open event tally (ui.js ridesHtml), at the top of the quest tracker */
.rides-box { margin: 0 0 10px; padding: 6px 8px 7px; border-radius: 6px; background: linear-gradient(90deg, rgba(120,58,16,.6), rgba(120,58,16,.08)); border-left: 3px solid #e08a3a; }
.rides-box.won { border-left-color: #7adf6a; background: linear-gradient(90deg, rgba(40,90,30,.6), rgba(40,90,30,.08)); }
.rides-box.lost { border-left-color: #9a9a9a; background: linear-gradient(90deg, rgba(60,60,60,.55), rgba(60,60,60,.08)); }
.rides-h { font-weight: bold; color: #ffc070; font-size: 13px; }
.rides-g { font-size: 12px; color: #f0e6d8; }
.rides-g.you { color: #ffe08a; }
.rides-marks { display: flex; gap: 3px; margin: 3px 0 2px; }
.rides-marks i { width: 14px; height: 6px; border-radius: 1px; background: rgba(255,255,255,.18); }
.rides-marks i.dn { background: #e0702a; }
.rides-marks i.ok { background: #7adf6a; }
.rides-pill { display: none; }

/* the potion slot (desktop and browser): just above the left end of the action bars, on its own key; drag a consumable onto it */
.actionbars .potslot { position: absolute; left: -2px; bottom: calc(100% + 6px); width: 48px; height: 48px; border: 2px solid #a08a58; border-radius: 6px;
  background: var(--grain), linear-gradient(#44545c, #1e303b 12%, #111c25 85%, #34434b); box-shadow: inset 0 0 0 2px #071018, 0 4px 10px #0009; overflow: hidden; }
.actionbars .potslot img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); border-radius: 3px; }
.actionbars .potslot.empty img { display: none; }
.actionbars .potslot.empty::before { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 18px; margin: -9px 0 0 -6px; border: 2px solid #8a7a5888; border-radius: 3px 3px 5px 5px; }
.actionbars .potslot.chosen { border-color: #e0c070; }
.actionbars .potslot.drag { box-shadow: inset 0 0 0 2px #071018, 0 0 0 2px #ffe8a088, 0 4px 10px #0009; }
.actionbars .potslot.drop { box-shadow: inset 0 0 0 2px #071018, 0 0 0 3px #ffe8a0, 0 0 14px #ffd06088; }
.actionbars .potslot .pcnt { position: absolute; right: 3px; bottom: 1px; font: 700 12px var(--font-body); color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }

/* ---- LF.5 brass frames (17 Nov 2026): the minimap and the player / target unit frames sit in cast brass, bevelled and
   lit from above, with plain L-shaped corner plates and square studs (no rays, stars, crosses or ring emblems). Static
   CSS only: no images, no animation, so phones pay nothing per frame. */
.hud { --lf-brass: linear-gradient(180deg, #f4dd9c 0%, #d2ae62 20%, #94733a 52%, #b99650 76%, #5a421c 100%);
  --lf-brass-h: linear-gradient(90deg, #6a4e22, #c9a45a 30%, #f0d690 50%, #c9a45a 70%, #6a4e22);
  --lf-stud: linear-gradient(135deg, #fff0bc, #c9a45a 45%, #5a421c);
  --lf-cut: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px); }
/* corner plates: an L of two bars in each corner and a square stud inside it */
.hud .minimap::after, .hud .unit::after {
  content: ''; position: absolute; pointer-events: none;
  --l: 24px; --t: 5px; --s: 6px; --o: 9px;
  background:
    var(--lf-stud) left var(--o) top var(--o) / var(--s) var(--s), var(--lf-stud) right var(--o) top var(--o) / var(--s) var(--s),
    var(--lf-stud) left var(--o) bottom var(--o) / var(--s) var(--s), var(--lf-stud) right var(--o) bottom var(--o) / var(--s) var(--s),
    var(--lf-brass-h) left top / var(--l) var(--t), var(--lf-brass) left top / var(--t) var(--l),
    var(--lf-brass-h) right top / var(--l) var(--t), var(--lf-brass) right top / var(--t) var(--l),
    var(--lf-brass-h) left bottom / var(--l) var(--t), var(--lf-brass) left bottom / var(--t) var(--l),
    var(--lf-brass-h) right bottom / var(--l) var(--t), var(--lf-brass) right bottom / var(--t) var(--l);
  background-repeat: no-repeat;
  filter: drop-shadow(0 1px 1px #000c);
}
/* minimap: a brass bezel round the square plate, a bevelled brass ring on the map, a brass-capped name plate */
.minimap::before {
  border: 4px solid transparent; border-image: var(--lf-brass) 1;
  background: var(--grain), var(--metal);
  box-shadow: inset 0 0 0 1px #2a1c0c, inset 0 0 0 3px #1a262e, inset 0 0 0 4px #a48b5099, inset 0 0 14px #000c;
  left: -4px; right: -4px; height: 218px; /* plus the 4px rim: the same outer height as before, so the notes under it keep their place */
}
.hud .minimap::after { z-index: -1; left: -4px; right: -4px; top: 23px; height: 226px; clip-path: var(--lf-cut); }
.minimap canvas { border-width: 5px; border-style: solid; border-color: #ecd08a #a07e40 #5e4520 #b8944e;
  box-shadow: 0 0 0 1px #1a1208, 0 0 0 2px #f0d69055, 0 6px 16px #0009; }
.zone-name { position: relative; border: 1px solid #6a4e22; border-radius: 1px;
  box-shadow: inset 4px 0 0 #b8944e, inset -4px 0 0 #b8944e, inset 0 1px 0 #f0d69088, inset 0 -1px 0 #0009, 0 2px 4px #0008; }
/* unit frames: the brass rim sits just outside the plate, the plate's own edge stays as the inner line */
.hud .unit::before { content: ''; position: absolute; inset: -4px; pointer-events: none; border: 3px solid transparent;
  border-image: var(--lf-brass) 1; clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
  box-shadow: inset 0 0 0 1px #1a1208; }
.hud .unit::after { inset: -4px; --l: 20px; --t: 4px; --s: 5px; --o: 7px; clip-path: var(--lf-cut); }
.unit .portrait { border-color: #ecd08a #a07e40 #5e4520 #b8944e; border-width: 3px; box-shadow: inset 0 0 0 2px #080f16, 0 0 0 1px #1a1208; }
.unit.elite::before { border-image: linear-gradient(180deg, #fff2c0, #e8c26a 30%, #a07e40 60%, #f0d690) 1; }
@media (max-height: 400px) { html.phone .hud .minimap::before { height: 206px; } html.phone .hud .minimap::after { height: 214px; } }
/* level 42+: the third skill row's tab sits above the bars' top right and can reach the left end, so the potion slot rises above it */
.actionbars .potslot.over3 { bottom: calc(100% + 66px); }
/* LF.6 the Ram Engine (client/game/ramEvent.js): a small brass-rimmed panel at the left, its buttons, and the tracker box */
.ram-panel { position: absolute; left: 12px; top: 38%; width: 232px; padding: 8px 10px 9px; border-radius: 6px; z-index: 4; pointer-events: auto; color: #efe4cc; font-size: 12px;
  background: linear-gradient(180deg, rgba(36,28,20,.92), rgba(22,18,14,.9)); border: 1px solid #a07e40; box-shadow: inset 0 0 0 1px #2a1e10, 0 2px 10px rgba(0,0,0,.5); }
.ram-panel.hidden { display: none; }
.ram-panel .rp-h { font-weight: 700; color: #f2d48a; font-size: 13px; margin-bottom: 5px; display: flex; justify-content: space-between; }
.ram-panel .rp-t { color: #d8c8a8; font-weight: 400; }
.ram-panel .rp-bar { position: relative; height: 14px; margin: 3px 0; background: #1a1410; border: 1px solid #5a4630; border-radius: 3px; overflow: hidden; }
.ram-panel .rp-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #b8643a, #7a3a20); }
.ram-panel .rp-st i { background: linear-gradient(180deg, #c8c0b0, #807a70); }
.ram-panel .rp-bar span { position: relative; padding-left: 5px; font-size: 11px; line-height: 14px; text-shadow: 0 1px 1px #000; }
.ram-panel .rp-w { margin: 4px 0 2px; }
.ram-panel .rp-w b { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.ram-panel .rp-w i { width: 14px; height: 9px; background: #2a2622; border: 1px solid #6a5a44; }
.ram-panel .rp-w i.on { background: #6a6a6e; border-color: #b0a080; }
.ram-panel .rp-s { color: #d8ccb4; line-height: 1.35; margin: 3px 0 6px; }
.ram-panel .rp-s b { color: #8aef7a; font-weight: 600; }
.ram-panel button { font: inherit; color: #f4e8cc; background: linear-gradient(180deg, #4a3a28, #2e2418); border: 1px solid #8a6a3a; border-radius: 4px; padding: 4px 6px; cursor: pointer; }
.ram-panel button:hover { border-color: #e0b860; }
.ram-panel button.on { background: linear-gradient(180deg, #6a5232, #4a3a22); border-color: #f0c870; }
.ram-panel .rp-drive { display: none; grid-template-columns: 1fr 1fr 1fr; gap: 4px; margin-bottom: 5px; }
.ram-panel.drv .rp-drive { display: grid; }
.ram-panel .rp-drive [data-h="f-1"] { grid-column: 2; }
.ram-panel .rp-drive .rp-strike { grid-column: 1 / 4; font-weight: 700; color: #ffd8a0; }
.ram-panel .rp-drive .rp-strike.ready { border-color: #8aef7a; color: #c8ffb8; box-shadow: 0 0 6px rgba(138,239,122,.45); }
.ram-panel .rp-acts { display: flex; flex-direction: column; gap: 4px; }
.ram-panel .rp-keys { margin-top: 6px; font-size: 10.5px; color: #a89878; }
.rides-box.ram-box { border-left-color: #c8a050; background: linear-gradient(90deg, rgba(90,66,30,.62), rgba(90,66,30,.08)); }
.rides-box.ram-box.idle { opacity: .85; }
.ram-pill { display: none; }

/* ================= S6 combat UI (combat_design.md 2.10, 4.5, 6.1): the morphing bar, pill, toast, dodge chip, pins,
   combo counter, poise bar, the Fusion Book and the Skill Web screen. Shapes: rounded rectangles and straight lines only */
.actionbars.kit2 .slot .fzw { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: linear-gradient(90deg, #ffe08a, #fff6d8); box-shadow: 0 0 6px #ffd870; z-index: 3; pointer-events: none; display: none; }
.actionbars.kit2 .slot .fzq { position: absolute; right: 1px; top: 1px; width: 15px; height: 15px; display: none; align-items: center; justify-content: center; font: 800 12px/1 var(--font-head); color: #2a1a06; background: #ffe08a; border-radius: 3px; box-shadow: 0 1px 2px #000; z-index: 5; pointer-events: none; }
.slot.fz { border-color: #ffe08a; }
.actionbars.kit2 .slot.fz .fzw { display: block; }
.slot.fz::before { content: ""; position: absolute; inset: -1px; z-index: 4; pointer-events: none; border-radius: 3px;
  background: linear-gradient(90deg, #fff6c8 0 30%, transparent 30%) 0 0 / 300% 2px no-repeat, linear-gradient(90deg, #fff6c8 0 30%, transparent 30%) 100% 100% / 300% 2px no-repeat,
    linear-gradient(0deg, #fff6c8 0 30%, transparent 30%) 0 100% / 2px 300% no-repeat, linear-gradient(0deg, #fff6c8 0 30%, transparent 30%) 100% 0 / 2px 300% no-repeat;
  box-shadow: inset 0 0 0 2px #e8b84a, 0 0 10px #ffcf5a; animation: fzrun 0.9s linear infinite; }
@keyframes fzrun { 0% { background-position: -100% 0, 200% 100%, 0 200%, 100% -100%; } 100% { background-position: 200% 0, -100% 100%, 0 -100%, 100% 200%; } }
.slot.fz.fz-in { animation: fzpop .22s ease-out; }
@keyframes fzpop { 0% { transform: scale(.82); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.actionbars.kit2 .slot.fz-unk .fzq { display: flex; }
.slot.fz-cool { border-color: #8a9094; box-shadow: inset 0 0 0 2px #9aa2a6, 0 0 0 1px #5a6266; }
.slot.fz-cool img { filter: grayscale(.6) brightness(.8); }
.slot.fz-clean::before { box-shadow: inset 0 0 0 3px #ffffff, 0 0 14px #ffffff; }
.actionbars.kit2 .chpips { position: absolute; left: 3px; bottom: 4px; display: flex; gap: 2px; z-index: 2; pointer-events: none; }
.actionbars.kit2 .chpips i { width: 7px; height: 4px; border-radius: 1px; background: #0009; box-shadow: 0 0 0 1px #f6df9f88; }
.actionbars.kit2 .chpips i.on { background: #ffe08a; box-shadow: 0 0 4px #ffd870; }
.actionbars .dchip { width: 40px; margin-left: 6px; overflow: visible; }
.actionbars .dchip img { object-fit: cover; }
.actionbars .dchip .dpips { position: absolute; left: 0; right: 0; bottom: 3px; display: flex; justify-content: center; gap: 3px; z-index: 2; pointer-events: none; }
.actionbars .dchip .dpips i { width: 8px; height: 5px; border-radius: 1px; background: #0009; box-shadow: 0 0 0 1px #5fe0d099; }
.actionbars .dchip .dpips i.on { background: #5fe0d0; box-shadow: 0 0 5px #5fe0d0; }
/* S10 Six Chambers: two straight rows of six rounds beside the dodge chip (brass when loaded, a warm edge for hot loads) */
.actionbars .rounds { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 6px; pointer-events: none; }
.actionbars .rounds.hidden { display: none; }
.actionbars .rounds .cyl { display: flex; gap: 2px; }
.actionbars .rounds .cyl i { width: 6px; height: 11px; border-radius: 2px; background: #0009; box-shadow: 0 0 0 1px #c8a05066; }
.actionbars .rounds .cyl i.on { background: linear-gradient(#e8c878, #a87c30); box-shadow: 0 0 0 1px #c8a050; }
.actionbars .rounds .cyl i.hot { background: linear-gradient(#ffb070, #c85a20); box-shadow: 0 0 4px #ff8a40; }
.actionbars .rounds.dry .cyl i { box-shadow: 0 0 0 1px #c0605088; }
.actionbars .dchip::before { content: ""; position: absolute; left: -5px; top: 6px; bottom: 6px; width: 2px; background: #a08a5888; }
.actionbars .pins { position: absolute; right: -2px; bottom: calc(100% + 2px); padding: 4px 6px 4px; gap: 4px; border: 2px solid #a08a58; border-bottom: 0; border-radius: 8px 8px 0 0;
  background: var(--grain), linear-gradient(#44545c, #1e303b 40%, #111c25); }
.actionbars .pins .slot { width: 40px; height: 40px; }
.actionbars .pins .slot.empty img { display: none; }
.actionbars .pins .slot.empty .pin-plus { position: absolute; inset: 9px; border: 2px dashed #a08a5899; border-radius: 4px; }
.actionbars .pins .slot.locked img { filter: grayscale(1) brightness(.6); }
.fz-lines { position: absolute; left: 0; right: 0; top: -1px; height: 0; pointer-events: none; z-index: 5; }
.fz-line { position: absolute; top: 0; height: 3px; border-radius: 2px; background: linear-gradient(90deg, transparent, #fff6c8 40%, #ffe08a); box-shadow: 0 0 8px #ffd870; transform-origin: left; animation: fzline .45s ease-out forwards; }
.fz-line.back { transform-origin: right; background: linear-gradient(270deg, transparent, #fff6c8 40%, #ffe08a); }
@keyframes fzline { 0% { transform: scaleX(0); opacity: 1; } 55% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
.fz-pill { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); display: flex; gap: 6px; pointer-events: none; z-index: 6; }
.fz-pill.hidden { display: none; }
.fz-pill span { display: flex; align-items: center; gap: 6px; padding: 3px 12px 3px 4px; border-radius: 12px; font: 700 14px var(--font-head); letter-spacing: .5px; color: #fff4d0;
  background: linear-gradient(#3a2a12f0, #1a120af0); border: 1px solid #e8b84a; box-shadow: 0 2px 8px #000a, 0 0 10px #ffcf5a55; text-shadow: 0 1px 2px #000; white-space: nowrap; }
.fz-pill span i { font: 800 11px var(--font-body); font-style: normal; color: #201b12; background: linear-gradient(#f4dfa3, #b69859); border-radius: 8px; padding: 0 6px; }
.fz-pill span i:empty { display: none; }
.fz-pill span.unk { color: #d8d0c0; border-color: #9a9488; }
.fz-pill span.clean { border-color: #fff; box-shadow: 0 0 12px #fff; }
.fz-pill.pop { animation: fzpill .2s ease-out; }
@keyframes fzpill { 0% { transform: translate(-50%, 6px); opacity: 0; } 100% { transform: translate(-50%, 0); opacity: 1; } }
.fz-toast { position: absolute; left: 50%; bottom: 150px; transform: translate(-50%, 0); text-align: center; pointer-events: none; opacity: 0; z-index: 7; white-space: nowrap; }
.fz-toast b { display: block; font: 700 30px var(--font-head); letter-spacing: 2px; color: #ffe8a8; text-shadow: 0 2px 0 #3a2008, 0 0 14px #ffb83a, 0 0 2px #000; }
.fz-toast small { display: block; font: 700 13px var(--font-head); letter-spacing: 3px; text-transform: uppercase; color: #9ae8de; text-shadow: 0 1px 2px #000; }
.fz-toast.on { animation: fztoast .9s ease-out forwards; }
.fz-toast.on.new { animation: fztoastnew 2.4s ease-out forwards; }
@keyframes fztoast { 0% { opacity: 0; transform: translate(-30%, 0); } 14% { opacity: 1; transform: translate(-50%, 0); } 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -6px); } }
@keyframes fztoastnew { 0% { opacity: 0; transform: translate(-30%, 0); } 6% { opacity: 1; transform: translate(-50%, 0); } 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }
.target-frame .combo { position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%); white-space: nowrap; font: 700 15px var(--font-head); color: #e1e9e8; text-shadow: 0 1px 2px #000, 0 0 6px #000; opacity: 0; transition: opacity .3s; pointer-events: none; }
.target-frame .combo b { font-size: 26px; color: #ffe8a8; margin-right: 4px; }
.target-frame .combo.on { opacity: 1; }
.target-frame .combo.bump b { display: inline-block; animation: combobump .16s ease-out; }
@keyframes combobump { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }
.target-frame .bar.poise { height: 6px; margin-top: 2px; background: #0b131a; border: 1px solid #00000099; position: relative; overflow: visible; }
.target-frame .bar.poise.hidden { display: none; }
.target-frame .bar.poise i { display: block; height: 100%; background: linear-gradient(#d8dcdc, #8a9294); transition: width .15s; }
.target-frame .bar.poise span { position: absolute; right: 2px; top: 6px; font: 700 10px var(--font-head); letter-spacing: 1px; color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; text-transform: uppercase; }
.target-frame .bar.poise.stag span { color: #ffe08a; }
.target-frame .bar.poise.broken span { color: #ff9a70; }
.target-frame .bar.poise.flash { animation: poiseflash .45s ease-out; }
@keyframes poiseflash { 0% { background: #fff; box-shadow: 0 0 10px #fff; } 100% { background: #0b131a; box-shadow: none; } }
/* the Skills window tabs and the Fusion Book */
.sk-tabs { display: flex; gap: 6px; margin: 0 0 8px; }
.window .sk-tabs button { flex: 1; background: linear-gradient(#3a4a52, #1e2a32); color: #c8d4d6; box-shadow: none; border-color: #4a5a62; }
.window .sk-tabs button.on { background: linear-gradient(180deg, #ffe08a, #c8902a); color: #2a1a06; }
.w-skills.w-book .wb { width: 620px; max-height: min(74vh, 640px); overflow-y: auto; }
.fz-book2 .fb-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.fz-book2 .fb-head b { font: 700 17px var(--font-head); color: var(--brass); }
.fz-book2 .fb-head span { color: #9ae8de; font-weight: 700; }
.fz-book2 .fb-head em { flex-basis: 100%; color: var(--metal-muted); font-size: 12px; }
.fb-row { display: flex; gap: 10px; padding: 8px; margin-bottom: 6px; border: 1px solid #5a4a2a; border-radius: 6px; background: linear-gradient(#2a221688, #14100a88); }
.fb-row.unk { opacity: .8; background: repeating-linear-gradient(135deg, #2a2a2a55 0 8px, #22222255 8px 16px); border-color: #555; align-items: center; }
.fb-prev { flex: 0 0 176px; height: 112px; border-radius: 4px; border: 1px solid #000; box-shadow: 0 0 0 1px #a08a58; background-size: 1760px 112px; background-repeat: no-repeat; animation: fbplay 1.6s steps(10) infinite; }
.fb-prev.still { animation: none; display: flex; align-items: center; justify-content: center; background: #0b131a; }
.fb-prev.still img { width: 96px; height: 96px; }
@keyframes fbplay { from { background-position: 0 0; } to { background-position: -1760px 0; } }
.fb-b { flex: 1; min-width: 0; font-size: 13px; }
.fb-t { display: flex; align-items: center; gap: 8px; }
.fb-t b { font: 700 16px var(--font-head); color: #ffe8a8; }
.fb-ic { width: 30px; height: 30px; border-radius: 3px; border: 1px solid #000; }
.fb-rank { font: 700 11px var(--font-body); padding: 1px 6px; border-radius: 8px; background: #3a4a52; color: #e1e9e8; }
.fb-rank.r3 { background: linear-gradient(#ffe08a, #c8902a); color: #2a1a06; }
.fb-tri { font: 700 11px var(--font-body); padding: 1px 6px; border-radius: 8px; background: #5a2a1a; color: #ffd0b0; }
.fb-in { display: flex; align-items: center; gap: 8px; margin: 4px 0; color: #c8d4d6; }
.fb-ins { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.fb-ins img { width: 26px; height: 26px; border-radius: 3px; border: 1px solid #000; }
.fb-row.unk .fb-ins img { width: 36px; height: 36px; filter: grayscale(.8); }
.fb-then { width: 12px; height: 2px; background: #a08a58; position: relative; }
.fb-then::after { content: ""; position: absolute; right: -1px; top: -3px; border: 4px solid transparent; border-left: 5px solid #a08a58; border-right: 0; }
.fb-d { color: #e1e9e8; margin: 2px 0 4px; }
.fb-m { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--metal-muted); font-size: 12px; }
.fb-x { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.fb-x span { font-size: 11px; padding: 1px 6px; border-radius: 8px; border: 1px solid #5a6a72; color: #a3b6bc; }
.fb-x span.on { border-color: #e8b84a; color: #ffe8a8; }
.fb-g { color: #c8c0b0; }
.fb-h { color: #9ae8de; font-style: italic; margin-top: 2px; }
.fb-l { color: #d8a070; font-size: 12px; margin-top: 4px; }
.fb-row.unk b { font: 700 14px var(--font-head); color: #c8c0b0; }
.fb-pins { display: flex; gap: 6px; margin-top: 6px; }
.window .fb-pins button { padding: 3px 10px; font-size: 12px; }
.window .fb-pins button.on { background: linear-gradient(#5fe0d0, #246e70); color: #031414; }
/* the Skill Web screen: full screen over the game */
.window.w-web { position: fixed; inset: 0; left: 0 !important; top: 0 !important; width: 100vw; height: 100vh; max-width: none; border: 0; border-radius: 0; z-index: 60; display: flex; flex-direction: column; background: #1a140c; }
.w-web .ws-top { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 10px; background: linear-gradient(#3a2a14, #22180c); border-bottom: 2px solid #8a6a30; }
.w-web .ws-title { font: 700 18px var(--font-head); color: var(--brass); letter-spacing: 1px; }
.w-web .ws-pts { color: #e1e9e8; font-size: 13px; }
.w-web .ws-pts b { color: #c8c0b0; font-size: 16px; }
.w-web .ws-pts b.free { color: #9ae8de; }
.w-web .ws-pts em { color: #9ae8de; }
.w-web .ws-search { width: 170px; padding: 5px 8px; border-radius: 4px; border: 1px solid #8a6a30; background: #120d08; color: #f3e2bf; font: 13px var(--font-body); }
.w-web .ws-sets { display: flex; gap: 4px; }
.w-web .ws-sp { flex: 1; }
.window.w-web .ws-top button { padding: 5px 12px; }
.window.w-web .ws-set { background: linear-gradient(#3a4a52, #1e2a32); color: #c8d4d6; box-shadow: none; }
.window.w-web .ws-set.on { background: linear-gradient(180deg, #ffe08a, #c8902a); color: #2a1a06; }
.window.w-web button:disabled { opacity: .45; cursor: default; }
.window.w-web .ws-apply.hot { background: linear-gradient(#7ff0e0, #2a8a80); color: #031414; box-shadow: 0 0 10px #5fe0d0aa; }
.window.w-web .ws-reset { background: linear-gradient(#6a3a2a, #3a1a10); color: #ffd0b0; }
.window.w-web .wx { position: static; }
.w-web .ws-sug { position: relative; }
.w-web .ws-sugl { position: absolute; top: calc(100% + 6px); left: 0; z-index: 5; width: 320px; display: flex; flex-direction: column; gap: 4px; padding: 6px; background: #1a140cf4; border: 1px solid #8a6a30; border-radius: 6px; box-shadow: 0 6px 18px #000a; }
.w-web .ws-sugl.hidden { display: none; }
.window.w-web .ws-sugl button { text-align: left; display: flex; flex-direction: column; gap: 2px; }
.w-web .ws-sugl button span { font: 400 12px var(--font-body); color: #3a2a10; }
.w-web .ws-cv { flex: 1; width: 100%; min-height: 0; display: block; touch-action: none; cursor: grab; }
.w-web .ws-zoom { position: absolute; right: 12px; bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.window.w-web .ws-zoom button { min-width: 44px; min-height: 36px; padding: 4px 8px; }
.w-web .ws-legend { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: #1a140ccc; color: #e1e9e8; font-size: 12px; pointer-events: none; }
.w-web .ws-legend i { width: 14px; height: 10px; border-radius: 3px; margin-left: 6px; }
.w-web .lg-held { background: #ffe08a; }
.w-web .lg-staged { background: #9ee0d4; }
.w-web .lg-reach { background: #c9bb98; box-shadow: 0 0 0 1px #7a5a26; }
.w-web .lg-lock { background: #a7a08f; }
.w-web .ws-card { position: absolute; z-index: 4; width: 300px; padding: 10px 12px; background: linear-gradient(#24333df4, #111c25f4); border: 1px solid #a08a58; border-radius: 6px; box-shadow: 0 8px 22px #000b; font-size: 13px; color: #e1e9e8; pointer-events: none; }
.w-web .ws-card.hidden { display: none; }
.w-web .ws-card.sheet { pointer-events: auto; left: 50% !important; top: auto !important; bottom: 0; transform: translateX(-50%); width: min(560px, 96vw); max-height: 52vh; overflow-y: auto; border-radius: 10px 10px 0 0; }
.w-web .wc-h b { display: block; font: 700 16px var(--font-head); color: var(--brass); }
.w-web .wc-h span { color: var(--metal-muted); font-size: 12px; }
.w-web .wc-d { margin-top: 6px; }
.w-web .wc-price { margin-top: 4px; color: #ff9a70; }
.w-web .wc-ren { margin-top: 4px; color: #ffe8a8; }
.w-web .wc-sk { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: #c8d4d6; }
.w-web .wc-sk img { width: 26px; height: 26px; border-radius: 3px; }
.w-web .wc-opt { margin-top: 6px; padding: 5px 7px; border-radius: 4px; border: 1px solid #4a5a62; }
.w-web .wc-opt.on { border-color: #e8b84a; background: #3a2a1255; }
.w-web .wc-opt em { color: #9ae8de; font-style: normal; font-size: 11px; }
.w-web .wc-fz { margin-top: 6px; color: #9ae8de; }
.w-web .wc-own { margin-top: 6px; color: #ffe08a; font-weight: 700; }
.w-web .wc-own.st { color: #9ee0d4; }
.w-web .wc-path { margin-top: 6px; color: #9ae8de; font-weight: 700; }
.w-web .wc-path.short { color: #ff9a70; }
.w-web .wc-hint { margin-top: 6px; color: var(--metal-muted); font-size: 11px; }
.w-web .wc-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.window.w-web .wc-btns button, .window.w-web .wc-form { min-height: 44px; padding: 6px 14px; margin-top: 4px; }

/* CR.9 Skill Web art pass: an inked map on a dark table; the bar, legend, zoom and card dressed to match the framed nodes */
.window.w-web { background: #1b130b; }
.w-web .ws-top { background: linear-gradient(#3e2c14, #1f160b); border-bottom: 0; box-shadow: 0 2px 0 #a07c38, 0 3px 0 #2a1c0a, 0 6px 14px #000a; position: relative; z-index: 3; }
.w-web .ws-title { font: 800 19px Cinzel, var(--font-head); color: #f6d488; letter-spacing: 2px; text-shadow: 0 1px 0 #000, 0 0 10px #c8902a66; }
.w-web .ws-pts b.free { color: #8ff4e4; text-shadow: 0 0 8px #3fe0cc88; }
.w-web .ws-search { background: #120d08; border: 1px solid #a07c38; box-shadow: inset 0 1px 3px #000c; }
.w-web .ws-search:focus { outline: none; border-color: #3fe0cc; box-shadow: inset 0 1px 3px #000c, 0 0 8px #3fe0cc66; }
.w-web .ws-sugl { background: linear-gradient(#2a1e10f6, #160f08f6); border-color: #a07c38; }
.w-web .ws-sugl button span { color: #3a2a10; }
.w-web .ws-cv:active { cursor: grabbing; }
.w-web .ws-legend { background: linear-gradient(#2a1e10e6, #160f08e6); border: 1px solid #a07c38; box-shadow: 0 3px 10px #0009; color: #f0e2c0; font: 600 12px var(--font-body); padding: 5px 12px; }
.w-web .ws-legend i { width: 13px; height: 13px; border-radius: 3px; margin-left: 8px; border: 2px solid #3a2410; }
.w-web .ws-legend i:first-child { margin-left: 0; }
.w-web .lg-held { background: linear-gradient(135deg, #fff1b8, #d9a23a); box-shadow: 0 0 6px #ffc450; }
.w-web .lg-staged { background: linear-gradient(135deg, #d2fbf2, #4fb3a6); box-shadow: 0 0 6px #50e6d2; border-color: #0a3430 !important; }
.w-web .lg-reach { background: linear-gradient(135deg, #f2e6c4, #cdb88a); box-shadow: none; border-color: #8a6a34 !important; }
.w-web .lg-lock { background: linear-gradient(135deg, #b4ab98, #6a6052); }
.window.w-web .ws-zoom button { background: linear-gradient(#4a3518, #24180a); color: #f6d488; border: 1px solid #a07c38; box-shadow: 0 2px 6px #0009; font: 800 16px Cinzel, var(--font-head); }
.window.w-web .ws-zoom button[data-z="0"] { font-size: 12px; }
.w-web .ws-card { background: linear-gradient(#2c2112f6, #170f07f6); border: 1px solid #c8a050; box-shadow: 0 0 0 1px #3a2410, 0 10px 26px #000c; color: #f0e4c8; }
.w-web .ws-card .wc-h { padding-bottom: 5px; margin-bottom: 2px; border-bottom: 1px solid #c8a05055; }
.w-web .ws-card .wc-h b { font-family: Cinzel, var(--font-head); color: #f6d488; letter-spacing: .5px; }
.w-web .ws-card .wc-h span { color: #c8b48a; }
.w-web .ws-card .wc-opt { border-color: #6a5430; background: #0000001f; }

/* (owner 20 Nov) character slots on the login screen: empty slots invite a new character */
.login .char-new { opacity: .78; border-style: dashed !important; }
.login .char-new:hover, .login .char-new.on { opacity: 1; }
.char-plus { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 4px; border: 1px dashed #8a6a3a; color: #e8c26a; font: 700 20px var(--font-head); }
/* Leave dungeon (under the minimap while inside a dungeon or raid; a second press confirms) */
.leave-dg { display: block; margin: 5px auto 0; padding: 3px 10px; font-size: 12px; color: #ffe0b0; background: rgba(40, 18, 10, 0.86); border: 1px solid #a0603a; border-radius: 4px; cursor: pointer; text-shadow: 0 1px 2px #000; pointer-events: auto; }
.leave-dg:hover { background: rgba(70, 30, 14, 0.92); }
.leave-dg.arm { color: #fff; background: rgba(120, 40, 20, 0.95); border-color: #ff8a50; }
.leave-dg.hidden { display: none; }

/* ======================================================================
   UPDATE CHECK (client/game/update.js): Update required (blocks play) and the New version note
   ====================================================================== */
.upd-shade {
  position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center;
  padding: 16px; box-sizing: border-box; overflow-y: auto;
  background: radial-gradient(ellipse at center, rgba(16,25,32,.82), rgba(4,7,10,.96));
  backdrop-filter: blur(3px); font-family: var(--font-body); pointer-events: auto;
}
.upd-panel {
  position: relative; width: min(470px, 100%); box-sizing: border-box; margin: auto; padding: 26px 28px 20px; text-align: center;
  background: var(--grain), var(--metal); color: var(--metal-text);
  border: 2px solid var(--brass-edge); border-radius: 2px;
  box-shadow: 0 16px 44px #000c, inset 0 1px 0 #e0eff047, inset 0 -2px 0 #000b, inset 0 0 0 4px var(--frame), inset 0 0 0 5px var(--engraving);
}
.upd-panel::before, .upd-panel::after {
  content: ''; position: absolute; width: 13px; height: 13px; border: solid var(--brass); pointer-events: none;
}
.upd-panel::before { top: -2px; left: -2px; border-width: 2px 0 0 2px; }
.upd-panel::after { bottom: -2px; right: -2px; border-width: 0 2px 2px 0; }
.upd-kicker { font: 700 13px var(--font-head); letter-spacing: 6px; text-transform: uppercase; color: #b7d4d4; }
.upd-title { margin-top: 4px; font: 800 34px var(--font-head); letter-spacing: 2px; color: var(--brass-light); text-shadow: 0 1px 0 #fff8, 0 3px 0 #685637, 0 6px 18px #000; }
.upd-rule { height: 3px; margin: 12px auto 14px; width: 80%; background: linear-gradient(90deg, transparent, var(--brass-edge) 18%, var(--teal) 50%, var(--brass-edge) 82%, transparent); }
.upd-sub { margin: 0 0 10px; font-size: 16px; line-height: 1.4; }
.upd-notes { margin: 0 0 12px; padding: 8px 10px; font-size: 13.5px; line-height: 1.4; color: #c9d6d6; text-align: left; background: rgba(6,12,16,.55); border: 1px solid #3b4b52; border-radius: 2px; }
.upd-go {
  display: block; width: 100%; margin: 6px 0 12px; padding: 13px 10px; cursor: pointer;
  font: 800 18px var(--font-head); letter-spacing: 2px; color: #1a252b; text-shadow: 0 1px 0 #fff4;
  background: linear-gradient(180deg, #f4d991, #cfac60 48%, #9e7b3d); border: 1px solid var(--brass-light); border-radius: 2px;
  box-shadow: inset 0 1px 0 #fff9, inset 0 0 0 2px #6b552f80, inset 0 -3px 0 #72572e, 0 4px 10px #0009;
}
.upd-go:hover { border-color: var(--teal); box-shadow: inset 0 1px 0 #fff9, inset 0 -3px 0 #72572e, 0 0 12px #e8c26a55; }
.upd-go:active { transform: translateY(1px); }
.upd-how { margin: 0; font-size: 13px; line-height: 1.4; color: #b6c7ca; }
.upd-status { margin: 8px 0 0; min-height: 1em; font-size: 13px; color: var(--teal); }
.upd-note {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 99999; max-width: calc(100vw - 32px); box-sizing: border-box;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 8px 12px;
  font: 14px var(--font-body); color: var(--metal-text); background: var(--grain), var(--metal);
  border: 1px solid var(--brass-edge); border-radius: 2px; box-shadow: 0 8px 20px #000a, inset 0 0 0 3px var(--frame), inset 0 0 0 4px var(--engraving);
}
.upd-note b { font: 700 14px var(--font-head); color: var(--brass-light); letter-spacing: 1px; }
.upd-note button { cursor: pointer; padding: 5px 12px; font: 700 13px var(--font-head); border-radius: 2px; border: 1px solid var(--brass-edge); color: var(--brass-light); background: linear-gradient(#394650, #15212b); }
.upd-note .upd-dl { color: #1a252b; background: linear-gradient(180deg, #f4d991, #cfac60 48%, #9e7b3d); border-color: var(--brass-light); }
/* phones held sideways: a shorter panel that still fits without scrolling */
html.mobile .upd-panel { padding: 14px 20px 12px; }
html.mobile .upd-title { font-size: 26px; }
html.mobile .upd-rule { margin: 8px auto 10px; }
html.mobile .upd-sub { font-size: 15px; margin-bottom: 8px; }
html.mobile .upd-notes { margin-bottom: 8px; font-size: 13px; }
html.mobile .upd-go { min-height: 48px; margin: 4px 0 8px; }
