/* ── Layout: main content with dock columns ─────────────────────────── */
#main-content {
  display: flex;
  flex-direction: row;
  flex: 1 1 0;
  overflow: hidden;
}

#center-column {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 200px;
  overflow: hidden;
}

.dock-column {
  display: flex;
  flex-direction: column;
  width: 260px;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #161b22;
  transition: width 0.15s ease;
}
.dock-column::-webkit-scrollbar { width: 6px; }
.dock-column::-webkit-scrollbar-track { background: #161b22; }
.dock-column::-webkit-scrollbar-thumb { background: #30363d; border-radius: 3px; }

#left-dock { border-right: 1px solid #30363d; }
#right-dock { border-left: 1px solid #30363d; }

.dock-column.collapsed { width: 0; overflow: hidden; border: none; padding: 0; }

body.mobile-panel-mode #left-dock,
body.mobile-panel-mode #right-dock {
  width: 0;
  overflow: hidden;
  border: none;
  padding: 0;
}

/* ── Dock toggle buttons ────────────────────────────────────────────── */
.dock-toggle-btn {
  background: #21262d;
  border: 1px solid #30363d;
  color: #8b949e;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
}
.dock-toggle-btn:hover { color: #c9d1d9; }
.dock-toggle-btn.active { color: #58a6ff; }

#mobile-panels-btn {
  display: none;
}

body.mobile-panel-mode #left-dock-toggle,
body.mobile-panel-mode #right-dock-toggle {
  display: none;
}

body.mobile-panel-mode #mobile-panels-btn {
  display: flex;
}

/* ── Panels menu dropdown ───────────────────────────────────────────── */
.panels-menu-wrap { position: relative; }
.panels-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 2000;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 6px 0;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.panels-menu.open { display: block; }
.panels-menu label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  color: #c9d1d9;
  cursor: pointer;
}
.panels-menu label:hover { background: #21262d; }

/* ── Mobile panel sheet ────────────────────────────────────────────── */
.mobile-panels-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: none;
  background: rgba(0, 0, 0, 0.55);
}

.mobile-panels-overlay.open {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.mobile-panels-sheet {
  margin-top: auto;
  width: 100%;
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  background: #0d1117;
  border-top: 1px solid #30363d;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.45);
}

.mobile-panels-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #30363d;
  background: #161b22;
}

.mobile-panels-title {
  font-size: 13px;
  font-weight: 700;
  color: #e6edf3;
  text-transform: uppercase;
}

.mobile-panels-close {
  background: none;
  border: none;
  color: #8b949e;
  font-size: 16px;
  cursor: pointer;
}

.mobile-panels-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px 6px;
  overflow-x: auto;
}

.mobile-panels-tab {
  flex: 0 0 auto;
  background: #161b22;
  border: 1px solid #30363d;
  color: #8b949e;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  text-transform: uppercase;
}

.mobile-panels-tab.active {
  color: #fff;
  border-color: #58a6ff;
  background: #1f2937;
}

.mobile-panels-select {
  margin: 0 12px 8px;
  background: #161b22;
  border: 1px solid #30363d;
  color: #c9d1d9;
  border-radius: 6px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12px;
}

.mobile-panels-content {
  display: flex;
  flex: 1 1 auto;
  min-height: 260px;
  padding: 0 8px 8px;
}

.mobile-panels-empty {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  color: #6e7681;
  font-size: 12px;
  font-style: italic;
}

/* ── Panel widgets ──────────────────────────────────────────────────── */
.gmcp-panel-widget {
  border: 1px solid #30363d;
  border-radius: 6px;
  margin: 4px;
  background: #0d1117;
  overflow: hidden;
  flex-shrink: 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: #161b22;
  border-bottom: 1px solid #30363d;
  cursor: grab;
  user-select: none;
  font-size: 12px;
  font-weight: 600;
  color: #8b949e;
}
.panel-header:active { cursor: grabbing; }

.panel-title {
  flex: 1;
  text-transform: uppercase;
}

.panel-controls {
  display: flex;
  gap: 2px;
  align-items: center;
}

