/* Elemath Academy: the open world map (starglyph-world.js). Every rule here starts with .sgw, so nothing else on the page changes. */
/* The container the game gives SGWorld.create needs a height of its own; the map fills it. Nothing here animates. */
.sgw { position: relative; width: 100%; height: 100%; min-height: 240px; overflow: hidden; background: #f3e7c9; color: #2b2233;
  font-family: 'Andika', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-user-select: none; user-select: none; }

/* The land. touch-action keeps the page from scrolling or zooming under a finger that drags or pinches on the map. */
.sgw-canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; -webkit-tap-highlight-color: transparent; }
.sgw-canvas:focus-visible { outline: 3px solid #8a5a34; outline-offset: -3px; }

/* The small map, bottom right. Its size is set by the script to match the land's shape. */
.sgw-mini { position: absolute; right: 10px; bottom: 10px; border: 2px solid #8a5a34; border-radius: 8px;
  background: #fbf4e2; box-shadow: 0 2px 10px rgba(43, 34, 51, .3); cursor: pointer; touch-action: none; }

/* The zoom buttons, top right: 44 pixels, large enough for a small finger. */
.sgw-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 8px; }
.sgw-btn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid #8a7f92; background: rgba(251, 244, 226, .94); color: #2b2233;
  font: 700 22px/1 system-ui, sans-serif; cursor: pointer; padding: 0; }
.sgw-btn:hover { border-color: #8a5a34; }
.sgw-btn:focus-visible { outline: 3px solid #8a5a34; outline-offset: 2px; }

/* A mark's label, shown above it while the pointer rests on it or its button in the list of places has the focus. */
.sgw-tip { position: absolute; transform: translate(-50%, -100%); margin-top: -6px; padding: 4px 10px; border-radius: 999px;
  background: rgba(251, 244, 226, .95); border: 1.5px solid #8a5a34; color: #2b2233; font-weight: 700; font-size: .85rem;
  white-space: nowrap; pointer-events: none; }
.sgw-tip[hidden] { display: none; }

/* Spoken news ("You are at the wave tower") and the list of places: off the screen, but there for a screen reader. */
.sgw-live { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sgw-place { position: absolute; left: 10px; bottom: 10px; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }
/* The place a keyboard user has reached steps onto the screen, bottom left, so a sighted keyboard user can read it too. */
.sgw-place:focus { width: auto; height: auto; margin: 0; padding: 8px 16px; overflow: visible; clip: auto; max-width: 70%;
  border: 2px solid #8a5a34; border-radius: 999px; background: #fbf4e2; color: #2b2233; font-weight: 700; font-size: .95rem;
  outline: 3px solid #8a5a34; outline-offset: 2px; }

@media (max-width: 700px) {
  .sgw-mini { right: 6px; bottom: 6px; }
  .sgw-zoom { right: 6px; top: 6px; }
}
