/* ── Navbar ── */
.navbar { position: absolute; inset: 0 0 auto 0; height: var(--navbar-h); display: flex; align-items: stretch; pointer-events: auto;
  background: linear-gradient(#241d15, #15110c); border-bottom: 1px solid var(--border-dark); box-shadow: 0 1px 0 #000; }
.nav-drag { align-self: stretch; }
.chat-tabs { position: relative; display: flex; align-items: center; gap: 2px; padding: 0 8px; }
.nav-btn { min-height: 30px; padding: 0 10px; align-self: center; background: none; border: 1px solid transparent; border-radius: 3px; color: var(--text-muted); display: inline-grid; place-items: center; }
.nav-btn:hover { color: var(--text); background: var(--bg-hover); }
.nav-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--border); background: var(--bg-raised); box-shadow: inset 0 -2px 0 var(--accent); }
.ping { align-self: center; padding: 0 12px; font-size: var(--size-small); color: var(--text-muted); }
.online { align-self: center; padding: 0 0 0 12px; font-size: var(--size-small); color: var(--text-muted); }
.ping::before { content: "●"; margin-right: 6px; }
.ping[data-quality="good"]::before { color: var(--good); }
.ping[data-quality="fair"]::before { color: var(--warn); content: "◐"; }
.ping[data-quality="poor"]::before { color: var(--danger); content: "○"; }
.popup { position: absolute; z-index: 50; background: var(--bg); box-shadow: 0 6px 18px #000c; }
/* Beside the console, not over it: what the options change is seen while they are changed. */
.chat-filter { top: calc(var(--navbar-h) - 4px); left: 790px; padding: 8px 12px; display: flex; flex-direction: column; gap: 5px; width: 320px; }
.chat-option { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; }
.menu-popup { position: fixed; min-width: 190px; padding: 2px; display: flex; flex-direction: column; }
.menu-popup .list-row { background: none; color: var(--text); }
.menu-popup .list-row:hover:not(:disabled), .menu-popup .list-row:focus-visible { background: var(--bg-hover); }
.menu-popup .list-row:disabled { opacity: .4; cursor: var(--cursor); }
.menu-popup .list-row.danger { color: #ff9c8f; }
.menu-title { padding: 2px 8px; }
.tooltip { position: fixed; z-index: 60; max-width: 340px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 3px; overflow-wrap: anywhere; }
.drag-ghost { position: fixed; z-index: 61; width: 48px; height: 48px; margin: -24px 0 0 -24px; object-fit: contain; opacity: .85; filter: drop-shadow(0 2px 3px #000); }
/* Neither may come between the pointer and what it is over (#overlays turns its children on). */
#overlays > .tooltip, #overlays > .drag-ghost { pointer-events: none; }

/* ── Play area ── */
.play { position: absolute; inset: var(--navbar-h) var(--sidebar-w) 0 0; pointer-events: auto; overflow: hidden; }
.play > * { pointer-events: none; }
.update-notice { left: 50%; top: calc(var(--navbar-h) + 18px); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 12px; pointer-events: auto; }
.console { position: absolute; left: 8px; top: 6px; width: 51%; display: flex; flex-direction: column; gap: 1px; }
/* While a message is being written a name can be clicked (a private message to them); paged back
   from the latest line, the console says so with a mark on its edge. */
.console.typing .chat-name { pointer-events: auto; cursor: pointer; }
.console.typing .chat-name:hover { text-decoration: underline; }
.console.paged { box-shadow: -3px 0 0 var(--accent); padding-left: 6px; }
.line { margin: 0; font-size: var(--chat-size, 16px); line-height: var(--chat-leading, 1.22); overflow-wrap: anywhere;
  text-shadow: -1px 0 #000d, 1px 0 #000d, 0 -1px #000d, 0 1px #000d; transition: opacity 2.5s linear; }
.line.fading { opacity: 0; }
/* The one part of a console line that takes the pointer, floating or pinned. */
.chat-link { pointer-events: auto; padding: 0; background: none; border: 0; font: inherit; color: inherit; text-shadow: inherit; text-decoration: underline; cursor: pointer; user-select: text; }
.chat-link:hover { color: var(--accent); }
.history { position: absolute; left: 0; top: 0; width: 55%; pointer-events: auto; background: #0c0a08d9; border: 1px solid var(--border-dim); border-top: 0; border-radius: 0 0 4px 0; }
.history-text { height: calc(var(--chat-log-lines, 11) * var(--chat-size, 16px) * var(--chat-leading, 1.22) + 12px); padding: 6px 8px; user-select: text; -webkit-user-select: text; }
/* Pinned: a translucent log the mouse passes through. */
.history.ghost { pointer-events: none; background: #0c0a0855; border-color: transparent; }
.history.ghost .history-text { overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.history.ghost .line { text-shadow: -1px 0 #000, 1px 0 #000, 0 -1px #000, 0 1px #000, 0 0 4px #000; }
.chat-bar { position: absolute; left: 50%; bottom: 8px; width: min(760px, calc(100% - 16px)); transform: translateX(-50%); display: flex; gap: 4px; pointer-events: auto; }
.chat-bar .input { min-height: 34px; background: #0f0d0ae6; }
.chat-bar select.input { width: 150px; flex: none; color: var(--ch, var(--text)); }
.chat-bar .input:not(select) { box-shadow: inset 3px 0 0 var(--ch, transparent); }
.chat-keys { position: absolute; left: 0; right: 0; bottom: 100%; margin: 0 0 4px; text-align: center; font-size: 13px; color: var(--text-muted); text-shadow: 0 0 3px #000, 0 1px 1px #000; pointer-events: none; }
/* Tabs: what arrived unseen is counted on the tab it went to. */
.chat-tab { display: inline-flex; align-items: center; gap: 6px; }
.tab-count { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #17130a; font: 11px/16px var(--font-ui); letter-spacing: 0; text-align: center; }
/* Log lines: the hour, and names that answer a click (only where the log takes the mouse). */
.line-time { margin-right: 7px; font-size: 13px; color: var(--text-muted); font-weight: normal; font-style: normal; font-variant-numeric: tabular-nums; opacity: .8; }
.chat-name { padding: 0; background: none; border: 0; font: inherit; font-weight: bold; color: inherit; text-shadow: inherit; pointer-events: none; }
.history:not(.ghost) .chat-name { pointer-events: auto; cursor: pointer; }
.history:not(.ghost) .chat-name:hover { text-decoration: underline; }
.history-jump { position: absolute; right: 16px; bottom: 8px; padding: 2px 12px; border: 1px solid var(--accent); border-radius: 12px; background: var(--bg); color: var(--accent); font-size: 13px; box-shadow: 0 2px 8px #000a; }
.history-jump:hover { background: var(--bg-hover); }

.tracker { position: absolute; right: 10px; top: 8px; width: 280px; text-shadow: 0 0 3px #000, 0 1px 1px #000; }
.tracker button { pointer-events: auto; }
/* An achievement just earned: centred over the top of the play area, then fading. */
.achv-banner-area { position: absolute; left: 0; right: 0; top: 150px; display: flex; justify-content: center; pointer-events: none; }
.achv-banner { min-width: 380px; padding: 10px 48px 12px; text-align: center; text-shadow: 0 1px 2px #000;
  background: linear-gradient(90deg, transparent, #0b0c10e8 20%, #0b0c10e8 80%, transparent);
  border-image: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent) 1; border-style: solid; border-width: 1px 0;
  animation: achv-in .32s ease-out; transition: opacity .8s; }
.achv-banner.leaving { opacity: 0; }
.achv-banner-title { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.achv-banner-name { font: 24px/1.25 var(--font-title, inherit); color: #fff; }
.achv-banner-reward { font-size: 13px; color: var(--good, #8fdc9a); margin-top: 2px; }
@keyframes achv-in { from { opacity: 0; transform: translateY(-8px) scale(1.05); } }
/* Staff watching another character's screen: a bar over the play area naming whom, with the way out. */
.spectate-bar { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); display: flex; gap: 10px; align-items: center;
  padding: 6px 12px; background: rgba(0, 0, 0, .72); border: 1px solid var(--accent); border-radius: 3px; color: #fff; pointer-events: auto; z-index: 5; }
.spectate-bar b { color: var(--accent); }
/* The camera is for an audience: the bar fades to a name, and the chat line is not shown. */
#hud.camera .spectate-bar { opacity: .55; }
#hud.camera .spectate-bar button { display: none; }
#hud.camera .chat-bar { display: none !important; }
/* A level gained: the same banner, risen from below with a gold flare behind its number. */
.level-banner { animation: level-in .55s cubic-bezier(.2, 1.4, .4, 1); }
.level-banner .achv-banner-name { color: var(--gold, #f2c14e); animation: level-flare 1.6s ease-out; }
@keyframes level-in { from { opacity: 0; transform: translateY(14px) scale(.85); } }
@keyframes level-flare { 0% { text-shadow: 0 0 0 transparent; } 25% { text-shadow: 0 0 18px var(--gold, #f2c14e), 0 0 4px #fff; } 100% { text-shadow: 0 1px 2px #000; } }
.tracker-quest { margin-bottom: 6px; transition: background-color 0.4s; border-radius: 4px; }
/* The quest that just moved, for a few seconds. */
.tracker-quest.lit { background: #e8c26a26; box-shadow: inset 2px 0 0 #f1d38b; padding-left: 6px; }
.tracker-quest.lit .gold { color: #ffe39a; }
.death { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(ellipse at center, #6a0d0a33, #40050599); text-shadow: 0 2px 4px #000; }
.death .title { color: #ff8273; font-size: 44px; }
.death button { pointer-events: auto; }
.debug { position: absolute; left: 50%; top: calc(var(--navbar-h) + 6px); transform: translateX(-50%); margin: 0; padding: 8px 12px; pointer-events: none;
  font: 13px/1.45 Consolas, "Cascadia Mono", monospace; color: #e8e6e1; background: #000000b8; border: 1px solid var(--border-dim); border-radius: 3px; white-space: pre; z-index: 5; }

/* ── Hotbar ── */
.hotbar { position: absolute; display: flex; align-items: center; gap: 3px; padding: 3px; pointer-events: auto; background: #0c0a08b3; border: 1px solid var(--border-dim); border-radius: 4px; }
.hotbar.vertical, .hotbar.vertical .hot-row { flex-direction: column; }
.hot-row { display: flex; gap: 3px; }
.hot-slot { width: 48px; height: 48px; flex: none; background: #0f0d0ad9; }
.hot-key { position: absolute; left: 3px; top: 0; font-size: 11px; color: var(--gold-dim); text-shadow: 0 0 2px #000; }
.hot-slot .macro { color: var(--text); overflow: hidden; max-width: 44px; }
.hot-grip { cursor: grab; touch-action: none; }
.hot-grip, .hot-turn { width: 22px; height: 30px; }
.spell-ring { display: inline-block; border: 3px solid; border-radius: 50%; flex: none; }

/* ── Sidebar ── */
.sidebar { position: absolute; inset: var(--navbar-h) 0 0 auto; width: var(--sidebar-w); pointer-events: auto;
  display: flex; flex-direction: column; gap: 6px; padding: 4px; }
.sidebar > .rule { margin: 0; }
.side-head { display: flex; gap: 8px; flex: none; }
.radar-col { width: 50%; display: flex; flex-direction: column; gap: 3px; }
.radar { position: relative; width: 100%; aspect-ratio: 33 / 23; padding: 0; background: none; cursor: pointer; }
.radar:hover { filter: brightness(1.3); }
.radar { overflow: hidden; }
.radar-map, .radar-dots { position: absolute; left: 0; top: 0; pointer-events: none; }
.radar-map { transition: transform .25s linear; will-change: transform; }
.radar-map img { position: absolute; display: block; height: auto; }
/* A jump across the world (hud/sidebar.js): everything takes its new place at once. */
.radar.snap .radar-map, .radar.snap .radar-dot, .radar.snap .radar-exit { transition: none; }
.radar-dot { transition: transform .25s linear; position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: #c0c0c8; }
.radar-exit { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: #ffffff; box-shadow: 0 0 0 1px #000a; transition: transform .25s linear; }
.radar-dot.npc { background: #7fd19a; }
.radar-dot.npc.hostile { background: #e0524a; }
.radar-dot.party { background: #73f273; }
.radar-dot.guild { background: #8ccbff; }
.radar-cross { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.coords { color: var(--gold-dim); font-size: var(--size-small); }
.zone[data-zone="safe"], .sidebar .coords[data-zone="safe"] { color: var(--good); }
.zone[data-zone="unsafe"], .zone[data-zone="arena"], .sidebar .coords[data-zone="unsafe"], .sidebar .coords[data-zone="arena"] { color: var(--danger); }
.zone[data-zone="nocombat"], .zone[data-zone="immune"], .sidebar .coords[data-zone="nocombat"], .sidebar .coords[data-zone="immune"] { color: var(--warn); }
/* What the character is, centred in the height the radar gives the row. */
.char-panel { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.char-panel > .char-name { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.char-fact { font-size: 14px; line-height: 1.25; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-foot { display: flex; justify-content: center; min-width: 0; }
/* Coordinates and ground under the radar, together in the middle rather than at its two edges. */
.radar-foot { justify-content: center; gap: 14px; }
/* The level medallion: the number in the middle, a ring that fills with the experience toward the
   next level (--xp, 0..1), lit in the accent. */
.char-ident { display: flex; align-items: center; gap: 10px; min-width: 0; }
.char-who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* A column of its own width: what the figure under the medallion says (and how long it is) must
   not move the medallion or the name beside it. */
.badge-col { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; }
.badge-col > .xp-float { bottom: auto; top: -16px; left: -30px; right: -30px; }
/* Without the ring's progress (experience on the bar): an empty ring, which reads as no figure
   rather than as a full one. */
.level-badge.plain { background: radial-gradient(circle at 50% 35%, #2a2416 0%, #12100b 70%) padding-box, linear-gradient(#ffffff1f, #ffffff1f) border-box; }
.level-badge.gained { animation: xp-gain .7s ease-out; }
/* The experience figure: under the medallion, or inside the thick bar. A click cycles what it says. */
.xp-under { width: 100%; padding: 0; border: 0; background: none; text-align: center; font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: inherit; }
.xp-under:hover { color: var(--text); }
.xp-thick { position: relative; display: block; width: 100%; height: 24px; padding: 0; border: 1px solid #ffffff1f; border-radius: 12px;
  background: var(--bar-track, #0008); overflow: hidden; cursor: inherit; }
.xp-thick > i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--bar-xp), #9be3b6); box-shadow: 0 0 8px #5fbf7a66; transition: width .3s ease-out; }
.xp-thick > .xp-text { position: absolute; inset: 0; display: block; text-align: center; font-size: 15px; font-weight: 600; line-height: 22px; color: var(--text); }
.xp-thick > .xp-text.on-fill { color: #0b1a10; clip-path: inset(0 calc(100% - var(--share, 0%)) 0 0); }
.xp-thick:hover { border-color: var(--accent); }
.xp-thick.gained > i { animation: xp-gain .7s ease-out; }
.level-badge {  position: relative; flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(circle at 50% 35%, #2a2416 0%, #12100b 70%) padding-box,
              conic-gradient(var(--accent) calc(var(--xp, 0) * 360deg), #ffffff1f 0) border-box;
  border: 3px solid transparent; box-shadow: 0 0 0 1px #000a, 0 2px 8px #0008; }
.level-num { font: 22px/1 var(--font-title, inherit); color: var(--gold); text-shadow: 0 1px 2px #000; }
.level-cap { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-top: 1px; }
.char-line { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.char-guild { align-self: flex-start; max-width: 100%; padding: 0 7px; border: 1px solid var(--gold-dim); border-radius: 9px;
  font-size: 12px; line-height: 17px; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.char-name { font: 21px/1.15 var(--font-title); color: var(--gold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* As tall as its pages need, not as the dock: what is left goes to the status box. */
.notebook { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
.notebook .tabs .tab { flex: 1; }
/* Both pages in one cell, the hidden one still taking its room, so the body is the taller one's
   height whichever tab is open (`buildSidebar`). */
.notebook-body { min-height: 0; padding-top: 4px; }
/* ⚠ Two classes deep: `.tab-body` in panels.css, which loads later, makes every tab body a flex box. */
.notebook > .notebook-body { flex: 0 1 auto; display: grid; }
.notebook-body > * { grid-area: 1 / 1; }
.notebook-body > .off { visibility: hidden; }
.bag-page, .spells-page { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; min-height: 0; }
/* Cells are square and 30..72 px; the grid shrinks to the height the dock has left. */
.bag-grid { flex: 0 1 auto; min-height: 0; overflow: auto; align-content: start; width: min(100%, 6 * 72px + 15px); margin: 0 auto; }
.detail-box { flex: none; min-height: 52px; padding: 1px 6px; }
/* A height of its own: what is selected must not move the grid above it or resize a window. It
   grows only by what the spell page is taller than the bag, so the purse sits at the foot of the
   page as the cast button does on the other tab. */
.bag-page .detail-box { flex: 1 0 76px; min-height: 76px; overflow: auto; }
.bag-grid { min-height: 34px; }
.detail-box .accessory { color: var(--good, #8fd18f); margin-top: 2px; }
.purse { display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px; background: none; border: 1px solid transparent; border-radius: 3px; color: var(--gold); cursor: pointer; }
.purse:hover { border-color: var(--border-dim); background: var(--bg-hover); }
/* Fourteen rows, whatever is selected: what a spell does opens from its ⓘ, so nothing under the
   list changes height and moves it. Slid over with the button held, it selects, so no text does. */
.spell-list { flex: 0 1 auto; box-sizing: content-box; height: calc(14 * 34px); min-height: 60px; user-select: none; -webkit-user-select: none; }
.spell-list.as-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; align-content: start; }
.spell-row { flex: none; height: 34px; min-height: 0; padding-right: 3px; }
.spell-row:hover:not([aria-selected="true"]) { background: var(--bg-hover); }
.spell-pick { flex: 1 1 0; min-width: 0; align-self: stretch; display: flex; align-items: center; gap: 8px; padding: 0; background: none; border: 0; color: inherit; text-align: left; }
.spell-pick > .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spell-row .spell-info { flex: none; }
/* The one action of the page, in the accent and in capitals: among the grey rows it has to be
   found at a glance. */
.cast-btn { min-height: 44px; font-size: 17px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.spell-actions > .icon-btn { width: 44px; height: 44px; }
/* Whatever height the notebook leaves, never less than a line of effects. */
.status-box { flex: 1 0 74px; min-height: 74px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; padding: 2px 4px; overflow: hidden; }
/* A chip per effect: its mark, what it is, the time it has left. Green helps, red harms, amber
   holds (a condition), gold is a rate. */
.fx { display: inline-flex; align-items: center; gap: 4px; color: var(--good); }
.fx.debuff, .fx.danger { color: var(--danger); }
.fx.condition { color: var(--warn); }
.fx.rate { color: var(--gold); }
.fx.more { color: var(--text-muted); }
.fx-mark { display: inline-grid; place-items: center; flex: none; }
.fx-mark svg { width: 14px; height: 14px; }
.fx-name { white-space: nowrap; }
.blink { animation: blink .6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .3; } }
.vitals { flex: none; display: flex; flex-direction: column; gap: 3px; }
.needs > * { flex: 1; }
.quick-row { flex: none; display: flex; flex-wrap: wrap; gap: 3px; }
.lock.open { color: var(--warn); border-color: var(--warn); }

/* ── Feedback shared by every theme ── */
.drag-ghost { display: grid; place-items: center; pointer-events: none; }
.list-row.drop { background: var(--bg-hover); box-shadow: inset 0 2px 0 var(--accent); }
.hot-slot { transition: transform .08s ease-out, filter .08s ease-out; }
.hot-slot .cost { color: #a9c8ff; }
.hot-slot.short img, .hot-slot.short .spell-ring { opacity: .35; filter: grayscale(1); }
.hot-slot.short .cost { color: var(--danger); }
.hot-slot.missing { opacity: .5; }
/* Locked: a spell the bar may not hold any more (put there before the rule). It stays, greyed,
   under a "no" sign, and says why when pressed. */
.hot-slot.locked img, .hot-slot.locked .spell-ring { opacity: .35; filter: grayscale(1); }
.hot-slot .hot-lock { position: absolute; inset: 0; display: grid; place-items: center; color: var(--danger); pointer-events: none; }
.hot-slot.fired { transform: scale(.9); filter: brightness(1.7); }
/* Held: its key is still down. A potion it keeps drinking flashes the slot as each one lands. */
.hot-slot.held { transform: scale(.9); filter: brightness(1.5); }
.hot-slot.used { animation: hot-used .3s ease-out; }
@keyframes hot-used { from { box-shadow: 0 0 0 2px var(--accent), 0 0 12px var(--accent); } }
/* Armed: the next click in the world is this spell's target. */
.hot-slot.armed, .spell-list .armed { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); animation: armed .7s ease-in-out infinite alternate; }
@keyframes armed { to { box-shadow: inset 0 0 0 2px var(--accent), 0 0 12px var(--accent); } }
.quick-row .icon-btn { position: relative; }
/* Calling: something behind the button waits for an answer (a party invitation, a friend request).
   A glow and nothing else: the frame is the open panel's (aria-pressed). */
.quick-row .icon-btn.calling { color: var(--accent); animation: calling .7s ease-in-out infinite alternate; }
@keyframes calling { from { box-shadow: 0 0 2px 0 transparent; } to { box-shadow: 0 0 12px 1px var(--accent); } }
.badge { position: absolute; right: -4px; top: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; pointer-events: none;
  background: #c8372c; color: #fff; font: 11px/16px var(--font-ui); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.bar.gained > i { animation: xp-gain .7s ease-out; }
/* "+N EXP" over the experience bar: held for half its time, faded over the other half. */
.xp-wrap { position: relative; }
.xp-float { position: absolute; left: 0; right: 0; bottom: 100%; text-align: center; font-size: 12px; font-weight: 600;
  color: var(--bar-xp); text-shadow: 0 0 3px #000, 0 1px 1px #000; opacity: 0; pointer-events: none; white-space: nowrap; }
.xp-float.level { color: var(--accent); }
.xp-float.on { animation: xp-float var(--hold, 1.4s) linear forwards; }
@keyframes xp-float { 0% { opacity: 1; transform: translateY(2px); } 10% { transform: none; } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(-4px); } }
@keyframes xp-gain { 30% { filter: brightness(1.9); } }
/* Cooling down: a shade that drains off the slot. It is animated from script (`coolShade`), on the
   clock of the cast, so a tab that was hidden meanwhile shows it where it is. */
.cool { position: absolute; inset: 0; background: #000000a6; transform-origin: bottom; pointer-events: none; }
/* A row of the spell list drains sideways. */
.spell-row { position: relative; overflow: hidden; }
.spell-row > .cool { transform-origin: right; }
/* Parts only the Pulse HUD shows (css/hud-pulse.css). */
.alerts, .chat-hint { display: none; }
@media (prefers-reduced-motion: reduce) {
  .hot-slot, .hot-slot.armed, .hot-slot.used, .spell-list .armed, .quick-row .calling, .bar.gained > i, .xp-float.on { animation: none; transition: none; }
}

/* ── What cannot be used right now is red, wherever it shows ── */
/* An action bar slot whose spell is beyond the mana left, whose item is gone or cannot be used. */
.hot-slot.short, .hot-slot.missing, .hot-slot.unusable { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); background: #ff5a4d1f; opacity: 1; }
.hot-slot.missing img { opacity: .45; filter: grayscale(1); }
.hot-slot.missing .amt { color: var(--danger); }
/* A spell beyond the mana left: the whole row says so, not only its number. */
.spell-row.short { box-shadow: inset 3px 0 0 var(--danger); background: #ff5a4d14; color: var(--danger); }
.spell-row.short .spell-ring, .spell-row.short img { opacity: .45; filter: grayscale(1); }
.spell-list.as-grid .slot.short { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); background: #ff5a4d1f; }
.spell-list.as-grid .slot.short img, .spell-list.as-grid .slot.short .spell-ring { opacity: .45; filter: grayscale(1); }
/* An item this character cannot use: its cell is framed in red as well as its icon washed. */
.slot.unusable { border-color: var(--danger); }