.panel-btn {
  background: none;
  border: none;
  color: #484f58;
  cursor: pointer;
  font-size: 11px;
  padding: 0 3px;
  line-height: 1;
}
.panel-btn:hover { color: #c9d1d9; }

.panel-body {
  padding: 6px 8px;
  font-size: 12px;
  overflow-y: auto;
  color: #c9d1d9;
}
.panel-body.collapsed { display: none; }
.panel-body .placeholder { color: #484f58; font-style: italic; }

.panel-body,
.gmcp-panel-widget.floating,
.inv-list,
.chat-log {
  scrollbar-width: thin;
  scrollbar-color: #30363d #000000;
}

.panel-body::-webkit-scrollbar,
.gmcp-panel-widget.floating::-webkit-scrollbar,
.inv-list::-webkit-scrollbar,
.chat-log::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.panel-body::-webkit-scrollbar-track,
.gmcp-panel-widget.floating::-webkit-scrollbar-track,
.inv-list::-webkit-scrollbar-track,
.chat-log::-webkit-scrollbar-track {
  background: #000000;
}

.panel-body::-webkit-scrollbar-thumb,
.gmcp-panel-widget.floating::-webkit-scrollbar-thumb,
.inv-list::-webkit-scrollbar-thumb,
.chat-log::-webkit-scrollbar-thumb {
  background: #30363d;
  border-radius: 4px;
}

.panel-body::-webkit-scrollbar-thumb:hover,
.gmcp-panel-widget.floating::-webkit-scrollbar-thumb:hover,
.inv-list::-webkit-scrollbar-thumb:hover,
.chat-log::-webkit-scrollbar-thumb:hover {
  background: #484f58;
}

.avatar-panel-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.avatar-panel-image {
  display: block;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  background: #0d1117;
  border: 1px solid #30363d;
  transition: opacity 0.3s ease;
}

.avatar-panel-image.avatar-loading { opacity: 0.5; }
.avatar-panel-image.avatar-default { opacity: 0.6; }
.avatar-panel-image.avatar-panel-image-zoomable { cursor: zoom-in; }

.avatar-panel-name {
  width: 100%;
  text-align: center;
  color: #8b949e;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

[data-panel-id="roomImage"] .panel-body {
  padding: 0;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-image-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-image-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: opacity 0.3s ease;
}

.room-image-img.room-image-loading { opacity: 0.5; }

.room-image-placeholder {
  color: #8b949e;
  font-size: 12px;
  padding: 12px;
  text-align: center;
}

.room-image-modal-overlay {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
}

.room-image-modal {
  width: min(92vw, 1200px);
  max-width: min(92vw, 1200px);
  max-height: 92vh;
}

.room-image-modal-body {
  padding: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05070a;
}

.room-image-modal-img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 78px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.gmcp-panel-widget.mobile-panel {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  width: 100%;
}

.gmcp-panel-widget.mobile-panel .panel-header {
  cursor: default;
}

.gmcp-panel-widget.mobile-panel .panel-collapse,
.gmcp-panel-widget.mobile-panel .panel-float {
  display: none;
}

.gmcp-panel-widget.mobile-panel .panel-body {
  flex: 1 1 auto;
  min-height: 0;
}

.gmcp-panel-hidden {
  display: none !important;
}

/* ── Floating panels ────────────────────────────────────────────────── */
.gmcp-panel-widget.floating {
  position: fixed;
  z-index: 1000;
  resize: both;
  overflow: auto;
  min-width: 200px;
  min-height: 80px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  max-width: 90vw;
  max-height: 80vh;
}

/* ── Drag and drop ──────────────────────────────────────────────────── */
.dock-drop-indicator {
  height: 2px;
  background: #58a6ff;
  margin: 0 4px;
  border-radius: 1px;
  flex-shrink: 0;
  display: none;
}
.dock-column.drag-over { box-shadow: inset 0 0 12px rgba(88,166,255,0.15); }
.drag-ghost {
  position: fixed;
  z-index: 3000;
  opacity: 0.7;
  pointer-events: none;
  width: 250px;
  border-radius: 6px;
  overflow: hidden;
}

.snap-edge {
  position: fixed;
  z-index: 2999;
  display: none;
  pointer-events: none;
  background: #58a6ff;
  opacity: 0.6;
}
.snap-edge-left, .snap-edge-right {
  width: 2px;
}
.snap-edge-top, .snap-edge-bottom {
  height: 2px;
}

/* ── Vitals bars ────────────────────────────────────────────────────── */
.vitals-row { margin-bottom: 4px; }
.vitals-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 1px;
  color: #8b949e;
}
.vitals-bar {
  height: 14px;
  background: #21262d;
  border-radius: 3px;
  overflow: hidden;
}
.vitals-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

/* ── Omens panel ────────────────────────────────────────────────────── */
.omens-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
}

.omens-summary {
  color: #c9d1d9;
  line-height: 1.35;
}

.omens-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.omens-status-grid > div {
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid #30363d;
  border-radius: 4px;
  background: #0d1117;
}

.omens-status-grid span,
.omens-pressure-label span:last-child,
.omens-muted {
  display: block;
  color: #8b949e;
  font-size: 10px;
}

.omens-status-grid strong {
  display: block;
  margin-top: 2px;
  color: #e6edf3;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.omens-pressure {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.omens-pressure-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
  color: #c9d1d9;
  font-size: 10px;
  text-transform: uppercase;
}

.omens-pressure-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 3px;
  background: #161b22;
}

