[data-preview] {
  max-width: 100%;
  height: auto;
}
.da-floor-row {
  display: flex;
  gap: 0.4rem;
  align-items: end;
  flex-wrap: wrap;
  margin: 0.6rem 0;
}
.da-floor-row label {
  flex: 1 1 12rem;
}
[data-template-editor] form {
  display: grid;
  gap: 0.55rem;
}
[data-template-editor] figure {
  margin: 0.4rem 0;
  display: flex;
  gap: 0.8rem;
  align-items: center;
}
[data-template-editor] [hidden] {
  display: none;
}
.sphere-section {
  position: relative;
  width: 3.4rem;
  height: 3.4rem;
  flex: none;
  border: 1px solid #57d8de;
  border-radius: 50%;
  background: #57d8de22;
}
.sphere-section i {
  position: absolute;
  left: 50%;
  top: 0;
  width: 50%;
  height: 50%;
  border-left: 2px solid #57d8de;
  border-bottom: 2px solid #57d8de;
}
.battlemap-workspace {
  --map-border: #303c46;
  border: 1px solid var(--map-border);
  border-radius: 12px;
  background: #13191d;
  overflow: hidden;
}
.map-top,
.map-tools,
.map-stage,
.map-stage-actions,
.map-stages {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.map-top,
.map-tools,
.map-stage {
  padding: 14px 18px;
  border-bottom: 1px solid var(--map-border);
}
.map-top label,
.map-tools label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.map-top select {
  min-width: 180px;
  max-width: 300px;
}
.map-save-state {
  margin-left: auto;
  max-width: 450px;
  font-size: 12px;
  color: #9db7ad;
}
.map-save-state.error {
  color: #ffb3a7;
}
.map-connection:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: #30271b;
  color: #f5d19a;
  border-bottom: 1px solid var(--map-border);
}
.map-connection > span {
  flex: 1 1 250px;
  font-size: 13px;
}
.map-stage {
  background: #192127;
  justify-content: space-between;
}
.map-stage p {
  margin: 0;
  font-size: 12px;
  color: #a7b3bc;
}
.map-stage > span {
  font-size: 12px;
  color: #a7b3bc;
}
.map-stages span {
  border-radius: 5px;
  color: #89949e;
  padding: 4px 8px;
  font-size: 11px;
  background: #11181d;
}
.map-stages .current {
  color: #ebcb8f;
}
.map-stages .done {
  color: #97d7bb;
}
.map-notice {
  flex-basis: 100%;
}
.map-live-door,
.map-token-vitals {
  padding: 12px;
  background: #24333a;
  border-radius: 8px;
  margin-bottom: 16px;
}
.map-door-insert {
  border-top: 1px solid var(--map-border);
  margin-top: 20px;
  padding-top: 12px;
}
.map-tools .button {
  padding: 6px 10px;
  font-size: 12px;
}
.map-tools [aria-pressed='true'] {
  border-color: #d7b46e;
  background: #403827;
  color: #ffe1aa;
}
.map-zoom {
  font: 12px monospace;
  color: #9faeb9;
  margin-right: auto;
}
.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
}
.map-ruler-readout {
  position: absolute;
  left: 12px;
  top: 12px;
  max-width: calc(100% - 24px);
  padding: 9px 12px;
  border: 1px solid #59766a;
  border-radius: 7px;
  background: #101b22ed;
  color: #edf4f7;
  font-size: 13px;
  line-height: 1.5;
  pointer-events: none;
}
.map-board {
  min-width: 0;
  position: relative;
  background: #080b0e;
}
.map-board canvas {
  display: block;
  width: 100%;
  height: min(72vh, 850px);
  min-height: 420px;
  touch-action: none;
  outline: none;
}
.map-board canvas:focus-visible {
  outline: 2px solid #d7b46e;
  outline-offset: -2px;
}
.map-coordinate {
  position: absolute;
  bottom: 8px;
  left: 10px;
  pointer-events: none;
  font: 11px monospace;
  color: #b1bdc7;
  background: #0a111acc;
  padding: 3px 6px;
  border-radius: 4px;
}
.map-inspector {
  border-left: 1px solid var(--map-border);
  padding: 18px;
  max-height: min(72vh, 850px);
  min-height: 420px;
  overflow: auto;
  font-size: 12px;
}
.map-inspector h3 {
  margin: 0 0 14px;
  font-size: 15px;
}
.map-inspector-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.map-inspector-tabs [aria-pressed='true'],
.map-object-row[aria-pressed='true'] {
  border-color: #d7b46e;
  background: #403827;
}
.map-object-row {
  display: grid;
  width: 100%;
  gap: 6px;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid var(--map-border);
  border-radius: 6px;
  background: #1b242b;
  color: #e4ebef;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.map-object-row span,
.map-object-row small {
  color: #a7b8c4;
  font-size: 11px;
  line-height: 1.5;
}
.map-object-pages {
  display: flex;
  justify-content: space-between;
}
.map-ai-revise {
  border-top: 1px solid var(--map-border);
  padding-top: 14px;
  margin-top: 16px;
}
.map-ai-revision-notes {
  width: 100%;
  min-height: 90px;
  resize: vertical;
}
.map-overlay-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--map-border);
  color: #a7b8c4;
  font-size: 11px;
}
.map-overlay-options label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 11px;
}
.map-overlay-options input {
  width: 14px;
  height: 14px;
  margin: 0;
}
.map-overlay-options[hidden] {
  display: none;
}
.map-inspector [hidden] {
  display: none !important;
}
.map-inspector label {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  color: #abb9c3;
  font-size: 12px;
}
.map-inspector input,
.map-inspector select {
  min-width: 0;
  width: 100%;
  font-size: 12px;
  padding: 8px;
}
.map-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 10px;
}
.map-inspector .map-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  line-height: 1.5;
}
.map-inspector .map-toggle input {
  width: 15px;
  height: 15px;
}
.map-inspector .button {
  margin-bottom: 8px;
  font-size: 12px;
}
.map-review,
.map-secondary {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--map-border);
}
.map-review p,
.map-inspector p {
  line-height: 1.6;
  color: #9eacb7;
}
.map-review ul {
  padding-left: 18px;
  color: #e5c997;
  line-height: 1.6;
}
.map-review li {
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.map-review li .button {
  display: block;
  margin-top: 4px;
}
.map-token-light {
  border: 1px solid var(--map-border);
  border-radius: 8px;
  padding: 12px;
  min-width: 0;
  margin: 16px 0;
}
.map-token-light legend {
  padding: 0 5px;
  font-size: 12px;
  color: #c3d1dc;
}
.map-help {
  font-size: 11px;
  color: #94a3b0;
  padding: 10px 18px;
  margin: 0;
  border-top: 1px solid var(--map-border);
}
.map-combat {
  padding: 12px 18px;
  border-bottom: 1px solid var(--map-border);
}
.map-combat:empty {
  display: none;
}
.map-combat-heading,
.map-combat-forms,
.map-combat-forms form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.map-combat-heading span,
.map-combat-message {
  font-size: 12px;
  color: #a7b3bc;
}
.map-combat .button {
  font-size: 12px;
  padding: 7px 10px;
}
.map-combat-roster {
  max-height: 300px;
  overflow: auto;
  margin-top: 12px;
}
.map-combat-roster article {
  padding: 14px 0;
  border-top: 1px solid var(--map-border);
}
.map-combat-forms {
  margin-top: 8px;
}
.map-combat-forms label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.map-combat-forms input {
  width: 100px;
  padding: 6px;
}
.map-encounter-results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.battlemap-workspace.map-expanded {
  position: fixed;
  inset: 10px;
  z-index: 80;
  overflow: auto;
}
.map-expanded .map-board canvas,
.map-expanded .map-inspector {
  height: var(--map-height, 60vh);
  min-height: 280px;
  max-height: none;
}
.map-token-results {
  display: grid;
  gap: 5px;
  max-height: 340px;
  overflow: auto;
  margin: 12px 0;
}
.map-token-results .button {
  justify-content: space-between;
  gap: 8px;
  text-align: left;
}
.map-token-results [aria-pressed='true'] {
  border-color: #d7b46e;
  background: #403827;
}
.map-token-results small {
  color: #96a8b5;
  font-size: 10px;
}
.map-ai-panel {
  padding: 22px;
  border-top: 1px solid var(--map-border);
}
.map-ai-heading,
.map-ai-result header,
.map-ai-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.map-ai-heading h3 {
  margin: 0;
}
.map-ai-status {
  margin-left: auto;
  font-size: 12px;
  color: #9db7ad;
}
.map-ai-panel p {
  color: #a7b3bc;
  font-size: 13px;
  line-height: 1.6;
}
.map-ai-panel label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: #b6c2ca;
  margin: 12px 0;
}
.map-ai-panel textarea,
.map-ai-panel input,
.map-ai-panel select {
  width: 100%;
  min-width: 0;
}
.map-ai-options {
  display: grid;
  grid-template-columns: 1fr 1fr 150px;
  gap: 15px;
}
.map-ai-jobs {
  margin-top: 22px;
}
.map-ai-result {
  border: 1px solid var(--map-border);
  border-radius: 8px;
  padding: 18px;
}
.map-ai-result header span {
  margin-left: auto;
  color: #dac38d;
  font-size: 12px;
}
.map-ai-entries {
  max-height: 360px;
  overflow: auto;
}
.map-ai-entries article {
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--map-border);
  padding: 12px 0;
}
.map-ai-entries article > div {
  flex: 1;
  min-width: 0;
}
.map-ai-entries span {
  display: block;
  color: #d7bd80;
  font-size: 11px;
  margin-top: 4px;
}
.map-ai-entries p {
  margin: 4px 0 0;
  font-size: 12px;
}
.map-ai-findings {
  display: grid;
  gap: 8px;
}
.map-ai-findings article {
  padding: 12px;
  border-left: 3px solid #7aafc9;
  background: #1b242b;
}
.map-ai-findings .warning {
  border-color: #e9c47a;
}
.map-ai-findings .error {
  border-color: #e88c82;
}
.map-ai-findings p {
  margin: 6px 0;
}
.map-confirm {
  max-width: 520px;
  width: calc(100% - 32px);
  border: 1px solid #48545d;
  border-radius: 12px;
  background: #192127;
  color: #edf1f3;
  padding: 26px;
}
.map-confirm::backdrop {
  background: #000b;
}
.map-confirm h2 {
  font-size: 22px;
  margin-top: 0;
}
.map-confirm p {
  line-height: 1.6;
  color: #b7c2ca;
}
.map-confirm label {
  display: grid;
  gap: 8px;
}
.map-confirm input {
  width: 100%;
}
.map-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
@media (max-width: 700px) {
  .map-ai-options {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .map-ai-entries article {
    flex-wrap: wrap;
  }
  .map-ai-entries article > div {
    flex-basis: 100%;
  }
}
@media (max-width: 1050px) {
  .map-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .map-inspector {
    border-left: 0;
    border-top: 1px solid var(--map-border);
    min-height: 0;
    max-height: none;
  }
  .map-inspector form {
    max-width: 560px;
  }
  .map-board canvas {
    height: 60vh;
  }
}
.map-token-steps {
  padding: 12px 0;
  border-bottom: 1px solid var(--map-border);
  margin-bottom: 12px;
}
.map-step-pad {
  display: grid;
  grid-template: 'nw . ne' 48px 'w centre e' 48px 'sw . se' 48px / 48px 48px 48px;
  gap: 5px;
  width: max-content;
}
.map-step-pad .button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 2px;
  font-size: 19px;
  line-height: 1;
}
.map-step-pad small {
  font-size: 10px;
  line-height: 1.3;
}
.map-step-pad > span {
  grid-area: centre;
  align-self: center;
  text-align: center;
  font-size: 11px;
}
.map-step-pad [data-step='nw'] {
  grid-area: nw;
}
.map-step-pad [data-step='ne'] {
  grid-area: ne;
}
.map-step-pad [data-step='w'] {
  grid-area: w;
}
.map-step-pad [data-step='e'] {
  grid-area: e;
}
.map-step-pad [data-step='sw'] {
  grid-area: sw;
}
.map-step-pad [data-step='se'] {
  grid-area: se;
}
@media (max-width: 600px) {
  .map-top {
    align-items: stretch;
  }
  .map-top label {
    width: 100%;
  }
  .map-top select {
    flex: 1;
    min-width: 0;
  }
  .map-save-state {
    margin-left: 0;
    width: 100%;
  }
  .map-tools {
    gap: 6px;
    padding: 10px;
  }
  .map-board canvas {
    min-height: 350px;
  }
}

