.wm-location-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 360px;
  max-width: 100%;
  height: 100%;
  background: var(--c-bg-800, #141414);
  border-left: 1px solid #8B0000;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 15px rgba(0,0,0,0.6);
  overflow-y: auto;
}

.wm-card-tabs {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0 8px;
  border-bottom: 1px solid var(--c-border-subtle, #333);
  background: rgba(18,18,18,0.9);
  gap: 2px;
  overflow-x: auto;
}

.wm-card-tabs li[role="tab"] {
  padding: 8px 12px;
  font-size: 12px;
  font-family: var(--font-heading, "Cinzel", serif);
  color: var(--c-text-muted, #999);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  user-select: none;
  transition: color 0.15s, border-color 0.15s;
}

.wm-card-tabs li[role="tab"]:hover {
  color: var(--c-gold-300, #d4af37);
}

.wm-card-tabs li[role="tab"][aria-selected="true"] {
  color: var(--c-gold-300, #d4af37);
  border-bottom: 2px solid #8B0000;
  font-weight: bold;
}

.wm-tab-panel {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wm-tab-panel[hidden] {
  display: none !important;
}

.wm-npc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.wm-npc-card {
  background: rgba(25,25,25,0.7);
  border: 1px solid var(--c-border-subtle, #333);
  border-radius: 4px;
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s, border-color 0.15s;
}

.wm-npc-card:hover {
  transform: translateY(-2px);
  border-color: var(--c-gold-300, #d4af37);
}

.wm-npc-portrait {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--c-gold-300, #d4af37);
  background: #111;
}

.wm-image-grid {
  column-count: 2;
  column-gap: 8px;
}

.wm-image-tile {
  width: 100%;
  margin-bottom: 8px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--c-border-subtle, #333);
  display: block;
  transition: transform 0.15s;
}

.wm-image-tile:hover {
  transform: scale(1.02);
  border-color: var(--c-gold-300, #d4af37);
}

.wm-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.wm-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 4px;
  box-shadow: 0 4px 25px rgba(0,0,0,0.9);
}

.wm-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wm-note-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: rgba(20,20,20,0.6);
  border: 1px solid var(--c-border-subtle, #333);
  border-radius: 4px;
  margin-bottom: 8px;
}

.wm-note-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--c-text-muted, #999);
}

.wm-note-body {
  font-size: 12px;
  color: #e0e0e0;
  line-height: 1.4;
  word-break: break-word;
}

.wm-note-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.wm-note-compose {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: rgba(25,25,25,0.85);
  border: 1px solid var(--c-border-subtle, #444);
  border-radius: 4px;
  margin-bottom: 12px;
}

.wm-note-compose textarea {
  width: 100%;
  box-sizing: border-box;
  background: #111;
  border: 1px solid #444;
  border-radius: 3px;
  color: #fff;
  padding: 6px 8px;
  font-size: 12px;
  resize: vertical;
  min-height: 60px;
}

.wm-note-compose select,
.wm-note-compose input {
  width: 100%;
  box-sizing: border-box;
  background: #111;
  border: 1px solid #444;
  border-radius: 3px;
  color: #fff;
  padding: 5px 8px;
  font-size: 12px;
}

.wm-location-st-toolbar {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--c-border-subtle, #333);
  background: rgba(25,10,10,0.6);
  flex-wrap: wrap;
}

.wm-location-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: rgba(20,20,20,0.9);
  border: 1px solid #8B0000;
  border-radius: 4px;
  margin-bottom: 12px;
}

.wm-location-form input,
.wm-location-form select {
  width: 100%;
  box-sizing: border-box;
  background: #111;
  border: 1px solid #444;
  border-radius: 3px;
  color: #fff;
  padding: 5px 8px;
  font-size: 12px;
}

.wm-location-form label {
  font-size: 11px;
  color: var(--c-gold-300, #d4af37);
  font-weight: 600;
}

.wm-session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(20,20,20,0.6);
  border: 1px solid var(--c-border-subtle, #333);
  border-radius: 4px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.wm-session-item:hover {
  border-color: var(--c-gold-300, #d4af37);
}

.wm-empty-state {
  font-size: 12px;
  color: var(--c-text-muted, #999);
  font-style: italic;
  padding: 12px 0;
  text-align: center;
}

.wm-loading-skeleton {
  padding: 20px;
  text-align: center;
  color: var(--c-gold-300, #d4af37);
  font-size: 13px;
}

@media (max-width: 600px) {
  .wm-location-drawer {
    width: 100% !important;
    left: 0;
  }

  .wm-npc-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wm-image-grid {
    column-count: 1;
  }
}

.wm-note-fab {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  z-index: 99999;
  pointer-events: auto !important;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  background: var(--accent, #7c3aed);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.wm-note-fab:hover {
  opacity: 0.88;
}

#wm-note-shortcut-dialog {
  max-width: 420px;
  width: 90vw;
  background: var(--c-bg-800, #1f1f23);
  color: var(--c-text-primary, #fff);
  border: 1px solid var(--c-border-medium, #444);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  z-index: 100000;
}

#wm-note-shortcut-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

#wm-note-shortcut-dialog form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#wm-note-shortcut-dialog label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-gold-300, #d4af37);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#wm-ns-place,
#wm-ns-body {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem;
  background: var(--c-bg-900, #141416);
  color: #fff;
  border: 1px solid var(--c-border-subtle, #333);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.875rem;
}

#wm-ns-place:focus,
#wm-ns-body:focus {
  outline: none;
  border-color: var(--accent, #7c3aed);
}

#wm-ns-suggestions {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 160px;
  overflow-y: auto;
  background: var(--c-bg-900, #141416);
  border: 1px solid var(--c-border-subtle, #333);
  border-radius: 4px;
}

#wm-ns-suggestions li {
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: #ddd;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#wm-ns-suggestions li:hover,
#wm-ns-suggestions li[aria-selected="true"] {
  background: var(--accent, #7c3aed);
  color: #fff;
}

.wm-ns-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

#wm-ns-submit {
  background: var(--accent, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
}

#wm-ns-submit:hover {
  opacity: 0.9;
}

#wm-ns-cancel {
  background: transparent;
  color: #aaa;
  border: 1px solid var(--c-border-subtle, #444);
  border-radius: 4px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

#wm-ns-cancel:hover {
  color: #fff;
  border-color: #666;
}

.wm-ns-error {
  color: var(--c-danger, #e06c75);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: none;
}
