* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  background: #1c140d;
  color: #e8d9b8;
  cursor: url('/assets/sprites/cursors/default.png') 2 2, auto;
}

/* Dark parchment track, bronze thumb that lights up gold on hover — matches every other
   scrollable panel's palette (journal/chat log, bank/backpack, skills gump) instead of
   leaving the browser's default light-grey bars clashing with the theme. */
* {
  scrollbar-width: thin;
  scrollbar-color: #8a6d3b #16100a;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: #16100a;
}

*::-webkit-scrollbar-thumb {
  background: #8a6d3b;
  border-radius: 5px;
  border: 2px solid #16100a;
}

*::-webkit-scrollbar-thumb:hover {
  background: #c9a227;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 16px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(138, 109, 59, 0.18), transparent 60%),
    #1c140d;
}

.auth-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 380px;
}

.auth-logo {
  width: 180px;
  height: 180px;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.6));
}

.dev-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: rgba(201, 122, 39, 0.15);
  border: 1px solid #c97a27;
  border-radius: 6px;
  color: #e8a765;
  font-size: 13px;
  font-weight: bold;
  text-align: center;
  justify-content: center;
  letter-spacing: 0.3px;
}

/* Shared "parchment card" look for both the login box and the Testers Wanted box —
   a gold double-border and subtle inner glow, distinct from the flat game-panel style
   used once you're actually in the game (this is the first thing anyone sees). */
.auth-box, .testers-box {
  width: 100%;
  background: linear-gradient(180deg, #2b1f14, #241a10);
  border: 1px solid #8a6d3b;
  outline: 1px solid rgba(201, 162, 39, 0.25);
  outline-offset: -5px;
  padding: 28px 32px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.auth-box h1, .testers-box h2 {
  margin: 0 0 4px;
  color: #c9a227;
  font-size: 22px;
  letter-spacing: 0.5px;
}

.testers-box h2 { font-size: 18px; }

.auth-subtitle {
  margin: 0 0 20px;
  font-size: 13px;
  color: #a08a5c;
}

.auth-box form, .testers-box form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.auth-box label, .testers-box label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: #c9b98a;
  gap: 5px;
}

.auth-box input, .auth-box textarea, .testers-box input, .testers-box textarea {
  padding: 9px 10px;
  background: #16100a;
  border: 1px solid #8a6d3b;
  border-radius: 4px;
  color: #e8d9b8;
  font-family: inherit;
  font-size: 14px;
}

.auth-box input:focus, .auth-box textarea:focus, .testers-box input:focus, .testers-box textarea:focus {
  outline: none;
  border-color: #c9a227;
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.25);
}

.auth-box textarea, .testers-box textarea {
  resize: vertical;
  min-height: 60px;
}