@media (max-width: 1050px) {
  .map-expanded .map-inspector {
    height: auto;
    min-height: 0;
  }
}
.visual-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
  gap: 20px;
}
.visual-workspace > .panel {
  padding: 24px;
  min-width: 0;
}
.visual-workspace h2 {
  margin: 0 0 16px;
}
.visual-workspace label,
.token-stamp-controls label {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}
.visual-workspace textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
}
.visual-library {
  grid-column: 1 / -1;
}
.floor-descriptions {
  margin: 10px 0 18px;
}
.floor-description {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.floor-description-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.floor-description-heading label {
  margin: 0;
}
.floor-description textarea {
  min-height: 72px;
}
.visual-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.visual-image {
  border: 1px solid var(--line, #343b41);
  border-radius: 10px;
  padding: 12px;
}
.visual-image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #0b0e11;
  border-radius: 6px;
}
.visual-image h3 {
  margin: 12px 0 4px;
  overflow-wrap: anywhere;
}
.visual-image .modal-button-row {
  flex-wrap: wrap;
}
.visual-job,
.visual-target {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--line, #343b41);
}
.visual-job p {
  width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
}
.dungeon-review {
  flex-basis: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.6rem;
}
.dungeon-review .visual-preview {
  display: grid;
  gap: 0.35rem;
  text-align: left;
  color: inherit;
}
.dungeon-review img {
  width: 100%;
  height: 74px;
  object-fit: contain;
  background: #111;
}
.visual-generator [hidden] {
  display: none;
}
.visual-target > :first-child {
  flex: 1;
  text-align: left;
}
.visual-target small {
  display: block;
  opacity: 0.65;
}
.visual-targets {
  max-height: 420px;
  overflow-y: auto;
}
.token-stamp-dialog {
  width: min(960px, calc(100vw - 32px));
  max-width: 960px;
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
  border: 1px solid #414950;
  border-radius: 14px;
  color: #e8edf2;
  background: #171c20;
}
.token-stamp-dialog::backdrop {
  background: #000a;
}
.token-stamp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr);
  gap: 24px;
  align-items: start;
}
.token-stamp-layout canvas {
  width: 100%;
  aspect-ratio: 1;
  touch-action: none;
  cursor: grab;
  border-radius: 8px;
  background: repeating-conic-gradient(#252c31 0% 25%, #1b2024 0% 50%) 50% / 24px 24px;
}
.token-stamp-controls input[type='range'] {
  width: 100%;
}
.token-stamp-controls input[type='color'] {
  width: 100%;
  height: 36px;
  padding: 3px;
}
.token-stamp-controls input[type='file'] {
  width: 100%;
}
.token-stamp-controls [data-status] {
  min-height: 1.5em;
  overflow-wrap: anywhere;
}
@media (max-width: 800px) {
  .visual-workspace,
  .token-stamp-layout {
    grid-template-columns: 1fr;
  }
  .token-stamp-layout canvas {
    max-width: 512px;
    margin: auto;
  }
}
.monster-artwork {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 1rem 0;
}
.monster-artwork figure {
  margin: 0;
  text-align: center;
}
.monster-artwork img {
  max-width: 220px;
  height: 180px;
  object-fit: contain;
  border-radius: 8px;
}
.monster-artwork .monster-token-preview {
  width: 100px;
  height: 100px;
}
.monster-artwork .modal-button-row {
  flex-basis: 100%;
}

.shared-image-dialog {
  width: min(900px, 94vw);
  max-height: 94vh;
  padding: 1.2rem;
  background: var(--panel, #181c1f);
  color: var(--text, #eee);
  border: 1px solid #454a4e;
  border-radius: 12px;
}
.shared-image-dialog img {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
}
.shared-image-reopen {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 90;
}
.world-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(15rem, 23%, 21rem);
  gap: 16px;
  align-items: start;
  container-type: inline-size;
}
.visual-preview {
  display: block;
  width: 100%;
  background: transparent;
  padding: 0;
  border: 0;
  cursor: zoom-in;
}
@media (min-width: 1100px) {
  main:has(> #worldmaps-root) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    row-gap: 16px;
  }
  main:has(> #worldmaps-root) > .page-heading {
    grid-area: 1/1;
    margin: 0;
  }
  main:has(> #worldmaps-root) > .campaign-toolbar {
    grid-area: 1/2;
    margin: 0;
  }
  main:has(> #worldmaps-root) > .campaign-toolbar label {
    width: clamp(150px, 16vw, 260px);
  }
  main:has(> #worldmaps-root) > :is(#worldmaps-root, #initiative-prompts, .compact-roll-tools) {
    grid-column: 1/-1;
  }
  main:has(> #worldmaps-root) > #initiative-prompts:empty {
    display: none;
  }
}
.visual-workspace:is([data-kind='worldmap'], [data-kind='dungeon']) .visual-tokens {
  display: none;
}
.visual-workspace:is([data-kind='worldmap'], [data-kind='dungeon']) .visual-library {
  grid-column: auto;
}
@media (min-width: 1051px) {
  .visual-workspace:is([data-kind='worldmap'], [data-kind='dungeon']) {
    grid-template-columns: minmax(18rem, 0.9fr) minmax(0, 1.1fr);
  }
}
.world-workspace [hidden] {
  display: none !important;
}
.world-map-panel,
.world-wiki {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}
.world-map-head,
.world-context,
.world-toolbar,
.world-viewbar,
.world-map-foot,
.world-brush {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 16px;
}
.world-map-head,
.world-context,
.world-toolbar,
.world-brush {
  border-bottom: 1px solid var(--line, #343a3e);
}
.world-map-head h2,
.world-wiki-reader h3,
.world-map-foot p {
  margin: 0;
}
.world-map-head h2 {
  font-size: 1rem;
}
.world-selectors,
.world-actions,
.world-toolgroup,
.world-brush label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.world-selectors {
  flex: 1 1 18rem;
  align-items: end;
  gap: 10px;
}
.world-selectors label,
.world-wiki-index label {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted, #bac2c6);
}
.world-selectors label {
  flex: 1 1 7rem;
}
.world-selectors select,
.world-wiki-index input,
.world-brush select,
.world-brush input {
  box-sizing: border-box;
  width: 100%;
  height: 36px;
  min-width: 0;
  margin: 0;
}
.world-layer-menu {
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}
.world-layer-menu summary {
  width: fit-content;
  cursor: pointer;
}
.world-render-mode {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 8px;
  width: fit-content;
}
.world-render-mode[hidden] {
  display: none;
}
.world-layer-menu[open] .world-toolgroup {
  margin-top: 8px;
}
.world-context {
  align-items: end;
}
.world-workspace .button {
  min-height: 34px;
  white-space: normal;
  line-height: 1.2;
}
.world-actions .button[data-world='uploadWorld'],
.world-toolgroup .button[aria-pressed='true'] {
  color: var(--gold, #f4cb79);
  border-color: #74623d;
  background: #342e21;
}
.world-toolbar,
.world-viewbar {
  background: #161b1e;
}
.world-toolbar,
.world-viewbar,
.world-map-foot,
.world-brush {
  padding-block: 8px;
}
.world-publish {
  margin-inline-start: auto;
}
.world-brush {
  justify-content: flex-start;
}
.world-brush label {
  font-size: 0.8rem;
}
.world-brush select {
  width: 8rem;
}
.world-brush [data-radius] {
  width: 5rem;
}
.world-canvas-wrap {
  position: relative;
  height: clamp(350px, 55vh, 760px);
  overflow: hidden;
  background: #101315;
}
.world-vector-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.world-vector-art img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
  will-change: transform;
}
.world-canvas-wrap canvas {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.world-viewbar {
  border-top: 1px solid var(--line, #343a3e);
  font-size: 0.8rem;
}
.world-viewbar .button {
  min-width: 36px;
}
.world-fog-key {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.world-fog-key::before {
  content: '';
  width: 0.85rem;
  height: 0.7rem;
  border: 1px solid #748088;
  border-radius: 2px;
  background: #39424c;
}
.world-map-foot {
  border-top: 1px solid var(--line, #343a3e);
}
.world-error {
  color: #ffb3a7;
  margin: 12px 16px;
  overflow-wrap: anywhere;
}
.world-wiki-index,
.world-wiki-reader,
.world-map-panel [data-marker-info]:not(:empty) {
  padding: 14px 16px;
}
.world-wiki-index label {
  margin-bottom: 10px;
}
.world-wiki-reader {
  display: grid;
  gap: 14px;
  overflow-wrap: anywhere;
}
.world-wiki-reader .prose {
  white-space: pre-wrap;
  margin: 0;
}
.world-wiki-reader h4 {
  margin: 0;
}
.world-wiki-reader .world-actions {
  justify-content: space-between;
}
.world-wiki-reader > button {
  justify-self: start;
}
.world-wiki-link {
  align-items: baseline;
  overflow-wrap: anywhere;
}
.world-wiki-link small {
  flex: none;
}
.world-editor-dialog {
  width: min(720px, 94vw);
  max-height: 92vh;
  overflow: auto;
  padding: 1.5rem;
  background: var(--panel, #181c1f);
  color: var(--text, #eee);
  border: 1px solid #454a4e;
  border-radius: 12px;
}
.world-editor-dialog form {
  display: grid;
  gap: 1rem;
}
.world-editor-dialog form > label:not(.checkbox-label),
.wiki-meta > label:not(.checkbox-label),
.wiki-author > label {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}
.world-editor-dialog :is(input:not([type='checkbox']), select, textarea) {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
dialog.wiki-editor {
  width: min(1080px, calc(100vw - 32px));
  max-width: calc(100vw - 24px);
  max-height: 92dvh;
  padding: clamp(1rem, 2.4vw, 2rem);
}
.wiki-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: end;
}
.wiki-editor [data-wiki-brief] {
  display: grid;
  gap: 1rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.wiki-editor [data-wiki-brief] label {
  display: grid;
  gap: 0.45rem;
}
.wiki-meta .checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 40px;
  margin: 0;
}
.wiki-author {
  display: grid;
  gap: 0.7rem;
}
.wiki-author [hidden],
.wiki-editor [data-error]:empty {
  display: none;
}
.wiki-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.wiki-tools button:last-child {
  margin-left: auto;
}
.wiki-author textarea,
.wiki-author .wiki-article {
  min-height: clamp(13rem, 31vh, 25rem);
  font-size: 1rem;
  line-height: 1.6;
}
.wiki-editor textarea {
  resize: vertical;
}
.wiki-editor [name='privateNotes'] {
  height: 6rem;
}
.wiki-editor [type='submit'] {
  justify-self: end;
  min-width: 8rem;
}
.wiki-article {
  overflow-wrap: anywhere;
}
.wiki-article p,
.wiki-article li {
  line-height: 1.6;
}
.wiki-article blockquote {
  margin: 0.5rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--gold);
}
@media (max-width: 620px) {
  .wiki-meta {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .wiki-tools button:last-child {
    margin-left: 0;
  }
}
.world-editor-dialog [data-links] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 220px;
  overflow: auto;
}
.world-editor-dialog [data-error] {
  color: #f39d93;
}
.world-wiki-link {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem;
  background: transparent;
  color: inherit;
  border: 0;
  border-bottom: 1px solid #383f40;
  text-align: left;
  cursor: pointer;
}
.world-wiki-link:hover {
  background: #282e30;
}
.world-wiki-link small {
  color: #a4b1b5;
}
@media (max-width: 1050px) {
  .world-workspace {
    grid-template-columns: 1fr;
  }
  .world-canvas-wrap {
    height: clamp(320px, 52vh, 620px);
  }
}

@media (max-width: 600px) {
  .world-map-head,
  .world-context,
  .world-toolbar,
  .world-viewbar,
  .world-map-foot,
  .world-brush {
    padding-inline: 10px;
  }
  .world-selectors {
    flex-basis: 100%;
  }
  .world-workspace .button {
    min-height: 38px;
  }
  .world-publish {
    margin-inline-start: 0;
  }
}
.world-storage {
  margin: 0.3rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.world-floors {
  margin: 0 0 0.9rem;
}
.world-floors summary {
  cursor: pointer;
  font-weight: 600;
}
.world-floors [data-floor-table] {
  max-height: 22rem;
  overflow: auto;
  margin-top: 0.5rem;
}
.world-floors table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.world-floors th,
.world-floors td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.world-floor-link {
  cursor: pointer;
  color: inherit;
  text-align: left;
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
}
.world-floor-link[aria-current='true'] {
  color: var(--gold);
}
