* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #14161f; color: #eef; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; overflow: hidden; }
[hidden] { display: none !important; }
a { color: #9cf; }
button { font: inherit; cursor: pointer; }

/* sign in */
.gate { position: fixed; inset: 0; display: grid; place-items: center; overflow: auto; padding: 16px;
  background: radial-gradient(circle at 30% 20%, #2c3a63 0, #14161f 60%); }
.card { width: min(460px, 100%); background: #1e2233; border: 1px solid #343a55; border-radius: 14px; padding: 22px; box-shadow: 0 10px 40px #0008; }
.card h1 { margin: 0 0 2px; font-size: 24px; }
.beta { font-size: 11px; background: #f5b93a; color: #222; padding: 2px 6px; border-radius: 6px; vertical-align: middle; }
.pitch { margin: 0 0 14px; color: #aab; font-style: italic; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button { flex: 1; padding: 8px; border-radius: 8px; border: 1px solid #3a4160; background: #262b40; color: #ccd; }
.tabs button.on { background: #3d4ea0; color: #fff; border-color: #5568c8; }
form label { display: block; margin: 8px 0; color: #cdd; font-size: 13px; }
form label small { color: #889; }
form input:not([type=checkbox]):not([type=radio]) { display: block; width: 100%; margin-top: 3px; padding: 8px 10px; border-radius: 8px; border: 1px solid #3a4160; background: #12141d; color: #fff; font: inherit; }
.row { display: flex; gap: 10px; } .row > * { flex: 1; }
label.check { display: flex; gap: 8px; align-items: flex-start; }
label.check input { margin-top: 3px; }
.bodies { display: flex; gap: 10px; margin: 6px 0; }
.bodypick { flex: 1; display: flex !important; align-items: center; gap: 8px; border: 1px solid #3a4160; border-radius: 10px; padding: 6px 10px; background: #12141d; }
.bodypick:has(input:checked) { border-color: #f5b93a; background: #2a2516; }
.bodypick img { image-rendering: auto; }
.primary { width: 100%; margin-top: 10px; padding: 10px; border: 0; border-radius: 10px; background: linear-gradient(#f7c552, #e09a20); color: #231a05; font-weight: 700; font-size: 15px; }
.primary:disabled { opacity: .6; }
.err { color: #ff8a8a; min-height: 1.2em; margin: 8px 0 0; }
.fine { color: #889; font-size: 12px; margin: 6px 0 0; }
.links { text-align: center; margin: 10px 0 0; color: #889; }

/* game */
.game, .stage { position: fixed; inset: 0; }
.stage canvas { display: block; }
.hud { position: fixed; z-index: 5; pointer-events: none; }
.hud .btn, .hud button { pointer-events: auto; }
.tl { top: 10px; left: 10px; background: #0009; padding: 8px 12px; border-radius: 10px; min-width: 200px; }
.hudname { font-weight: 700; } .hudname .tag { color: #f5c96a; font-weight: 600; margin-right: 4px; } .hudname .lv { color: #9cf; margin-right: 6px; }
.xpbar { height: 6px; background: #333a; border-radius: 3px; margin: 5px 0 3px; overflow: hidden; }
#xpFill { height: 100%; width: 0; background: linear-gradient(90deg, #5bd17a, #c6f36b); transition: width .4s; }
.hudxp { font-size: 11px; color: #bbc; }
/* v0.53.0 (Jay 21:31) HP + mana bars over the XP bar, top-left */
.tlbar { position: relative; height: 12px; background: #333a; border-radius: 4px; margin: 4px 0 0; overflow: hidden; }
.tlbar > div { height: 100%; width: 100%; transition: width .2s; }
.tlbar.hp > div { background: linear-gradient(90deg, #c0392b, #ff6b5a); }
.tlbar.mp > div { background: linear-gradient(90deg, #2463c9, #5aa8ff); }
.tlbar span { position: absolute; inset: 0; font: 700 9px/12px system-ui, sans-serif; color: #fff; text-align: center; text-shadow: 0 1px 2px #000; }
body.touch .tl .tlbar { height: 9px; } body.touch .tl .tlbar span { font-size: 8px; line-height: 9px; }
.tr { top: 10px; right: 10px; display: flex; gap: 6px; }
.pill { background: #0009; color: #dde; border: 1px solid #fff2; padding: 5px 10px; border-radius: 999px; font-size: 12px; }
.menu { position: fixed; z-index: 8; top: 46px; right: 10px; display: flex; flex-direction: column; background: #1e2233f2; border: 1px solid #3a4160; border-radius: 10px; overflow: hidden; min-width: 230px; }
.menu > * { text-align: left; padding: 10px 14px; border: 0; background: none; color: #dde; text-decoration: none; border-bottom: 1px solid #fff1; }
.menu > *:hover { background: #fff1; }
.chat { position: fixed; z-index: 6; left: 10px; bottom: 10px; width: min(420px, calc(100% - 20px)); }
.chatlog { max-height: 190px; overflow-y: auto; background: #0008; border-radius: 10px 10px 0 0; padding: 6px 10px; font-size: 13px; scrollbar-width: thin; }
.chatlog .m { margin: 2px 0; word-wrap: break-word; }
.chatlog .who { font-weight: 700; color: #cde; cursor: pointer; } .chatlog .who:hover { text-decoration: underline; }
.chatlog .tg { color: #f5c96a; font-size: 11px; margin-right: 3px; }
.chatlog .sys { color: #f5c96a; font-style: italic; }
.chatlog .mod .who { color: #7fe3ff; }
#chatForm input { width: 100%; padding: 8px 10px; border: 1px solid #fff2; border-radius: 0 0 10px 10px; background: #000a; color: #fff; font: inherit; outline: none; }
#chatForm input:focus { border-color: #f5b93a; }
.pmenu { position: fixed; z-index: 9; background: #1e2233; border: 1px solid #3a4160; border-radius: 10px; overflow: hidden; min-width: 170px; box-shadow: 0 6px 20px #0008; }
.pmenu .h { padding: 8px 12px; font-weight: 700; border-bottom: 1px solid #fff1; }
.pmenu button { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; background: none; color: #dde; }
.pmenu button:hover { background: #fff1; }
.toast { position: fixed; z-index: 10; top: 60px; left: 50%; transform: translateX(-50%); background: #000c; padding: 10px 16px; border-radius: 10px; border: 1px solid #f5b93a66; }
.dialog { position: fixed; inset: 0; z-index: 50;   /* v0.31.10 (Jay) above the PvP pick screen (45) so 🎒 My bag shows on top */ display: grid; place-items: center; background: transparent; }   /* v0.109.4 (Jay, Nov 21 04:26: "the background darkens when it opens. make sure we remove those"): no dim. The see-through layer still catches every click, so nothing reaches the world behind a window (v0.72.0) */
.dcard { width: min(420px, calc(100% - 24px)); background: #1e2233; border: 1px solid #3a4160; border-radius: 14px; padding: 18px; }
.dcard h2 { margin: 0 0 8px; font-size: 18px; }
.dcard input, .dcard textarea { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid #3a4160; background: #12141d; color: #fff; font: inherit; }
.dcard .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.dcard .acts button { padding: 8px 14px; border-radius: 8px; border: 1px solid #3a4160; background: #262b40; color: #dde; }
.dcard .acts button.go { background: #f5b93a; color: #231a05; border: 0; font-weight: 700; }
.dcard .srow button { padding: 4px 12px; border-radius: 7px; border: 1px solid #3a4160; background: #262b40; color: #dde; cursor: pointer; }
.dcard .srow button.go, .dcard .lk button.go { background: #f5b93a; color: #231a05; border: 0; font-weight: 700; }
.dcard button:disabled { opacity: .45; cursor: default; }
.dcard kbd { background: #333; border-radius: 4px; padding: 1px 5px; font-size: 12px; }
@media (max-width: 600px) { .tl { min-width: 0; } .chatlog { max-height: 120px; } }

/* v0.8.6 🎒 Character & bag */
.dcard.wide { width: min(720px, calc(100% - 24px)); max-height: calc(100vh - 40px); overflow: auto; }
.bagtop { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 10px; font-size: 14px; }
.bagtop b { color: #f5b93a; }
.worn { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 6px 0 12px; }
.slot { display: flex; gap: 8px; align-items: center; background: #12141d; border: 1px solid #3a4160; border-radius: 10px; padding: 6px 8px; min-height: 46px; font-size: 12px; }
.slot.empty { opacity: .55; }
.slot .sl { color: #99a; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.ico { width: 34px; height: 34px; flex: none; border-radius: 8px; background: #262b40; display: grid; place-items: center; font-size: 18px; image-rendering: auto; }
.ico img { width: 34px; height: 34px; object-fit: contain; }
.baggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.r-common { border-color: #4a5170; } .r-uncommon { border-color: #3f9b5a; } .r-rare { border-color: #3b7bd6; } .r-epic { border-color: #9b5ad6; } .r-legendary { border-color: #e0a030; }
.bagnote { font-size: 12px; color: #aab; margin-top: 10px; }
.stats { font-size: 11px; color: #bbc; }

/* v0.8.7 hover + 🎡 roulette */
.roul { position: fixed; inset: 0; z-index: 18; display: grid; place-items: center; background: #0a0c14c8; }
.rcard { width: min(760px, calc(100% - 24px)); background: #1e2233; border: 1px solid #3a4160; border-radius: 16px; padding: 18px 20px; text-align: center; }
.rcard h2 { margin: 0 0 4px; font-size: 20px; color: #f5b93a; }
.rcols { display: grid; grid-template-columns: 1fr 220px 1fr; gap: 14px; align-items: start; margin-top: 12px; }
.rteam { background: #12141d; border: 1px solid #3a4160; border-radius: 12px; padding: 10px; min-height: 160px; transition: border-color .4s, background .4s; }
.rteam h3 { margin: 0 0 8px; font-size: 14px; color: #ccd; }
.rteam.t1 { border-color: #3b7bd6; background: #13203a; } .rteam.t2 { border-color: #d65a4a; background: #2e1616; }
.rname { padding: 6px 8px; margin: 4px 0; border-radius: 8px; background: #262b40; font-weight: 700; animation: rin .45s ease-out; }
@keyframes rin { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.rwheel { height: 160px; overflow: hidden; position: relative; border-radius: 12px; background: #12141d; border: 2px solid #f5b93a; }
.rwheel::before, .rwheel::after { content: ''; position: absolute; left: 0; right: 0; height: 52px; z-index: 1; pointer-events: none; }
.rwheel::before { top: 0; background: linear-gradient(#12141d, #12141d00); } .rwheel::after { bottom: 0; background: linear-gradient(#12141d00, #12141d); }
.rstrip { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.rstrip div { height: 40px; line-height: 40px; font-weight: 700; color: #dde; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
.rwheel .rmark { position: absolute; left: 6px; right: 6px; top: 60px; height: 40px; border: 2px solid #f5b93a; border-radius: 8px; z-index: 2; }
.rstatus { margin-top: 10px; min-height: 22px; color: #ccd; font-size: 14px; }
.coin { width: 110px; height: 110px; margin: 22px auto 0; position: relative; transform-style: preserve-3d; }
.coin .f { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; font-size: 34px; font-weight: 800; backface-visibility: hidden; border: 4px solid #a8781c; background: #f5b93a; color: #3a2606; }
.coin .b { transform: rotateY(180deg); }
.coin.spin { animation: flip var(--coin-ms, 2.6s) cubic-bezier(.2,.7,.25,1) forwards; }
@keyframes flip { from { transform: rotateY(0) translateY(0); } 45% { transform: rotateY(calc(var(--turns) * .55)) translateY(-40px); } to { transform: rotateY(var(--turns)) translateY(0); } }
.rpick { text-align: left; max-height: 260px; overflow: auto; margin: 8px 0; }
.rpick label { display: block; padding: 3px 0; }

/* v0.9.0 combat UI */
.targetbox { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 6; min-width: 240px; background: #1e2233e6; border: 1px solid #3a4160; border-radius: 12px; padding: 6px 12px; text-align: center; font-size: 13px; }
.targetbox .tbar { height: 8px; background: #12141d; border-radius: 4px; overflow: hidden; margin: 4px 0 2px; }
.targetbox .tbar div { height: 100%; background: #e0574a; transition: width .15s; }
.mini { position: fixed; right: 12px; top: 52px; z-index: 5; border: 2px solid #3a4160; border-radius: 10px; background: #12141d; cursor: pointer; box-shadow: 0 4px 16px #0006; }
.mini[hidden] { display: none; }
body.armed #stage canvas { cursor: url(/play/art/cursors/cursor_attack.png) 1 1, crosshair !important; }
.keys { width: 100%; border-collapse: collapse; margin: 6px 0; } .keys td { padding: 4px 2px; } .keys td:last-child { text-align: right; }
.kb { min-width: 90px; padding: 5px 10px; border-radius: 8px; border: 1px solid #3a4160; background: #262b40; color: #fff; font-weight: 700; cursor: pointer; }
.dcard input[type=checkbox], .dcard input[type=radio] { width: auto; padding: 0; margin-right: 6px; vertical-align: middle; }

/* v0.9.1 ability bar */
.abar { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 6; display: flex; gap: 6px; padding: 6px 8px; background: #1e2233e6; border: 1px solid #3a4160; border-radius: 14px; }
.ab { position: relative; width: 46px; height: 46px; border-radius: 10px; background: #262b40; border: 1px solid #4a5170; display: grid; place-items: center; user-select: none; }
.ab.gap { margin-left: 10px; }
.ab .ai { font-size: 22px; line-height: 1; }
.ab .ak { position: absolute; left: 3px; top: 1px; font-size: 10px; font-weight: 800; color: #f5b93a; }
.ab .acd { position: absolute; inset: 0; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; background: conic-gradient(#000a var(--p, 0deg), #0002 0); }
.ab.off { opacity: .4; }
.ab.press { transform: scale(.92); } .ab.nope { border-color: #e0574a; }
.ab.wpn { width: auto; padding: 0 10px; margin-left: 10px; display: flex; gap: 6px; } .ab.wpn .an { font-size: 12px; font-weight: 700; color: #dde; }
@media (max-width: 900px) { .abar { bottom: auto; top: 60px; } }
.slot .eq { margin-left: auto; padding: 3px 8px; border-radius: 7px; border: 1px solid #4a5170; background: #2e3550; color: #fff; font-weight: 700; font-size: 11px; cursor: pointer; }
.slot .eq[data-on='1'] { background: #f5b93a; color: #231a05; border: 0; }
@media (min-width: 1100px) { .abar { transform: translateX(calc(-50% + 130px)); } }

/* v0.9.1 dock + tooltips */
.dock { position: fixed; right: 12px; bottom: 12px; z-index: 6; display: flex; flex-direction: column; gap: 6px; padding: 6px; background: #1e2233e6; border: 1px solid #3a4160; border-radius: 14px; }
.dock button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid #4a5170; background: #262b40; font-size: 19px; cursor: pointer; }
.dock button:hover, .ab:hover { border-color: #f5b93a; background: #2e3550; }
.dock button.on { border-color: #f5b93a; }
.tip { position: fixed; z-index: 80;   /* v0.53.0 (Jay) above the bag window (.azwin 55) and dialogs (50); loading screen stays on top */ max-width: 260px; pointer-events: none; background: #12141df2; border: 1px solid #f5b93a88; border-radius: 10px; padding: 8px 10px; font-size: 12px; color: #dde; box-shadow: 0 6px 20px #0008; }
.tip b { display: block; color: #fff3c4; font-size: 13px; margin-bottom: 2px; } .tip kbd { background: #333; border-radius: 4px; padding: 0 5px; color: #f5b93a; font-weight: 700; }
.tip .stat { color: #9fe0a8; } .tip .bad { color: #ff9a8a; }
.ab[data-slot] { cursor: pointer; }
.slot.has { cursor: default; } .slot.can { cursor: pointer; } .slot.can:hover { border-color: #f5b93a; }
.qs { position: fixed; left: 50%; top: 90px; transform: translateX(-50%); z-index: 7; width: min(520px, calc(100% - 24px)); background: #1e2233f2; border: 1px solid #f5b93a88; border-radius: 14px; padding: 12px 16px; font-size: 13px; }
.qs h3 { margin: 0 0 6px; color: #f5b93a; font-size: 15px; } .qs ul { margin: 0 0 8px 18px; padding: 0; } .qs li { margin: 3px 0; }

.mana { position: relative; width: 70px; height: 46px; margin-left: 10px; border-radius: 10px; background: #12141d; border: 1px solid #3a4160; overflow: hidden; align-self: center; }
.mana #manaFill { position: absolute; left: 0; bottom: 0; top: 0; background: linear-gradient(#4d8cff, #2a5bd6); transition: width .2s; }
.mana #manaTxt { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 13px; text-shadow: 0 1px 2px #000; }
.rack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; } .rack .kb { min-width: 0; font-size: 12px; } .rack .kb.on { border-color: #f5b93a; }

/* v0.10.0 Arena Skirmish: lobby, scoreboard (hold Tab for K/D), death screen, countdown banner */
.matchbox { position: fixed; right: 64px; top: 90px; z-index: 16; width: 330px; max-height: 70vh; overflow: auto; background: #1c0d08ee; color: #fff3c4; border: 2px solid #f5b93a; border-radius: 12px; padding: 10px 12px; font: 13px system-ui, sans-serif; box-shadow: 0 6px 24px #0008; }
.matchbox.mini { width: auto; padding: 4px; display: flex; gap: 4px; }
.matchbox.mini button { background: #f5b93a; border: 0; border-radius: 8px; padding: 6px 10px; font-weight: 700; cursor: pointer; }
.matchbox .mh { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.matchbox .mh button { background: none; border: 0; color: #fff3c4; font-size: 18px; cursor: pointer; }
.matchbox .fine { opacity: .8; font-size: 12px; margin: 4px 0 8px; }
.matchbox .teams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.matchbox .tm h4 { margin: 0 0 4px; }
.matchbox .tm ul { list-style: none; margin: 0; padding: 0; }
.matchbox .tm li { display: flex; align-items: center; gap: 4px; padding: 4px 6px; margin-bottom: 4px; border-radius: 8px; background: #ffffff12; cursor: default; }
.matchbox .tm li[data-m] { cursor: pointer; }
.matchbox .tm li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matchbox .tm.blue li { border-left: 4px solid #3d8bff; } .matchbox .tm.red li { border-left: 4px solid #ff4d3d; }
.matchbox .tm li.me { font-weight: 700; background: #f5b93a33; }
.matchbox .tm li.pick { outline: 2px solid #ffd34d; }
.matchbox .tm li.off { opacity: .5; }
.matchbox button { background: #ffffff22; color: #fff3c4; border: 0; border-radius: 6px; padding: 3px 7px; cursor: pointer; font: inherit; }
.matchbox button:hover { background: #ffffff38; }
.matchbox button.go, .matchbox button.ok { background: #f5b93a; color: #1c0d08; font-weight: 700; }
.matchbox .reqs { margin-top: 6px; display: grid; gap: 4px; }
.matchbox .req { background: #ffffff12; border-radius: 8px; padding: 4px 6px; }
.matchbox .acts { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.matchbox .acts button { padding: 6px 12px; }
.matchbox.result { left: 50%; right: auto; top: 50%; transform: translate(-50%, -50%); width: 420px; text-align: center; }
.matchbox.result h2 { margin: 4px 0; font-size: 26px; } .matchbox.result .big { font-size: 34px; font-weight: 800; margin: 0; }
.scorebox { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 15; color: #fff; font: 13px system-ui, sans-serif; text-align: center; pointer-events: auto; }
.scorebox .sc { display: inline-flex; align-items: center; gap: 10px; background: #1c0d08dd; border-radius: 12px; padding: 4px 14px; font-weight: 800; font-size: 22px; }
.scorebox .sc .b { color: #6fb7ff; } .scorebox .sc .r { color: #ff7a6a; } .scorebox .clk { font-size: 15px; color: #fff3c4; min-width: 52px; }
.scorebox .sub { margin-top: 3px; font-size: 12px; text-shadow: 0 1px 2px #000; }
.scorebox .sub button { background: #1c0d08cc; color: #fff3c4; border: 1px solid #f5b93a88; border-radius: 6px; padding: 1px 6px; cursor: pointer; font: inherit; }
.scorebox .kd { display: none; gap: 10px; justify-content: center; margin-top: 6px; }
.scorebox.open .kd, .matchbox.result .kd { display: flex; }
.kd table { background: #1c0d08e6; border-radius: 8px; border-collapse: collapse; color: #fff3c4; font-size: 13px; }
.kd th, .kd td { padding: 3px 8px; text-align: left; } .kd td + td, .kd th + th { text-align: center; }
.kd tr.me td { color: #ffd34d; font-weight: 700; } .kd tr.dead td { opacity: .5; }
.deathbox { position: fixed; left: 50%; top: 36%; transform: translate(-50%, -50%); z-index: 17; background: #000a; color: #fff; border-radius: 14px; padding: 14px 26px; display: grid; gap: 4px; text-align: center; font: 16px system-ui, sans-serif; pointer-events: none; }
.deathbox b { font-size: 20px; color: #ff9a8a; }
.banner { position: fixed; left: 50%; top: 30%; transform: translate(-50%, -50%); z-index: 17; font: 900 64px system-ui, sans-serif; color: #ffd34d; text-shadow: 0 3px 0 #1c0d08, 0 0 18px #000; pointer-events: none; }
.ab .ai img { width: 38px; height: 38px; display: block; border-radius: 6px; image-rendering: auto; }
.matchbox .addbot { width: 100%; margin-top: 2px; border: 1px dashed #f5b93a88; }
.matchbox .rx { position: absolute; right: 8px; top: 6px; background: none !important; font-size: 16px; }
.matchbox.result { position: fixed; }
.matchbox.pick { left: 0; right: 0; top: 0; bottom: 0; transform: none; width: auto; max-height: none; border-radius: 0; border: 0; position: fixed; z-index: 45; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(ellipse at center, #3a1f12f2, #120806fa); }   /* v0.13.0 full-screen pick (20 s) */
.matchbox.pick > * { width: min(720px, 100%); }
.matchbox.pick .mh b { font-size: 22px; }
.matchbox.pick .clk { font-size: 26px; font-weight: 800; color: #ffd34d; }
.matchbox.pick .picks { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; }
.matchbox.pick .tm li b { font-weight: 600; font-size: 12px; white-space: nowrap; }
.matchbox .picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.matchbox .pk { padding: 8px 4px !important; font-weight: 700; }
.matchbox .pk.on { background: #f5b93a !important; color: #1c0d08; }
.matchbox .pk:disabled { opacity: .6; cursor: default; }
.matchbox .clk { font-weight: 800; color: #ffd34d; font-size: 18px; }

/* v0.11.0 📱 phone controls */
.tonly { display: none; }
body.touch .tonly { display: inline-block; }
.joy { position: fixed; left: 18px; bottom: 18px; z-index: 9; width: 128px; height: 128px; border-radius: 50%; background: #ffffff1c; border: 2px solid #ffffff44; touch-action: none; }
.joy .knob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: #f5b93acc; border: 2px solid #fff8; pointer-events: none; transition: transform .05s; }
.atkbtn { position: fixed; right: 18px; bottom: 18px; z-index: 9; width: 88px; height: 88px; border-radius: 50%; border: 3px solid #fff8; background: #c0392bdd; font-size: 38px; touch-action: none; }
.atkbtn.press { transform: scale(.92); }
/* v0.109.7 (Jay, Nov 22): the phone attack-move button: tap it (it glows red), then tap the ground */
.amovebtn { position: fixed; z-index: 9; width: 54px; height: 54px; border-radius: 50%; border: 2px solid #fff8; background: #2b2f3add; color: #ffd9d4; font: 800 22px/1 system-ui, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; touch-action: none; }
.amovebtn small { font-size: 9px; font-weight: 700; letter-spacing: .5px; opacity: .85; }
.amovebtn[hidden] { display: none; }
body.armed .amovebtn { background: #c0392bee; border-color: #ffb3a8; box-shadow: 0 0 14px #ff4a3a; color: #fff; }
body.touch .amovebtn { right: calc(264px + env(safe-area-inset-right)); bottom: calc(22px + env(safe-area-inset-bottom)); width: 50px; height: 50px; }   /* left of the dash (D), clear of the skill arc */
body.touch .abar { top: auto !important; bottom: 8px; transform: translateX(-50%) !important; gap: 4px; padding: 4px 6px; }
body.touch .ab { width: 46px; height: 46px; }
body.touch .ab .ai img { width: 34px; height: 34px; }
body.touch .ab.wpn .an { display: none; }
body.touch .dock { top: 52px; bottom: auto; right: 8px; flex-direction: row; flex-wrap: wrap; max-width: 60vw; justify-content: flex-end; padding: 4px; }
body.touch .dock button { width: 34px; height: 34px; font-size: 16px; }
body.touch .chat { display: none; }
body.touch.chat-open .chat { display: block; top: 96px; bottom: auto; left: 10px; width: min(360px, 50vw); }
body.touch .chatlog { max-height: 110px; font-size: 12px; }
body.touch .mini { top: 104px; width: 140px; height: auto; }
body.touch #stage canvas { touch-action: none; }
@media (max-width: 700px) { body.touch .ab .ak { display: none; } body.touch .ab { width: 40px; height: 40px; } body.touch .joy { width: 110px; height: 110px; } }

/* v0.12.0 guild dungeon panel (top centre) */
.dcol { position: fixed; top: 76px; left: 12px; z-index: 15; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: none; }
.dcol > * { pointer-events: auto; }
.partybox .prow { margin: 2px 0; }
.partybox button.mini { padding: 0 6px; font-size: 11px; }
.globbox button:disabled { opacity: .45; cursor: default; }
.slist { max-height: 46vh; overflow: auto; margin: 6px 0; }
.srow { display: flex; align-items: center; gap: 8px; padding: 5px 2px; border-bottom: 1px solid #ffffff14; }
.qrw { color: #ffd34d !important; }   /* v0.53.0 quest rewards */
.srow .sp { flex: 1; }
.lk .acts { margin: 4px 0 8px; gap: 6px; }
.globbox { position: relative; min-width: 200px; max-width: min(300px, 92vw); background: #1c0d08e8; color: #fff3c4; border: 2px solid #f5b93a; border-radius: 12px; padding: 8px 14px; font: 13px system-ui, sans-serif; text-align: center; box-shadow: 0 4px 18px #0008; }
.globbox .gh { font-weight: 800; font-size: 15px; }
.globbox .gl { margin-top: 2px; }
.globbox .fine { opacity: .8; font-size: 12px; }
.globbox .acts { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
.globbox button { background: #ffffff22; color: #fff3c4; border: 0; border-radius: 6px; padding: 5px 12px; cursor: pointer; font: inherit; font-weight: 700; }
.globbox button.go { background: #f5b93a; color: #1c0d08; }
/* v0.31.1 (Jay: "the guild dungeon square is a bit big"): waiting in town = one small line, not a big box */
.globbox.compact { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 6px 4px 10px; border-width: 1px; border-radius: 9px; font-size: 12px; text-align: left; }
.globbox.compact .gh { font-size: 12px; white-space: nowrap; }
.globbox.compact .gl { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.globbox.compact { max-width: min(560px, 96vw); }   /* v0.47.0 the lobby bar never runs off the screen */
.globbox.compact .acts { flex-shrink: 0; }
.globbox.compact .acts { margin: 0; }
.globbox.compact button { padding: 2px 8px; font-size: 11px; }
.betabar { max-width: min(560px, 92vw); text-align: left; }
/* v0.13.0 loot dice roll (Zee's ui_dice: 6 faces in a row) */
/* v0.31.16 D47 the dice card: right edge above the skills, small, never top-centre */
.rollbox { position: fixed; right: 16px; bottom: 210px; z-index: 40; width: 200px; background: #1c0d08e6; color: #fff3c4; border: 1px solid #f5b93a; border-radius: 10px; padding: 6px 9px; font: 12px system-ui, sans-serif; box-shadow: 0 4px 14px #0007; }
.rollbox .gh { font-weight: 800; font-size: 13px; }
.rollbox .rtop { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.rollbox .rnav { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; opacity: .85; }
.rollbox .rnav button { padding: 0 6px; font-size: 13px; background: none; }
.rollbox .rline { font-size: 12px; padding: 2px 0; }
.rollbox .fine { opacity: .8; font-size: 11px; }
.rollbox .dice { display: flex; justify-content: center; gap: 8px; margin: 8px 0; }
.rollbox .acts { display: flex; justify-content: space-between; gap: 4px; margin: 5px 0 2px; }
.rollbox button { background: #ffffff22; color: #fff3c4; border: 0; border-radius: 6px; padding: 4px 0; flex: 1; cursor: pointer; font: inherit; font-weight: 700; }
.rollbox button.go { background: #f5b93a; color: #1c0d08; }
.rollbox button:disabled { cursor: default; opacity: .7; }
.rollbox .rrow { display: flex; align-items: center; gap: 6px; padding: 3px 0; justify-content: flex-start; }
.rollbox .rrow.win { color: #ffd34d; }
.rollbox .bar { height: 3px; background: #ffffff22; border-radius: 2px; overflow: hidden; margin-top: 6px; }
.rollbox .bar i { display: block; height: 100%; background: #f5b93a; animation: rollbar linear forwards; }
@keyframes rollbar { from { width: 100%; } to { width: 0; } }
.die { display: inline-block; width: 32px; height: 32px; background: url(/play/art/loot/ui_dice.png) 0 0 / 192px 32px no-repeat; image-rendering: auto; }
.die.big { width: 48px; height: 48px; background-size: 288px 48px; }
/* v0.13.0 Junjun's forge */
.forge { display: grid; grid-template-columns: 220px 1fr; gap: 12px; }
.flist { max-height: 46vh; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.dcard .fitem { text-align: left; padding: 6px 8px; border-radius: 7px; border: 1px solid #3a4160; background: #262b40; cursor: pointer; font: inherit; }
.dcard .fitem.on { border-color: #f5b93a; background: #3a3220; }
.fhead { display: flex; gap: 12px; align-items: center; }
.fslot { width: 72px; height: 72px; flex: none; background-size: cover; background-position: center; display: grid; place-items: center; border-radius: 10px; }
.fslot img { width: 44px; height: 44px; image-rendering: auto; }
.fslot { position: relative; }
.ffx { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; pointer-events: none; background-size: 576px 96px; animation: ffx .5s steps(6) forwards; }
.ffx.success { background-image: url(/play/art/ui/fx_upgrade_success.png); }
.ffx.fail { background-image: url(/play/art/ui/fx_upgrade_fail.png); }
@keyframes ffx { from { background-position: 0 0; } to { background-position: -576px 0; } }
.socks { display: flex; gap: 4px; margin-top: 4px; }
.sock { width: 24px; height: 24px; background: center / contain no-repeat; display: inline-block; }
.sock.empty { border: 2px dashed #ffffff44; border-radius: 50%; width: 20px; height: 20px; }
.sock.opt { width: auto; height: auto; min-height: 20px; padding: 2px 7px; border: 1px solid #f0c96a; border-radius: 10px; font-size: 11px; line-height: 16px; color: #7fd0ff; background: #1c120b; }   /* v0.81.0 a socket option */
.sockp .acts button.on { outline: 2px solid #7fb6ff; }
.socks { flex-wrap: wrap; }
.dcard .fdet button:disabled { opacity: .45; cursor: default; }
@media (max-width: 640px) { .forge { grid-template-columns: 1fr; } }
/* v0.13.0 attack-move armed (A): a crosshair everywhere over the world */
body.armed #stage, body.armed #stage canvas { cursor: url(/play/art/cursors/cursor_crosshair.png) 16 16, crosshair !important; }

/* v0.14.0 beta event banner */
.betabar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; line-height: 1.35; border-color: #d9b44a; }
.betabar span { flex: 1 1 180px; }
.betabar button.x { background: transparent; border: 0; color: inherit; opacity: .7; padding: 2px 6px; cursor: pointer; }
/* v0.14.0 beta starter weapons: countdown on the icon */
.slot .ico { position: relative; }
.slot .ico .exp { position: absolute; right: -4px; bottom: -4px; font-size: 9px; line-height: 1; padding: 1px 3px; border-radius: 6px; background: #2a1d10; color: #ffe8a0; border: 1px solid #a07c3a; white-space: nowrap; }
.slot .ico .exp.soon { background: #5a1410; color: #fff; border-color: #e0604a; }
/* v0.14.0 Penguin's shop: item icons on every listing */
.srow .sico { width: 36px; height: 36px; flex: 0 0 36px; margin-right: 8px; object-fit: contain; image-rendering: pixelated; display: inline-flex; align-items: center; justify-content: center; font-size: 22px;
  background: radial-gradient(circle, #3a2a18 0%, #20160c 75%); border: 1px solid #6b5230; border-radius: 6px; }
.srow { align-items: center; }

/* ---------------- v0.14.0 📱 phone QoL pass (Mobile Legends-style) ---------------- */
html, body { overscroll-behavior: none; }
body.touch { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
body.touch input, body.touch textarea { -webkit-user-select: text; user-select: text; }
/* attack button bottom right, skills around it (Q left, W up-left, R above, D + B outside) */
body.touch .atkbtn { right: calc(22px + env(safe-area-inset-right)); bottom: calc(22px + env(safe-area-inset-bottom)); width: 96px; height: 96px; font-size: 42px; }
body.touch .abar { left: auto !important; right: 0; top: auto !important; bottom: 0; transform: none !important; width: 0; height: 0; padding: 0; border: 0; background: none; }
body.touch .abar .ab[data-slot] { position: fixed; width: 60px; height: 60px; border-radius: 50%; background: #262b40dd; border: 2px solid #ffffff55; touch-action: none; }
body.touch .abar .ab[data-slot] .ai img { width: 44px; height: 44px; border-radius: 50%; }
body.touch .abar .ab[data-slot] .acd { border-radius: 50%; }
/* v0.56.12 the round 🧪 / 💧 buttons live on <body> and the windows inside #game's stacking context, so the buttons drew over every
   open window on phones: hide them while a window is open */
body.touch:has(#dialog:not([hidden])) .potbtn, body.touch:has(.azwin:not([hidden])) .potbtn { display: none !important; }
body.touch .abar .ab[data-slot] .ak { display: none; }
body.touch .abar .ab[data-slot="Q"] { right: calc(132px + env(safe-area-inset-right)); bottom: calc(24px + env(safe-area-inset-bottom)); }
body.touch .abar .ab[data-slot="W"] { right: calc(116px + env(safe-area-inset-right)); bottom: calc(108px + env(safe-area-inset-bottom)); }
body.touch .abar .ab[data-slot="R"] { right: calc(40px + env(safe-area-inset-right)); bottom: calc(132px + env(safe-area-inset-bottom)); width: 66px; height: 66px; }
body.touch .abar .ab[data-slot="D"] { right: calc(204px + env(safe-area-inset-right)); bottom: calc(22px + env(safe-area-inset-bottom)); width: 48px; height: 48px; }
body.touch .abar .ab[data-slot="B"] { right: calc(190px + env(safe-area-inset-right)); bottom: calc(150px + env(safe-area-inset-bottom)); width: 44px; height: 44px; }
body.touch .abar .ab[data-slot="E"], body.touch .abar .ab.wpn { display: none; }
body.touch .abar .ab.aiming { border-color: #f5b93a; box-shadow: 0 0 0 4px #f5b93a55; }
body.touch .abar .mana { position: fixed; right: calc(30px + env(safe-area-inset-right)); bottom: calc(210px + env(safe-area-inset-bottom)); width: 120px; height: 14px; margin: 0; border-radius: 7px; }
body.touch .abar .mana #manaTxt { font-size: 10px; }
.aimcancel { position: fixed; right: calc(250px + env(safe-area-inset-right)); bottom: calc(190px + env(safe-area-inset-bottom)); z-index: 10; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  font: 800 26px system-ui, sans-serif; color: #fff; background: #5a1410cc; border: 2px solid #e0604a; pointer-events: none; }
.aimcancel.hot { transform: scale(1.18); background: #c0392b; }
.aimcancel[hidden] { display: none; }
/* joystick: bottom left, a little bigger */
body.touch .joy { left: calc(22px + env(safe-area-inset-left)); bottom: calc(22px + env(safe-area-inset-bottom)); width: 140px; height: 140px; }
/* big Auto-battle toggle (dungeons) */
.autobtn { position: fixed; z-index: 9; right: calc(22px + env(safe-area-inset-right)); bottom: calc(232px + env(safe-area-inset-bottom)); min-width: 74px; height: 50px; border-radius: 25px;
  border: 2px solid #ffffff66; background: #262b40e6; color: #fff; font-size: 22px; display: inline-flex; align-items: center; gap: 4px; padding: 0 12px; }
.autobtn small { font: 800 11px system-ui, sans-serif; letter-spacing: .04em; }
.autobtn.on { background: #2e7d32e6; border-color: #a5d6a7; }
.autobtn:not(.on) { background: #b3261ee6; border-color: #f2a59f; }   /* v0.47.0 red = paused */
button.autoon { background: #2e7d32; border-color: #a5d6a7; color: #fff; }   /* v0.47.0 green ⏸ = auto-battle on */
button.autooff { background: #b3261e; border-color: #f2a59f; color: #fff; }   /* red ▶ = off */
.autobtn[hidden], body:not(.touch) .autobtn { display: none; }
/* turn sideways */
.rotate { display: none; }
@media (orientation: portrait) { body.touch .rotate { display: grid; position: fixed; inset: 0; z-index: 60; place-items: center; background: #0d0f13f2; color: #fff3c4; text-align: center; font: 600 16px system-ui, sans-serif; }
  .rotate div { font-size: 54px; } .rotate p { font-size: 16px; margin: 10px 24px; } .rotate button { font-size: 15px; padding: 10px 18px; border-radius: 10px; border: 1px solid #f5b93a; background: #262b40; color: #fff3c4; } }
/* HUD that fits small screens (landscape phones are short) */
@media (max-height: 460px) {
  body.touch .mini { display: none; }
  body.touch .dcol { top: 50px; transform: scale(.85); transform-origin: top left; }
  body.touch .dock { top: 6px; }
  body.touch .joy { width: 118px; height: 118px; }
  body.touch .atkbtn { width: 84px; height: 84px; font-size: 36px; }
  body.touch .abar .ab[data-slot] { width: 52px; height: 52px; }
  body.touch .abar .ab[data-slot] .ai img { width: 38px; height: 38px; }
  body.touch .abar .ab[data-slot="Q"] { right: calc(116px + env(safe-area-inset-right)); bottom: 18px; }
  body.touch .abar .ab[data-slot="W"] { right: calc(102px + env(safe-area-inset-right)); bottom: 92px; }
  body.touch .abar .ab[data-slot="R"] { right: calc(34px + env(safe-area-inset-right)); bottom: 116px; width: 58px; height: 58px; }
  body.touch .abar .ab[data-slot="D"] { right: calc(178px + env(safe-area-inset-right)); bottom: 16px; }
  body.touch .abar .ab[data-slot="B"] { right: calc(166px + env(safe-area-inset-right)); bottom: 128px; }
  body.touch .abar .mana { bottom: 184px; width: 100px; height: 12px; }
  .autobtn { bottom: 196px; height: 44px; }
  .aimcancel { bottom: 160px; right: calc(220px + env(safe-area-inset-right)); }
}
/* bag, forge, shop and other wide panels go full screen on phones */
body.touch .dialog .dcard.wide, body.touch .dialog .dcard:has(.slot), body.touch .dialog .dcard:has(.slist) { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; border-radius: 0; overflow: auto;
  padding: calc(14px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left)); box-sizing: border-box; }
body.touch .dialog .dcard .slist { max-height: none; }
@media (max-height: 460px) { body.touch .dialog .dcard { max-height: 100dvh; overflow: auto; } }
/* chat: a slide-up sheet that stays above the on-screen keyboard */
body.touch.chat-open .chat { position: fixed; display: block; left: 0; right: 0; top: auto; bottom: var(--kb, 0px); width: auto; max-width: none; z-index: 25; border-radius: 14px 14px 0 0;
  padding-bottom: env(safe-area-inset-bottom); background: #12141df2; transition: bottom .12s; }
body.touch.chat-open .chatlog { max-height: 34dvh; }
body.touch.chat-open .chat input { font-size: 16px; }   /* 16 px: iOS doesn't zoom into the box */
/* the beta banner stays slim on phones */
body.touch .betabar { font-size: 11px; padding: 6px 8px; max-width: min(520px, 62vw); }
body.touch .betabar span { flex-basis: 100%; }
@media (max-height: 460px) { body.touch .betabar span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } }
.srow .stock { color: #9fe0a8; } .srow .stock.out { color: #e0604a; }   /* v0.15.0 Penguin stock */
/* v0.15.0 🧪 potion button (dungeons): beside the skill bar on PC, by the skills on phones */
.potbtn { position: fixed; z-index: 7; left: calc(50% + 250px); bottom: 14px; width: 50px; height: 50px; border-radius: 12px; border: 1px solid #4a5170; background: #262b40e6; color: #fff; font-size: 22px; display: grid; place-items: center; cursor: pointer; }
.potbtn small { position: absolute; right: 4px; bottom: 2px; font: 800 11px system-ui, sans-serif; color: #fff3c4; }
.potbtn .pcd { position: absolute; inset: 0; border-radius: 12px; background: #000a; display: grid; place-items: center; font: 800 15px system-ui, sans-serif; }
.potbtn.empty { opacity: .5; }
.potbtn.away { opacity: .4; filter: grayscale(.6); }   /* v0.55.0 shown everywhere, greyed where potions don't work */
.potbtn[hidden] { display: none; }
.potbtn.mana { left: calc(50% + 306px); }   /* v0.47.0 D99 */
body.touch .potbtn.mana { left: auto; right: calc(252px + env(safe-area-inset-right)); }
@media (max-height: 460px) { body.touch .potbtn.mana { right: calc(222px + env(safe-area-inset-right)); } }
body.touch .potbtn { left: auto; right: calc(196px + env(safe-area-inset-right)); bottom: calc(94px + env(safe-area-inset-bottom)); width: 50px; height: 50px; border-radius: 50%; }
body.touch .potbtn .pcd { border-radius: 50%; }
@media (max-height: 460px) { body.touch .potbtn { right: calc(172px + env(safe-area-inset-right)); bottom: 74px; width: 44px; height: 44px; } }
.chatlog .m.party { color: #9fe0ff; } .chatlog .m.party .pt { color: #7fc8ff; font-weight: 800; }   /* v0.15.0 party chat */
.menu .vol { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 13px; color: inherit; } .menu .vol input { flex: 1; min-width: 90px; }   /* v0.15.0 */
.runbanner { position: fixed; left: 50%; top: 24%; transform: translate(-50%, -50%); z-index: 18; text-align: center; pointer-events: none; animation: rbIn .5s ease-out; transition: opacity .8s; }   /* v0.17.0 */
.runbanner .rt { font: 900 clamp(22px, 4.2vw, 44px) system-ui, sans-serif; color: #ffd34d; text-shadow: 0 3px 0 #1c0d08, 0 0 18px #000; letter-spacing: .02em; }
.runbanner .rs { font: 700 clamp(12px, 1.8vw, 17px) system-ui, sans-serif; color: #fff3c4; text-shadow: 0 2px 0 #1c0d08, 0 0 10px #000; margin-top: 4px; }
.runbanner.out { opacity: 0; }
@keyframes rbIn { from { opacity: 0; transform: translate(-50%, -40%) scale(.9); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* v0.18.3 phones (Jay: "HUD a bit messy and cluttered"): fewer things on screen. The dock shows 🎒 💬 ⋯ (⋯ opens the rest),
   a smaller name card and target box, the online / ping pills hidden (☰ Menu stays). */
body.touch .dock { flex-direction: row-reverse; flex-wrap: nowrap; gap: 4px; background: #1e2233b0; }
body.touch .dock button { width: 36px; height: 36px; font-size: 17px; }
body.touch .dock:not(.open) button:not([data-dock="bag"]):not([data-dock="chat"]):not([data-dock="more"]):not([data-dock="menu"]) { display: none; }
body.touch .hud.tr { display: none; }
body.touch .menu { top: 56px; right: 8px; max-height: calc(100vh - 70px); overflow: auto; z-index: 45; }
body.touch .dock.open { flex-wrap: wrap; max-width: 70vw; }
body.touch .dock button[data-dock="more"], body.touch .dock button[data-dock="menu"] { display: inline-block; }
body.touch .tl { padding: 4px 8px; min-width: 0; max-width: 34vw; font-size: 12px; }
body.touch .tl .hudxp { font-size: 10px; }
body.touch .tl .xpbar { height: 4px; }
body.touch .targetbox { min-width: 150px; padding: 3px 10px; font-size: 11px; top: 8px; }
body.touch .targetbox .tbar { height: 5px; margin: 2px 0 1px; }
body.touch .hud.tr #hudOnline, body.touch .hud.tr #hudPing { display: none; }

/* v0.18.5 phones: the 💬 Talk button (shows next to an NPC or a place), the canvas at CSS size (it renders at 2×), ping in the menu */
.talkbtn { position: fixed; z-index: 7; right: calc(28px + env(safe-area-inset-right)); bottom: calc(244px + env(safe-area-inset-bottom)); padding: 8px 14px; border-radius: 18px; border: 2px solid #f5b93a; background: #262b40ee; color: #fff3c4; font: 700 14px system-ui, sans-serif; touch-action: none; }
.mping { padding: 8px 14px; font: 600 12px system-ui, sans-serif; color: #b8c0d8; border-bottom: 1px solid #3a4160; }
body:not(.touch) .mping { display: none; }

/* v0.19.0 D1 Kris' Welcome chain tracker (under the name card) + the title */
.wq { margin-top: 6px; padding-top: 6px; border-top: 1px solid #ffffff22; font-size: 12px; max-width: 260px; line-height: 1.35; }
.wq .mini { margin-left: 4px; padding: 1px 6px; font-size: 10px; border-radius: 6px; border: 1px solid #4a5170; background: #262b40; color: #b8c0d8; cursor: pointer; }
.hudname .ttl { color: #f5c96a; font-weight: 600; font-size: 11px; }
body.touch .wq { max-width: 34vw; font-size: 11px; }
/* v0.21.0 Honor & Wardrobe */
.hbar { height: 8px; background: #2a1d14; border-radius: 4px; overflow: hidden; margin: 6px 0; }
.hbar i { display: block; height: 100%; background: linear-gradient(90deg, #c8902a, #ffd34d); }
.wgrid { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.wbtn { font-size: 13px; padding: 6px 9px; }
.wbtn.on { outline: 2px solid #ffd34d; }
.wbtn[disabled] { opacity: .5; }
/* v0.21.0 D8 Darkness twist: the mask's holes show the game; the rest is black */
.darkveil { position: fixed; pointer-events: none; z-index: 1; background: rgba(4, 3, 10, .93); mask-composite: intersect; -webkit-mask-composite: source-in; }
/* v0.22.0 D4 stamp card */
.stamps { display: flex; gap: 6px; margin: 6px 0 2px; }
.stamp { width: 30px; height: 30px; border-radius: 50%; border: 2px dashed #8a7a5a; display: grid; place-items: center; font-size: 13px; color: #c9b88a; }
.stamp.on { border: 2px solid #ffd34d; background: #6b4a12; color: #ffe08a; font-weight: 700; }
/* v0.23.0 D27 Cabal-style NPC dialogue: a box at the bottom of the screen */
.dialog.talkbox { place-items: end center; background: transparent; padding-bottom: 18px; }   /* v0.109.4 no dim behind NPC talk either */
.dialog.talkbox .dcard { width: min(640px, calc(100% - 24px)); padding: 12px 14px; }
.talk { display: flex; gap: 12px; align-items: flex-start; }
.talk .tport { flex: 0 0 72px; height: 72px; border-radius: 10px; border: 1px solid #3a4160; background-color: #12141d; background-repeat: no-repeat; background-size: 288px 144px; background-position: -36px -4px; image-rendering: auto; }
.talk .tbody { flex: 1; min-width: 0; }
.talk .tname { margin-bottom: 4px; }
.talk .tline { min-height: 2.6em; color: #fff3c4; cursor: pointer; }
.talk .tchoices { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.talk .tchoice { text-align: left; padding: 7px 10px; border-radius: 8px; border: 1px solid #3a4160; background: #262b40; color: #dde; cursor: pointer; font: inherit; }
.talk .tchoice:hover:not(:disabled) { background: #313754; border-color: #f5b93a; }
.talk .tchoice kbd { display: inline-block; min-width: 1.4em; text-align: center; margin-right: 6px; padding: 0 4px; border-radius: 4px; background: #12141d; color: #f5b93a; font-size: 12px; }
@media (max-width: 640px) { .talk .tchoice { padding: 10px 12px; } .talk .tport { flex-basis: 56px; height: 56px; background-size: 224px 112px; background-position: -28px -3px; } }

/* v0.25.0 D10 Codex */
.codex{display:flex;flex-wrap:wrap;gap:4px}.codex .cx{width:34px;height:34px;border-radius:6px;background:#0005;display:inline-flex;align-items:center;justify-content:center}.codex .cx img{width:30px;height:30px;filter:brightness(0) opacity(.45)}.codex .cx.got img{filter:none}.codex .cx.got{background:#ffffff18}

/* v0.27.0 D36 sign-up: live checks next to each field, show / hide password, a year dropdown, bigger hero preview, phone sizes */
.fchk { display: block; min-height: 1.1em; font-size: 12px; margin-top: 2px; }
.fchk.ok { color: #7fe0aa; } .fchk.bad { color: #ff8a8a; }
.pw { display: flex; gap: 6px; align-items: stretch; } .pw input { flex: 1; min-width: 0; }
.pw .eye { width: 44px; border-radius: 8px; border: 1px solid #3a4160; background: #12141d; color: #fff; cursor: pointer; }
#signupForm select { display: block; width: 100%; box-sizing: border-box; margin-top: 3px; padding: 8px 10px; border-radius: 8px; border: 1px solid #3a4160; background: #12141d; color: #fff; font: inherit; }
.pw input { margin-top: 0 !important; } .pw { margin-top: 3px; }
.heropick { display: flex; gap: 12px; align-items: center; margin: 6px 0; }
.heropick #heroPrev { width: 112px; height: 112px; object-fit: contain; background: radial-gradient(#2a2f45, #171a26); border-radius: 12px; border: 1px solid #3a4160; flex: none; }
.heropick .bodies { flex: 1; flex-direction: column; display: flex; gap: 8px; }
.inv-share { display: inline-flex; gap: 6px; }
@media (pointer: coarse) { #signupForm input:not([type=checkbox]):not([type=radio]), #signupForm select, #loginForm input { min-height: 44px; font-size: 16px; } }

/* v0.27.0 D37 the gold edge arrow to a Where to? place (or Kris' Welcome target) */
.wayarrow { position: fixed; z-index: 40; transform: translate(-50%, -50%); pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wayarrow .arr { font-size: 30px; color: #ffd34d; text-shadow: 0 0 8px #000, 0 0 3px #000; display: inline-block; animation: waypulse 1s ease-in-out infinite; }
.wayarrow .lbl { font: 700 12px system-ui, sans-serif; color: #fff3c4; background: #1c0d08cc; padding: 2px 6px; border-radius: 6px; white-space: nowrap; }
@keyframes waypulse { 50% { opacity: .55; } }
.wayl .srow { align-items: center; gap: 8px; } .wayl .sico { font-size: 20px; width: 26px; text-align: center; }

/* v0.27.1 D41 📩 Message a GM */
.gmthread { max-height: 34vh; overflow: auto; margin: 6px 0; }
.gmmsg { background: #20232d; border-radius: 8px; padding: 6px 8px; margin: 4px 0; font-size: 13px; } .gmmsg.gm { background: #1d2a44; border-left: 3px solid #7fe3ff; }
.dcard textarea, .gmnew select { width: 100%; box-sizing: border-box; margin: 4px 0; padding: 8px; border-radius: 8px; border: 1px solid #3a4160; background: #12141d; color: #fff; font: inherit; }
.gmticket { border: 1px solid #343a55; border-radius: 10px; padding: 8px; margin: 6px 0; } .gmticket.open { border-color: #f5b93a; }

/* v0.27.2 D31 */
.baghint { background: #2a2516; border: 1px solid #f5b93a; border-radius: 8px; padding: 6px 10px; margin: 4px 0 8px; font-size: 13px; }

/* v0.27.3 D35 loading screen */
.loading { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; opacity: 1; transition: opacity .3s ease;
  background: radial-gradient(ellipse at 50% 30%, #2b3560 0%, #171a2b 55%, #0c0d14 100%); }
.loading.keyart { background: #0c0d14 url(/play/art/keyart.jpg) center / cover no-repeat; }
.loading.out { opacity: 0; }
.loading .lcard { width: min(560px, 90vw); text-align: center; padding: 24px; background: #0c0d14aa; border-radius: 16px; }
.loading .ltitle { font: 800 clamp(26px, 5vw, 40px) system-ui, sans-serif; color: #ffe9a8; text-shadow: 0 2px 0 #6b4428, 0 0 18px #f5b93a66; letter-spacing: .5px; }
.loading .lwhere { margin: 10px 0 14px; color: #dfe4ff; font: 600 16px system-ui, sans-serif; }
.loading .ldev { margin: -8px 0 12px; color: #c9b47a; font: 500 13px system-ui, sans-serif; }   /* v0.37.0 D59 */
.loading .lbar { height: 12px; border-radius: 8px; background: #1c2033; border: 1px solid #f5b93a66; overflow: hidden; }
.loading .lbar div { height: 100%; width: 0; background: linear-gradient(90deg, #c88a1c, #ffd34d); transition: width .15s ease; }
.loading .lpct { margin-top: 6px; color: #aab; font-size: 12px; }
.loading .ltip { margin-top: 18px; min-height: 2.6em; color: #fff3c4; font-size: 14px; }
@media (orientation: landscape) and (max-height: 500px) { .loading .lcard { padding: 12px; } .loading .ltip { margin-top: 10px; } }
/* v0.30.0 D38 PARTY HUD (left, under the name card) */
.phud { margin-top: 6px; pointer-events: auto; max-width: 230px; }
.phud .phbtn, .phud .phtog { background: #1e2233e6; border: 1px solid #3a4160; color: #e8ecff; border-radius: 10px; padding: 4px 10px; font: 600 12px system-ui, sans-serif; cursor: pointer; }
.phud .phtog { width: 100%; text-align: left; }
.phud .phrows { background: #1e2233d9; border: 1px solid #3a4160; border-top: 0; border-radius: 0 0 10px 10px; padding: 4px 6px; }
.phud .phrow { display: flex; align-items: center; gap: 6px; padding: 3px 0; cursor: pointer; }
.phud .phrow.off { opacity: .5; }
.phud .phrow.me .phname { color: #ffd34d; }
.phud .phhead { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #1c0d08; font: 800 12px system-ui, sans-serif; flex: none; border: 2px solid #0008; }
.phud .phmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.phud .phname { font: 600 12px system-ui, sans-serif; color: #6fb4ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phud .phbar { height: 5px; background: #0008; border-radius: 3px; overflow: hidden; }
.phud .phbar span { display: block; height: 100%; }
.phud .phwhere { font-size: 13px; }
.phud .phacts { display: flex; gap: 4px; margin-top: 4px; }
.phud .phacts button { background: #262b40; border: 1px solid #3a4160; color: #fff; border-radius: 8px; padding: 3px 7px; cursor: pointer; font-size: 13px; }
.phud .phacts button.go { background: #f5b93a; color: #1c0d08; }
body.touch .phud { max-width: 150px; }
body.touch .phud .phname { display: none; }
body.touch .phud .phmain { min-width: 60px; }
/* v0.30.0 D42 the notice card (Event Call, Wishing Well, …): bottom-right, above the skill bar, one at a time */
.ecard { position: fixed; right: 76px; bottom: 92px; z-index: 7; width: 290px; max-width: calc(100vw - 32px); background: #1e2233f2; border: 1px solid #f5b93a; border-radius: 14px; padding: 10px 12px; color: #e8ecff; box-shadow: 0 6px 24px #0008; font: 13px system-ui, sans-serif; animation: ecin .25s ease-out; }
@keyframes ecin { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.ecard .ectop { display: flex; align-items: center; gap: 8px; }
/* v0.56.17 D147 RF-style notices: a column of pulsing ❗ badges on the right edge; the card opens beside them */
.ebadges { position: fixed; right: 76px; bottom: 92px; z-index: 8; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.ebadges[hidden] { display: none; }
.ebadge { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 2px solid #f5b93a; background: #1e2233f2; font-size: 20px; cursor: pointer; padding: 0; box-shadow: 0 0 10px #f5b93a66; animation: ebpulse 1.4s ease-in-out infinite; }
.ebadge.on { animation: none; border-color: #7fe3ff; }
.ebadge i { position: absolute; right: -4px; top: -6px; font-style: normal; font: 900 14px system-ui, sans-serif; color: #ff5a3a; text-shadow: 0 1px 2px #000; }
.ebmore { font: 700 11px system-ui, sans-serif; color: #ffd34d; }
@keyframes ebpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
body:not(.touch) .ecard { right: 132px; }
body.touch .ecard { right: 52px; }
body.touch .ebadges { right: 8px; bottom: auto; top: 56px; }
body.touch .ebadge { width: 36px; height: 36px; font-size: 16px; }
@media (orientation: portrait) { body.touch .ebadges { display: none; } }
.ecard .ecico { font-size: 22px; }
.ecard .ectitle { flex: 1; font-weight: 700; color: #ffd34d; }
.ecard .ecx { background: none; border: 0; color: #aab; cursor: pointer; font-size: 14px; }
.ecard .ecbody { margin: 6px 0 4px; }
.ecard .ecguide { margin-bottom: 6px; }
.ecard .ecacts { display: flex; gap: 6px; flex-wrap: wrap; }
.ecard .ecacts button { background: #262b40; border: 1px solid #3a4160; color: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.ecard .ecacts button.go { background: #f5b93a; color: #1c0d08; font-weight: 700; }
.ecard .ecacts button.big { font-size: 16px; padding: 8px 18px; }
body.touch .ecard { right: 8px; bottom: auto; top: 56px; width: 260px; }
/* v0.31.1 one chat channel: lines from players in another area */
.chatlog .m.far { color: #c9b6ff; } .chatlog .m.far .ar { color: #a98bff; font-weight: 700; font-size: 11px; }
/* v0.31.3 the beta notice folds into a small chip (Jay: it covered the character panel) */
.betabar.chip { padding: 3px 6px; gap: 4px; max-width: none; font-size: 12px; }
.betabar.chip button { padding: 3px 8px; font-size: 12px; }
/* v0.31.6 D57 chat tabs */
.chattabs { display: flex; gap: 4px; margin-bottom: 2px; }
.chattabs button { font: 600 11px system-ui, sans-serif; padding: 3px 9px; border-radius: 8px 8px 0 0; border: 0; background: #0007; color: #ccd; cursor: pointer; position: relative; }
.chattabs button.on { background: #000a; color: #ffd34d; }
.chattabs button.dot::after { content: ''; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: #ff6b5a; }
.chatlog.only-world .m.sys { display: none; }
.chatlog.only-sys .m:not(.sys) { display: none; }
/* v0.31.6 D54 draggable / smaller windows on PC */
.dcard .draghead { cursor: move; user-select: none; }
.dcard { position: relative; }
.dcard .wintools { position: absolute; top: 6px; right: 8px; display: flex; gap: 4px; z-index: 2; }
.dcard .wintools button { font-size: 12px; line-height: 1; padding: 3px 6px; border-radius: 6px; border: 1px solid #3a4160; background: #262b40; color: #ccd; cursor: pointer; }
body.touch .dcard .wintools { display: none; }
/* v0.31.6 D52 update banner + patch notes */
.updbar { position: fixed; z-index: 14; left: 50%; top: 64px; transform: translateX(-50%); background: #1c0d08e6; color: #fff3c4; border: 1px solid #f5b93a88; border-radius: 10px; padding: 6px 10px; font: 12px system-ui, sans-serif; display: flex; gap: 8px; align-items: center; max-width: min(560px, 92vw); }
.updbar button { font: 600 12px system-ui, sans-serif; border-radius: 7px; border: 1px solid #f5b93a66; background: #3a2a12; color: #fff3c4; padding: 3px 8px; cursor: pointer; }
/* v0.56.11 the update notice and toasts shared the same spot at the top: toasts move below the notice while it shows (PC) */
body:not(.touch):has(#updBar:not([hidden])) .toast { top: 112px; }
.pnotes { max-height: 60vh; overflow: auto; }
.pnote { margin: 6px 0; } .pnote ul { margin: 4px 0 6px 18px; padding: 0; } .pnote li { margin: 2px 0; }
.pnote.psoon { padding: 6px 10px; border: 1px dashed rgba(255, 214, 120, .55); border-radius: 8px; background: rgba(255, 214, 120, .07); margin-bottom: 10px; }   /* v0.121.1 🔮 Coming soon */
body.touch #hudNotes { display: none; }
/* v0.31.7 D48 guild log */
.glcard { border: 1px solid #3a4160; border-radius: 10px; padding: 8px 10px; margin: 6px 0; background: #171a28; }
/* v0.31.7 D49 beta card */
.dcard .warnbox { background: #3a2010; border: 1px solid #f5b93a88; border-radius: 8px; padding: 8px 10px; }
.betabar.chip button[data-b="card"] { color: #ffd34d; font-weight: 700; }

/* v0.31.12 D45 shrine buff chips (top middle, under the toasts) */
.shrinebuffs { position: fixed; top: 104px; left: 50%; transform: translateX(-50%); z-index: 12; display: flex; gap: 6px; pointer-events: none; }
.shrinebuffs .sb { background: #1c0d08dd; color: #fff3c4; border: 1px solid #f5b93a88; border-radius: 999px; padding: 3px 10px; font: 600 12px system-ui, sans-serif; }
.shrinebuffs .sb-fury { border-color: #ffc23a; } .shrinebuffs .sb-haste { border-color: #6fd3ff; } .shrinebuffs .sb-mending { border-color: #6fe08a; }

/* v0.31.16 D47 during a run the guild and party panels are one slim strip (tap ▸ to open), the party frames are a little see-through */
.globbox.strip { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: min(360px, 70vw); padding: 3px 4px 3px 9px; border-width: 1px; border-radius: 9px; font-size: 12px; text-align: left; }
.globbox.strip .gh { font-size: 12px; white-space: nowrap; }
.globbox.strip .gl { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.globbox.strip .acts { margin: 0; flex-wrap: nowrap; }
.globbox.strip button { padding: 2px 8px; font-size: 11px; }
.globbox .gtog { background: none !important; padding: 2px 4px !important; opacity: .8; }
.phud { opacity: .85; transition: opacity .15s; }
.phud:hover { opacity: 1; }
body.touch .rollbox { right: calc(10px + env(safe-area-inset-right)); bottom: calc(250px + env(safe-area-inset-bottom)); width: 176px; }

/* v0.31.16 (Jay: "on the phone the notifs are in the way"): small notices on phones, never over the middle */
body.touch .updbar { top: auto; bottom: calc(8px + env(safe-area-inset-bottom)); left: 50%; max-width: 40vw; padding: 3px 6px; font-size: 10.5px; line-height: 1.25; gap: 4px; opacity: .92; }
body.touch .updbar button { font-size: 10.5px; padding: 1px 5px; }
body.touch .toast { top: calc(44px + env(safe-area-inset-top)); max-width: 52vw; padding: 5px 10px; font-size: 12px; pointer-events: none; opacity: .94; }
/* v0.32.0 D50 a link styled as a dialog button (🌐 More on the website) */
#dcard .acts a.btn { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 8px; background: #ffffff1a; color: inherit; text-decoration: none; font-weight: 600; }
/* v0.32.1 sit / sleep buttons light up while you sit or sleep */
.hud .pill.btn.on { background: #f5b93a; color: #1c0d08; }
/* v0.33.2 recovery code */
#recovBox h2 { margin: 4px 0 8px; font-size: 18px; }
.recov { text-align: center; margin: 12px 0; }
.recov code { font-size: 20px; letter-spacing: 1px; padding: 8px 12px; border-radius: 8px; background: rgba(255,255,255,.08); border: 1px dashed rgba(255,255,255,.35); user-select: all; }
#recovBox .acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
/* v0.34.0 D60 ⭐ Rate the game */
.rstars-pick { display: flex; gap: 6px; justify-content: center; margin: 6px 0 10px; }
.rstar { font-size: 30px; line-height: 1; background: none; border: 0; color: #6b6f7a; cursor: pointer; padding: 2px 4px; }
.rstar.on { color: #ffcf4a; text-shadow: 0 0 6px rgba(255,207,74,.5); }
.rstars { color: #ffcf4a; letter-spacing: 1px; }
/* v0.35.1 the party panel (painted part by part now, so the inline styles moved here) */
.gl.pl { text-align: left; }
.acts.pacts { flex-wrap: wrap; }
/* v0.35.1 (Pixel's bug log #4, iPhone landscape ~852 x 393): the event card goes to the top centre, smaller, so it never
   covers the 💬 Talk button or the skill buttons; nothing shows over the "turn your phone" screen. */
@media (max-height: 500px) {
  body.touch .ecard { top: calc(6px + env(safe-area-inset-top)); left: 50%; right: auto; transform: translateX(-50%); width: 232px; padding: 7px 10px; font-size: 12px; animation: none; }
  body.touch .ecard .ecico { font-size: 17px; }
  body.touch .ecard .ecbody { margin: 3px 0; }
  body.touch .ecard .ecacts button { padding: 4px 8px; font-size: 12px; }
  body.touch .ecard .ecacts button.big { font-size: 14px; padding: 6px 12px; }
}
@media (orientation: portrait) { body.touch .ecard { display: none; } }
/* v0.36.0 Wardrobe stats + try-on, the quest tracker, letters */
/* v0.56.13 D148 the tidy Honor & Wardrobe */
.whead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .whead .hbar { flex: 1 1 120px; margin: 0; }
.winfo { border-radius: 50%; width: 24px; height: 24px; padding: 0; font-weight: 800; }
.wgrid2 { max-height: 46vh; overflow: auto; margin: 6px 0; }
.wrow { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; flex-wrap: wrap; }
.wfam { width: 58px; font: 700 11px system-ui, sans-serif; color: #e8d9b0; text-align: right; }
.wtile { position: relative; width: 56px; height: 56px; padding: 0; border-radius: 8px; border: 2px solid #4a3a26; background: #1b140e; cursor: pointer; overflow: hidden; }
.wtile.sel { border-color: #7fe3ff; } .wtile.on { border-color: #ffd34d; box-shadow: 0 0 8px #ffd34d88; }
.wtile.locked .wtpic { opacity: .35; filter: grayscale(.7); }
.wtpic { position: absolute; inset: 2px; background-repeat: no-repeat; background-position: center 30%; background-size: 170%; }
.wtpic.wing { background-size: 400% 100%; background-position: 0 50%; }
.wtnone { display: grid; place-items: center; height: 100%; font-size: 20px; color: #c9b38a; }
.wtile i { position: absolute; font-style: normal; font: 800 10px system-ui, sans-serif; }
.wtier { left: 3px; top: 2px; color: #fff3c4; text-shadow: 0 1px 2px #000; } .wok { right: 3px; top: 1px; color: #ffd34d; } .wlock { right: 2px; bottom: 1px; font-size: 11px; }
.wdet { border: 1px solid #4a3a26; border-radius: 8px; padding: 6px 8px; background: #1b140ecc; display: flex; flex-direction: column; gap: 2px; }
.wact { display: flex; gap: 6px; justify-content: flex-end; }
.witem { display: inline-flex; gap: 2px; align-items: stretch; margin: 2px; }
.witem .wbtn { margin: 0; }
.wtry { background: #262b40; border: 1px solid #3a4160; color: #fff; border-radius: 8px; padding: 0 8px; cursor: pointer; }
.wst { color: #9fd3a0; }
.storybox { text-align: left; max-width: 260px; padding: 6px 10px; }
.storybox .srow { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.storybox .srow + .srow { margin-top: 4px; border-top: 1px solid #ffffff1a; padding-top: 4px; }
.letter { border: 1px solid #3a4160; border-radius: 10px; padding: 8px 10px; margin: 6px 0; background: #1e2233; }
.letter.unread { border-color: #f5b93a; }
.letter p { margin: 6px 0; }
#menuBtn.dot::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff5a5a; margin-left: 6px; vertical-align: middle; }
body.touch .storybox { font-size: 11px; max-width: 210px; }
/* v0.36.1 📬 the bouncing mail icon (only while there's unread mail) */
.mailfab { position: fixed; z-index: 8; right: calc(76px + env(safe-area-inset-right)); bottom: 24px; width: 52px; height: 52px; border-radius: 50%; border: 2px solid #f5b93a; background: #262b40ee; font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 0 0 0 #f5b93a88; animation: mailbob 1.4s ease-in-out infinite, mailglow 1.4s ease-out infinite; }
.mailfab .mfn { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #ff5a5a; color: #fff; font: 700 11px/18px system-ui, sans-serif; }
@keyframes mailbob { 0%, 100% { transform: translateY(0) rotate(0); } 15% { transform: translateY(-6px) rotate(-8deg); } 30% { transform: translateY(0) rotate(6deg); } 45% { transform: rotate(0); } }
@keyframes mailglow { 0% { box-shadow: 0 0 0 0 #f5b93a99; } 70% { box-shadow: 0 0 0 12px #f5b93a00; } 100% { box-shadow: 0 0 0 0 #f5b93a00; } }
body.touch .mailfab { right: auto; left: calc(12px + env(safe-area-inset-left)); bottom: auto; top: 50%; width: 44px; height: 44px; font-size: 22px; }
@media (orientation: portrait) { body.touch .mailfab { display: none; } }

/* v0.38.0 D63 /perf (owner / mods) */
.perfbox { position: fixed; left: 50%; top: 6px; transform: translateX(-50%); z-index: 9999; background: #1c0d08e0; color: #fff3c4; font: 12px/1.3 ui-monospace, monospace; padding: 4px 10px; border-radius: 6px; pointer-events: none; white-space: nowrap; }
/* v0.43.0 the room host + kill target */
.matchbox .target { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 4px 0; }
.matchbox .target .tgt { display: inline-flex; gap: 3px; }
.matchbox .target .tgt button { padding: 2px 7px; min-width: 26px; }
.matchbox .target .tgt button.on { background: #f5b93a; color: #2a1d05; }

/* v0.46.0 D139 Lanes part 2: gold chip, item box (keys 1-6), shop window */
.lbox { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 7; display: flex; align-items: center; gap: 8px; padding: 5px 8px; background: #1c0d08e6; border: 1px solid #f5b93a88; border-radius: 12px; font: 13px system-ui, sans-serif; color: #fff3c4; }
@media (min-width: 1100px) { .lbox { transform: translateX(calc(-50% + 130px)); } }
@media (max-width: 900px) { .lbox { bottom: 10px; } }
.lbox .lgold { min-width: 64px; color: #ffd34d; }
.lbox .lslots { display: flex; gap: 4px; }
.lbox .lslot { position: relative; width: 42px; height: 42px; border-radius: 8px; background: #2c1c12; border: 1px solid #6b4a2a; display: grid; place-items: center; cursor: pointer; user-select: none; }
.lbox .lslot.empty { opacity: 0.45; cursor: default; }
.lbox .lslot.act { border-color: #ffd34d; }
.lbox .lslot .ic { font-size: 22px; line-height: 1; }
.lbox .lslot .k { position: absolute; left: 3px; top: 1px; font-size: 10px; color: #c9b38a; }
.lbox .lslot .n { position: absolute; right: 3px; bottom: 1px; font-size: 11px; font-weight: 700; }
.lbox .lslot .cd { position: absolute; inset: 0; display: grid; place-items: center; background: #000a; border-radius: 8px; font-weight: 700; }
.lbox .lshopbtn { font-size: 20px; padding: 4px 8px; border-radius: 8px; background: #3a2616; color: #fff3c4; border: 1px solid #6b4a2a; cursor: pointer; }
.lbox .lshopbtn.on { border-color: #ffd34d; box-shadow: 0 0 8px #ffd34d88; }
.lshop { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 30; width: min(440px, 96vw); max-height: min(560px, calc(100vh - 180px)); display: flex; flex-direction: column; background: #1c0d08f4; color: #fff3c4; border: 2px solid #f5b93a; border-radius: 12px; padding: 10px 12px; font: 13px system-ui, sans-serif; box-shadow: 0 6px 24px #0009; }
.lshop .sh { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.lshop .sh .gold { color: #ffd34d; font-weight: 700; }
.lshop .sh .warn { color: #ffb07a; }
.lshop .sh .x { margin-left: auto; background: none; border: 0; color: #fff3c4; font-size: 16px; cursor: pointer; }
.lshop .tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.lshop .tabs button { font-size: 12px; padding: 3px 7px; border-radius: 7px; background: #2c1c12; color: #fff3c4; border: 1px solid #6b4a2a; cursor: pointer; }
.lshop .tabs button.on { background: #f5b93a; color: #1c0d08; }
.lshop .sl { overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; min-height: 80px; flex: 1 1 auto; }
.lshop .srow { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 7px; background: #2c1c12; color: #fff3c4; border: 1px solid #4a321c; cursor: pointer; text-align: left; font-size: 12px; }
.lshop .srow.on { border-color: #ffd34d; }
.lshop .srow .ic { font-size: 18px; }
.lshop .srow .nm { flex: 1; }
.lshop .srow .c { color: #ffd34d; font-weight: 700; }
.lshop .srow .c.no { color: #b08a6a; }
.lshop .det { margin-top: 8px; padding-top: 6px; border-top: 1px solid #6b4a2a; }
.lshop .det p { margin: 4px 0; }
.lshop .det .go { margin-top: 4px; }
.lshop .tree .tr { font-size: 12px; }
.lshop .tree .tr.d1 { padding-left: 14px; } .lshop .tree .tr.d2 { padding-left: 28px; } .lshop .tree .tr.d3 { padding-left: 42px; }
.lshop .mine { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.scorebox .litems { font-size: 11px; letter-spacing: 1px; opacity: 0.9; }
.lshop .det .go { padding: 6px 14px; border-radius: 8px; background: #f5b93a; color: #1c0d08; border: 0; font-weight: 700; cursor: pointer; }
.lshop .det .go:disabled { opacity: 0.5; cursor: not-allowed; }

/* v0.47.0 D114 rare drop announcements */
.chatlog .m.sys.rare { color: #ffd76a; font-weight: 700; }
.rarebanner { position: fixed; z-index: 40; top: 76px; left: 50%; transform: translateX(-50%); max-width: min(640px, 92vw); padding: 10px 18px; border-radius: 12px; border: 2px solid #f5b93a; background: linear-gradient(#3a2208f0, #1c0d08f0); color: #ffe7a0; font: 800 16px system-ui, sans-serif; text-align: center; box-shadow: 0 0 24px #f5b93a88; animation: rareIn .4s ease-out; pointer-events: none; }
@keyframes rareIn { from { opacity: 0; transform: translate(-50%, -12px) scale(.95); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.deathbox button { pointer-events: auto; margin-top: 6px; padding: 8px 14px; border-radius: 9px; border: 1px solid #f5b93a; background: #3a2208; color: #ffe7a0; font: 700 14px system-ui, sans-serif; cursor: pointer; }   /* v0.47.0 D134 */
.rankline.ok { color: #ffd76a; }   /* v0.47.0 D146 */

/* ---------- v0.48.0 D137 every window fits the screen (1366 × 768 and 390 × 844): only lists scroll inside ---------- */
.dcard { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; max-width: calc(100vw - 16px); box-sizing: border-box; }
.dcard img { max-width: 100%; }
/* ---------- v0.48.0 D137 + D109 the Cabal-style 🎒 Character & Bag window ---------- */
.azwin { position: fixed; z-index: 55; width: min(590px, calc(100vw - 16px)); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); overflow: hidden; display: flex; flex-direction: column;
  background: linear-gradient(#2a1d12, #1c140d); border: 2px solid #b8893a; border-radius: 10px; box-shadow: 0 10px 40px #000a, inset 0 0 0 1px #f5d48a33; color: #f3e6c8; font-size: 13px; }
.azwin .wtitle { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: linear-gradient(#5a3d1c, #3a2812); border-bottom: 1px solid #b8893a; cursor: move; user-select: none; }
.azwin .wtitle .sp, .azwin .btabs .sp { flex: 1; }
.azwin .wx { background: #5a1f14; color: #ffd9c8; border: 1px solid #d9774f; border-radius: 6px; width: 26px; height: 24px; cursor: pointer; }
.azwin .wx:hover { background: #8a2f1c; }
.azwin .wbody { display: flex; gap: 10px; padding: 10px; min-height: 0; overflow: auto; }
.azwin .cpane { width: 190px; flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; }
.azwin .ctop, .azwin .cfoot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.azwin .cfoot button { margin-left: auto; padding: 3px 8px; border-radius: 6px; border: 1px solid #8a6a32; background: #3a2812; color: #f3e6c8; cursor: pointer; font-size: 11px; }
.azwin .doll { display: grid; grid-template-columns: repeat(3, 56px); gap: 6px; justify-content: center; }
.azwin .wslot, .azwin .bslot { position: relative; width: 46px; height: 46px; border-radius: 6px; background: #120c07; border: 2px solid #5a4424; display: grid; place-items: center; overflow: hidden; }
.azwin .wslot { width: 52px; height: 52px; }
.azwin .wslot .sn { font-size: 9px; color: #8a7a5a; text-align: center; line-height: 1.05; padding: 2px; }
.azwin .wslot img, .azwin .bslot img, .whgrid .bslot img { width: 40px; height: 40px; object-fit: contain; pointer-events: none; }
.azwin .cstats { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: #e8d8b0; background: #120c0788; border-radius: 6px; padding: 5px 7px; }
.azwin .bpane { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.azwin .btabs .btrash { min-width: 74px; height: 30px; padding: 0 10px; font-size: 14px; border-color: #8a3a2a; background: #3a1812; color: #ffd2c0; }   /* v0.108.3 (Jay: "the trash bin is small") */
.azwin.dragging .btrash { min-width: 110px; height: 38px; background: #5a1e14; box-shadow: 0 0 0 2px #ff7a5a inset; }   /* bigger while you drag */
.azwin .btabs { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; }
.azwin .btab, .azwin .btabs [data-b] { min-width: 28px; height: 26px; border-radius: 6px 6px 0 0; border: 1px solid #6a5028; background: #2a1d12; color: #d8c49a; cursor: pointer; font-weight: 700; }
.azwin .btab.on { background: #b8893a; color: #231a05; }
.azwin .btab.lockd { opacity: .55; cursor: not-allowed; }
.azwin .bgrid, .whgrid { display: grid; grid-template-columns: repeat(6, 46px); gap: 4px; }
.whgrid { grid-template-columns: repeat(auto-fill, 46px); max-height: 46vh; overflow: auto; padding: 2px; }
.whgrid .bslot { position: relative; width: 46px; height: 46px; border-radius: 6px; background: #120c07; border: 2px solid #5a4424; display: grid; place-items: center; cursor: pointer; }
.azwin .bslot[data-key] { cursor: grab; }
.azwin .bslot.sel { outline: 2px solid #ffe58a; }
.azwin .bslot.lockd { color: #8a7a5a; }
.azwin .bslot .q, .whgrid .bslot .q { position: absolute; right: 2px; bottom: 0; font-size: 11px; color: #fff; text-shadow: 0 1px 2px #000, 0 0 2px #000; }
.azwin .bslot .u, .azwin .wslot .u, .whgrid .bslot .u { position: absolute; left: 2px; top: 0; font-size: 10px; color: #ffd75e; text-shadow: 0 1px 2px #000; }
.azwin .bslot .lkb, .azwin .bslot .tm { position: absolute; right: 1px; top: 0; font-size: 10px; font-style: normal; }
.azwin .bslot .tm { left: 1px; right: auto; top: auto; bottom: 0; }
.azwin .r-uncommon, .whgrid .r-uncommon { border-color: #4f9a4f; } .azwin .r-rare, .whgrid .r-rare { border-color: #4f7fd9; }
.azwin .r-epic, .whgrid .r-epic { border-color: #a35fd9; } .azwin .r-legendary, .whgrid .r-legendary { border-color: #f0a030; box-shadow: 0 0 8px #f0a03066; }
.azwin .bfoot { display: flex; gap: 10px; align-items: center; font-size: 11px; flex-wrap: wrap; }
.azwin .fine { color: #b8a888; font-size: 11px; margin: 0; }
.azwin .wmenu { position: absolute; z-index: 3; min-width: 170px; background: #1c140d; border: 1px solid #b8893a; border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 6px 20px #000a; }
.azwin .wmenu b { font-size: 12px; padding: 2px 4px 4px; border-bottom: 1px solid #5a4424; }
.azwin .wmenu button { text-align: left; padding: 6px 8px; border-radius: 6px; border: 0; background: #2a1d12; color: #f3e6c8; cursor: pointer; }
.azwin .wmenu button:hover { background: #5a3d1c; }
.azwin .sheettabs { display: flex; gap: 4px; padding: 6px 8px 0; }
.azwin .sheettabs button { flex: 1; padding: 7px; border-radius: 8px 8px 0 0; border: 1px solid #6a5028; background: #2a1d12; color: #d8c49a; font-weight: 700; }
.azwin .sheettabs button.on { background: #b8893a; color: #231a05; }
/* phones / narrow: a bottom sheet, max 70 % of the screen, one pane at a time */
.azwin.sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: 100vw; max-height: 70vh; max-height: 70dvh; border-radius: 14px 14px 0 0; }
.azwin.sheet .wtitle { cursor: default; }
.azwin.sheet .wbody { justify-content: center; }
.azwin.sheet .cpane { width: auto; }
.azwin.sheet .bgrid { grid-template-columns: repeat(6, minmax(40px, 50px)); }
.azwin.sheet .bslot { width: auto; aspect-ratio: 1; height: auto; }
.azwin .cos { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.azwin .cos select { background: #120c07; color: #f3e6c8; border: 1px solid #8a6a32; border-radius: 6px; padding: 2px 4px; max-width: 130px; }
.azwin .cos a { color: #ffd75e; }
/* v0.48.0 D153 👑 Costume Shop */
.cshop { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 8px 0; }
.cshop .ccard { background: #12141d; border: 1px solid #3a4160; border-radius: 10px; padding: 8px; text-align: center; }
.cshop .ccard .pic { height: 150px; display: grid; place-items: center; background: radial-gradient(#2a2f48, #12141d); border-radius: 8px; font-size: 42px; }
.cshop .ccard .pic img { max-height: 150px; max-width: 100%; }
.cshop .ccard .pr { color: #ffd75e; font-weight: 700; }
.cpay { background: #12141d; border: 1px dashed #f5b93a; border-radius: 10px; padding: 8px 10px; margin: 6px 0; font-size: 13px; }
.cpay input, .cpay select { width: auto !important; }
@media (orientation: portrait) { body.touch .azwin { display: none; } }   /* v0.48.0 the game is landscape-only on phones (the turn-sideways card covers everything) */
@media (max-height: 460px) { .azwin.sheet { max-height: 92vh; max-height: 92dvh; } .azwin.sheet .bslot { max-width: 40px; } }   /* landscape phones: a little taller sheet */

/* v0.50.0 D154 Party Bonus + loot rule line under the party rows */
.phbuff{font-size:11px;opacity:.55;padding:2px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.phbuff.on{opacity:1;color:#ffd34d}

/* v0.50.0 (Jay: "make some windows smaller in phone", "i dont understand the windows in bag for phone"): on a landscape phone the
   Character & Bag sheet is a panel on the RIGHT (about 60 % wide) so the game stays visible on the left; the item buttons are big. */
@media (max-height: 460px) {
  body.touch .azwin.sheet { left: auto !important; right: 0; width: min(560px, 62vw); max-height: 100vh; max-height: 100dvh; top: 0 !important; bottom: 0; border-radius: 14px 0 0 14px; }
  body.touch .azwin.sheet .bgrid { grid-template-columns: repeat(6, minmax(36px, 46px)); }
  body.touch .azwin.sheet .bslot { max-width: 46px; }
  body.touch .azwin .wmenu button { min-height: 40px; font-size: 15px; }
  body.touch .dialog .dcard.wide, body.touch .dialog .dcard:has(.slot), body.touch .dialog .dcard:has(.slist) { left: auto; right: 0; width: min(620px, 70vw); border-radius: 14px 0 0 14px; }
}
/* v0.50.0 (Jay: "I have a hard time looking for chat"): phones get a labelled 💬 Chat button with an unread count, and the newest line shows for a few seconds */
body.touch .dock button[data-dock="chat"] { width: auto; padding: 0 10px; font-size: 14px; font-weight: 700; background: #3a2f12; border-color: #f5b93a; color: #ffd34d; }
body.touch .dock button[data-dock="chat"]::after { content: ' Chat'; }
.dock button .unread { display: inline-block; min-width: 16px; height: 16px; margin-left: 4px; padding: 0 4px; border-radius: 8px; background: #e0574a; color: #fff; font-size: 11px; line-height: 16px; vertical-align: middle; }
.chatpeek { position: fixed; z-index: 7; left: 10px; bottom: 140px; max-width: min(360px, 45vw); padding: 6px 10px; border-radius: 10px; background: #000b; color: #fff; font-size: 13px; pointer-events: none; opacity: 0; transition: opacity .3s; }
.chatpeek.on { opacity: 1; }
body:not(.touch) .chatpeek { display: none; }
body.chat-open .chatpeek { display: none; }

/* v0.52.0 D87 📸 photo mode: only the world is left on screen */
body.photo #game > *:not(#stage), body.photo .chat, body.photo .dock, body.photo .azwin, body.photo .chatpeek, body.photo .mailfab { visibility: hidden !important; }
.photox { position: fixed; z-index: 99; right: 10px; top: 10px; padding: 4px 10px; border-radius: 10px; border: 1px solid #fff4; background: #0008; color: #fff; font-size: 13px; opacity: .55; cursor: pointer; }
.photox:hover { opacity: 1; }

/* v0.53.0 Cabal-style quest window */
.qwin .qhead { margin: 0 0 4px; font: 800 12px system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #f5b93a; }
.qwin .qname { margin: 0 0 8px; font-size: 16px; }
.qwin .qsay { background: #f3e6c4; color: #3a2a10; border: 1px solid #c9a86a; border-radius: 10px; padding: 10px 12px; font: 14px/1.4 Georgia, serif; box-shadow: inset 0 0 12px #c9a86a55; }
.qwin .qsec { margin: 10px 0 4px; font: 700 11px system-ui, sans-serif; text-transform: uppercase; color: #9ab; letter-spacing: .06em; }
.qwin .qobj { margin: 0; padding-left: 4px; list-style: none; } .qwin .qobj li { padding: 2px 0; color: #ccd; } .qwin .qobj li.ok { color: #7fd48f; } .qwin .qobj li.now { color: #ffe9a8; font-weight: 600; }
.qwin .qrew { display: flex; flex-wrap: wrap; gap: 6px; }
.qchip { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #262b40; border: 1px solid #3a4160; } .qchip.xp { color: #c6f36b; } .qchip.co { color: #ffd34d; } .qchip.it { color: #a8e0ff; } .qchip.rk { color: #ff9ad5; }

/* v0.55.0 Cabal-style NPC shop + Auction House (public/play/cabalui.js): categories left, icon grid / list right, details below */
.dcard.wide:has(.cwin) { width: min(780px, calc(100% - 24px)); }
.ctabs { display: flex; gap: 2px; margin: 6px 0 0; border-bottom: 1px solid #3a4160; }
.ctabs button { padding: 7px 14px; border: 1px solid #3a4160; border-bottom: 0; border-radius: 8px 8px 0 0; background: #181c2a; color: #aab; cursor: pointer; font-weight: 600; }
.ctabs button.on { background: #2b3150; color: #ffd98a; border-color: #f5b93a88; }
.cwin { display: grid; grid-template-columns: 150px 1fr; gap: 8px; background: #141824; border: 1px solid #3a4160; border-top: 0; border-radius: 0 0 10px 10px; padding: 8px; min-height: 280px; }
.ccats { display: flex; flex-direction: column; gap: 3px; }
.ccats button { text-align: left; padding: 7px 8px; border-radius: 7px; border: 1px solid transparent; background: #1c2133; color: #dde; cursor: pointer; font-size: 13px; display: flex; justify-content: space-between; }
.ccats button.on { background: #f5b93a22; border-color: #f5b93a; color: #ffd98a; }
.ccats button.none { opacity: .45; }
.ccats .n { color: #889; font-size: 11px; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 6px; align-content: start; max-height: 46vh; overflow: auto; padding-right: 2px; }
.ctile { background: #1c2133; border: 1px solid #2e3550; border-radius: 8px; padding: 4px; cursor: pointer; text-align: center; user-select: none; }
.ctile:hover { border-color: var(--rc); }
.ctile.sel { border-color: #f5b93a; box-shadow: 0 0 0 2px #f5b93a66; background: #2b2a2a; }
.ctile.off { opacity: .5; }
.ctile .ci { position: relative; height: 44px; display: grid; place-items: center; border-bottom: 2px solid var(--rc); margin-bottom: 3px; }
.ctile .ci img { width: 40px; height: 40px; image-rendering: pixelated; }
.ctile .cb { position: absolute; top: -2px; right: -2px; background: #0a0c12d0; color: #ffd98a; font-size: 10px; padding: 0 4px; border-radius: 6px; }
.ctile .cl { position: absolute; bottom: 0; left: 0; color: #9ab; font-size: 9px; font-style: normal; }
.ctile .cu { position: absolute; bottom: 0; right: 0; color: #7fd17f; font-size: 10px; font-style: normal; font-weight: 700; }
.ctile .cp { font-size: 10px; color: #ffd98a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cdet { display: flex; align-items: center; gap: 10px; background: #1a1f30; border: 1px solid #3a4160; border-radius: 10px; padding: 8px 10px; margin-top: 8px; min-height: 52px; }
.cdet img { width: 40px; height: 40px; image-rendering: pixelated; }
.cdet .sp { flex: 1; }
.cdet input { width: 64px; padding: 6px; border-radius: 7px; border: 1px solid #3a4160; background: #12141d; color: #fff; }
.cdet button { white-space: nowrap; padding: 7px 14px; border-radius: 8px; border: 0; background: #f5b93a; color: #231a05; font-weight: 700; cursor: pointer; }
.cdet button:disabled { opacity: .45; cursor: default; }
.clist { display: flex; flex-direction: column; min-width: 0; }
.cbar { display: flex; gap: 6px; margin-bottom: 6px; }
.cbar input { flex: 1; } .cbar select { padding: 6px; border-radius: 8px; border: 1px solid #3a4160; background: #12141d; color: #fff; }
.ctbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.ctbl th { text-align: left; color: #889; font-weight: 600; font-size: 11px; padding: 4px 6px; border-bottom: 1px solid #3a4160; }
.ctbl td { padding: 5px 6px; border-bottom: 1px solid #23283a; vertical-align: middle; }
.ctbl tr:hover td { background: #1f2538; }
.ctbl td.an img { width: 24px; height: 24px; vertical-align: middle; margin-right: 6px; image-rendering: pixelated; }
.ctbl td.pr { color: #ffd98a; white-space: nowrap; }
.ctbl button { padding: 4px 12px; border-radius: 7px; border: 1px solid #3a4160; background: #262b40; color: #dde; cursor: pointer; }
.ctbl button.go { background: #f5b93a; color: #231a05; border: 0; font-weight: 700; }
.ctbl button:disabled { opacity: .45; }
.cpager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 6px; }
.cpager button { padding: 3px 10px; border-radius: 7px; border: 1px solid #3a4160; background: #262b40; color: #dde; }
body.touch .cwin { grid-template-columns: 1fr; } body.touch .ccats { flex-direction: row; flex-wrap: wrap; } body.touch .ccats button { padding: 5px 7px; }
/* v0.55.0 the left HUD stack can be dragged by an empty part of a box */
.dcol > .globbox { cursor: grab; } .dcol > .globbox button, .dcol > .globbox a { cursor: pointer; }
.dcol.dragging, .dcol.dragging > .globbox { cursor: grabbing; user-select: none; }
.dcol.dragging > * { box-shadow: 0 8px 26px #000a; }
/* v0.55.0 Cabal-style hotbar: framed groups (Class skills · Basic · Quick) with small headers; potions are real slots inside */
.abar { align-items: flex-end; gap: 8px; padding: 14px 10px 8px; background: linear-gradient(#262a3a, #161926); border: 2px solid #7a6330; border-radius: 10px; box-shadow: 0 0 0 1px #000, inset 0 1px 0 #ffffff14, 0 6px 18px #000a; }
.abg { position: relative; padding: 4px; border: 1px solid #4a3f22; border-radius: 7px; background: #0d0f17cc; box-shadow: inset 0 1px 3px #000c; }
.abg .abl { position: absolute; top: -11px; left: 6px; padding: 0 5px; font: 800 9px system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #e8c674; background: #1f2231; border: 1px solid #4a3f22; border-radius: 4px; line-height: 13px; }
.abg .abs { display: flex; gap: 4px; }
.abar .ab { border-radius: 6px; background: linear-gradient(#30364d, #1d2132); border: 1px solid #5a5240; box-shadow: inset 0 1px 0 #ffffff1a, inset 0 -2px 3px #0008; }
.abar .ab .acd { border-radius: 6px; }
.abar .ab:hover { border-color: #f5c542; }
.potbtn.inbar { margin: 0; padding: 0; position: relative; left: auto !important; right: auto; bottom: auto !important; z-index: auto; width: 46px; height: 46px; border-radius: 6px; background: linear-gradient(#30364d, #1d2132); border: 1px solid #5a5240; box-shadow: inset 0 1px 0 #ffffff1a, inset 0 -2px 3px #0008; font-size: 22px; }
.potbtn.inbar .pcd { border-radius: 6px; }
.potbtn .ak { position: absolute; left: 3px; top: 1px; font: 800 10px system-ui, sans-serif; color: #f5b93a; }
.abar .mana { align-self: center; }
body.touch .abg .abl { display: none; } body.touch .abar { padding: 6px 8px; } body.touch .abg { padding: 2px; }

.scorebox .sub button.leavebtn { background: #7a1f1a; border-color: #e0574a; color: #fff; padding: 3px 10px; font-weight: 700; }   /* v0.55.0 easy to find */

/* v0.55.6 portrait phones: nothing over the "turn your phone sideways" screen */
@media (orientation: portrait) { body.touch .potbtn { display: none !important; } }

/* v0.56.14 the Slime Rush tracker */
.rushbar { position: fixed; z-index: 13; left: 50%; top: 104px; transform: translateX(-50%); background: #10240fe8; color: #e6ffd8; border: 1px solid #6fe08a; border-radius: 10px; padding: 5px 12px; font: 12.5px system-ui, sans-serif; white-space: nowrap; pointer-events: none; box-shadow: 0 0 10px #6fe08a55; }
.rushbar .ok { color: #ffd34d; font-weight: 700; }
body.touch .rushbar { top: calc(46px + env(safe-area-inset-top)); font-size: 11px; padding: 3px 8px; }
body:not(.touch):has(#rushBar:not([hidden])) .toast { top: 142px; }
body.touch:has(#rushBar:not([hidden])) .toast { top: calc(72px + env(safe-area-inset-top)); }
.blesschip { position: fixed; z-index: 12; right: 10px; top: 236px; background: #2a1606e8; color: #ffe2b0; border: 1px solid #ff9a3a; border-radius: 10px; padding: 4px 10px; font: 12px system-ui, sans-serif; pointer-events: auto; }
body.touch .blesschip { top: auto; bottom: calc(160px + env(safe-area-inset-bottom)); right: 8px; font-size: 11px; }
/* v0.123.7 📊 Current stats v2: the Cabal-style lower tab (dark, compact, one stat a row, value right, thin scrollbar) */
.cabtab { background: #0d0b09; border: 1px solid #3b2d1c; border-radius: 6px; margin: 8px 0 6px; box-shadow: inset 0 0 0 1px #00000080; }
.cabhead { font-size: 12px; font-weight: 700; color: #e9d6a8; padding: 5px 8px; border-bottom: 1px solid #2b2116; background: linear-gradient(#1c160f, #120e0a); }
.cablist { max-height: 232px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #6b5434 #120e0a; padding: 2px 0; }
.cablist::-webkit-scrollbar { width: 6px; } .cablist::-webkit-scrollbar-thumb { background: #6b5434; border-radius: 3px; } .cablist::-webkit-scrollbar-track { background: #120e0a; }
.cabr { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 3px 9px; font-size: 12.5px; line-height: 1.35; color: #d9ccb3; cursor: help; }
.cabr:nth-child(even) { background: #ffffff06; } .cabr:hover { background: #ffffff12; }
.cabn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cabn i { font-style: normal; font-size: 10.5px; color: #8c7d63; }
.cabv { white-space: nowrap; color: #f3e7c8; font-variant-numeric: tabular-nums; } .cabc { color: #8c7d63; }
.cabmax { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .5px; color: #1a1205; background: linear-gradient(#ffe48a, #d9a632); border-radius: 3px; padding: 0 4px; margin-left: 5px; }
.cabr.max .cabv { color: #ffd76a; }
.cabwhere { margin: 0; padding: 4px 8px 5px; font-size: 10.5px !important; }
@media (max-width: 560px) { .cabr { font-size: 12px; } .cablist { max-height: 170px; } }
.strow { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #3a2c1c; }
.stico { font-size: 22px; width: 28px; text-align: center; } .stn { flex: 1; } .stplus { color: #8fe39a; font-weight: 700; }
.stbtns { display: flex; gap: 4px; } .stbtns button { min-width: 34px; padding: 4px 6px; }

/* v0.59.0 D113 🤝 trade window */
.tdcols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tdside { border: 2px solid #3a4160; border-radius: 8px; padding: 6px 8px; background: rgba(0,0,0,.18); }
.tdside.locked { border-color: #e0b84a; } .tdside.ok { border-color: #4fc79a; }
.tdside h3 { margin: 2px 0 6px; font-size: 14px; }
.tdgrid { display: flex; flex-wrap: wrap; gap: 6px; min-height: 40px; }
.tdbag { max-height: 180px; overflow-y: auto; margin-top: 6px; }
.tdslot { display: flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 6px; background: #252b44; cursor: pointer; font-size: 12px; max-width: 170px; }
.tdslot img { width: 26px; height: 26px; image-rendering: pixelated; }
.tdslot:hover { outline: 2px solid #ffd76a; }
@media (max-width: 600px) { .tdcols { grid-template-columns: 1fr; } }
.tdslot.off { opacity: .4; cursor: not-allowed; } .tdslot.off:hover { outline: none; }
/* v0.61.0 D132 the optional "Invited by" box on sign-up */
.refbox { margin: 6px 0; padding: 4px 8px; border: 1px dashed #4a5578; border-radius: 6px; }
.refbox summary { cursor: pointer; font-size: 13px; }
.refbox label { display: block; margin-top: 4px; }
/* v0.65.0 (Jay: "party members on the left like Cabal… quests on the other side… the top-right buttons feel too big") */
.phud .pftop { display: flex; gap: 4px; }
.phud .pftop .phtog { flex: 1; }
.phud .pfr { display: flex; align-items: center; gap: 6px; margin-top: 4px; padding: 4px 6px; background: #161a28e6; border: 1px solid #3a4160; border-radius: 8px; cursor: pointer; width: 206px; box-sizing: border-box; }
.phud .pfr:hover { border-color: #7fa8ff; }
.phud .pfr.off { opacity: .5; } .phud .pfr.dead .pfhead { filter: grayscale(1); }
.phud .pfhead { position: relative; flex: 0 0 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font: 700 13px system-ui, sans-serif; color: #1c0d08; }
.phud .pfhead i { position: absolute; top: -9px; right: -7px; font-style: normal; font-size: 11px; }
.phud .pfmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.phud .pfname { font: 600 11px system-ui, sans-serif; color: #e8ecff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 4px; align-items: center; }
.phud .pfwhere { margin-left: auto; }
.phud .pfbar { height: 5px; border-radius: 3px; background: #0008; overflow: hidden; display: block; }
.phud .pfbar > span { display: block; height: 100%; }
.phud .pfbar.mp > span { background: #4a8fe0; }
.phud .pfnone { margin-top: 4px; padding: 4px 6px; }
.rcol { position: fixed; top: 214px; right: 74px; z-index: 15; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: 250px; pointer-events: none; }   /* v0.108.5 right 62 → 74 px: a 16 px gap to the quick-button column (Pixel's misclick opened Kris' quest) */
.rcol > * { pointer-events: auto; }
.rcol > .globbox { cursor: grab; touch-action: none; }   /* v0.77.1 drag the quest cards */
body.touch .rcol { top: 150px; right: 56px; transform: scale(.85); transform-origin: top right; }
.hud.tr .pill { padding: 3px 8px; font-size: 11px; }
.hud.tr { gap: 4px; }
/* v0.65.0 the walk-in party portal */
.pgate { background: rgba(110, 80, 220, .18); border: 1px solid rgba(160, 130, 255, .45); border-radius: 8px; padding: 6px 8px; margin: 4px 0; }
/* v0.69.0 the World map */
.wmap { position: relative; height: 340px; border-radius: 10px; margin: 6px 0 10px; background: radial-gradient(ellipse at 60% 50%, #1d3326 0%, #121a20 55%, #0b0f14 100%); border: 1px solid rgba(255, 211, 107, .25); overflow: hidden; }
.wmap svg { display: block; }
.wmap .wmn:not(.soon):hover circle { stroke: #ffd36b; stroke-width: 4; }
/* v0.72.0 "Dungeon cleared!" banner + auto exit */
.dclear { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); z-index: 60; min-width: 340px; text-align: center; padding: 14px 26px 12px; color: #fff3c4; font: 13px system-ui, sans-serif;
  background: linear-gradient(180deg, #3a1f0ef2, #1c0d08f2); border: 2px solid #f5b93a; border-radius: 14px; box-shadow: 0 0 0 4px #1c0d0899, 0 10px 40px #000a, 0 0 40px #f5b93a55; animation: dclearIn .45s cubic-bezier(.2,1.6,.4,1); }
.dclear h2 { margin: 0 0 4px; font-size: 30px; letter-spacing: 1px; color: #ffd84a; text-shadow: 0 2px 0 #7a3b00, 0 0 18px #ffb300aa; }
.dclear .dcl-sub { opacity: .9; margin-bottom: 8px; }
.dclear .dcl-row { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 8px; }
.dclear button { background: #f5b93a; color: #1c0d08; border: 0; border-radius: 8px; padding: 6px 14px; font-weight: 800; cursor: pointer; }
.dclear button.ghost { background: transparent; color: #fff3c4; border: 1px solid #f5b93a88; }
@keyframes dclearIn { from { transform: translateX(-50%) scale(.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }

/* v0.72.1 (Jay): system messages in their own smaller box above the chat; item names coloured by rarity */
.sysbox { margin-bottom: 4px; background: #0007; border-radius: 10px; padding: 3px 8px 4px; }
.syshead { display: flex; justify-content: space-between; align-items: center; font-size: 10px; font-weight: 700; color: #f5c96a; opacity: .85; }
.syshead button { background: none; border: 0; color: #f5c96a; cursor: pointer; font-size: 11px; padding: 0 2px; }
.syslog { max-height: 86px; overflow-y: auto; font-size: 11px; line-height: 1.3; color: #f5c96a; font-style: italic; scrollbar-width: thin; }
.syslog .m { margin: 1px 0; word-wrap: break-word; }
.sysbox.min .syslog { display: none; }
.rar-common { color: #ffffff; font-style: normal; font-weight: 700; } .rar-uncommon { color: #5fd46a; font-style: normal; font-weight: 700; } .rar-rare { color: #4a9cff; font-style: normal; font-weight: 700; }
.rar-epic { color: #b46cff; font-style: normal; font-weight: 700; } .rar-legendary { color: #ff9a2a; font-style: normal; font-weight: 700; }
@media (max-width: 600px) { .syslog { max-height: 54px; } }

/* v0.72.2 C = the bag on the right + the stats on the left */
.statside { position: fixed; left: 14px; top: 90px; z-index: 30; width: min(360px, calc(100vw - 28px)); max-height: calc(100vh - 200px); overflow-y: auto; color: #fff3c4;
  background: linear-gradient(180deg, #2a160bf0, #1c0d08f0); border: 2px solid #b8862e; border-radius: 12px; padding: 10px 12px; font: 13px system-ui, sans-serif; box-shadow: 0 8px 30px #0009; }
.statside h2 { margin: 0 0 4px; font-size: 16px; }
.statside .acts { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
@media (max-width: 800px) { .statside { display: none; } }
/* v0.73.0 the "new version" reload banner */
.reloadbar { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 70; background: #1c0d08f2; color: #fff3c4; border: 1px solid #f5b93a; border-radius: 10px; padding: 7px 12px; font: 13px system-ui, sans-serif; box-shadow: 0 6px 20px #0008; display: flex; gap: 8px; align-items: center; }
.reloadbar button { background: #f5b93a; color: #1c0d08; border: 0; border-radius: 7px; padding: 4px 10px; font-weight: 800; cursor: pointer; }
.reloadbar button.ghost { background: transparent; color: #fff3c4; border: 1px solid #f5b93a88; }
/* v0.74.1 quest cards hide while a window is open */
body.winopen .rcol { display: none; }
/* V3 M1 👥 character select */
body.v3 .v3hide { display: none !important; }
.chcard { max-width: 640px; width: 100%; }
.chcard h1 small { font-size: 14px; opacity: .7; font-weight: 400; }
.chlist { display: grid; gap: 8px; margin: 10px 0; }
.chrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.chrow.empty { justify-content: center; opacity: .45; font-style: italic; min-height: 56px; }
.chrow img { image-rendering: pixelated; }
.chinfo { flex: 1; display: grid; }
.chinfo span { font-size: 13px; opacity: .8; }
.chbar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.clgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 10px 0; }
.clpick { display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border-radius: 10px; background: rgba(255,255,255,.06); border: 2px solid transparent; color: inherit; cursor: pointer; }
.clpick.on { border-color: #f5c542; background: rgba(245,197,66,.15); }
.clpick small { font-size: 11px; opacity: .75; text-align: center; }
.clicons img { image-rendering: pixelated; }

/* V3 M4b the free-form skill bar on phones: two pages of six round buttons around the attack button (+ a page flip) */
body.touch .abar .ab.skr { position: fixed; width: 54px; height: 54px; border-radius: 50%; background: #262b40dd; border: 2px solid #ffffff55; touch-action: none; }
body.touch .abar .ab.skr .ai img { width: 40px; height: 40px; border-radius: 50%; }
body.touch .abar .ab.skr .acd { border-radius: 50%; }
body.touch .abar .ab.skr .ak { display: none; }
body.touch .abar .ab.skr[data-rad="0"] { right: calc(110px + env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom)); }
body.touch .abar .ab.skr[data-rad="1"] { right: calc(108px + env(safe-area-inset-right)); bottom: calc(96px + env(safe-area-inset-bottom)); }
body.touch .abar .ab.skr[data-rad="2"] { right: calc(30px + env(safe-area-inset-right)); bottom: calc(118px + env(safe-area-inset-bottom)); }
body.touch .abar .ab.skr[data-rad="3"] { right: calc(342px + env(safe-area-inset-right)); bottom: calc(58px + env(safe-area-inset-bottom)); }
body.touch .abar .ab.skr[data-rad="4"] { right: calc(282px + env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom)); }
body.touch .abar .ab.skr[data-rad="5"] { right: calc(278px + env(safe-area-inset-right)); bottom: calc(96px + env(safe-area-inset-bottom)); }
body.touch .abar .ab.skr[data-rad="flip"] .ai { font-size: 12px; }
body.touch .abar .ab.skr[data-rad="flip"] { right: calc(26px + env(safe-area-inset-right)); bottom: calc(182px + env(safe-area-inset-bottom)); width: 44px; height: 44px; font-size: 11px; font-weight: 700; color: #f5b93a; }

/* V3 M4c: on phones the free-form skill wheel reaches up to the ⇄ flip button, so the quest / story column sits higher and stays clear of it (a touch conflict found in M4c) */
body.touch.m4bar .rcol { top: 58px; }

/* V3 M4c follow-up (found during the deferred Playground check): in fields and dungeons the AUTO button sat on the skill wheel's ⇄ page flip (bottom 182–226 px) on landscape phones; with the M4 bar it sits above it */
body.touch.m4bar .autobtn { bottom: calc(250px + env(safe-area-inset-bottom)); }
/* …and the ⇄ flip sat on the phone mana bar (bottom 184 px in the short landscape layout): it moves just above it */
body.touch.m4bar .abar .ab.skr[data-rad="flip"] { bottom: calc(200px + env(safe-area-inset-bottom)); }

/* v0.77.0 the server wipe banner: top middle, folded by default, tap to open */
.wipebar { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 16; max-width: min(420px, 80vw); background: #3a0d0de8; color: #ffe2c4; border: 2px solid #e2553a; border-radius: 12px; font: 13px system-ui, sans-serif; box-shadow: 0 4px 18px #0008; }
.wipebar button.wh { all: unset; cursor: pointer; display: block; padding: 4px 12px; font-weight: 700; color: #ffd1a8; text-align: center; }
.wipebar .wb { padding: 0 12px 8px; line-height: 1.4; white-space: pre-line; }
.wipebar .wb .fine { opacity: .8; font-size: 12px; }
body.touch .wipebar { top: 4px; font-size: 12px; }

/* D158 🌏 server select + 👥 character page (mockup EtXRbE6vrzGhpPPujRzY36) */
#chars.gate { background: radial-gradient(ellipse at 30% 0%, #26315a 0%, #161a2b 55%, #0f1119 100%); overflow-x: hidden; }   /* blade tips past the class preview box never make phones scroll sideways (weapon25d.js, Nov 16) */
.svwrap { width: min(820px, 100%); display: grid; gap: 20px; justify-items: center; }
.svtitle { font-family: Cinzel, Georgia, serif; font-weight: 700; font-size: 40px; letter-spacing: 3px; color: #f5c04a; text-align: center; }
.svtitle.sm { font-size: 22px; letter-spacing: 2px; }
.svcard { width: 100%; box-sizing: border-box; display: grid; gap: 16px; }
.svhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.svhead h1 { margin: 0; font-size: 24px; }
.svtabs { display: flex; gap: 8px; }
.svtab { font: inherit; font-weight: 700; padding: 8px 18px; border-radius: 999px; border: 1px solid #3a3f57; background: transparent; color: #c9cddc; cursor: pointer; }
.svtab.on { border-color: #f5c04a; background: #3a3220; color: #f5c04a; }
.svtable { border: 1px solid #3a3f57; border-radius: 12px; overflow: hidden; }
.svrow { display: grid; grid-template-columns: 2.2fr 1.2fr 1.6fr 1.2fr 1.3fr; gap: 12px; padding: 14px 18px; align-items: center; border-top: 1px solid #3a3f57; }
.svrow.svth { border-top: 0; background: #262a3e; font-size: 12px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: #a3a8bd; padding: 10px 18px; }
.svrow.last { background: rgba(245,192,74,.08); box-shadow: inset 3px 0 0 #f5c04a; }
.svname { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.svname b { font-size: 19px; }
.svname small { flex-basis: 100%; color: #a3a8bd; font-size: 13px; }
.svnew { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: #f5c04a; color: #1a1408; }
.svstat { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.svstat i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.svstat.on { color: #6ee7a0; } .svstat.off { color: #f2a3ad; }
.svload { display: grid; gap: 4px; } .svload span { display: flex; gap: 4px; }
.svload i { width: 20px; height: 8px; border-radius: 3px; background: #3a3f57; }
.svload i.f { background: #6ee7a0; }
.svload[data-load="Busy"] i.f { background: #f5c04a; } .svload[data-load="Full"] i.f { background: #f2a3ad; }
.sventer { min-height: 44px; }
.svfoot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cppage { width: min(1240px, 100%); display: grid; gap: 16px; align-self: stretch; grid-template-rows: auto 1fr; }
.cptop { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cpbrand { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cpserver { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #1e2234; border: 1px solid #3a3f57; font-size: 13px; color: #c9cddc; }
.cpserver i { width: 8px; height: 8px; border-radius: 50%; background: #6ee7a0; }
.linkbtn { font: inherit; font-size: 13px; background: none; border: 0; color: #f5c04a; cursor: pointer; text-decoration: underline; padding: 8px 4px; }
.cpgrid { display: grid; grid-template-columns: 300px 1fr 290px; gap: 22px; min-height: 0; }
.cpslots { display: flex; flex-direction: column; gap: 8px; }
.cpslh { display: flex; justify-content: space-between; align-items: baseline; } .cpslh small { color: #a3a8bd; }
.cpslot { font: inherit; color: #eef0f6; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 12px; border-radius: 12px; cursor: pointer; text-align: left; background: #1e2234; border: 1px solid #3a3f57; }
.cpslot.on { background: #2b2a24; border-color: #f5c04a; }
.cpinit { width: 42px; height: 42px; border-radius: 10px; background: #2c3150; display: grid; place-items: center; font-weight: 700; color: #f5c04a; flex: none; }
.cpsi { display: grid; gap: 2px; } .cpsi small { color: #a3a8bd; }
.cpnew { font: inherit; min-height: 60px; border-radius: 12px; border: 1px dashed #4a5070; background: transparent; color: #c9cddc; cursor: pointer; }
.cpnew:disabled { opacity: .45; cursor: default; }
.cpempty { min-height: 46px; border-radius: 12px; border: 1px solid #2c3048; display: grid; place-items: center; font-size: 13px; color: #7d8299; }
.cpsupp { text-align: center; }
.cpstagecol { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; padding-bottom: 8px; }
.cpstage { width: 300px; height: 340px; display: grid; place-items: end center; }
.cpcanvas { width: 300px; height: 300px; image-rendering: pixelated; }
.cpchibi { width: 220px; image-rendering: pixelated; }
.cpshadow { width: 230px; height: 14px; border-radius: 50%; background: rgba(0,0,0,.45); margin-top: -18px; }
.cpname { font-family: Cinzel, Georgia, serif; font-size: 28px; font-weight: 700; }
.cpinfo { display: flex; flex-direction: column; gap: 14px; }
.cpk { font-size: 12px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: #a3a8bd; }
.cpdl { display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; margin: 0; font-size: 14px; }
.cpdl dt { color: #a3a8bd; } .cpdl dd { margin: 0; font-weight: 700; }
.cpgrow { flex: 1; }
.cpplay { min-height: 54px; font-size: 18px; }
.cpdel { font: inherit; min-height: 44px; border-radius: 10px; border: 1px solid #5a3a42; background: transparent; color: #f2a3ad; cursor: pointer; }
.cpcreate { justify-self: center; max-width: 760px; }
#chars button.ghost { font: inherit; font-size: 14px; min-height: 40px; padding: 8px 14px; border-radius: 8px; border: 1px solid #3a3f57; background: transparent; color: #eef0f6; cursor: pointer; }
@media (max-width: 900px) {
  .svrow { grid-template-columns: 1fr 1fr; } .svrow.svth { display: none; } .sventer { grid-column: 1 / -1; }
  .cpgrid { grid-template-columns: 1fr; } .cpstagecol { order: -2; } .cpinfo { order: -1; } .cpinfo .cpgrow { display: none; } .cpstage { height: 220px; } .cpcanvas { width: 200px; height: 200px; }
}

/* V3 D162 🧪 the test server bar (public/play/testbar.js): above everything, never catches clicks */
.testbar { position: fixed; top: 0; left: 0; right: 0; z-index: 2147483000; height: 20px; line-height: 20px; text-align: center; font: 700 12px/20px system-ui, sans-serif;
  color: #fff; background: repeating-linear-gradient(135deg, #6b2fbf 0 14px, #5a24a6 14px 28px); box-shadow: 0 1px 4px rgba(0,0,0,.4); pointer-events: none; letter-spacing: .02em; }
body.testsrv #chars, body.testsrv #gate { padding-top: 20px; }
.svnew.svtest { background: #6b2fbf; color: #fff; }

/* V3 D161 👀 the Platinum class preview at creation (public/play/v3preview.js) */
.chcard.pvcard { max-width: 980px; }
.pvwrap { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; align-items: start; }
.pvright { display: grid; gap: 8px; justify-items: center; padding: 12px; background: radial-gradient(ellipse at 50% 70%, rgba(245,197,66,.10), rgba(0,0,0,.25) 70%); }
.pvstage { width: 280px; height: 280px; display: grid; place-items: center; }
.pvcanvas { display: block; image-rendering: auto; }   /* sized inline: 280 × 280 + a transparent margin so blade tips are never cut (weapon25d.js) */
.pvempty { text-align: center; max-width: 180px; }
.pvbtns { display: flex; gap: 8px; } .pvbtns button { min-width: 96px; }
.pvhair { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
.pvh { padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: inherit; cursor: pointer; font-size: 12px; }
.pvh.on { border-color: #f5c542; background: rgba(245,197,66,.2); }
.pvh.pvc.on { outline: 2px solid #f5c542; outline-offset: 2px; }   /* v0.83.0 hair colour swatch */
.pvrole { text-align: center; font-size: 13px; } .pvrole p { margin: 4px 0 0; opacity: .85; } .pvrole small { opacity: .7; }
.pvnote { text-align: center; margin: 0; }
@media (max-width: 760px) { .pvwrap { grid-template-columns: 1fr; } .pvright { order: -1; } }
@media (max-height: 500px) and (orientation: landscape) { .pvwrap { grid-template-columns: minmax(0, 1fr) 220px; } .pvstage { width: 200px; height: 225px; } .pvcanvas { zoom: .75; } }

/* v0.85.0 Jeane's Raid Exchange */
.jlist{display:flex;flex-direction:column;gap:6px;max-height:52vh;overflow:auto;margin:8px 0}.jrow{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;padding:6px 8px;border-radius:8px;background:#0000002a}.jrow select{margin-top:4px;font-size:12px}.jp{font-weight:700;color:#ffd36b}.mwarn{color:#ffb347}
/* v0.85.0 the installed party HUD art (ui_party_*) + the stun / slow status icons */
.phud .pfr { background: url(art/ui/ui_party_frame.png) center / 100% 100% no-repeat; border: 0; border-radius: 0; padding: 6px 9px; }
.phud .pfhead { border-radius: 50%; box-shadow: none; }
.phud .pfhead::after { content: ''; position: absolute; inset: -4px; background: url(art/ui/ui_party_portrait.png) center / 100% 100% no-repeat; pointer-events: none; }
.phud .pfbar.hp { height: 8px; border-radius: 0; background: url(art/ui/ui_party_hp_track.png) center / 100% 100% no-repeat; padding: 2px 3px; box-sizing: border-box; }
.phud .pfbar.hp > span { border-radius: 2px; }
#mystatus { display: flex; gap: 4px; margin-top: 4px; pointer-events: none; }
#mystatus .st { position: relative; width: 24px; height: 24px; background: center / 100% 100% no-repeat; }
#mystatus .st b { position: absolute; right: -3px; bottom: -4px; font: 700 10px system-ui, sans-serif; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
/* v0.86.0 ⚙️ the Auto settings window (gold frame: art/ui/ui_upgrade_window) + its button beside AUTO */
.autocfgbtn { position: fixed; z-index: 9; right: calc(104px + env(safe-area-inset-right)); bottom: calc(238px + env(safe-area-inset-bottom)); width: 38px; height: 38px; border-radius: 50%; border: 2px solid #c9a24a; background: #1b2030e6; color: #fff; font-size: 18px; cursor: pointer; }
.autocfgbtn:hover { border-color: #ffd77a; }
.autowin { position: fixed; z-index: 30; right: calc(70px + env(safe-area-inset-right)); bottom: calc(290px + env(safe-area-inset-bottom)); width: 290px; max-height: 62vh; overflow: auto; color: #e8ecff; font: 13px system-ui, sans-serif;
  border: 14px solid transparent; border-image: url(art/ui/ui_upgrade_window.png) 22 fill / 14px stretch; padding: 2px 4px; box-sizing: border-box; }
.autowin .awhead { display: flex; justify-content: space-between; align-items: center; color: #ffd77a; font-size: 14px; margin-bottom: 4px; }
.autowin .awhead button { background: #2a3045; border: 1px solid #c9a24a; color: #ffd77a; border-radius: 6px; width: 24px; height: 22px; margin-left: 4px; cursor: pointer; }
.autowin.min .awbody { display: none; }
.autowin details { border-top: 1px solid #c9a24a66; padding: 5px 0; }
.autowin summary { cursor: pointer; font-weight: 700; color: #f3e2b3; }
.autowin .awrow, .autowin .awck { display: flex; align-items: center; gap: 6px; margin: 5px 0; }
.autowin .awrow input[type=range] { flex: 1; accent-color: #c9a24a; }
.autowin select { flex: 1; background: #12141d; color: #e8ecff; border: 1px solid #c9a24a; border-radius: 6px; padding: 2px 4px; }
.autowin input[type=checkbox] { accent-color: #c9a24a; }
.autowin .fine { margin: 3px 0; }
body.touch .autowin { width: 250px; bottom: calc(200px + env(safe-area-inset-bottom)); }
/* v0.90.0 (Jay, Nov 17 "install everything"): Zee's brown-gold UI kit (art/ui/bg/, sliced from the hud / controls / status / wipe sheets)
   on the HUD bars, the windows, buttons, checkboxes, radios, scrollbars, the wipe banner and the status icons. */
.tl { background: none; border: 12px solid transparent; border-image: url(art/ui/bg/panel.png) 20 fill / 12px stretch; padding: 2px 6px; border-radius: 0; }
.tlbar { height: 15px; background: url(art/ui/bg/bar_frame.png) center / 100% 100% no-repeat; border-radius: 0; padding: 3px 4px; box-sizing: border-box; }
.tlbar > div { border-radius: 2px; }
.tlbar.hp > div { background: url(art/ui/bg/bar_hp.png) left center / 100% 100% no-repeat; }
.tlbar.mp > div { background: url(art/ui/bg/bar_mp.png) left center / 100% 100% no-repeat; }
.tlbar span { line-height: 15px; }
.xpbar { height: 9px; background: url(art/ui/bg/bar_frame_thin.png) center / 100% 100% no-repeat; border-radius: 0; padding: 2px 3px; box-sizing: border-box; }
#xpFill { background: url(art/ui/bg/bar_xp.png) left center / 100% 100% no-repeat; border-radius: 1px; }
.dcard { background: #1e2233; border: 16px solid transparent; border-image: url(art/ui/ui_upgrade_window.png) 22 fill / 16px stretch; border-radius: 0; padding: 6px 8px; }
.dialog .dcard { box-shadow: 0 6px 22px #000b; }   /* v0.109.4 with no dim behind it, a soft shadow keeps the window apart from a bright world */
.dcard h2 { color: #ffd77a; }
.dcard .acts button, .autowin .awhead button { border: 10px solid transparent; border-image: url(art/ui/bg/btn.png) 16 fill / 10px stretch; background: none; border-radius: 0; color: #fff3d6; padding: 2px 8px; font-weight: 700; text-shadow: 0 1px 1px #000a; cursor: pointer; }
.dcard .acts button:hover, .autowin .awhead button:hover { border-image-source: url(art/ui/bg/btn_hover.png); }
.dcard .acts button:active { border-image-source: url(art/ui/bg/btn_down.png); }
.dcard .acts button.go { border: 10px solid transparent; border-image: url(art/ui/bg/btn_hover.png) 16 fill / 10px stretch; color: #fff; background: none; filter: drop-shadow(0 0 4px #ffd77a88); }   /* v0.96.0 (Jay 22:41: "the borders are missing"): an older `border: 0` on .go took the frame away; the selected / main button now keeps it + a gold glow */
.dcard .acts button:disabled { border-image-source: url(art/ui/bg/btn_off.png); color: #bbb; cursor: not-allowed; }
.autowin .awhead button { width: auto; height: auto; padding: 0 4px; border-width: 8px; }
input[type=checkbox], input[type=radio] { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; flex: none; margin: 0 6px 0 0; padding: 0; border: 0; vertical-align: middle; cursor: pointer;
  background: url(art/ui/bg/check.png) center / 100% 100% no-repeat; }
input[type=checkbox]:checked { background-image: url(art/ui/bg/check_on.png); }
input[type=radio] { background-image: url(art/ui/bg/radio.png); }
input[type=radio]:checked { background-image: url(art/ui/bg/radio_on.png); }
input[type=checkbox]:disabled, input[type=radio]:disabled { opacity: .5; cursor: not-allowed; }
.dcard input[type=checkbox], .dcard input[type=radio] { width: 18px; padding: 0; border: 0; border-radius: 0; background-color: transparent; }
.dcard ::-webkit-scrollbar, .autowin::-webkit-scrollbar, .dcard::-webkit-scrollbar { width: 12px; }
.dcard ::-webkit-scrollbar-track, .autowin::-webkit-scrollbar-track, .dcard::-webkit-scrollbar-track { background: url(art/ui/bg/scroll_track.png) center / 100% 100% no-repeat; }
.dcard ::-webkit-scrollbar-thumb, .autowin::-webkit-scrollbar-thumb, .dcard::-webkit-scrollbar-thumb { background: url(art/ui/bg/scroll_thumb.png) center / 100% 100% no-repeat; }
.wipebar { background: url(art/ui/bg/banner_wipe.png) left top / 100% 100% no-repeat; border: 0; border-radius: 0; min-width: 300px; padding: 10px 14px 10px 54px; box-sizing: border-box; }
#mystatus .st { width: 26px; height: 26px; }
/* the item tooltip's sockets (Cabal-style): a gem per filled socket (colour = option, cut = grade), an empty frame, a dark locked one */
.tsocks { display: flex; gap: 3px; align-items: center; margin: 4px 0 2px; }
/* v0.92.0 fix: the shorthand "background" on #tip .tsock out-ranked .tsock.e / .x and wiped their pictures (Jay: no icons) */
.tsock { width: 26px; height: 26px; background-position: center; background-size: 100% 100%; background-repeat: no-repeat; display: inline-block; position: relative; flex: none; }
.tsock.gem { background-image: url(art/ui/bg/slot.png); }
.tsock.gem i { position: absolute; inset: 3px; background: center / 100% 100% no-repeat; }
.tsock.e { background-image: url(art/ui/bg/slot.png); }
.tsock.x { background-image: url(art/ui/bg/slot_dark.png); opacity: .45; }
.tsocks .tsl { font-size: 11px; color: #b8a27f; margin-left: 4px; }
.topts { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px; }
.topt { display: flex; align-items: center; gap: 5px; color: #7fd0ff; font-size: 12px; }
.topt i { width: 14px; height: 14px; flex: none; background-position: center; background-size: 100% 100%; background-repeat: no-repeat; }

/* v0.94.0 the 20-minute run clock */
.runclock { position: fixed; top: 54px; left: 50%; transform: translateX(-50%); z-index: 40; padding: 4px 12px; border-radius: 8px; background: #1c0d08d0; color: #fff3c4; font: 700 16px system-ui, sans-serif; border: 1px solid #c9a45a; pointer-events: none; }
.runclock.warn { color: #ffd27a; } .runclock.low { color: #ff8a7a; border-color: #ff6a5a; animation: rcPulse 1s infinite; }
@keyframes rcPulse { 50% { opacity: 0.55; } }

/* v0.94.0 the Auto settings inside the field panel */
.awinline { margin: 6px 0 2px; max-height: 46vh; overflow-y: auto; text-align: left; }
.awinline details { margin: 3px 0; } .awinline summary { cursor: pointer; font-weight: 700; }
.awinline .awrow { display: flex; align-items: center; gap: 6px; } .awinline .awck { display: block; margin: 2px 0; }

/* v0.96.0 top-centre request cards (trade / party / Arena / raid invites) */
.reqcards { position: fixed; top: 96px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; width: min(360px, 92vw); pointer-events: none; }
.reqcard { pointer-events: auto; background: #1c0d08ee; border: 2px solid #c9a45a; border-radius: 10px; padding: 8px 10px 6px; color: #fff3c4; font: 13px system-ui, sans-serif; box-shadow: 0 6px 18px #0008; animation: rqIn .22s ease-out; }
.reqcard .rqh { display: flex; align-items: center; gap: 6px; font-size: 14px; } .reqcard .rqi { font-size: 18px; }
.reqcard .rqb { margin: 3px 0 0 24px; color: #e8d9b0; font-size: 12px; }
.reqcard .rqa { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; } .reqcard kbd { font: 10px system-ui; opacity: .7; border: 1px solid #fff5; border-radius: 3px; padding: 0 3px; margin-left: 3px; }
.reqcard .rqt { height: 3px; margin-top: 6px; background: #ffffff22; border-radius: 2px; overflow: hidden; } .reqcard .rqt i { display: block; height: 100%; background: #e9c46a; animation: rqTime linear forwards; }
@keyframes rqTime { from { width: 100%; } to { width: 0; } } @keyframes rqIn { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* v0.96.0 the XP log lines */
.m.sys.xp { color: #4fd1c5; } .m.sys.xp.loss { color: #3a9e95; opacity: .85; }

/* v0.96.0 the same wooden frame on every window button (row buttons, table buttons, the global / party boxes) */
.dcard .srow button, .dcard .lk button, .ctbl button, .globbox .acts button, .phud .phacts button { border: 8px solid transparent; border-image: url(art/ui/bg/btn.png) 16 fill / 8px stretch; background: none; border-radius: 0; color: #fff3d6; font-weight: 700; text-shadow: 0 1px 1px #000a; }
.dcard .srow button.go, .dcard .lk button.go, .ctbl button.go, .globbox .acts button.go, .phud .phacts button.go { border-image-source: url(art/ui/bg/btn_hover.png); color: #fff; background: none; }

/* v0.96.0 🔒 locked bag items */
.bslot.lk::after { content: '🔒'; position: absolute; left: 1px; top: 0; font-size: 10px; filter: drop-shadow(0 1px 1px #000); pointer-events: none; }
.reqcard .rqa button { border: 8px solid transparent; border-image: url(art/ui/bg/btn.png) 16 fill / 8px stretch; background: none; border-radius: 0; color: #fff3d6; font-weight: 700; padding: 0 6px; cursor: pointer; text-shadow: 0 1px 1px #000a; }
.reqcard .rqa button.go, .reqcard .rqa button:first-child { border-image-source: url(art/ui/bg/btn_hover.png); color: #fff; }

/* v0.96.0 (Jay 00:20) the chat stays usable while a window is open (trading, shops): above the dim layer */
.chat:has(#chatInput) { z-index: 55; }

/* v0.97.0 item links in chat: hover for the tooltip */
.ilink { cursor: help; text-decoration: underline dotted; font-weight: 600; color: #e8e8e8; }
.ilink.r-uncommon { color: #6fdc6f; } .ilink.r-rare { color: #5aa8ff; } .ilink.r-epic { color: #c27bff; } .ilink.r-legendary { color: #ffb347; } .ilink.r-mythic { color: #ff5a5a; }
/* v0.97.0 gear you can't wear (class or level): dark icon + a small red corner; the tooltip says why */
.nowear img, .nowear > span { filter: grayscale(0.6) brightness(0.82); }   /* v0.99.0 (Jay: "the greyed out was a bit too much, we can't tell the item"): lighter, the red corner says it */
.nowear { position: relative; }
.nowear::after { content: ''; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 13px 13px 0; border-color: transparent #e0393e transparent transparent; pointer-events: none; }
.ctile.nowear .ci img, .ctile.nowear .ci > span { filter: grayscale(0.6) brightness(0.82); }
/* v0.97.0 ✉️ player mail */
.pmbody label { display: block; margin: 4px 0; } .pmbody input, .pmbody textarea { width: 100%; box-sizing: border-box; }
.pmpick { display: flex; flex-wrap: wrap; gap: 4px; max-height: 150px; overflow: auto; margin: 4px 0; } .pmpick .bslot { width: 40px; height: 40px; position: relative; }
.pmpick .bslot img { width: 34px; height: 34px; }

/* v0.99.0 socket dots on item tiles (◆ gem, ◇ open), the ⚠ reason badge, can't-wear auction rows, bag multi-select */
.cdots { position: absolute; left: 1px; top: 0; font-style: normal; font-size: 9px; line-height: 10px; letter-spacing: -1px; color: #c9d3e6; text-shadow: 0 1px 2px #000, 0 0 2px #000; pointer-events: none; }
.cdots b { color: #ffcf4a; font-weight: 400; }
.azwin .bslot .cdots { left: auto; right: 2px; top: auto; bottom: 1px; }
.ctile .ci .cu ~ .cdots, .ctile .cdots { top: 1px; left: 2px; }
.ctile .cb.why { font-size: 11px; background: #0a0c12e0; }
.ctbl tr.nowear td { opacity: .78; } .ctbl tr.nowear td .sico { filter: grayscale(0.6) brightness(0.85); }
.ctbl tr.nowear td.an::after { content: attr(data-why); display: block; color: #ff9a8a; font-size: 10px; }
.ctbl tr.nowear td.an { position: relative; box-shadow: inset 3px 0 0 #e0393e; }
.azwin .bslot.msel { outline: 2px solid #5fb0ff; outline-offset: -2px; box-shadow: 0 0 6px #5fb0ff88; }
.ctile.msel { outline: 2px solid #5fb0ff; outline-offset: -2px; }
.adots { font-size: 10px; letter-spacing: -1px; color: #c9d3e6; }
.adots b { color: #ffcf4a; font-weight: 400; }
/* v0.99.0 (Jay's ☰ menu screenshot): the menu's checkboxes were stretched into wide bars by `.menu .vol input { flex: 1 }`,
   and the range sliders were the browser's default blue. Checkboxes keep their 18 px box; sliders get the brown-gold look. */
.menu .vol input[type=checkbox] { flex: none; min-width: 0; width: 18px; height: 18px; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 18px; background: transparent; cursor: pointer; accent-color: #c9a24a; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(#3a2a18, #5a4128); border: 1px solid #8a6a3a; }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(#3a2a18, #5a4128); border: 1px solid #8a6a3a; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 16px; margin-top: -6px; border-radius: 3px; background: linear-gradient(#ffe39a, #c9922e); border: 1px solid #5a3a12; box-shadow: 0 1px 2px #000a; }
input[type=range]::-moz-range-thumb { width: 14px; height: 16px; border-radius: 3px; background: linear-gradient(#ffe39a, #c9922e); border: 1px solid #5a3a12; box-shadow: 0 1px 2px #000a; }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: #c9a24a; }
/* v0.99.0 the ☰ menu in sections */
.menu > .mhead { padding: 7px 14px 3px; font-size: 11px; font-weight: 700; letter-spacing: .4px; color: #c9a24a; text-transform: uppercase; background: #0003; border-bottom: 1px solid #c9a24a33; cursor: default; }
.menu > .mhead:hover { background: #0003; }
.menu .vol select { margin-left: auto; background: #2a2418; color: #ffe9b8; border: 1px solid #8a6a3a; border-radius: 4px; padding: 2px 4px; }
/* v0.99.0 UI sweep: the ☰ menu ran off the bottom of the screen on PCs (Log out unreachable) and the quest card / 📊 / 📬 buttons
   were drawn over it; it scrolls now and sits on top while open. The key hints get a small key cap. */
.menu { max-height: calc(100vh - 60px); overflow-y: auto; z-index: 120; }
.menu kbd { margin-left: 6px; padding: 0 5px; border: 1px solid #8a6a3a; border-bottom-width: 2px; border-radius: 4px; background: #2a2418; color: #ffe9b8; font: 11px system-ui, sans-serif; }

/* v0.99.0 Auction: My listings */
.asum { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.aslots { display: flex; align-items: center; gap: 3px; } .aslots i { width: 12px; height: 8px; border-radius: 2px; background: #2a2f44; border: 1px solid #3a4160; } .aslots i.on { background: #c9a24a; border-color: #ffd77a; } .aslots .fine { margin-left: 6px; }
.ctabs.small button { padding: 3px 10px; font-size: 12px; }
.ctbl.amine td { padding-top: 4px; padding-bottom: 4px; }
.ctbl .aact { white-space: nowrap; text-align: right; }
.ctbl button.ib { border-width: 6px; padding: 0 4px; min-width: 30px; font-size: 13px; margin-left: 3px; }

/* v0.100.0 👥 buddies */
.bdot { width: 9px; height: 9px; border-radius: 50%; background: #555; margin-right: 8px; flex: none; } .bdot.on { background: #5ad16a; box-shadow: 0 0 6px #5ad16a; }
.srow.boff b { color: #9aa; }
.pfr .prdy { margin-left: 4px; }
.pbgoal { display: inline-block; background: #2a2418; border: 1px solid #8a6a3a; border-radius: 4px; padding: 0 5px; font-size: 11px; margin-right: 4px; }

/* v0.103.0 🔧 update countdown */
.patchbox { position: fixed; z-index: 60; top: 18%; left: 50%; transform: translateX(-50%); width: min(460px, 92vw); padding: 18px 22px 16px; border-radius: 16px; border: 2px solid #f5b93a; background: linear-gradient(#2a1a08f2, #140b06f2); color: #ffe7a0; text-align: center; box-shadow: 0 0 32px #f5b93a77; font-family: system-ui, sans-serif; pointer-events: none; animation: rareIn .4s ease-out; }
.patchbox .pb-t { font: 800 18px system-ui, sans-serif; letter-spacing: .5px; }
.patchbox .pb-n { font: 900 84px/1.05 system-ui, sans-serif; color: #fff3c4; text-shadow: 0 0 18px #f5b93a; margin: 4px 0; }
.patchbox .pb-n.pb-hot { color: #ffb080; text-shadow: 0 0 22px #ff6a2a; animation: pbPulse 1s ease-in-out infinite; }
.patchbox .pb-note { font: 700 14px system-ui, sans-serif; color: #fff; margin-bottom: 6px; }
.patchbox .pb-tip { font: 600 14px system-ui, sans-serif; color: #e9d7a8; }
@keyframes pbPulse { 50% { transform: scale(1.08); } }

/* v0.104.0 📖 Monster Book + 🗃️ Codex */
table.cdx { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; }
table.cdx th, table.cdx td { padding: 3px 6px; border-bottom: 1px solid #ffffff1a; text-align: left; }
.cdx-st { color: #f5b93a; letter-spacing: 1px; } .cdx-done { color: #7be08a; font-weight: 700; }
.cdx-items { display: flex; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow: auto; } .cdx-note { font-size: 12px; opacity: .8; } .cdx-tot { font-size: 14px; }

/* v0.123.0 🐾 Pets window */
.petcard { border: 1px solid #4a3822; border-radius: 8px; padding: 6px 10px; margin: 6px 0; background: rgba(0, 0, 0, 0.2); }
.petcard.act { border-color: #ffd76a; box-shadow: 0 0 0 1px #ffd76a55 inset; }
.pethead { display: flex; align-items: center; gap: 8px; } .pethead button { margin-left: auto; }
.petrow { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; margin: 3px 0; }
.petbar { height: 6px; background: #2a1e12; border-radius: 3px; overflow: hidden; margin: 3px 0; } .petbar i { display: block; height: 100%; background: #8fe39a; }
.petsks { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; } .petsk { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: #2a1e12; color: #a89880; cursor: help; } .petsk.on { color: #ffe08a; } .petsk i { font-style: normal; opacity: 0.7; }
.petfood { display: flex; flex-wrap: wrap; gap: 4px; } .petfood button { font-size: 12px; padding: 3px 6px; }
.petshop { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
@media (max-width: 560px) { .petrow { font-size: 12px; } .petfood button { flex: 1 1 45%; } }

/* v0.123.6 ⚒️ Extract All review */
.bxall { white-space: nowrap; }
.xatools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 4px 0; } .xatools .fine { margin-left: auto; }
.dialog:has(.xalist), .dialog:has(.xaresult) { z-index: 60; }   /* above the bag window and the chat box (55): the review must be fully visible */
.xalist { max-height: 40vh; overflow-y: auto; border: 1px solid #4a3822; border-radius: 8px; padding: 2px 6px; background: rgba(0, 0, 0, 0.2); }
.xarow { display: flex; align-items: center; gap: 8px; padding: 5px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); cursor: pointer; }
.xarow:last-child { border-bottom: 0; } .xarow input { width: 18px; height: 18px; flex: none; }
.xan { flex: 1 1 auto; min-width: 0; } .xay { flex: none; text-align: right; }
.xarow.r-uncommon .xan { color: #8fe39a; } .xarow.r-rare .xan { color: #7fb6ff; } .xarow.r-epic .xan { color: #d59cff; }
.xatot { margin: 8px 0 4px; }
@media (max-height: 460px) { .xalist { max-height: 24vh; } .xatools { margin: 2px 0; } }
@media (max-width: 560px) { .xarow { flex-wrap: wrap; } .xay { flex-basis: 100%; text-align: left; padding-left: 26px; } }

/* Squad P1 Stage 1: the helpers window */
.sqlist { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 4px; max-height: 300px; overflow-y: auto; }
.sqrow { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid #3b2d1c; border-radius: 6px; background: #120e0a; }
.sqrow.out { border-color: #6a8f3a; background: #141a0c; }
.sqn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sqon { color: #b6e27a; font-size: 12px; white-space: nowrap; }
.sqcount { margin: 4px 0; font-weight: 700; color: #e9d6a8; }
@media (max-width: 560px) { .sqrow { gap: 6px; padding: 6px 8px; } .sqrow button { padding: 4px 8px; font-size: 12px; } }

/* Squad P1 Stage 2: the helpers bar (select + hold / follow); right-click / tap orders the selected helpers */
.squadbar { position: fixed; z-index: 12; left: 50%; transform: translateX(-50%); bottom: 96px; display: flex; gap: 6px; align-items: center; padding: 5px 8px; background: #120e0ae8; border: 1px solid #6a8f3a; border-radius: 8px; font: 12px system-ui, sans-serif; color: #e9d6a8; pointer-events: auto; }
.squadbar .sqbt kbd { font-size: 10px; }
.squadbar button { padding: 3px 8px; font-size: 12px; border-radius: 6px; background: #1c160f; color: #e9d6a8; border: 1px solid #3b2d1c; cursor: pointer; }
.squadbar .sqchip.on { background: #2b3a14; border-color: #b6e27a; color: #fff; box-shadow: 0 0 0 1px #b6e27a inset; }
body.touch .squadbar { bottom: calc(150px + env(safe-area-inset-bottom)); left: 50%; }
.squadbar .sqplay.on { background: #3a2a10; border-color: #ffd76a; color: #fff; box-shadow: 0 0 0 1px #ffd76a inset; }
.squadbar button, .squadbar .sqbt { white-space: nowrap; }
@media (max-width: 900px) { body.touch .squadbar { gap: 4px; padding: 3px 5px; max-width: calc(100vw - 260px); overflow-x: auto; } body.touch .squadbar button { padding: 2px 6px; font-size: 11px; } body.touch .squadbar kbd, body.touch .squadbar .sqbt { display: none; } }
/* v0.123.12 open-bugs sweep (Aza handoff AG). The quest cards (.rcol) and the 📬 button live outside the game layer, so they drew over the
   ☰ menu and over the open chat: hidden while either is open. On phones the menu sits above the chat and the quick buttons (G1, G4). */
body:has(#menu:not([hidden])) .rcol, body:has(#menu:not([hidden])) .mailfab, body.touch.chat-open .rcol, body.touch.chat-open .mailfab { display: none; }
body.touch .menu { z-index: 120; }
body.touch:has(#menu:not([hidden])) .potbtn, body.touch.chat-open .potbtn { display: none !important; }   /* the 🧪 / 💧 / 🪽 quick buttons too (they sit outside the game layer) */
/* G2 (PC): with a window open the chat keeps its input but shrinks, so it doesn't cover the window */
body:not(.touch):has(#dialog:not([hidden])) .chatlog { max-height: 54px; }
body:not(.touch):has(#dialog:not([hidden])) .syslog { display: none; }

