:root {
  color-scheme: dark;
  --bg: #121418;
  --panel: #1a1d24;
  --text: #e8e4dc;
  --muted: #9a958c;
  --accent: #c9a227;
  --danger: #c44;
  --ok: #3a7;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: var(--panel);
  border-bottom: 1px solid #2a2e38;
}
.brand { font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--text); }
nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
nav a { text-decoration: none; }
.inline { display: inline; margin: 0; }
.linkish {
  background: none; border: none; color: var(--accent);
  cursor: pointer; font: inherit; text-decoration: underline; padding: 0;
}
.main { flex: 1; padding: 1.25rem; max-width: 52rem; margin: 0 auto; width: 100%; }
.main.main--quests {
  max-width: min(96rem, 100%);
  padding-top: 0.75rem;
}
.foot {
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid #2a2e38;
}
.flash { padding: 0.75rem 1rem; margin: 0 auto; max-width: 52rem; }
.flash-error { background: #3a2020; color: #f8c0c0; }
.flash-success { background: #1f2e24; color: #b8e8c8; }
.tag-warn { color: var(--danger); font-size: 0.9em; font-weight: 600; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-top: 0.5rem; }
.admin-table th, .admin-table td { border: 1px solid #2a2e38; padding: 0.35rem 0.5rem; text-align: left; vertical-align: top; }
.admin-table th { color: var(--muted); font-weight: 600; }
.admin-actions form { display: inline; margin-right: 0.5rem; }
.admin-actions input[type="text"] { max-width: 12rem; }
.admin-inline-row { margin: 0.5rem 0; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.admin-inline-row.eb-admin-world-tabs .btn,
.admin-inline-row.eb-admin-world-tabs a.btn { margin-top: 0; }
.eb-admin-world-strip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.eb-admin-world-strip .btn { margin-top: 0; }
.eb-admin-world-strip__link.is-current {
  cursor: default;
  pointer-events: none;
}
.admin-inline-row .btn.is-current,
.eb-admin-world-strip__link.is-current {
  border-color: #6b8fc9;
  background: rgba(75, 105, 150, 0.45);
  box-shadow: inset 0 0 0 1px rgba(143, 188, 255, 0.35);
  font-weight: 600;
  color: var(--text);
}
nav a.nav-current {
  color: var(--text);
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(143, 188, 255, 0.45);
  background: rgba(70, 95, 135, 0.35);
}
.admin-stat-list { margin: 0.5rem 0 1rem; padding-left: 1.25rem; }
.admin-search-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }
.name-pick-fieldset { border: 1px solid #2a2e38; border-radius: 6px; padding: 0.75rem 1rem; margin-bottom: 1rem; }
.name-pick-fieldset legend { padding: 0 0.35rem; color: var(--muted); font-size: 0.95rem; }
.name-suggest-label { display: block; margin: 0.4rem 0; cursor: pointer; }
.name-suggest-label input { margin-right: 0.45rem; }
h1 { font-size: 1.5rem; margin-top: 0; }
h2 { font-size: 1.15rem; color: var(--muted); font-weight: 600; }
.login-verify-section {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #2a2e38;
}
.exit-compass-panel .compass-hint { font-size: 0.88rem; margin-top: 0; margin-bottom: 0.65rem; }
.exit-compass {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
}
.compass-row {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
}
.compass-cell {
  display: inline;
  margin: 0;
}
button.compass-btn {
  min-width: 4.35rem;
  padding: 0.45rem 0.4rem;
  font-size: 0.82rem;
  margin-top: 0;
}
.compass-hub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.35rem;
  color: var(--muted);
  font-size: 1.1rem;
  user-select: none;
}
.compass-empty {
  display: inline-block;
  min-width: 4.35rem;
  min-height: 2.25rem;
}
.panel {
  background: var(--panel);
  border: 1px solid #2a2e38;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
label { display: block; margin-top: 0.75rem; font-size: 0.9rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], select {
  width: 100%; max-width: 22rem;
  padding: 0.5rem 0.65rem;
  margin-top: 0.25rem;
  border-radius: 6px;
  border: 1px solid #3a3f4d;
  background: #0e1014;
  color: var(--text);
}
button.btn, .btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid #5a4a1a;
  background: #2a2418;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}
button.btn:hover, .btn:hover { background: #3a3220; }
.room-title { font-size: 1.35rem; margin-bottom: 0.25rem; }
.room-zone { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.75rem; }
.room-short { font-style: italic; color: #c4bfb5; margin-bottom: 1rem; }
.room-long { margin-bottom: 1rem; white-space: pre-wrap; }
.room-ambient { font-size: 0.9rem; color: #8a8578; font-style: italic; margin-bottom: 1.25rem; }
.exits { list-style: none; padding: 0; margin: 0; }
.exits li { margin-bottom: 0.5rem; }
.exits form { display: inline; }
.char-list { list-style: none; padding: 0; }
.char-list li { padding: 0.5rem 0; border-bottom: 1px solid #2a2e38; }
.muted { color: var(--muted); font-size: 0.92rem; }
/* --- Quests journal (wide, horizontal-first) --- */
.quests-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}
.quests-page-title { margin: 0; }
.quests-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0.75rem 1rem;
  align-items: start;
}
@media (max-width: 52rem) {
  .quests-two-col { grid-template-columns: 1fr; }
}
.quests-col-heading { margin-top: 0; margin-bottom: 0.65rem; }
.quests-col-empty { margin: 0; }
.quests-two-col > .panel { margin-bottom: 0; }
.quest-journal-card {
  border: 1px solid #2a2e38;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.65rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0.5rem 1rem;
  align-items: start;
}
.quest-journal-card:last-child { margin-bottom: 0; }
@media (max-width: 40rem) {
  .quest-journal-card {
    grid-template-columns: 1fr;
  }
}
.quest-journal-top {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 0.5rem 1rem;
  align-items: start;
}
@media (max-width: 36rem) {
  .quest-journal-top { grid-template-columns: 1fr; }
}
.quest-journal-titles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
}
.quest-journal-name { margin: 0; font-size: 1.05rem; }
.quest-journal-badge {
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid #3a3f4d;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  white-space: nowrap;
}
.quest-journal-desc {
  font-size: 0.9rem;
  line-height: 1.4;
  max-height: 4.5rem;
  overflow: auto;
  margin: 0;
}
.quest-journal-mid {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  min-width: 0;
}
.quest-journal-side {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  min-width: 0;
}
@media (max-width: 40rem) {
  .quest-journal-mid,
  .quest-journal-side {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .quest-journal-side {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 52rem) and (min-width: 41rem) {
  .quest-journal-side { grid-template-columns: 1fr; }
}
.quests-mini-h {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}
.quest-step-rail {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: stretch;
}
.quest-step-chip {
  flex: 1 1 8rem;
  max-width: 100%;
  border: 1px solid #2f3440;
  border-radius: 6px;
  padding: 0.35rem 0.45rem;
  font-size: 0.82rem;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.quest-step-chip--done { opacity: 0.72; }
.quest-step-chip--current {
  border-color: rgba(212, 181, 106, 0.55);
  box-shadow: 0 0 0 1px rgba(212, 181, 106, 0.12);
}
.quest-step-chip-mark {
  font-size: 0.75rem;
  color: var(--muted);
}
.quest-step-chip--current .quest-step-chip-mark { color: var(--accent, #d4b56a); }
.quest-step-chip-label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.quest-step-chip-detail {
  font-size: 0.75rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.quest-step-chip-npc {
  font-size: 0.72rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.quest-journal-box {
  background: #12151c;
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  font-size: 0.88rem;
  line-height: 1.35;
  min-width: 0;
}
.quest-journal-box--muted { opacity: 0.95; }
.quest-now-head { margin: 0 0 0.25rem; font-weight: 600; }
.quest-now-line { margin: 0.15rem 0; font-size: 0.84rem; }
.quest-now-line .muted { margin-right: 0.25rem; }
.quest-done-mechanic { margin: 0 0 0.25rem; font-size: 0.78rem; line-height: 1.3; }
.quest-done-reward { margin: 0; font-size: 0.82rem; }
.scroll-y {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.quests-avail-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.quest-avail-card {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  border: 1px solid #2a2e38;
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
}
.quest-avail-main { flex: 1 1 12rem; min-width: 0; }
.quest-avail-title { margin: 0 0 0.15rem; font-size: 1rem; }
.quest-avail-reward { margin: 0 0 0.25rem; font-size: 0.82rem; }
.quest-avail-hint { margin: 0 0 0.25rem; font-size: 0.82rem; line-height: 1.3; }
.quest-avail-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
  max-height: 3.6rem;
  overflow: auto;
}
.quest-avail-actions {
  flex: 0 0 auto;
  align-self: center;
}
.quest-avail-actions .btn { margin: 0; }
.lede { font-size: 1.05rem; max-width: 40rem; }
code { background: #0e1014; padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.9em; }
.stats-bar { font-size: 0.95rem; }
.field-msg {
  margin: 0.5rem 0 0.75rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
  min-height: 1.35em;
  border-radius: 6px;
  max-width: 22rem;
}
.field-msg[hidden] {
  display: none !important;
}
.field-msg--ok {
  color: var(--ok);
  background: rgba(51, 170, 119, 0.12);
  border: 1px solid rgba(51, 170, 119, 0.35);
}
.field-msg--bad {
  color: #f0a8a8;
  background: rgba(196, 68, 68, 0.18);
  border: 1px solid rgba(196, 68, 68, 0.45);
}
.field-msg--hint {
  color: var(--muted);
  background: rgba(154, 149, 140, 0.08);
  border: 1px solid #2a2e38;
}

/* Creature name vs player level (+ boss / named / rare from DB) */
.mob-star {
  color: #ffd54a;
  font-weight: 800;
  margin-right: 0.15em;
  text-shadow: 0 0 6px rgba(255, 180, 60, 0.85);
}
.mob-name {
  font-weight: 700;
}
.mob-name--trivial {
  color: #b8b4ac;
  font-weight: 600;
}
.mob-name--weak {
  color: #5ecf7a;
}
.mob-name--even {
  color: #7ec8ff;
}
.mob-name--risk {
  color: #3b6cff;
}
.mob-name--danger {
  color: #f0d040;
  text-shadow: 0 0 4px rgba(240, 208, 64, 0.35);
}
.mob-name--deadly {
  color: #ff4d4d;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(255, 60, 60, 0.45);
}
.mob-disposition {
  font-size: 0.88em;
  margin-left: 0.25rem;
}
/* --- Play page: wide layout + MUD-style graph map strip + dialog --- */
.main.main--play-map {
  max-width: min(98vw, 88rem);
  padding-top: 0.85rem;
  padding-bottom: 1rem;
}
.main.main--map-editor {
  max-width: min(100vw, 120rem);
  margin: 0 auto;
  width: 100%;
  padding: 0.65rem 0.85rem 1rem;
  min-height: calc(100vh - 7rem);
}
/* Full-viewport map canvas: main fills space under header; footer hidden */
body.body--map-editor-fullpage {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
}
body.body--map-editor-fullpage .foot {
  display: none;
}
body.body--map-editor-fullpage .main.main--map-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}
/* Map Studio: hide global nav so the studio chrome fills the viewport */
body.body--map-studio .top {
  display: none;
}
.play-map-layout {
  width: 100%;
}
.play-map-layout[data-eb-period="night"] {
  filter: brightness(0.87) saturate(0.93);
}
.play-map-layout[data-eb-period="dawn"],
.play-map-layout[data-eb-period="dusk"] {
  filter: brightness(0.93) saturate(1.03);
}
.play-map-layout[data-eb-period="day"] {
  filter: none;
}
.eb-world-clock {
  font-size: 0.88rem;
  margin: 0 0 0.65rem;
  padding: 0.4rem 0.55rem;
  border-radius: 7px;
  background: rgba(18, 20, 27, 0.75);
  border: 1px solid #2a3140;
  line-height: 1.4;
}
.eb-world-clock__time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--fg, #e8e8e8);
  margin-right: 0.25rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.play-chat-dock {
  margin-top: 0;
  margin-bottom: 0.65rem;
  border: 1px solid #2a2e38;
  border-radius: 8px;
  background: var(--panel);
  padding: 0.55rem 0.75rem 0.65rem;
}
.play-map-layout > .play-chat-dock {
  margin-top: 0.65rem;
}
.play-hub-grid .play-col-scroll > section {
  position: relative;
}
.play-hub-grid .play-col-scroll > section:not(.eb-panel-resizing):not(.eb-panel-dragging) {
  cursor: grab;
}
.play-hub-grid .play-col-scroll > section:active:not(.eb-panel-resizing):not(.eb-panel-dragging) {
  cursor: grabbing;
}
.play-hub-grid .play-col-scroll > section.eb-panel-sized {
  box-sizing: border-box;
  flex-shrink: 0;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 5rem;
  max-height: min(92vh, 56rem);
}
.play-hub-grid .play-col-scroll > section.eb-panel-dragging {
  opacity: 0.72;
}
.play-hub-grid .play-col-scroll > section.eb-panel-drag-over {
  outline: 2px dashed rgba(147, 197, 253, 0.55);
  outline-offset: 2px;
}
.play-hub-grid .eb-panel-resize-handle {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 6;
  min-height: 12px;
  height: 12px;
  margin: 0.25rem -0.35rem -0.35rem;
  border-radius: 0 0 6px 6px;
  cursor: ns-resize;
  background: linear-gradient(
    180deg,
    rgba(18, 20, 27, 0.35),
    rgba(147, 197, 253, 0.14)
  );
  touch-action: none;
  flex-shrink: 0;
}
.play-hub-grid .eb-panel-resize-handle:hover,
.play-hub-grid .eb-panel-resize-handle:focus-visible {
  background: rgba(147, 197, 253, 0.18);
}
.play-hub-grid .eb-panel-resize-handle::after {
  content: "";
  display: block;
  margin: 3px auto 0;
  width: 2rem;
  height: 3px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.55);
}
.play-hub-grid .play-col-scroll > section.eb-panel-resizing {
  cursor: ns-resize;
  user-select: none;
}
.play-hub-grid section.play-chat-dock.eb-panel-sized {
  display: flex;
  flex-direction: column;
}
.play-hub-grid section.play-chat-dock.eb-panel-sized .play-chat-log {
  flex: 1 1 auto;
  max-height: none;
  min-height: 4rem;
}
.play-hub-grid section.play-chat-dock.eb-panel-sized .play-chat-form {
  flex-shrink: 0;
}
.play-chat-dock__title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}
.play-chat-dock__hint {
  font-size: 0.82rem;
  margin: 0 0 0.45rem;
  line-height: 1.45;
}
.play-chat-legend-world { color: var(--muted); font-weight: 600; }
.play-chat-legend-guild { color: #5fd87a; font-weight: 600; }
.play-chat-legend-party { color: #93c5fd; font-weight: 600; }
.play-chat-log {
  max-height: 14rem;
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 0.84rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.25rem;
  background: #14171d;
  border-radius: 6px;
  border: 1px solid #232832;
}
.play-chat-line {
  margin: 0.2rem 0;
  word-break: break-word;
}
.play-chat-line--world {
  color: var(--muted);
}
.play-chat-line--guild {
  color: #5fd87a;
}
.play-chat-line--party {
  color: #93c5fd;
}
.play-chat-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-right: 0.35rem;
  opacity: 0.9;
}
.play-chat-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.play-chat-form input[type="text"] {
  flex: 1 1 14rem;
  min-width: 10rem;
  max-width: 100%;
}
/* Flex hub: center track must not shrink to 0 (grid minmax(0,1fr) could hide it). */
.play-hub-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
}
@media (min-width: 56.01rem) {
  .play-hub-grid {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0.75rem 1rem;
    overflow-x: auto;
    overflow-y: visible;
  }
  .play-hub-grid > .play-col--left {
    flex: 0 0 var(--eb-play-left-w, min(22vw, 20rem));
    width: auto;
    min-width: 12.5rem;
    max-width: min(36rem, 52vw);
    order: 10;
    align-self: stretch;
    min-height: 0;
  }
  .play-hub-grid > .play-col--center {
    flex: 1 1 16rem;
    min-width: min(42vw, 22rem);
    max-width: 100%;
    order: 20;
    align-self: stretch;
    min-height: 0;
  }
  .play-hub-grid > .play-col--right {
    flex: 0 0 var(--eb-play-right-w, min(26vw, 24rem));
    width: auto;
    min-width: 12.5rem;
    max-width: min(36rem, 52vw);
    order: 30;
    align-self: flex-start;
    min-height: 0;
  }
  .play-hub-grid > .eb-play-col-gutter--lc {
    order: 15;
  }
  .play-hub-grid > .eb-play-col-gutter--cr {
    order: 25;
  }
}
.eb-play-col-gutter {
  display: none;
  flex: 0 0 10px;
  width: 10px;
  align-self: stretch;
  min-height: 5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  cursor: col-resize;
  touch-action: none;
  background: rgba(100, 116, 139, 0.14);
  box-sizing: border-box;
}
@media (min-width: 56.01rem) {
  .eb-play-col-gutter {
    display: block;
  }
}
.eb-play-col-gutter:hover,
.eb-play-col-gutter:focus-visible {
  background: rgba(147, 197, 253, 0.28);
  outline: none;
}
body.eb-col-gutter-dragging {
  cursor: col-resize;
  user-select: none;
}
@media (max-width: 56rem) {
  .play-hub-grid > .play-col--left,
  .play-hub-grid > .play-col--center,
  .play-hub-grid > .play-col--right {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: 1 1 auto;
  }
}
.play-col-scroll {
  max-height: calc(100dvh - 6.25rem);
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}
.play-col--left .stats-bar--play {
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  font-size: 0.82rem;
  line-height: 1.3;
}
.play-col--left .stats-bar--play strong {
  font-size: 0.9rem;
}
.play-col--left > .panel:first-of-type {
  margin-bottom: 0.5rem;
}
.play-col--right > .panel.play-map-strip--minimap {
  margin-bottom: 0.5rem;
}
.inventory-window__lede {
  font-size: 0.88rem;
  margin-bottom: 0.65rem;
  line-height: 1.45;
}
.inventory-slot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.5rem;
}
@media (max-width: 36rem) {
  .inventory-slot-grid {
    grid-template-columns: 1fr;
  }
}
.inventory-slot {
  border: 1px solid #2a2e38;
  border-radius: 8px;
  padding: 0.55rem 0.65rem 0.65rem;
  background: rgba(8, 10, 14, 0.45);
  min-width: 0;
}
.inventory-slot__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #2a2e38;
}
.inventory-slot__title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.inventory-slot__meta {
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.inventory-slot__empty {
  margin: 0;
  font-size: 0.88rem;
}
.inventory-slot__list {
  margin-bottom: 0;
}
.play-map-strip--minimap .play-map-strip-head {
  margin-bottom: 0.25rem;
}
.play-map-strip--minimap .play-map-strip-title {
  font-size: 0.88rem;
}
.play-col--right .map-graph-wrap--mini {
  max-height: min(40vh, 11rem);
  overflow: auto;
}
.play-col--right .map-graph-wrap--mini .map-graph-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 5rem;
  min-width: min(100%, 18rem);
}
.play-col-scroll > .panel,
.play-col-scroll > article.room {
  margin-bottom: 0.5rem;
}
.play-col-scroll > .panel:last-child,
.play-col-scroll > article.room:last-child {
  margin-bottom: 0;
}
.play-map-strip {
  margin-bottom: 0.65rem;
  padding: 0.55rem 0.85rem 0.65rem;
}
.play-map-strip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.35rem;
}
.play-map-strip-titles {
  min-width: 0;
}
.play-map-strip-title {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}
.play-map-strip-zone {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
}
.play-map-strip-btn {
  margin-top: 0;
  flex-shrink: 0;
}
.map-graph-wrap {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #3a3530;
  background: #c8c2ba;
  overflow: hidden;
}
.map-graph-wrap--mini {
  max-height: 5.5rem;
  overflow-x: auto;
  overflow-y: hidden;
}
.map-graph-wrap--mini .map-graph-svg {
  display: block;
  width: 100%;
  height: 4.75rem;
  min-width: min(100%, 36rem);
}
.map-graph-wrap--full {
  margin-top: 0.35rem;
}
.map-graph-wrap--full .map-graph-svg {
  display: block;
  width: 100%;
  height: auto;
  /* Large full-zone / staff world map (coords doubled server-side + tall viewport) */
  min-height: min(90vh, 78rem);
  max-height: min(94vh, 102rem);
}
.map-graph-svg {
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
}
.map-graph-link {
  stroke: #6e2a2a;
  stroke-width: 2.25;
  stroke-linecap: round;
  opacity: 0.88;
}
.map-graph-link--stub {
  stroke-dasharray: 5 6;
  stroke-width: 2;
  opacity: 0.62;
  stroke: #5c4a42;
}
.map-graph-room rect {
  fill: #c9b89a;
  stroke: #5c5246;
  stroke-width: 1.25;
}
.map-graph-room--here rect {
  fill: #e8d8a8;
  stroke: #c9a227;
  stroke-width: 2.5;
}
.map-graph-room--fog rect {
  fill: #9a948c;
  stroke: #6a6560;
}
.map-graph-room--shrine rect {
  fill: #b8d4c4;
  stroke: #3a7a58;
}
.map-graph-room--staff-tp {
  cursor: pointer;
}
.map-graph-room--staff-tp:focus {
  outline: none;
}
.map-graph-room--staff-tp:focus rect,
.map-graph-room--staff-tp:hover rect {
  filter: brightness(1.06);
  stroke: #8b6914;
}
.map-graph-t1 {
  fill: #1a1612;
  font-size: 9.5px;
  font-weight: 700;
  pointer-events: none;
}
.map-graph-t2 {
  fill: #3a342c;
  font-size: 7.75px;
  font-weight: 600;
  pointer-events: none;
}
.map-graph-wrap--full .map-graph-t1 {
  font-size: 22px;
}
.map-graph-wrap--full .map-graph-t2 {
  font-size: 17px;
}
.map-graph-t3 {
  fill: #4a4338;
  font-size: 7px;
  font-weight: 500;
  pointer-events: none;
}
.map-graph-wrap--full .map-graph-t3 {
  font-size: 15px;
}
.map-graph-wrap--full .map-graph-link {
  stroke-width: 4.25;
}
.map-graph-wrap--full .map-graph-link--stub {
  stroke-width: 3.6;
  stroke-dasharray: 8 10;
}
.map-graph-wrap--full .map-graph-room rect {
  stroke-width: 2;
}
.map-graph-wrap--full .map-graph-room--here rect {
  stroke-width: 4;
}
.map-explorer-empty {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
}
.play-hub-grid .room {
  margin-bottom: 0.5rem;
}
.play-room-shell .room {
  margin-bottom: 0;
}
.play-hub-grid .room-long {
  max-height: min(22vh, 9.5rem);
  overflow: auto;
}
.stats-bar--play {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  font-size: 0.88rem;
  line-height: 1.35;
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.65rem;
}
.stats-bar--play__identity {
  font-size: 0.9rem;
}
.stats-bar--play__tail {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
}
.stats-bar--play strong {
  font-size: 0.95rem;
}
.vitals-bars {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}
.vital-row__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.2rem;
}
.vital-row__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.vital-row__values {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.vital-track {
  height: 0.55rem;
  border-radius: 999px;
  background: #252830;
  border: 1px solid #2f343e;
  overflow: hidden;
}
.vital-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 0;
  transition: width 0.18s ease;
}
.vital-fill--hp {
  background: linear-gradient(90deg, #2a5c3e, #4ecf7a);
  box-shadow: 0 0 6px rgba(80, 200, 120, 0.25);
}
.vital-fill--mp {
  background: linear-gradient(90deg, #2a4a78, #6ab4ff);
  box-shadow: 0 0 6px rgba(100, 170, 255, 0.22);
}
.vital-fill--warn {
  filter: brightness(1.12) saturate(1.15);
}
.familiar-head {
  margin: 0 0 0.35rem;
}
.familiar-head + .vitals-bars {
  margin-top: 0;
}
.map-full-dialog {
  max-width: min(99vw, 152rem);
  width: min(99vw, 152rem);
  min-width: 18rem;
  min-height: 14rem;
  max-height: min(96vh, 2400px);
  border: 1px solid #2a2e38;
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  padding: 0;
  resize: both;
  overflow: auto;
}
.map-full-dialog::backdrop {
  background: rgba(6, 8, 12, 0.72);
}
.map-full-dialog-inner {
  padding: 0.85rem 1rem 1rem;
  min-height: 0;
  max-height: none;
  overflow: auto;
}
.map-full-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.map-full-dialog-title {
  margin: 0;
  font-size: 1.15rem;
}
.map-full-dialog-sub {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  line-height: 1.35;
}
.map-full-close {
  margin: 0;
  flex-shrink: 0;
}

/* Spell panel: shared focus + horizontal spell bar */
.eb-spell-panel .eb-spell-focus-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  margin-bottom: 0.85rem;
}
.eb-spell-panel .eb-spell-focus-label {
  margin: 0;
}
.eb-spell-panel .eb-spell-focus-select {
  min-width: 11rem;
  max-width: 100%;
  flex: 1 1 14rem;
  padding: 0.28rem 0.45rem;
  border-radius: 4px;
  border: 1px solid #2a2e38;
  background: #0f1218;
  color: var(--text);
}
.eb-spell-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.65rem;
  align-items: stretch;
}
.eb-spell-slot {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 8.75rem;
  flex: 0 1 auto;
}
.eb-spell-slot-meta {
  font-size: 0.82rem;
  line-height: 1.25;
}
.eb-spell-panel .eb-spell-btn {
  width: 100%;
  text-align: center;
  padding: 0.38rem 0.65rem;
  font-size: 0.92rem;
}
.eb-spell-btn--blocked {
  opacity: 0.55;
  cursor: not-allowed;
}

.mob-name--boss {
  display: inline-block;
  padding: 0.12em 0.45em 0.1em;
  margin: 0 0.05em 0.1em 0;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.92em;
  color: #1a0d00;
  background: linear-gradient(180deg, #ff9a1a 0%, #ff5a00 45%, #e04000 100%);
  border: 1px solid #ffc266;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 14px rgba(255, 120, 0, 0.75),
    inset 0 1px 0 rgba(255, 220, 160, 0.45);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