.auth-box button, .testers-box button {
  margin-top: 6px;
  padding: 10px;
  background: linear-gradient(180deg, #a3833f, #8a6d3b);
  border: 1px solid #c9a227;
  border-radius: 4px;
  color: #1c140d;
  font-weight: bold;
  font-size: 14px;
  letter-spacing: 0.3px;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}

.auth-box button:hover, .testers-box button:hover { background: #c9a227; }

.auth-box p, .testers-box p { font-size: 13px; }

.auth-box a { color: #c9a227; }

.error { color: #d9534f; }

.success-message { color: #7fd1a8; font-size: 13px; }

.auth-note {
  font-size: 12px;
  color: #a08a5c;
  text-align: center;
}

.testers-box {
  border-color: rgba(138, 109, 59, 0.6);
}

.testers-box p.auth-subtitle { margin-bottom: 16px; }

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #2b1f14;
  border-bottom: 3px solid #8a6d3b;
}

.game-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.game-header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.game-header-nav a {
  color: #c9a227;
  text-decoration: none;
  font-size: 14px;
}

.game-header-nav a:hover { text-decoration: underline; }

.game-header-nav-button {
  background: none;
  border: none;
  color: #c9a227;
  font-size: 14px;
  font-family: inherit;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
  padding: 0;
}

.game-header-nav-button:hover { text-decoration: underline; }

/* The nameplate — character name plus a compact Hits/Mana/Stam bar stack, styled
   after the classic UO overhead status bars. Bar colors match their classic UO
   status-window counterparts (red/blue/green); no combat system moves current
   below max yet, see calculateVitals in services/combatStats.js. */
.nameplate {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nameplate-name {
  font-size: 20px;
  color: #c9a227;
  font-weight: bold;
}

.nameplate-bars {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 190px;
}

.nameplate-bar-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nameplate-bar-tag {
  width: 30px;
  flex-shrink: 0;
  font-size: 9px;
  text-transform: uppercase;
  color: #a08a5c;
}

.nameplate-bar {
  flex: 1;
  height: 7px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(138, 109, 59, 0.4);
  border-radius: 3px;
  overflow: hidden;
}

.nameplate-bar-fill {
  height: 100%;
}

.nameplate-bar-fill.nameplate-bar-hits { background: #a13a3a; }
.nameplate-bar-fill.nameplate-bar-mana { background: #3a5ba1; }
.nameplate-bar-fill.nameplate-bar-stam { background: #7a9c3a; }

.nameplate-bar-value {
  width: 42px;
  flex-shrink: 0;
  text-align: right;
  font-size: 10px;
  color: #d9c9a3;
}

.game-main {
  display: flex;
  gap: 40px;
  padding: 30px;
  flex-wrap: wrap;
}

.journal-panel {
  background: #2b1f14;
  border: 3px solid #8a6d3b;
  border-radius: 6px;
  padding: 16px;
  margin: 0 30px 30px;
}

.journal-panel h2 {
  margin-top: 0;
  color: #c9a227;
  font-size: 16px;
}

.journal-log {
  height: 160px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(138, 109, 59, 0.4);
  border-radius: 4px;
  padding: 8px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.journal-entry.journal-fail { color: #d9534f; }
.journal-entry.journal-success { color: #7fd1a8; }
.journal-entry.journal-skill { color: #6ec6ff; }
.journal-entry.journal-stat { color: #4caf50; }
.journal-entry.journal-info { color: #e8d9b8; }
.journal-entry.journal-vendor { color: #e0a854; font-style: italic; }
.journal-entry.journal-devtool { color: #d896ff; text-shadow: 0 0 4px rgba(216, 150, 255, 0.6); }
.journal-entry.journal-combat { color: #e07b39; }
.journal-entry.journal-chatter { color: #9fb88a; font-style: italic; }

/* Death: no auto-res anymore — the whole page goes greyscale until "Res" is said in
   Local chat. body-level filter (not a wrapper) so it never needs a DOM restructure;
   the banner below sits inside the filtered body too and just reads fine in grey. */
body.is-dead { filter: grayscale(1); }

.death-overlay {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: #2b1f14;
  border: 2px solid #8a6d3b;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.death-overlay-title { color: #d9534f; font-weight: bold; font-size: 15px; }
.death-overlay-text { color: #e8d9b8; font-size: 13px; }

.death-overlay-teleport-btn {
  padding: 6px 14px;
  background: linear-gradient(180deg, #a3833f, #8a6d3b);
  border: 1px solid #c9a227;
  border-radius: 4px;
  color: #1c140d;
  font-weight: bold;
  font-size: 13px;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}
.death-overlay-teleport-btn:hover { background: #c9a227; }

.journal-action-link {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  font-size: 11px;
  font-family: inherit;
  color: #2b1f14;
  background: #c9a227;
  border: 1px solid #8a6d3b;
  border-radius: 10px;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
  line-height: 1.6;
}

.journal-action-link:hover { background: #e0b83f; }

.chat-panel {
  background: #2b1f14;
  border: 3px solid #8a6d3b;
  border-radius: 6px;
  padding: 16px;
  margin: 0 30px 30px;
}

.chat-panel h2 {
  margin-top: 0;
  color: #c9a227;
  font-size: 16px;
}

.chat-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.chat-tab {
  padding: 4px 12px;
  background: #1c140d;
  border: 1px solid #8a6d3b;
  border-radius: 3px;
  color: #8a6d3b;
  font-size: 12px;
  font-weight: bold;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}

.chat-tab.active {
  background: #8a6d3b;
  color: #1c140d;
}

.chat-log {
  height: 120px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(138, 109, 59, 0.4);
  border-radius: 4px;
  padding: 8px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.chat-entry-name {
  font-weight: bold;
}

/* Each channel gets its own color so a message's origin is unmistakable at a glance —
   Local reads as plain speech, Global a cool blue, Guild the classic UO guild-chat
   green (a slightly different shade from the Journal's stat-gain green, since they're
   unrelated systems that just happen to share a palette family). */
.chat-entry.chat-channel-local { color: #e8d9b8; }
.chat-entry.chat-channel-local .chat-entry-name { color: #c9a227; }
.chat-entry.chat-channel-global { color: #5bc8ea; }
.chat-entry.chat-channel-global .chat-entry-name { color: #8fdcf2; }
.chat-entry.chat-channel-guild { color: #6fcf6f; }
.chat-entry.chat-channel-guild .chat-entry-name { color: #9be89b; }

.chat-form {
  display: flex;
  gap: 8px;
}

.chat-form input {
  flex: 1;
  padding: 6px 8px;
  background: #1c140d;
  border: 1px solid #8a6d3b;
  color: #e8d9b8;
  font-family: inherit;
  border-radius: 3px;
}

.chat-form button {
  padding: 6px 14px;
  background: #8a6d3b;
  border: none;
  border-radius: 3px;
  color: #1c140d;
  font-weight: bold;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}

.equipped-panel-wrap, .inventory-panel {
  background: #2b1f14;
  border: 3px solid #8a6d3b;
  border-radius: 6px;
  padding: 16px;
}

.equipped-panel-wrap h2, .inventory-panel h2 {
  margin-top: 0;
  color: #c9a227;
  font-size: 16px;
}

.equipped-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: fit-content;
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 2px dashed rgba(138, 109, 59, 0.6);
  border-radius: 4px;
}

/* A rough paperdoll silhouette: helm at the top, neck tucked in next to chest
   (shrunk so it doesn't sit too far from the helm), cloak on the other side,
   weapon+shield flanking the legs, and arms/gloves/rings on the bottom row.
   Both rings share the single slot-rings tile — they're the same-sized small
   accessory boxes side by side rather than one full-size gear slot each.
   Placement is by grid-area, not DOM order, so equipped.ejs is free to render
   these slots in whatever order is convenient. */
.equip-paperdoll {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: 44px 44px 44px 44px;
  gap: 8px;
  grid-template-areas:
    "slot-mount     slot-head      ."
    "slot-neck      slot-chest     slot-cloak"
    "slot-weapon    slot-legs      slot-shield"
    "slot-arms      slot-hands     slot-rings";
}

.equip-slot-box[data-slot="mount"] { grid-area: slot-mount; }
.equip-slot-box[data-slot="head"] { grid-area: slot-head; }
.equip-slot-box[data-slot="neck"] {
  grid-area: slot-neck;
  width: 30px;
  height: 26px;
  justify-self: center;
}
.equip-slot-box[data-slot="neck"] .item-icon { width: 26px; height: 26px; }
.equip-slot-box[data-slot="chest"] { grid-area: slot-chest; }
.equip-slot-box[data-slot="arms"] { grid-area: slot-arms; }
.equip-slot-box[data-slot="hands"] { grid-area: slot-hands; }
.equip-slot-box[data-slot="legs"] { grid-area: slot-legs; }
.equip-slot-box[data-slot="cloak"] { grid-area: slot-cloak; }
.equip-slot-box[data-slot="weapon"] { grid-area: slot-weapon; }
.equip-slot-box[data-slot="shield"] { grid-area: slot-shield; }
.equip-slot-box[data-slot="ring1"],
.equip-slot-box[data-slot="ring2"] {
  grid-area: slot-rings;
  width: 20px;
  height: 26px;
}
.equip-slot-box[data-slot="ring1"] { justify-self: start; }
.equip-slot-box[data-slot="ring2"] { justify-self: end; }
.equip-slot-box[data-slot="ring1"] .item-icon,
.equip-slot-box[data-slot="ring2"] .item-icon { width: 18px; height: 18px; }
.equip-slot-box[data-slot="ring1"] .equip-slot-label,
.equip-slot-box[data-slot="ring2"] .equip-slot-label {
  font-size: 6px;
  letter-spacing: -0.3px;
}

/* Empty Mount slot shows a faint horseshoe rather than the plain text label every
   other empty slot uses — a mount is worn "beneath" the character in UO's own
   paperdoll convention, so a placeholder icon reads better here than a word. */
.equip-slot-box.equip-slot-mount-empty {
  background: rgba(138, 109, 59, 0.08);
}
.equip-slot-placeholder-icon {
  width: 30px;
  height: 30px;
  opacity: 0.35;
  filter: grayscale(1);
  pointer-events: none;
}

/* Blacked out while a two-handed weapon is worn — there's no free hand for a shield. */
.equip-slot-box.equip-slot-disabled {
  background: #000;
  border-color: rgba(138, 109, 59, 0.2);
  opacity: 0.55;
  pointer-events: none;
}

/* Food + the 3 Potions — always the bottom row, deliberately separate from the
   paperdoll grid above so they never shuffle position as other gear changes. */
.equip-consumables {
  display: grid;
  grid-template-columns: repeat(4, 44px);
  gap: 8px;
}

.food-threshold-control {
  width: 100%;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.food-threshold-control label {
  font-size: 11px;
  color: #a08a5c;
  text-align: center;
}

.food-threshold-control label span {
  color: #c9a227;
  font-weight: bold;
}

.food-threshold-control input[type="range"] {
  width: 100%;
  accent-color: #8a6d3b;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}

.item-slot {
  position: relative;
  width: 44px;
  height: 44px;
}

.equip-slot-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(138, 109, 59, 0.5);
  border-radius: 3px;
}

.equip-slot-box.drag-over {
  border-color: #c9a227;
  background: rgba(201, 162, 39, 0.2);
}

.equip-slot-label {
  font-size: 9px;
  text-transform: uppercase;
  color: #6b5636;
  text-align: center;
  line-height: 1.1;
  pointer-events: none;
}

.equip-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2e8b2e;
  color: #f2fff2;
  font-size: 10px;
  font-weight: bold;
  line-height: 14px;
  text-align: center;
  border: 1px solid #1c4d1c;
  pointer-events: none;
}

.backpack-panel {
  position: relative;
  background-image: url('/assets/sprites/backpack_bg.png');
  background-size: cover;
  border: 2px solid #8a6d3b;
  border-radius: 4px;
  overflow: hidden;
}

.backpack-panel.drag-over {
  outline: 2px solid #c9a227;
}

.item-icon {
  width: 44px;
  height: 44px;
  image-rendering: pixelated;
  cursor: url('/assets/sprites/cursors/grab.png') 16 16, grab;
}

.backpack-item {
  position: absolute;
}

.item-icon:active { cursor: url('/assets/sprites/cursors/grabbing.png') 16 16, grabbing; }

.item-icon[data-is-container="true"] { cursor: url('/assets/sprites/cursors/default.png') 2 2, pointer; }

.item-icon.drag-over {
  outline: 2px solid #c9a227;
  outline-offset: 1px;
}

.stack-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  min-width: 14px;
  height: 14px;
  padding: 0 2px;
  border-radius: 3px;
  background: #2b1f14;
  color: #e8d9b8;
  font-size: 10px;
  font-weight: bold;
  line-height: 14px;
  text-align: center;
  border: 1px solid #8a6d3b;
  pointer-events: none;
}

.activities-panel, .stats-panel {
  background: #2b1f14;
  border: 3px solid #8a6d3b;
  border-radius: 6px;
  padding: 16px;
  width: 236px;
}

.stats-panel h2 {
  margin-top: 0;
  color: #c9a227;
  font-size: 16px;
}

.stats-row {
  display: grid;
  grid-template-columns: 14px 1fr 24px;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 14px;
}

.stat-value {
  text-align: right;
}

.stat-arrow {
  padding: 0;
  width: 14px;
  height: 14px;
  line-height: 12px;
  font-size: 8px;
  background: #1c140d;
  color: #8a6d3b;
  border: 1px solid #8a6d3b;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}

.stat-arrow-up, .stat-arrow-down {
  background: #c9a227;
  color: #1c140d;
  font-weight: bold;
}

.stats-total {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(138, 109, 59, 0.4);
  font-size: 13px;
  color: #8a6d3b;
  text-align: right;
}

.stats-section-label {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(138, 109, 59, 0.4);
  font-size: 11px;
  text-transform: uppercase;
  color: #8a6d3b;
}

.weight-row {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(138, 109, 59, 0.4);
  font-size: 14px;
}

.weight-row .overweight, #weight-value.overweight {
  color: #d9534f;
  font-weight: bold;
}

.weight-bar {
  height: 8px;
  margin-top: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.weight-bar-fill {
  height: 100%;
  background: #8a6d3b;
}

.weight-bar-fill.overweight {
  background: #d9534f;
}

.activities-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.activities-header h2 {
  margin: 0;
  color: #c9a227;
  font-size: 16px;
}

.skills-toggle {
  width: 22px;
  height: 22px;
  padding: 0;
  background: #1c140d;
  color: #c9a227;
  border: 1px solid #8a6d3b;
  border-radius: 3px;
  font-size: 12px;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}

.activities-list {
  margin-top: 10px;
  max-height: 320px;
  overflow-y: auto;
}

.skills-empty {
  padding: 6px 0;
  font-size: 13px;
  color: #8a6d3b;
  font-style: italic;
}

.activity-row {
  padding: 6px 0;
  border-bottom: 1px solid rgba(138, 109, 59, 0.4);
}

.activity-row:last-child { border-bottom: none; }

.activity-main {
  display: grid;
  grid-template-columns: 104px 34px max-content;
  align-items: center;
  gap: 6px;
}

.activity-label {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-skill {
  font-size: 12px;
  color: #8a6d3b;
  text-align: right;
}

.activity-toggle {
  padding: 4px 10px;
  background: #8a6d3b;
  border: none;
  border-radius: 3px;
  color: #1c140d;
  font-weight: bold;
  font-size: 12px;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}

.activity-toggle.active {
  background: #2e8b2e;
  color: #f2fff2;
}

.activity-progress {
  height: 3px;
  margin-top: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 2px;
  overflow: hidden;
  visibility: hidden;
}

.activity-row.active .activity-progress {
  visibility: visible;
}

.activity-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: #2e8b2e;
}

.activity-progress-fill.failed {
  background: #d9534f;
}

.skills-gump-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}

.skills-gump {
  width: 260px;
  background: #2b1f14;
  border: 4px double #8a6d3b;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.skills-gump-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 2px solid rgba(138, 109, 59, 0.6);
  color: #c9a227;
  font-weight: bold;
}

.skills-gump-close {
  background: none;
  border: none;
  color: #c9a227;
  font-size: 18px;
  line-height: 1;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
  padding: 0 4px;
}

.skills-gump-body {
  max-height: 60vh;
  overflow-y: auto;
  padding: 6px 14px;
}

.skills-gump-category {
  margin-top: 10px;
  padding-top: 6px;
  font-size: 11px;
  text-transform: uppercase;
  color: #8a6d3b;
  border-top: 1px solid rgba(138, 109, 59, 0.4);
}

.skills-gump-category:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.skills-gump-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(138, 109, 59, 0.4);
  font-size: 14px;
}

.skills-gump-row:last-child { border-bottom: none; }

.skills-gump-value {
  color: #8a6d3b;
}

.skills-gump-total {
  margin: 0 14px 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(138, 109, 59, 0.4);
  font-size: 13px;
  color: #c9a227;
  text-align: right;
}

.travel-gump-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}

.travel-gump {
  width: min(900px, 90vw);
  background: #2b1f14;
  border: 4px double #8a6d3b;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.travel-gump-map {
  position: relative;
  line-height: 0;
}

.travel-gump-map-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0 0 4px 4px;
}

.travel-map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  padding: 0;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}

.travel-map-pin-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d9534f;
  border: 2px solid #2b1f14;
  box-shadow: 0 0 0 1px #e8d9b8;
}

/* Dungeons get their own pin color — a warning at a glance before you ever open the
   description text, same "flag drives a visual tell" idea as the equip-slot-disabled
   blackout for a worn two-handed weapon. */
.travel-map-pin.dungeon .travel-map-pin-dot {
  background: #6b2d8f;
}

.travel-map-pin:hover .travel-map-pin-dot {
  background: #f0c88a;
}

.travel-map-pin.current .travel-map-pin-dot {
  background: #2e8b2e;
  cursor: default;
}

.travel-map-pin-label {
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 1px 2px #000;
  white-space: nowrap;
}

.travel-map-tooltip {
  display: none;
  position: fixed;
  z-index: 1600;
  background: #2b1f14;
  border: 1px solid #8a6d3b;
  color: #e8d9b8;
  padding: 4px 8px;
  font-size: 13px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
}

.bank-gump-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}

.bank-gump {
  background: #2b1f14;
  border: 4px double #8a6d3b;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding-bottom: 14px;
}

.bank-panel {
  position: relative;
  background-image: url('/assets/sprites/backpack_bg.png');
  background-size: cover;
  overflow: hidden;
}

.combat-gump-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}

.combat-gump {
  width: 320px;
  background: #2b1f14;
  border: 4px double #8a6d3b;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding-bottom: 14px;
}

.combat-gump-body {
  padding: 8px 16px 0;
}

.combat-monster-display {
  position: relative;
  text-align: center;
  padding: 16px 0 8px;
}

.combat-monster-sprite {
  width: 132px;
  height: 132px;
  image-rendering: pixelated;
}

.combat-hp-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.combat-hp-bar {
  flex: 1;
}

.combat-hp-fill-monster {
  background: #a13a3a;
}

.combat-hp-value {
  font-size: 12px;
  color: #d9c9a3;
  white-space: nowrap;
}

@keyframes damage-popup-float {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, -28px); opacity: 0; }
}

.damage-popup {
  position: absolute;
  top: 0;
  left: 50%;
  font-weight: bold;
  font-size: 16px;
  pointer-events: none;
  animation: damage-popup-float 800ms ease-out forwards;
}

.damage-popup-monster { color: #ffe08a; text-shadow: 0 0 3px #000; }
.damage-popup-player { color: #d9534f; text-shadow: 0 0 3px #000; }

.ground-loot-gump-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}

.ground-loot-gump {
  width: 300px;
  background: #2b1f14;
  border: 4px double #8a6d3b;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding-bottom: 14px;
}

.ground-loot-item-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 8px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ground-loot-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(138, 109, 59, 0.4);
}

.ground-loot-item-name {
  flex: 1;
  font-size: 13px;
}

.ground-loot-take-btn, .ground-loot-take-all-btn {
  padding: 3px 10px;
  background: #8a6d3b;
  border: none;
  border-radius: 3px;
  color: #1c140d;
  font-weight: bold;
  font-size: 12px;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}

.ground-loot-take-all-btn {
  display: block;
  margin: 12px 16px 0;
}

.bank-panel.drag-over {
  outline: 2px solid #c9a227;
}

.bank-gold-row {
  display: flex;
  justify-content: space-between;
  margin: 10px 14px 0;
  font-size: 14px;
}

.bank-weight-row {
  display: flex;
  justify-content: space-between;
  margin: 10px 14px 0;
  font-size: 14px;
}

.bank-weight-row .overweight, #bank-weight-value.overweight {
  color: #d9534f;
  font-weight: bold;
}

.bank-weight-bar {
  height: 8px;
  margin: 6px 14px 0;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.bank-weight-bar-fill {
  height: 100%;
  background: #8a6d3b;
}

.bank-weight-bar-fill.overweight {
  background: #d9534f;
}

/* The Guild gump — reuses the skills-gump-header/close chrome but needs its own
   wider body to fit a member roster with per-row management buttons, or a charter's
   signature list, or the open-charter browser, depending on which of the four views
   currently applies (see public/js/guilds.js). */
.guild-gump-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}

.guild-gump {
  width: 380px;
  background: #2b1f14;
  border: 4px double #8a6d3b;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.guild-gold-label {
  font-size: 12px;
  color: #8a6d3b;
  font-weight: normal;
  margin-left: 8px;
}

.guild-gump-body {
  max-height: 70vh;
  overflow-y: auto;
  padding: 14px;
}

.guild-gump-body h3 {
  margin: 14px 0 6px;
  color: #c9a227;
  font-size: 15px;
}

.guild-gump-body h3:first-child { margin-top: 0; }

.guild-hint {
  font-size: 12px;
  color: #a08a5c;
  margin: 0 0 10px;
}

.guild-invite-banner {
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 14px;
  font-size: 13px;
}

.guild-invite-banner p { margin: 0 0 8px; }

.guild-member-list, .guild-charter-signers, .guild-open-charter-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.guild-member-row, .guild-open-charter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(138, 109, 59, 0.4);
  border-radius: 4px;
  font-size: 13px;
}

.guild-charter-signer-row {
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(138, 109, 59, 0.4);
  border-radius: 4px;
  font-size: 13px;
}

.guild-member-rank {
  font-size: 10px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.guild-rank-guildmaster { background: #c9a227; color: #1c140d; }
.guild-rank-officer { background: #6ec6ff; color: #1c140d; }
.guild-rank-member { background: rgba(138, 109, 59, 0.4); color: #e8d9b8; }

.guild-member-name {
  flex: 1;
}

.guild-member-actions {
  display: flex;
  gap: 4px;
}

.guild-open-charter-row span { flex: 1; }

.guild-action-btn {
  padding: 3px 8px;
  background: #8a6d3b;
  border: none;
  border-radius: 3px;
  color: #1c140d;
  font-size: 11px;
  font-weight: bold;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}

.guild-action-btn.guild-action-danger, .guild-action-danger {
  background: #a13a3a;
  color: #f2e2e2;
}

.guild-sign-btn {
  padding: 4px 10px;
  background: #8a6d3b;
  border: none;
  border-radius: 3px;
  color: #1c140d;
  font-size: 12px;
  font-weight: bold;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}

.guild-inline-form {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.guild-inline-form input {
  flex: 1;
  padding: 6px 8px;
  background: #1c140d;
  border: 1px solid #8a6d3b;
  color: #e8d9b8;
  font-family: inherit;
  border-radius: 3px;
}

.guild-inline-form button {
  padding: 6px 14px;
  background: #8a6d3b;
  border: none;
  border-radius: 3px;
  color: #1c140d;
  font-weight: bold;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}

.guild-management-buttons {
  display: flex;
  gap: 8px;
}

.guild-management-buttons button {
  padding: 6px 12px;
  background: #8a6d3b;
  border: none;
  border-radius: 3px;
  color: #1c140d;
  font-size: 13px;
  font-weight: bold;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}

.guild-management-buttons button.guild-action-danger {
  background: #a13a3a;
  color: #f2e2e2;
}

/* The [TAG] prefix on the nameplate — the classic UO guild-chat green, matching
   .chat-entry.chat-channel-guild so a tag reads the same wherever it shows up. */
.nameplate-guild-tag {
  color: #6fcf6f;
  font-weight: bold;
  margin-right: 4px;
}

.world-map-panel {
  background: #2b1f14;
  border: 3px solid #8a6d3b;
  border-radius: 6px;
  padding: 16px;
  width: 236px;
}

.current-location {
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(138, 109, 59, 0.4);
}

.current-location-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #8a6d3b;
}

.current-location-name {
  font-size: 16px;
  color: #c9a227;
  font-weight: bold;
}

.current-location-desc {
  font-size: 12px;
  margin-top: 4px;
  color: #e8d9b8;
}

.vendor-stub {
  margin-top: 6px;
  font-size: 11px;
  font-style: italic;
  color: #8a6d3b;
}

.blacksmith-note {
  margin-top: 6px;
  font-size: 11px;
  font-style: italic;
  color: #c9a227;
}

.dungeon-note {
  margin-top: 6px;
  font-size: 11px;
  font-style: italic;
  font-weight: bold;
  color: #b361e0;
}

.stable-note {
  margin-top: 6px;
  font-size: 11px;
  font-style: italic;
  color: #6fa8c9;
}

/* Regional karma ("Standing") — same row+bar shape as .bank-weight-row/.bank-weight-bar,
   just scoped to the World Map panel's current-location block instead of the Bank gump. */
.karma-row {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: #c9b98a;
}

.karma-row .low-standing, #karma-value.low-standing {
  color: #d9534f;
  font-weight: bold;
}

.karma-bar {
  height: 6px;
  margin-top: 3px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  overflow: hidden;
}

.karma-bar-fill {
  height: 100%;
  background: #7fd1a8;
}

.karma-bar-fill.low-standing {
  background: #d9534f;
}

.stable-roster {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 14px 14px;
  width: 360px;
}

.stable-mount-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(138, 109, 59, 0.4);
}

.stable-mount-icon {
  width: 44px;
  height: 44px;
  image-rendering: pixelated;
}

.stable-mount-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.stable-mount-name {
  font-size: 13px;
}

.stable-mount-bonus {
  font-size: 11px;
  color: #8a6d3b;
}

.stable-mount-price {
  font-size: 12px;
  color: #c9a227;
  white-space: nowrap;
}

.stable-buy-btn {
  padding: 3px 10px;
  background: #8a6d3b;
  border: none;
  border-radius: 3px;
  color: #1c140d;
  font-weight: bold;
  font-size: 12px;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}

.dungeon-roster {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dungeon-monster-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(138, 109, 59, 0.4);
}

.dungeon-monster-icon {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.dungeon-monster-name {
  flex: 1;
  font-size: 13px;
}

.dungeon-attack-btn {
  padding: 3px 10px;
  background: #8a6d3b;
  border: none;
  border-radius: 3px;
  color: #1c140d;
  font-weight: bold;
  font-size: 12px;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}

.ground-loot-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ground-loot-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(138, 109, 59, 0.4);
}

.ground-loot-label {
  flex: 1;
  font-size: 12px;
  font-style: italic;
  color: #a08a5c;
}

.ground-loot-view-btn {
  padding: 3px 10px;
  background: #8a6d3b;
  border: none;
  border-radius: 3px;
  color: #1c140d;
  font-weight: bold;
  font-size: 12px;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
}

.travel-progress {
  margin-top: 10px;
}

.travel-progress-label {
  font-size: 13px;
  margin-bottom: 6px;
}

.travel-countdown {
  color: #8a6d3b;
  font-variant-numeric: tabular-nums;
}

.travel-progress-bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  overflow: hidden;
}

.travel-progress-fill {
  height: 100%;
  width: 0%;
  background: #c9a227;
}

#open-bags-area {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.bag-panel-wrap {
  background: #2b1f14;
  border: 3px solid #8a6d3b;
  border-radius: 6px;
  padding: 10px;
  height: fit-content;
}

.bag-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #c9a227;
  font-size: 14px;
}

.bag-panel-close {
  background: none;
  border: none;
  color: #c9a227;
  font-size: 16px;
  line-height: 1;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
  padding: 0 4px;
}

.bag-panel {
  position: relative;
  background-image: url('/assets/sprites/backpack_bg.png');
  background-size: cover;
  border: 2px solid #8a6d3b;
  border-radius: 4px;
  overflow: hidden;
}

.bag-panel.drag-over {
  outline: 2px solid #c9a227;
}

.item-tooltip {
  display: none;
  position: fixed;
  z-index: 1000;
  background: #2b1f14;
  border: 1px solid #8a6d3b;
  color: #e8d9b8;
  padding: 4px 8px;
  font-size: 13px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
}

.tooltip-heal {
  color: #4caf50;
  font-weight: bold;
}

.tooltip-ar {
  color: #7fb3d5;
  font-weight: bold;
}

.tooltip-mount {
  color: #d4af7a;
  font-weight: bold;
}

.tooltip-blessed {
  color: #c9a227;
  font-weight: bold;
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 2000;
  background: #2b1f14;
  border: 2px solid #8a6d3b;
  color: #e8d9b8;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-success { border-color: #2e8b2e; }
.toast-error { border-color: #d9534f; }

.wiki-nav {
  display: flex;
  gap: 16px;
  padding: 10px 20px;
  background: #2b1f14;
  border-bottom: 3px solid #8a6d3b;
}

.wiki-nav a {
  color: #c9a227;
  text-decoration: none;
  font-size: 14px;
}

.wiki-nav a:hover { text-decoration: underline; }

.wiki-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px;
}

.wiki-main h1 {
  color: #c9a227;
  margin-top: 0;
}

.wiki-list {
  line-height: 2;
}

.wiki-list a { color: #c9a227; }

.wiki-section {
  background: #2b1f14;
  border: 3px solid #8a6d3b;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.wiki-section h2 {
  color: #c9a227;
  margin-top: 0;
}

.wiki-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.wiki-table th, .wiki-table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(138, 109, 59, 0.4);
  font-size: 14px;
}

.wiki-table th {
  color: #8a6d3b;
  text-transform: uppercase;
  font-size: 11px;
}

.wiki-icon {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.wiki-heal {
  color: #4caf50;
  font-weight: bold;
}

/* Testers Ring dev tool — deliberately more "extra" than every other gump (shimmering
   gradient frame, glowing title text) since this is meant to be the reusable base look
   for future dev/test tooling rather than a one-off. */
.devtools-gump-overlay {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 4, 20, 0.65);
}

.devtools-gump-frame {
  padding: 3px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff8a8a, #ffe08a, #8ad4ff, #c88aff, #ff8a8a);
  background-size: 300% 300%;
  animation: devtools-shimmer 6s ease infinite;
  box-shadow: 0 0 32px rgba(200, 140, 255, 0.55), 0 8px 24px rgba(0, 0, 0, 0.6);
}

@keyframes devtools-shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.devtools-gump {
  width: 320px;
  max-height: 80vh;
  overflow-y: auto;
  background: #1a1024;
  border-radius: 11px;
}

.devtools-gump-header {
  position: relative;
  padding: 14px 16px;
  text-align: center;
  border-bottom: 1px solid rgba(216, 150, 255, 0.35);
}

.devtools-gump-title {
  font-size: 17px;
  font-weight: bold;
  background: linear-gradient(90deg, #ff8a8a, #ffe08a, #8ad4ff, #c88aff, #ff8a8a);
  background-size: 300% 100%;
  animation: devtools-shimmer 6s ease infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 14px rgba(200, 140, 255, 0.5);
}

.devtools-gump-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: #d896ff;
  font-size: 20px;
  line-height: 1;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
  padding: 0 4px;
}

.devtools-gump-body {
  padding: 8px 16px 16px;
}

.devtools-gump-section-label {
  margin-top: 10px;
  padding-top: 6px;
  font-size: 11px;
  text-transform: uppercase;
  color: #a888c9;
  border-top: 1px solid rgba(216, 150, 255, 0.25);
}

.devtools-gump-section-label:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.devtools-gump-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}

.devtools-gump-row label {
  flex: 1;
  font-size: 13px;
  color: #e8d9ff;
}

.devtools-gump-input {
  width: 64px;
  background: #2a1f38;
  border: 1px solid #6b4a8f;
  color: #f0e8ff;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 13px;
}

.devtools-gump-set {
  background: linear-gradient(135deg, #8a5fc9, #c88aff);
  border: none;
  color: #1a1024;
  font-weight: bold;
  border-radius: 4px;
  padding: 4px 10px;
  cursor: url('/assets/sprites/cursors/point.png') 4 2, pointer;
  font-size: 12px;
}

.devtools-gump-set:hover {
  filter: brightness(1.15);
}

.devtools-contact-row {
  padding: 8px 0;
  border-bottom: 1px solid rgba(216, 150, 255, 0.2);
  font-size: 12px;
}

.devtools-contact-row:last-child { border-bottom: none; }

.devtools-contact-name {
  color: #e8d9ff;
  font-weight: bold;
}

.devtools-contact-email {
  color: #a888c9;
}

.devtools-contact-message {
  margin-top: 3px;
  color: #c9b8e8;
  white-space: pre-wrap;
  word-break: break-word;
}

.devtools-contact-empty {
  color: #a888c9;
  font-size: 12px;
  padding: 6px 0;
}