.omens-pressure-bar > div {
  height: 100%;
  min-width: 2px;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.omens-god-mitra { color: #f2cc60; }
.omens-god-gaea { color: #7ee787; }
.omens-god-set { color: #d2a8ff; }
.omens-pressure-row.omens-god-mitra .omens-pressure-bar > div {
  background: linear-gradient(90deg, #8f6b18, #f2cc60);
}
.omens-pressure-row.omens-god-gaea .omens-pressure-bar > div {
  background: linear-gradient(90deg, #1f7a3b, #7ee787);
}
.omens-pressure-row.omens-god-set .omens-pressure-bar > div {
  background: linear-gradient(90deg, #5f2c82, #d2a8ff);
}

.omens-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.omens-chip {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 6px;
  border: 1px solid #30363d;
  border-radius: 999px;
  background: #161b22;
  font-size: 10px;
  font-weight: 700;
}

.omens-eclipse {
  color: #ff7b72;
  border-color: rgba(248, 81, 73, 0.45);
  background: rgba(248, 81, 73, 0.12);
}

/* ── Stats table ────────────────────────────────────────────────────── */
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.stats-table td {
  padding: 1px 4px;
}
.stats-table td:first-child {
  color: #8b949e;
  font-weight: 600;
  width: 40px;
}
.stat-up { color: #3fb950; }
.stat-down { color: #f85149; }

/* ── Status panel ───────────────────────────────────────────────────── */
.status-row {
  display: flex;
  justify-content: space-between;
  padding: 1px 0;
  font-size: 11px;
}
.status-row .status-key { color: #8b949e; }
.status-badges { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.status-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
}
.badge-dead { background: #f8514933; color: #f85149; }
.badge-drunk { background: #d2992233; color: #d29922; }
.badge-invis { background: #58a6ff33; color: #58a6ff; }
.badge-sitting { background: #484f5833; color: #8b949e; }
.badge-viking { background: #bc8cff33; color: #bc8cff; }

/* ── Buffs panel ────────────────────────────────────────────────────── */
.buff-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.buff-entry {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
  padding: 3px 6px;
  border: 1px solid #30363d;
  border-left: 3px solid #58a6ff;
  border-radius: 4px;
  background: #161b22;
  color: #c9d1d9;
  font-size: 11px;
  overflow: hidden;
}

.buff-entry-debuff {
  border-color: #6e2f2b;
  border-left-color: #f85149;
  background: #1f1517;
  color: #ffb4ad;
}

.buff-entry-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--buff-pct, 100%);
  background: rgba(88, 166, 255, 0.18);
  pointer-events: none;
}

.buff-entry-debuff .buff-entry-fill {
  background: rgba(248, 81, 73, 0.2);
}

.buff-entry-name {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.buff-entry-time {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  color: #8b949e;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.buff-entry-kind {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  color: #f85149;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

/* ── Exit compass ───────────────────────────────────────────────────── */
.room-name { font-weight: 600; color: #c9d1d9; margin-bottom: 2px; }
.room-area { font-size: 11px; color: #8b949e; margin-bottom: 6px; }
.room-env { font-size: 10px; color: #6e7681; margin-bottom: 6px; }
.exit-compass {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  max-width: 150px;
  margin: 0 auto 6px;
}
.exit-btn {
  background: #21262d;
  border: 1px solid #30363d;
  color: #c9d1d9;
  padding: 3px 0;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  text-align: center;
}
.exit-btn:hover { background: #30363d; border-color: #58a6ff; }
.exit-btn.inactive { visibility: hidden; }
.exit-ud {
  display: flex;
  justify-content: center;
  gap: 2px;
  max-width: 150px;
  margin: 0 auto 6px;
}
.exit-ud .exit-btn { width: 48%; }
.room-players { font-size: 11px; color: #8b949e; border-top: 1px solid #21262d; padding-top: 4px; }
.room-players span { color: #c9d1d9; }

/* ── Inventory panel ────────────────────────────────────────────────── */

/* Tabs */
.inv-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 6px;
  border-bottom: 1px solid #21262d;
  padding-bottom: 4px;
}
.inv-tab {
  background: none;
  border: none;
  color: #484f58;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 3px 3px 0 0;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.inv-tab:hover { color: #8b949e; }
.inv-tab.active { color: #58a6ff; border-bottom: 2px solid #58a6ff; }

/* Tab content */
.inv-tab-content { display: none; }
.inv-tab-content.active { display: block; }

/* Item list (All + Carried tabs) */
.inv-list {
  max-height: 280px;
  overflow-y: auto;
}

.inv-group-header {
  font-size: 10px;
  font-weight: 700;
  color: #484f58;
  letter-spacing: 1px;
  padding: 6px 0 2px;
  text-transform: uppercase;
}
.inv-group-header:first-child { padding-top: 0; }

.inv-item {
  font-size: 11px;
  color: #c9d1d9;
  padding: 2px 4px;
  border-radius: 3px;
  cursor: default;
}
.inv-item:hover { background: #21262d; }

/* Paper-doll (Worn tab) */
.inv-paperdoll {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 2px 0;
}
.inv-doll-row {
  display: flex;
  justify-content: center;
}
.inv-doll-row-split {
  gap: 3px;
}
.inv-doll-row-split .inv-doll-slot {
  flex: 1;
}
.inv-doll-slot {
  border: 1px solid #30363d;
  border-radius: 4px;
  padding: 3px 6px;
  min-width: 0;
  max-width: 200px;
  width: 100%;
  text-align: center;
  overflow: hidden;
}
.inv-doll-filled {
  background: #21262d;
  border-color: #30363d;
}
.inv-doll-empty {
  background: transparent;
  border-color: #21262d;
}
.inv-doll-slot-label {
  font-size: 9px;
  font-weight: 700;
  color: #484f58;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.inv-doll-filled .inv-doll-slot-label { color: #8b949e; }
.inv-doll-slot-item {
  font-size: 11px;
  color: #c9d1d9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inv-doll-empty .inv-doll-slot-item {
  color: #484f58;
  font-style: italic;
  font-size: 10px;
}

/* Wielded tab */
.inv-wield-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.inv-wield-slot {
  display: flex;
  flex-direction: column;
  border: 1px solid #30363d;
  border-radius: 4px;
  padding: 4px 8px;
  background: #21262d;
}
.inv-wield-label {
  font-size: 9px;
  font-weight: 700;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.inv-wield-item {
  font-size: 12px;
  color: #c9d1d9;
}
.inv-wield-empty {
  font-size: 11px;
  color: #484f58;
  font-style: italic;
}

/* ── Enemy panel ────────────────────────────────────────────────────── */
.enemy-name { font-weight: 600; margin-bottom: 4px; }
.enemy-hp-string { font-size: 11px; color: #8b949e; margin-bottom: 4px; }
.panel-inactive { opacity: 0.4; }
.enemy-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.enemy-image {
  flex: 0 0 64px;
  width: 64px;
  border-radius: 6px;
  overflow: hidden;
  background: #0d1117;
}
.enemy-image img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.enemy-image.enemy-image-loaded img { opacity: 1; }
.enemy-image.enemy-image-error img { display: none; }
.enemy-info {
  flex: 1;
  min-width: 0;
}

/* ── Group panel ────────────────────────────────────────────────────── */
.group-header { font-size: 11px; color: #8b949e; margin-bottom: 4px; }
.group-member {
  padding: 3px 0;
  border-bottom: 1px solid #21262d;
  font-size: 11px;
}
.group-member:last-child { border-bottom: none; }
.group-member-name { font-weight: 600; }
.group-member-away { opacity: 0.4; }
.group-mini-bar {
  height: 6px;
  background: #21262d;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
}
.group-mini-bar-fill {
  height: 100%;
  border-radius: 2px;
}

/* ── Chat panel ─────────────────────────────────────────────────────── */
.chat-log { max-height: 250px; overflow-y: auto; }
.chat-entry { font-size: 11px; padding: 1px 0; word-wrap: break-word; }
.chat-channel { font-weight: 600; }
.chat-talker { color: #8b949e; }

/* ── Map Panel ──────────────────────────────────────────────────────── */
[data-panel-id="map"].gmcp-panel-widget {
  display: flex;
  flex-direction: column;
}
[data-panel-id="map"] .panel-header {
  flex-shrink: 0;
}
#panel-body-map {
  padding: 0;
  overflow: hidden;
  background: #000000;
  display: flex;
  flex: 1;
  min-height: 0;
  align-items: center;
  justify-content: center;
  position: relative;
}

.map-grid {
  display: grid;
  background: #000;
}

.map-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.map-empty-msg {
  color: #484f58;
  font-size: 12px;
  text-align: center;
  font-style: italic;
}

.map-tile {
  width: 32px;
  height: 32px;
  background-color: #000;
  background-size: cover;
  background-repeat: no-repeat;
}

.map-tile-player {
  position: relative;
  box-shadow: 0 0 4px 1px #fff;
}
.map-tile-player::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: url('/assets/tiles/player.png') center/cover no-repeat;
}

/* Terrain tile backgrounds */
.map-tile-city        { background-image: url('/assets/tiles/city.jpg'); }
.map-tile-road        { background-image: url('/assets/tiles/road.jpg'); }
.map-tile-path        { background-image: url('/assets/tiles/path.jpg'); }
.map-tile-forest      { background-image: url('/assets/tiles/forest.jpg'); }
.map-tile-jungle      { background-image: url('/assets/tiles/jungle.jpg'); }
.map-tile-canopy      { background-image: url('/assets/tiles/canopy.jpg'); }
.map-tile-plains      { background-image: url('/assets/tiles/plains.jpg'); }
.map-tile-farm        { background-image: url('/assets/tiles/farm.jpg'); }
.map-tile-hills       { background-image: url('/assets/tiles/hills.jpg'); }
.map-tile-mountain    { background-image: url('/assets/tiles/mountain.jpg'); }
.map-tile-desert      { background-image: url('/assets/tiles/desert.jpg'); }
.map-tile-sea         { background-image: url('/assets/tiles/sea.jpg'); }
.map-tile-lake        { background-image: url('/assets/tiles/lake.jpg'); }
.map-tile-river       { background-image: url('/assets/tiles/river.jpg'); }
.map-tile-beach       { background-image: url('/assets/tiles/beach.jpg'); }
.map-tile-swamp       { background-image: url('/assets/tiles/swamp.jpg'); }
.map-tile-arctic      { background-image: url('/assets/tiles/arctic.jpg'); }
.map-tile-underground { background-image: url('/assets/tiles/underground.jpg'); }
.map-tile-inside      { background-image: url('/assets/tiles/inside.jpg'); }
.map-tile-barren      { background-image: url('/assets/tiles/barren.jpg'); }
.map-tile-underwater  { background-image: url('/assets/tiles/underwater.jpg'); }
.map-tile-sky         { background-image: url('/assets/tiles/sky.jpg'); }
.map-tile-outside     { background-image: url('/assets/tiles/outside.jpg'); }

/* Z-level indicator overlay */
.map-zlevel {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #888;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--df-font-mono);
  pointer-events: none;
}
.map-zlevel-arrow {
  color: #aaa;
}

/* ── Quest Panel ─────────────────────────────────────────────────────── */
.quest-active { margin-bottom: 8px; }
.quest-active-name { font-weight: 600; color: #e6edf3; margin-bottom: 2px; }
.quest-active-desc { font-size: 12px; color: #8b949e; margin-bottom: 6px; }
.quest-obj { margin-bottom: 4px; }
.quest-obj-name { font-size: 12px; color: #c9d1d9; }
.quest-obj-progress { display: flex; align-items: center; gap: 6px; }
.quest-bar { flex: 1; height: 6px; background: #21262d; border-radius: 3px; overflow: hidden; }
.quest-bar-sm { height: 4px; }
.quest-bar-fill { height: 100%; background: #58a6ff; border-radius: 3px; transition: width 0.3s; }
.quest-bar-done { background: #3fb950; }
.quest-obj-count { font-size: 11px; color: #8b949e; min-width: 32px; text-align: right; }

.quest-list { border-top: 1px solid #30363d; padding-top: 6px; }
.quest-list-header { font-size: 11px; color: #484f58; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.quest-list-item { padding: 3px 0; }
.quest-list-active .quest-list-name { color: #58a6ff; }
.quest-list-done .quest-list-name { color: #3fb950; text-decoration: line-through; opacity: 0.7; }
.quest-list-name { font-size: 12px; color: #c9d1d9; }
.quest-list-info { display: flex; align-items: center; gap: 6px; }
.quest-list-status { font-size: 11px; color: #8b949e; min-width: 60px; }

/* ── Achievement Panel ──────────────────────────────────────────────── */
.ach-summary {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.7);
}
.ach-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.ach-summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ach-summary-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b949e;
}
.ach-summary-value {
  font-size: 16px;
  font-weight: 700;
  color: #e6edf3;
}
.ach-equipped {
  font-size: 12px;
  color: #c9d1d9;
}
.ach-panel-note {
  margin-top: 8px;
  font-size: 11px;
  color: #8b949e;
}
.ach-panel-note code {
  color: #c9d1d9;
}
.ach-section {
  margin-top: 12px;
}
.ach-section-title {
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b949e;
}
.ach-family {
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: rgba(1, 4, 9, 0.45);
}
.ach-family-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.ach-family-name {
  font-size: 13px;
  font-weight: 600;
  color: #e6edf3;
}
.ach-family-meta {
  font-size: 11px;
  color: #8b949e;
}
.ach-family-value {
  font-size: 14px;
  font-weight: 700;
  color: #58a6ff;
  white-space: nowrap;
}
.ach-tier-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ach-tier-chip {
  padding: 2px 7px;
  border: 1px solid #30363d;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8b949e;
  background: rgba(13, 17, 23, 0.8);
}
.ach-tier-chip.unlocked {
  border-color: #238636;
  color: #3fb950;
  background: rgba(35, 134, 54, 0.15);
}
.ach-next-row {
  margin-top: 8px;
}
.ach-next-label {
  margin-bottom: 4px;
  font-size: 11px;
  color: #8b949e;
}
.ach-complete {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #3fb950;
}
.ach-compact-item {
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: rgba(1, 4, 9, 0.45);
}
.ach-compact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.ach-compact-next {
  margin-bottom: 6px;
  font-size: 11px;
  color: #8b949e;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .dock-column { width: 200px; }
  .ach-summary-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .dock-column { width: 0; overflow: hidden; border: none; }
}
