/* Dark Mage of Mossfen — the minimap and the full map (v0.21, ui/minimap.js). */

/* the minimap: top right, where the Controls list used to be */
#minimap { top: 12px; right: 12px; width: 212px; padding: 7px 9px 8px; }
#minimap header { align-items: center; padding-bottom: 5px; margin-bottom: 7px; }
#minimap .win-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mm-view {
  position: relative; display: block; margin: 0 auto; padding: 0; cursor: pointer;
  border: 1px solid #000; border-radius: 3px; background: #080b09; line-height: 0;
  box-shadow: 0 0 0 1px var(--edge);
}
.mm-view canvas { display: block; border-radius: 2px; }
.mm-view:hover, .mm-view[aria-pressed="true"] { box-shadow: 0 0 0 1px var(--edge-strong); }
.mm-view:focus-visible { outline: 2px solid #f3d68a; outline-offset: 2px; }

/* the name of a way out, beside its marker */
.mm-tip {
  position: absolute; transform: translateY(-50%); z-index: 1; pointer-events: none;
  padding: 3px 7px; border-radius: 3px; white-space: nowrap;
  background: rgba(12, 16, 13, 0.92); border: 1px solid var(--edge);
  font: 700 12px/1.2 var(--f-display); letter-spacing: 0.04em; color: var(--ink);
}

.mm-foot {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 6px;
  font: 500 12.5px/1.2 var(--f-display); letter-spacing: 0.05em; color: var(--ink-dim);
}
.mm-foot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-foot output { flex: none; font-family: var(--f-body); font-variant-numeric: tabular-nums; letter-spacing: 0; color: var(--ink-faint); }

/* the full map (M): centred in the space above the key bar, over the other windows */
#worldmap {
  left: 50%; top: calc(50% - 40px); transform: translate(-50%, -50%); z-index: 6;
  padding: 10px 14px 12px;
}
#worldmap header { align-items: center; }
#worldmap .win-meta { margin-right: auto; margin-left: 4px; }
#worldmap canvas {
  display: block; margin: 0 auto; border: 1px solid #000; border-radius: 3px;
  box-shadow: 0 0 0 1px var(--edge);
}
#worldmap .sk-hint { max-width: 62ch; margin-top: 8px; }

/* the plot you stand in, written at the top of the screen (Map builder tool, v0.30, ui/plottag.js) */
#plot-tag {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px;
  background: var(--panel); border: 1px solid var(--edge); border-radius: 999px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45); white-space: nowrap; pointer-events: none;
}
#plot-tag b {
  min-width: 40px; padding: 5px 8px 6px; border-radius: 999px; text-align: center;
  font: 700 19px/1 var(--f-display); letter-spacing: 0.06em; color: #1a1408; background: var(--exp);
}
#plot-tag strong { font: 700 21px/1 var(--f-display); letter-spacing: 0.05em; color: #fff9ea; }
#plot-tag small { font: 500 14px/1 var(--f-display); letter-spacing: 0.06em; color: var(--ink-dim); }
#plot-tag small:not(:empty)::before { content: '·'; margin-right: 10px; color: var(--ink-faint); }
#plot-tag.is-new { animation: plot-new 0.9s ease-out; }
@keyframes plot-new {
  0% { box-shadow: 0 0 0 2px var(--exp), 0 0 26px rgba(232, 179, 58, 0.85); }
  100% { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45); }
}
/* a monster's window has the top middle while you have one targeted */
#target:not([hidden]) ~ #plot-tag, #boss-bar:not([hidden]) ~ #plot-tag { top: 104px; }
@media (prefers-reduced-motion: reduce) { #plot-tag.is-new { animation: none; } }

/* small screens: the status and target windows share the top row, so the minimap gives way
   (the full map is still on M, and the controls on H) */
@media (max-width: 760px) {
  #minimap { display: none; }
  #plot-tag { top: 96px; gap: 8px; }
  #plot-tag strong { font-size: 18px; }
  #worldmap { padding: 8px 10px 10px; }
}

/* the world map (v1.73, ui/world-map.js): Ping's painting, a place for each map, its map popping out beside it */
#mm-world, .mm-world {
  margin-left: auto; padding: 3px 8px; border: 1px solid #000; border-radius: 3px; cursor: pointer;
  background: #0b0f0c; box-shadow: inset 0 0 0 1px var(--edge); color: var(--ink-dim);
  font: 700 11px/1 var(--f-display); letter-spacing: 0.08em; text-transform: uppercase;
}
#mm-world:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--edge-strong); }
#wm-world { margin-right: 10px; }
#world {
  left: 50%; top: calc(50% - 30px); transform: translate(-50%, -50%); z-index: 7;
  padding: 10px 12px 10px;
  width: min(1040px, calc(100vw - 24px), calc((100vh - 170px) * 1.5 + 24px));
}
#world header { align-items: center; }
#world .win-meta { margin-right: auto; margin-left: 6px; }
.world-frame {
  position: relative; width: 100%; aspect-ratio: 1536 / 1024; overflow: hidden;
  border: 1px solid #000; border-radius: 3px; box-shadow: 0 0 0 1px var(--edge); background: #1b2a33;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.world-sheet { position: absolute; inset: 0; transform-origin: 0 0; }
.world-frame img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.world-places { position: absolute; inset: 0; }
#world-zoom { margin-right: 10px; }
.world-place.is-off { display: none; }
.world-place {
  position: absolute; transform: translate(-50%, -50%); padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent;
}
/* every place the same small gold dot, whatever its size; a ring round the whole place when pointed at */
.world-place::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; transform: translate(-50%, -50%);
  border-radius: 50%; background: #fff1c4; box-shadow: 0 0 0 2px #2a1c08, 0 0 8px 2px rgba(255, 214, 120, 0.55);
}
.world-place:hover, .world-place:focus-visible, .world-place.is-shown {
  outline: none; background: rgba(255, 214, 120, 0.16);
  box-shadow: 0 0 0 2px rgba(255, 220, 140, 0.9), 0 0 14px rgba(255, 200, 90, 0.7);
}
.world-place.is-here::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 3px solid #ffd76a; box-shadow: 0 0 10px rgba(255, 200, 80, 0.9), inset 0 0 6px rgba(255, 200, 80, 0.6);
  animation: world-here 1.8s ease-in-out infinite;
}
@keyframes world-here { 0%, 100% { transform: scale(0.92); opacity: 1; } 50% { transform: scale(1.12); opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) { .world-place.is-here::after { animation: none; } }
.world-card {
  position: absolute; z-index: 2; display: grid; gap: 4px; padding: 8px; max-width: 220px;
  background: var(--panel); border: 1px solid #000; border-radius: 4px;
  box-shadow: 0 0 0 1px var(--edge-strong), 0 6px 22px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.world-card canvas { display: block; border: 1px solid #000; border-radius: 2px; box-shadow: 0 0 0 1px var(--edge); }
.world-card strong { font: 700 15px/1.1 var(--f-display); letter-spacing: 0.04em; color: #fff3cf; }
.world-card small { font: 500 12.5px/1.1 var(--f-display); letter-spacing: 0.05em; color: var(--ink-dim); }
.world-card em { font: italic 500 12.5px/1.25 var(--f-body); color: #ffd76a; }
@media (max-width: 760px) {
  #world { padding: 8px; top: 50%; }
  .world-card { max-width: 170px; padding: 6px; }
}
