/* ===== GloranthaGIS Phase 0-1 (Skeleton) ===== */

:root {
  color-scheme: light;
  --gg-footer-height: 32px;
  --gg-left-gap: 10px;
  --gg-settings-label-width: 104px;
  --gg-rune-font-family: "Glorantha Core Runes", "Glorantha Got Runes Set 1", "Glorantha Got Runes Set 2", "Glorantha Got Runes Set 3", "Glorantha Got Runes Set 4", "Glorantha Got Runes Set 5", "Glorantha Got Runes Set 6", "Glorantha Got Runes Set 7", "Glorantha Got Runes Set 8", serif;
  --gg-main-bg: #050505;
  --gg-main-surface: rgba(15, 15, 15, 0.9);
  --gg-main-surface-strong: rgba(24, 24, 24, 0.96);
  --gg-main-border: rgba(255, 255, 255, 0.1);
  --gg-main-ink: #f4f4f4;
  --gg-main-muted: #9aa0a8;
  --gg-main-accent: #f4f4f4;
  --gg-main-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.gg-rune-glyph,
.gg-rune-backdrop-char,
.gg-rune-parade-copy,
.gg-tool-inline-rune,
.gg-rune-tool-btn-glyph,
.gg-rune-jump-btn-glyph,
.gg-travel-rune,
.gg-tool-measure-rune,
.gg-tool-polyline-rune,
.gg-tool-walker-rune,
.gg-tool-circle-center,
.gg-tool-circle-rune {
  font-weight: 400;
}

* {
  box-sizing: border-box;
}

html, body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden; /* 驛｢譎擾ｽ｣・ｹ郢晢ｽｻ驛｢・ｧ繝ｻ・ｸ驛｢・ｧ繝ｻ・ｹ驛｢・ｧ繝ｻ・ｯ驛｢譎｢・ｽ・ｭ驛｢譎｢・ｽ・ｼ驛｢譎｢・ｽ・ｫ驛｢・ｧ陷ｻ闌ｨ・ｽ・ｮ繝ｻ・ｺ驍ｵ・ｺ陷ｻ・ｻ繝ｻ・ｼ郢晢ｽｻheel驛｢・ｧ隶難ｽｽapView驍ｵ・ｺ繝ｻ・ｸ髮九ｑ・ｽ・｡驍ｵ・ｺ陷ｻ・ｻ繝ｻ・ｼ郢晢ｽｻ*/
}

body {
  margin: 0;
  background: #0b0d10;  /* 鬲・ｺｷ繝ｻ・つ隲幄肩・ｽ・ｿ郢晢ｽｻ郢晢ｽｻ */
  color: #e6e6e6;       /* 鬨ｾ蜈ｷ・ｽ・ｽ驍ｵ・ｲ隲帙・豐る恣・｣繝ｻ・ｰ */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", sans-serif;
}

/* 驛｢・ｧ繝ｻ・｢驛｢譎丞ｹｲ・取㊥諤ｦ繝ｻ・ｨ髣厄ｽｴ隰撰ｽｺ隴ｽ・ｧ */
#app {
  height: 100vh;
  width: 100vw;
  display: block;

  /* footer髯懈圜・ｽ・ｺ髯橸ｽｳ陞｢・ｹ遶企ｦｴ・ｫ・ｫ繝ｻ・ｰ驛｢・ｧ陟募ｨｯ繝ｻ驍ｵ・ｺ郢晢ｽｻ繝ｻ・ｿ隴取ｧｫ鬨鍋ｹ晢ｽｻ髢ｧ・ｲ繝ｻ・ｶ繝ｻ・ｭ髫ｰ謔ｶ繝ｻ繝ｻ・ｼ郢晢ｽｻ*/
  padding-bottom: var(--gg-footer-height);

  overflow: hidden;
}

/* ===== 驛｢譎｢・ｽ・ｬ驛｢・ｧ繝ｻ・､驛｢・ｧ繝ｻ・｢驛｢・ｧ繝ｻ・ｦ驛｢譎冗樟郢晢ｽｻ驍ｵ・ｲ隶呵ｶ｣・ｽ・ｮ繝ｻ・ｱ驍ｵ・ｲ郢晢ｽｻ===== */

.gg-root {
  width: 100%;
  display: grid;
  grid-template-rows: 48px 1fr;
  grid-template-columns: 320px 1fr;
  grid-template-areas:
    "top top"
    "left center";
  height: calc(100vh - var(--gg-footer-height)); /* footer髯具ｽｻ郢晢ｽｻ繝ｻ螳夲｣ｰ鬘鯉ｽｼ雋ｻ・ｼ讓抵ｽｸ・ｺ雋・ｽｽ陋ｻ・､鬯ｮ・ｱ繝ｻ・｢髯ｷﾂ郢晢ｽｻ*/
}

/* 髣包ｽｳ闔ｨ竏・､ゑｽｹ譎√・郢晢ｽｻ */
.gg-topbar {
  grid-area: top;
  border-bottom: 1px solid #22262b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
}

.gg-topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.gg-topbar-home-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.gg-topbar-home-link:hover,
.gg-topbar-home-link:focus-visible {
  opacity: 0.86;
}

.gg-topbar-home-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: block;
}

#appTitle {
  min-width: 0;
}

.gg-global-language {
  position: fixed;
  top: max(8px, env(safe-area-inset-top, 0px) + 8px);
  right: 12px;
  z-index: 7000;
  width: 190px;
}

.gg-distance-readout {
  position: fixed;
  top: calc(max(8px, env(safe-area-inset-top, 0px) + 8px) + 42px);
  right: 12px;
  z-index: 6990;
  width: 150px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(18, 18, 18, 0.9);
  color: #f3f4f6;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", "Noto Sans TC", sans-serif;
}

.gg-map-tool-action-panel {
  position: fixed;
  top: calc(max(8px, env(safe-area-inset-top, 0px) + 8px) + 132px);
  right: 12px;
  z-index: 6985;
  width: 150px;
  display: grid;
  gap: 8px;
}

.gg-map-tool-panel {
  top: 150px;
}

.gg-map-tool-panel-controls {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", "Noto Sans TC", sans-serif;
}

.gg-map-tool-action-status {
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(18, 18, 18, 0.82);
  color: #c6ccd4;
  font-size: 11px;
  line-height: 1.4;
}

.gg-distance-readout-coords {
  font-size: 12px;
  font-weight: 600;
  color: #c6ccd4;
}

body.gg-opening-active .gg-distance-readout {
  display: none !important;
}

/* 髯晢ｽｾ繝ｻ・ｦ驛｢譏懶ｽｻ・｣郢晢ｽｭ驛｢譎｢・ｽ・ｫ */
.gg-left {
  grid-area: left;
  border-right: 1px solid #22262b;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gg-left-gap);
  min-height: 0;
  overflow: hidden;

  /* 髫ｨ蛟･繝ｻ髯晢ｽｾ繝ｻ・ｦ驛｢・ｧ髮区ｨ停・鬯ｮ・ｱ繝ｻ・｢驍ｵ・ｺ繝ｻ・ｫ驍ｵ・ｺ陷会ｽｱ遯ｶ・ｻ驛｢・ｧ繝ｻ・ｯ驛｢譎｢・ｽ・ｪ驛｢譏ｴ繝ｻ邵ｺ驢搾ｽｹ・ｧ髮区ｩｸ・ｽ・･繝ｻ・ｪ驛｢・ｧ闕ｳ螂・ｽｽ讙趣ｽｸ・ｺ繝ｻ・ｪ驍ｵ・ｺ郢晢ｽｻ繝ｻ閧ｲ・ｸ・ｺ郢晢ｽｻ遶企豪・ｸ・ｺ陷ｷ・ｶ繝ｻ繝ｻ*/
  position: relative;
  z-index: 5;
}

.gg-left-layer-slot {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* 髣包ｽｳ繝ｻ・ｭ髯樊ｻゑｽｽ・ｮ驛｢・ｧ繝ｻ・ｭ驛｢譎｢・ｽ・｣驛｢譎｢・ｽ・ｳ驛｢譎√・邵ｺ蟷・ｽｬ繝ｻ・ｼ諛茨ｽｲ・ｺ */
.gg-center {
  /* 髫ｨ蛟･繝ｻ驍ｵ・ｺ髦ｮ蜻ｻ・ｼ繝ｻ・ｸ・ｺ隶吝ｯゆｼｯ驍ｵ・ｺ郢晢ｽｻ遶翫・grid 驍ｵ・ｺ隰疲ｻゑｽｽ・ｴ繝ｻ・ｩ驛｢・ｧ陟募ｨｯﾂ・ｻ鬮ｯ・ｲ繝ｻ・ｫ驛｢・ｧ陷ｿ・･陟弱・螯吶・・ｽ髫ｲ・､繝ｻ・ｧ驍ｵ・ｺ陟募ｨｯ譌ｺ驛｢・ｧ郢晢ｽｻ*/
  grid-area: center;

  position: relative;
  overflow: hidden;
  padding: 0;

  /* 髯滂ｽ｢繝ｻ・ｵ驍ｵ・ｺ繝ｻ・ｮ驍ｵ・ｺ雋・∞・ｽ竏ｬ蜿峨・・ｭ髯樊ｻゑｽｽ・ｮ驍ｵ・ｺ繝ｻ・ｯ髯晢ｽｾ繝ｻ・ｦ驛｢・ｧ陋ｹ・ｻ繝ｻ鬘俶｡吶・・･ */
  z-index: 1;
}

/* 鬩阪ｑ・ｽ・ｱ驍ｵ・ｺ繝ｻ・ｮ鬮ｫ蜍溷罰郢晢ｽｻ驍ｵ・ｺ鬩｢蜥ｲ闊樒ｹ晢ｽｻ陜捺ｻ督蜻ｵ豌｣陜謎ｸｻ蠢懃ｹ晢ｽｻ郢晢ｽｻ*/
.gg-box-title {
  font-size: 12px;
  color: #b8bcc2;
  letter-spacing: 0.04em;
  margin: 0 0 8px 0;
}

.gg-panel {
  border: 1px solid #22262b;
  background: #0f1216;
  padding: 12px;
  border-radius: 6px;
  min-width: 0;
}

.gg-settings-panel {
  flex: 0 0 auto;
  padding: 10px 10px 8px;
}

.gg-settings-table {
  display: grid;
  gap: 6px;
}

.gg-settings-item {
  display: grid;
  grid-template-columns: var(--gg-settings-label-width) minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
}

.gg-settings-item-button {
  grid-template-columns: minmax(0, 1fr);
}

.gg-settings-label {
  min-height: 32px;
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #cfd3d8;
  white-space: nowrap;
}

.gg-settings-control {
  min-width: 0;
}

.gg-settings-control-full {
  grid-column: 1 / -1;
  position: relative;
}

.gg-layer-panel {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-height: 100%;
}

.gg-layer-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gg-inline-hint {
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 20;
  min-width: 180px;
  max-width: min(280px, calc(100vw - 48px));
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(16, 18, 23, 0.94);
  color: #f6f7fb;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.gg-inline-hint[hidden] {
  display: none !important;
}

/* ===== Phase 0-3/0-4: Entry footer notices ===== */

.hidden {
  display: none;
}

.gg-entry-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  height: 32px;
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 0 12px;
  border-top: 1px solid #22262b;
  background: #0f1216;

  z-index: 999;
}

/* notice blocks */
#osNotice,
#resolutionNotice {
  font-size: 12px;
  color: #cfd3d8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* OS notice should feel "stronger" */
#osNotice {
  color: #ffd6d6; /* 驛｢謨鳴驛｢譎｢・ｽ・ｼ驛｢・ｧ繝ｻ・ｯ鬮｢・ｭ隴ｴ・ｧ陷搾ｽｹ驍ｵ・ｺ繝ｻ・ｧ鬨ｾ・ｶ繝ｻ・ｮ鬩包ｽｶ闕ｵ譏ｶ蜻ｽ髮趣ｽｺ繝ｻ・｡驍ｵ・ｺ郢晢ｽｻ繝ｻ・ｵ繝ｻ・､鬩堺ｼ夲ｽｽ・ｻ */
}

/* ===== OS Not Supported Notice ===== */

#osNotice {
  position: fixed;
  top: 16px;
  right: 16px;
  padding: 12px 16px;
  background: #1a1f26;
  border: 1px solid #2e3742;
  color: #ff0000;
  font-size: 14px;
  border-radius: 6px;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.hidden {
  display: none;
}

/* ===== Phase 1-0: MapCanvas ===== */

.gg-map-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.gg-base-map {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: center center;
  user-select: none;
  pointer-events: none; /* 鬨ｾ蛹・ｽｽ・ｻ髯ｷ雋櫁㊥郢晢ｽｻ鬮ｴ繝ｻ・ｽ・ｫ驍ｵ・ｺ繝ｻ・ｯ髫ｰ證ｦ・ｽ・ｴ驍ｵ・ｺ繝ｻ・ｾ驍ｵ・ｺ陝ｶ蜷ｮ繝ｻ驍ｵ・ｺ郢晢ｽｻ繝ｻ・ｼ郢晢ｽｻapArea驍ｵ・ｺ繝ｻ・ｧ髫ｰ證ｦ・ｽ・ｴ驛｢・ｧ・つ郢晢ｽｻ郢晢ｽｻ*/
}

#mapArea {
  overflow: hidden;
  cursor: grab;
}

#mapArea.gg-grabbing,
#mapArea.gg-grabbing * {
  cursor: grabbing !important;
}

/* center mark (always on) */
.gg-center-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.gg-center-mark::before,
.gg-center-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(230, 230, 230, 0.9);
}

.gg-center-mark::before {
  width: 22px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.gg-center-mark::after {
  width: 2px;
  height: 22px;
  transform: translate(-50%, -50%);
}

/* coords HUD */
#hudArea {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 200;
}

.gg-coords-hud {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 201;
  font-size: 12px;
  color: #cfd3d8;
  background: rgba(15, 18, 22, 0.92);
  border: 1px solid #22262b;
  border-radius: 6px;
  padding: 6px 8px;
  white-space: nowrap;
  display: none;
}

/* ===== I-05S: Map area must live inside center panel ===== */
.gg-center {
  position: relative;   /* mapArea absolute 驍ｵ・ｺ繝ｻ・ｮ髯憺屮・ｽ・ｺ髮九・繝ｻ*/
  overflow: hidden;
}

#mapArea {
  position: absolute;   /* fixed驍ｵ・ｺ繝ｻ・ｯ鬩募撫謇ｱ繝ｻ・ｭ繝ｻ・｢驍ｵ・ｲ郢ｧ繝ｻ・ｽ・ｸ繝ｻ・ｭ髯樊ｻゑｽｽ・ｮ驛｢譏懶ｽｻ・｣郢晢ｽｭ驛｢譎｢・ｽ・ｫ髯ｷﾂ郢晢ｽｻ邵ｲ螳壽･懆ｮ呵ｶ｣・ｽ・ｵ郢晢ｽｻ*/
  inset: 12px;          /* .gg-center 驍ｵ・ｺ繝ｻ・ｮ padding 驍ｵ・ｺ繝ｻ・ｫ髯ｷ・ｷ陋ｹ・ｻ繝ｻ蜀暦ｽｸ・ｺ陝ｶ蜻ｻ・ｽ繝ｻ*/
  overflow: hidden;
  cursor: grab;
}

/* MapCanvas驍ｵ・ｺ陟包ｽ｡繝ｻ・ｽ隲帛･・ｽｽ繝ｻviewport/wrap 驛｢・ｧ陜｣・､繝ｻ・｢繝ｻ・ｺ髯橸ｽｳ雋・ｪ繝ｻ鬩阪ｑ・ｽ・ｱ驍ｵ・ｺ繝ｻ・ｫ髯ｷ・ｿ陟托ｽｱ繝ｻ竏ｫ・ｹ・ｧ郢晢ｽｻ*/
#mapViewport {
  width: 100%;
  height: 100%;
}

#baseWrap {
  will-change: transform;
  transform: translateZ(0);   /* 髯滓汚・ｽ・ｷ髯具ｽｻ繝ｻ・ｶGPU驛｢譎｢・ｽ・ｬ驛｢・ｧ繝ｻ・､驛｢譎｢・ｽ・､髯具ｽｹ郢晢ｽｻ*/
  backface-visibility: hidden;
}

/* ===== I-05T: Layer UI (T2/T3/T4) ===== */

/* Layers 鬮ｫ蜍溷罰郢晢ｽｻ驍ｵ・ｺ郢晢ｽｻ*/
.gg-subtitle {
  font-size: 12px;
  color: #b8bcc2;
  letter-spacing: 0.04em;
  margin: 0 0 8px 0;
}

/* 髫ｴ・ｫ繝ｻ・ｰ髣皮甥ﾂ・･遯ｶ・ｳ髣包ｽｳ・つ鬮ｫ蛹・ｽｽ・ｧ */
.gg-layer-list {
  margin-top: 0;
  border: 1px solid #22262b;
  background: #0b0d10;
  border-radius: 18px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gg-layer-placeholder {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: #aab0b7;
}

/* 鬮ｯ・ｦ郢晢ｽｻ*/
.gg-layer-row {
  pointer-events: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  cursor: grab;
}

.gg-layer-row:active {
  cursor: grabbing;
}

.gg-layer-row.is-dragging {
  opacity: 0.58;
}

.gg-layer-row.is-drop-before::before,
.gg-layer-row.is-drop-after::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 3px;
  border-radius: 3px;
  background: var(--gg-main-accent, #ffffff);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
  pointer-events: none;
  z-index: 2;
}

.gg-layer-row.is-drop-before::before {
  top: -8px;
}

.gg-layer-row.is-drop-after::after {
  bottom: -8px;
}

.gg-layer-row button,
.gg-layer-row input,
.gg-layer-row select,
.gg-layer-row textarea,
.gg-layer-row a {
  cursor: auto;
}

.gg-layer-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 驛｢譎・ｽｼ譁撰ｼ憺Δ・ｧ繝ｻ・､驛｢譎｢・ｽ・ｫ髯ｷ・ｷ郢晢ｽｻ*/
.gg-layer-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  color: #e6e6e6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gg-layer-order-btn {
  flex: 0 0 auto;
}

/* 驛｢譎｢・ｽ・｡驛｢・ｧ繝ｻ・ｿ髫ｲ・ｰ郢晢ｽｻ繝ｻ・ｰ繝ｻ・ｱ */
.gg-layer-meta {
  font-size: 11px;
  color: #8f96a0;
}

/* range panel fit */
.gg-layer-opacity {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.gg-layer-opacity-value {
  flex: 0 0 36px;
  text-align: right;
  font-size: 11px;
  color: #aab0b7;
}

.gg-layer-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  flex: 1 1 auto;
  width: 100%;
  max-width: calc(100% - 44px);
  height: 12px;
  accent-color: #7f8790;
  background: transparent;
}

.gg-layer-row input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: #4f5660;
}

.gg-layer-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border-radius: 50%;
  border: 0;
  background: #c1c6cc;
}

.gg-layer-row input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: #4f5660;
}

.gg-layer-row input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #c1c6cc;
  border: 0;
}

.gg-language-select {
  width: 100%;
  min-width: 104px;
  height: 32px;
  padding: 4px 32px 4px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  background: rgba(255, 255, 255, 0.96);
  color: #111111;
  outline: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.gg-language-select option {
  background: #ffffff;
  color: #111111;
}

.gg-language-select-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gg-language-select-label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
}

@media (max-width: 900px) {
  .gg-root {
    grid-template-columns: 280px 1fr;
  }

  :root {
    --gg-settings-label-width: 88px;
  }
}

@media (max-width: 640px) {
  .gg-global-language {
    width: 150px;
  }
}

#mapArea.gg-map-placeholder {
  background: #72777d;
  border: 1px solid #565b61;
}

#mapArea.gg-map-placeholder .gg-center-mark {
  display: none;
}

.gg-action-btn {
  width: 100%;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid #4b5560;
  background: #676f78;
  color: #fff;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.gg-action-btn:hover {
  background: #727b85;
}

.gg-image-load-btn.is-primary {
  background: #1e63ff;
  border-color: #3b78ff;
}

.gg-image-load-btn.is-primary:hover {
  background: #2a6dff;
}

#mapViewport {
  position: relative;
}

.gg-map-empty-message {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: #f2f3f5;
  font-size: 20px;
  letter-spacing: 0.03em;
  pointer-events: none;
  z-index: 5;
}

#mapViewport.is-empty .gg-center-mark {
  display: none;
}

.gg-layer-row button {
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #4b5560;
  background: #3f464e;
  color: #fff;
  cursor: pointer;
}

.gg-layer-row button:disabled {
  opacity: 0.45;
  cursor: default;
}

/* ===== Opening Screens ===== */
:root {
  --gg-opening-bg: #030303;
  --gg-opening-ink: #171717;
  --gg-opening-muted: #7d8288;
  --gg-opening-accent: #171717;
  --gg-opening-border: rgba(17, 17, 17, 0.1);
}

@font-face {
  font-family: "Glorantha Core Runes";
  src: url("./assets/fonts/GloranthaCoreRunes1.5.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Glorantha Got Runes Set 1";
  src: url("./assets/fonts/GloranthaGotRunesSet1v1.0.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Glorantha Got Runes Set 2";
  src: url("./assets/fonts/GloranthaGotRunesSet2v1.0.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Glorantha Got Runes Set 3";
  src: url("./assets/fonts/GloranthaGotRunesSet3v1.0.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Glorantha Got Runes Set 4";
  src: url("./assets/fonts/GloranthaGotRunesSet4v1.0.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Glorantha Got Runes Set 5";
  src: url("./assets/fonts/GloranthaGotRunesSet5v1.0.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Glorantha Got Runes Set 6";
  src: url("./assets/fonts/GloranthaGotRunesSet6v1.0.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Glorantha Got Runes Set 7";
  src: url("./assets/fonts/GloranthaGotRunesSet7v1.0.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Glorantha Got Runes Set 8";
  src: url("./assets/fonts/GloranthaGotRunesSet8v1.0.woff2") format("woff2");
  font-display: swap;
}

body.gg-opening-active {
  background: var(--gg-opening-bg);
}

body.gg-opening-active .gg-language-select {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(245, 248, 252, 0.94);
  color: #0f1722;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

body.gg-opening-active .gg-language-select option {
  background: #f4f6f8;
  color: #111111;
}

#app.gg-app-hidden {
  visibility: hidden;
  pointer-events: none;
}

#screenRoot {
  position: fixed;
  inset: 0;
  z-index: 5000;
  pointer-events: none;
}

#screenRoot:empty {
  display: none;
}

.gg-screen-shell {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(20px, 3vw, 40px);
  color: var(--gg-opening-ink);
  pointer-events: auto;
  z-index: 0;
}

.gg-screen-shell.has-rune-backdrop {
  isolation: isolate;
}

.gg-screen-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 52%, rgba(255, 255, 255, 0.08), transparent 26%),
    linear-gradient(180deg, #020202, #0b0b0b);
  z-index: 0;
  pointer-events: none;
}

.gg-screen-shell[data-screen="guidance"] {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
}

.gg-screen-shell[hidden] {
  display: none;
}

.gg-screen-panel {
  position: relative;
  z-index: 2;
  width: min(100%, 1120px);
  height: min(100%, 720px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gg-screen-shell[data-screen="guidance"] .gg-screen-panel {
  width: min(100%, 1120px);
  height: auto;
  min-height: 100%;
  justify-content: flex-start;
  margin: 0 auto;
}

.gg-start-panel {
  gap: clamp(28px, 4vw, 40px);
}

.gg-start-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  min-height: 0;
  overflow: visible;
}

.gg-rune-stage {
  position: relative;
  min-height: clamp(260px, 48vh, 480px);
  border: 1px solid var(--gg-opening-border);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(242, 242, 242, 0.96)),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.015) 0 1px, transparent 1px 40px);
  overflow: visible;
}

.gg-rune-stage::after {
  content: "";
  position: absolute;
  inset: 14% 8%;
  border-radius: 24px;
  border: 1px solid rgba(17, 17, 17, 0.05);
  pointer-events: none;
}

.gg-rune-glyph {
  position: absolute;
  display: grid;
  place-items: center;
  font-family: var(--gg-rune-font-family);
  line-height: 1;
  color: var(--gg-opening-ink);
  user-select: none;
  transform-origin: center center;
  will-change: transform, opacity;
}

.gg-rune-glyph.is-movement {
  z-index: 3;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.06));
}

.gg-rune-glyph.is-earth {
  z-index: 1;
  color: rgba(17, 17, 17, 0.72);
}

.gg-rune-glyph.is-air {
  z-index: 4;
  color: rgba(120, 120, 120, 0.9);
}

.gg-rune-stage-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0 58%, rgba(0, 0, 0, 0.035) 100%);
  pointer-events: none;
}

.gg-start-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gg-start-title {
  margin: 0;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.94;
  letter-spacing: 0.05em;
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

.gg-start-subtitle {
  margin: 0;
  max-width: 32ch;
  color: #bcc4cf;
  font-size: clamp(15px, 2vw, 20px);
  line-height: 1.7;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.36);
}

.gg-start-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.gg-start-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: opacity 120ms ease;
}

.gg-start-link.start {
  color: #5da2ff;
  font-size: clamp(24px, 3.6vw, 42px);
  font-weight: 800;
  animation: gg-start-blink 3.8s ease-in-out infinite;
  text-shadow: 0 0 18px rgba(93, 162, 255, 0.38);
}

.gg-start-link.credit {
  color: #d2d8e0;
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 600;
}

.gg-start-link:hover,
.gg-start-link:focus-visible,
.gg-screen-button:hover,
.gg-screen-button:focus-visible,
.gg-link-jump:hover,
.gg-link-jump:focus-visible {
  opacity: 0.8;
}

.gg-screen-article {
  position: relative;
  z-index: 2;
  width: min(100%, 860px);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--gg-opening-border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.08);
}

.gg-rune-backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.gg-screen-shell[data-screen="guidance"] .gg-rune-backdrop {
  position: fixed;
  inset: 0;
  height: 100vh;
  margin-bottom: 0;
}

.gg-rune-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.09), transparent 58%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.02));
}

.gg-rune-backdrop-row {
  position: absolute;
  left: 0;
  top: var(--gg-row-top);
  width: 100%;
  opacity: var(--gg-row-opacity, 0.1);
  white-space: nowrap;
  will-change: transform;
}

.gg-rune-backdrop-track {
  display: inline-flex;
  align-items: center;
  gap: clamp(28px, 2.5vw, 44px);
  min-width: max-content;
  padding-left: 100vw;
  will-change: transform;
}

.gg-rune-backdrop-copy {
  display: inline-flex;
  align-items: center;
  gap: clamp(28px, 2.5vw, 44px);
}

.gg-rune-backdrop-char {
  display: inline-block;
  font-size: var(--gg-row-size);
  line-height: 1;
  color: rgba(214, 220, 226, 0.98);
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.08);
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.05));
  transform-origin: center center;
}

.gg-rune-backdrop-gap {
  display: inline-block;
  width: clamp(68px, 6vw, 112px);
}

.gg-rune-parade {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.gg-rune-parade::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.07), transparent 58%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.02));
}

.gg-rune-parade-track {
  position: absolute;
  left: 0;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 14vw;
  min-width: max-content;
  padding-left: 0;
  transform: translate3d(-18%, -50%, 0);
  will-change: transform;
  animation: gg-rune-parade-march 160s linear infinite;
  animation-delay: -72s;
}

.gg-rune-parade-copy {
  display: inline-block;
  font-size: min(66vh, 66vw);
  line-height: 0.9;
  white-space: pre;
  color: rgba(202, 208, 214, 0.18);
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.04);
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.03));
}

@keyframes gg-rune-parade-march {
  from {
    transform: translate3d(-18%, -50%, 0);
  }

  to {
    transform: translate3d(-68%, -50%, 0);
  }
}

.gg-screen-title {
  margin: 0 0 22px;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gg-screen-copy {
  margin: 0;
  color: #2f3338;
  font-size: clamp(15px, 1.85vw, 19px);
  line-height: 1.9;
  white-space: pre-line;
}

.gg-screen-copy + .gg-screen-copy {
  margin-top: 18px;
}

.gg-credit-link {
  color: #1d4fd8;
  text-decoration-thickness: 1px;
}

.gg-screen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.gg-screen-button,
.gg-link-jump {
  appearance: none;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  padding: 12px 18px;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 120ms ease;
}

.gg-link-jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gg-screen-button.is-secondary {
  background: transparent;
  color: var(--gg-opening-ink);
}

.gg-guidance-wrap {
  width: min(100%, 1040px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gg-guidance-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.gg-guidance-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.gg-guidance-header-actions .gg-screen-button.is-secondary {
  background: rgba(52, 56, 62, 0.96);
  border-color: rgba(78, 84, 92, 0.92);
  color: #e7eaee;
}

/* Remove the inner frame around the live map area. */
.gg-center {
  padding: 0;
}

#mapArea {
  inset: 0;
}

.gg-guidance-start-button {
  border-color: rgba(255, 54, 54, 0.72);
  background: #c71515;
  color: #ffffff;
  animation: gg-guidance-red-blink 4.6s ease-in-out infinite;
  box-shadow: 0 0 24px rgba(199, 21, 21, 0.22);
}

.gg-guidance-lead {
  margin: 0;
  color: #e6edf7;
  font-size: clamp(28px, 4.2vw, 48px);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

.gg-guidance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.gg-guidance-card {
  padding: clamp(20px, 2.6vw, 28px);
  border: 1px solid var(--gg-opening-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.06);
}

.gg-guidance-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gg-guidance-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center top;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(0, 0, 0, 0.04);
  margin-bottom: 6px;
}

.gg-guidance-card h3 {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.6vw, 30px);
}

.gg-guidance-card p {
  margin: 0;
  color: #3f454c;
  line-height: 1.8;
}

.gg-guidance-note {
  margin-top: 10px;
  color: #5f6670;
  font-size: 14px;
}

.gg-guidance-card .gg-link-jump {
  margin-top: auto;
}

.gg-guidance-bottom-actions {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.gg-guidance-bottom-copy {
  position: relative;
  min-width: 0;
  color: transparent;
  font-size: 0;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}

.gg-guidance-bottom-copy::before {
  content: "Let's GloranthaGIS !";
  color: #e6edf7;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

.gg-guidance-bottom-copy::after {
  content: "→→→";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #f3e7a2;
  font-size: clamp(20px, 2.7vw, 30px);
  font-weight: 800;
  letter-spacing: 0.24em;
  text-shadow: 0 0 16px rgba(243, 231, 162, 0.34);
  white-space: nowrap;
  pointer-events: none;
}

.gg-guidance-bottom-actions .gg-guidance-start-button {
  justify-self: end;
}

.gg-guidance-bottom-actions [data-action="load-demo"] {
  border-color: rgba(255, 132, 196, 0.84);
  background: linear-gradient(180deg, #ff5ca8, #d81b72);
  color: #fff7fb;
  animation: gg-guidance-demo-pulse 6.2s cubic-bezier(0.32, 0, 0.2, 1) infinite;
  box-shadow: 0 0 10px rgba(255, 92, 168, 0.14);
}

.gg-guidance-bottom-actions [data-action="load-png"] {
  border-color: rgba(110, 220, 255, 0.84);
  background: linear-gradient(180deg, #55d8ff, #1398db);
  color: #f7fdff;
  animation: gg-guidance-png-pulse 6.2s cubic-bezier(0.32, 0, 0.2, 1) infinite;
  box-shadow: 0 0 10px rgba(85, 216, 255, 0.14);
}

.gg-guidance-inline-hint {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 5;
  min-width: 180px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(16, 18, 23, 0.92);
  color: #f6f7fb;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -100%);
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.gg-guidance-inline-hint[hidden] {
  display: none !important;
}

.gg-screen-footer {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

@keyframes gg-start-blink {
  0%, 100% {
    opacity: 0.28;
  }

  45% {
    opacity: 1;
  }

  65% {
    opacity: 0.82;
  }
}

@keyframes gg-guidance-red-blink {
  0%, 100% {
    background: #8f1111;
    border-color: rgba(255, 54, 54, 0.48);
    box-shadow: 0 0 12px rgba(199, 21, 21, 0.16);
    opacity: 0.68;
  }

  48% {
    background: #e22828;
    border-color: rgba(255, 105, 105, 0.9);
    box-shadow: 0 0 30px rgba(226, 40, 40, 0.36);
    opacity: 1;
  }

  70% {
    background: #c71515;
    border-color: rgba(255, 74, 74, 0.72);
    box-shadow: 0 0 22px rgba(199, 21, 21, 0.24);
    opacity: 0.84;
  }
}

@keyframes gg-guidance-demo-pulse {
  0%, 100% {
    opacity: 0.76;
    filter: saturate(0.9) brightness(0.96);
    box-shadow:
      0 0 8px rgba(255, 92, 168, 0.14),
      0 0 20px rgba(255, 92, 168, 0.12);
  }

  28% {
    opacity: 0.88;
    filter: saturate(0.98) brightness(1);
    box-shadow:
      0 0 12px rgba(255, 92, 168, 0.2),
      0 0 28px rgba(255, 92, 168, 0.2);
  }

  50% {
    opacity: 1;
    filter: saturate(1.08) brightness(1.05);
    box-shadow:
      0 0 18px rgba(255, 92, 168, 0.34),
      0 0 42px rgba(255, 92, 168, 0.4),
      0 0 72px rgba(255, 92, 168, 0.18);
  }

  72% {
    opacity: 0.86;
    filter: saturate(0.98) brightness(1);
    box-shadow:
      0 0 12px rgba(255, 92, 168, 0.2),
      0 0 28px rgba(255, 92, 168, 0.18);
  }
}

@keyframes gg-guidance-png-pulse {
  0%, 100% {
    opacity: 0.74;
    filter: saturate(0.88) brightness(0.96);
    box-shadow:
      0 0 8px rgba(85, 216, 255, 0.12),
      0 0 20px rgba(85, 216, 255, 0.1);
  }

  28% {
    opacity: 0.82;
    filter: saturate(0.96) brightness(1);
    box-shadow:
      0 0 12px rgba(85, 216, 255, 0.16),
      0 0 28px rgba(85, 216, 255, 0.16);
  }

  50% {
    opacity: 0.78;
    filter: saturate(0.92) brightness(0.98);
    box-shadow:
      0 0 10px rgba(85, 216, 255, 0.14),
      0 0 24px rgba(85, 216, 255, 0.12);
  }

  78% {
    opacity: 1;
    filter: saturate(1.08) brightness(1.05);
    box-shadow:
      0 0 18px rgba(85, 216, 255, 0.32),
      0 0 42px rgba(85, 216, 255, 0.38),
      0 0 72px rgba(85, 216, 255, 0.16);
  }
}

@media (max-width: 900px) {
  .gg-start-hero {
    grid-template-columns: 1fr;
  }

  .gg-guidance-header {
    align-items: stretch;
    flex-direction: column;
  }

  .gg-guidance-header-actions {
    justify-content: flex-end;
  }

  .gg-guidance-header-actions .gg-screen-button {
    width: auto;
  }

  .gg-guidance-bottom-actions {
    grid-template-columns: 1fr;
    justify-items: end;
  }

  .gg-guidance-bottom-copy {
    width: 100%;
  }

  .gg-guidance-bottom-copy::after {
    top: calc(100% + 18px);
  }

  .gg-guidance-grid {
    grid-template-columns: 1fr;
  }

  .gg-screen-actions {
    flex-direction: column;
  }

  .gg-screen-button,
  .gg-link-jump {
    width: 100%;
    justify-content: center;
  }

  .gg-guidance-bottom-actions .gg-screen-button {
    width: auto;
  }
}

@media (max-width: 640px) {
  .gg-screen-shell {
    padding: 16px;
  }

  .gg-screen-panel {
    height: 100%;
    justify-content: flex-start;
    padding-block: 20px;
  }

  .gg-rune-stage {
    min-height: 240px;
    border-radius: 22px;
  }

  .gg-guidance-bottom-copy {
    white-space: normal;
  }

  .gg-guidance-bottom-copy::before {
    display: block;
    padding-right: 92px;
  }

  .gg-guidance-bottom-copy::after {
    left: auto;
    right: 0;
    transform: translateY(-50%);
    letter-spacing: 0.12em;
  }

  .gg-screen-article,
  .gg-guidance-card {
    border-radius: 20px;
  }

  .gg-home-link {
    right: 12px;
    bottom: 42px;
  }

  .gg-home-logo {
    width: 42px;
  }
}


.gg-map-drop-overlay {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  background: rgba(15, 18, 22, 0.82);
  color: #f3f4f6;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-align: center;
  z-index: 16;
  pointer-events: none;
}

#mapArea.is-dragover {
  outline: 2px solid rgba(47, 103, 255, 0.65);
  outline-offset: -4px;
}

.gg-home-link {
  position: fixed;
  right: 16px;
  bottom: 44px;
  z-index: 1190;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.gg-home-logo {
  width: 46px;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.16));
  transition: transform 220ms ease, filter 220ms ease;
}

.gg-home-link:hover .gg-home-logo,
.gg-home-link:focus-visible .gg-home-logo {
  animation: gg-home-logo-hop 380ms ease-out 1;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.2));
}

@keyframes gg-home-logo-hop {
  0% {
    transform: translateY(0) scale(1);
  }

  38% {
    transform: translateY(-7px) scale(1.03);
  }

  68% {
    transform: translateY(1px) scale(0.995);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

.gg-hint-card {
  position: fixed;
  left: var(--gg-map-tool-panel-left, 50%);
  top: var(--gg-map-tool-panel-top, 50%);
  z-index: 1300;
  width: min(300px, calc(100vw - 32px));
  max-width: min(300px, calc(100vw - 32px));
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(16, 18, 23, 0.86);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  color: #ffffff;
  cursor: grab;
  transform: none;
  user-select: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", "Noto Sans TC", sans-serif;
}

.gg-hint-card.is-dragging {
  cursor: grabbing;
}

.gg-hex-adjust-panel {
  position: fixed;
  left: calc(320px + 12px);
  bottom: 56px;
  z-index: 1400;
  width: min(280px, calc(100vw - 48px));
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(15, 18, 22, 0.9);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(10px);
  color: #f4f4f4;
}

.gg-grid-adjust-panel-square {
  bottom: 284px;
}

.gg-hex-adjust-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.gg-hex-adjust-body {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.gg-hex-adjust-copy,
.gg-hex-adjust-values,
.gg-hex-adjust-status {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.gg-hex-adjust-values {
  font-weight: 700;
  color: #cfe3ff;
}

.gg-hex-adjust-slider-group {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px;
}

.gg-hex-adjust-slider-label {
  font-size: 12px;
  font-weight: 700;
  color: #f4f4f4;
}

.gg-hex-adjust-slider {
  width: 100%;
  accent-color: #7db1ff;
}

.gg-grid-adjust-select {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.gg-hex-adjust-status {
  color: rgba(255, 255, 255, 0.74);
}

.gg-hex-adjust-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.gg-hex-adjust-button {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(60, 116, 214, 0.92);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.gg-hex-adjust-button.is-secondary {
  background: rgba(255, 255, 255, 0.08);
}

.gg-hex-adjust-button.is-active {
  background: rgba(184, 71, 71, 0.94);
}

.gg-hex-adjust-overlay {
  position: absolute;
  inset: 0;
  z-index: 19;
  cursor: grab;
  background: transparent;
}

.gg-hex-adjust-overlay.is-dragging {
  cursor: grabbing;
}

.gg-square-adjust-overlay {
  position: absolute;
  inset: 0;
  z-index: 18;
  cursor: grab;
  background: transparent;
}

.gg-square-adjust-overlay.is-dragging {
  cursor: grabbing;
}


.gg-hint-card-title {
  margin: 0 28px 10px 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  color: #f6f7fb;
}

.gg-hint-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gg-hint-card-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(240, 242, 247, 0.82);
  overflow-wrap: anywhere;
}

.gg-tool-inline-rune {
  display: inline-block;
  min-width: 1.1em;
  margin-right: 0.12em;
  font-family: var(--gg-rune-font-family);
  font-size: 1.18em;
  font-weight: 400;
  line-height: 1;
  vertical-align: -0.04em;
}

.gg-hint-card-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ===== Main Screen Light Theme ===== */
body:not(.gg-opening-active) {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.04), transparent 24%),
    radial-gradient(circle at 82% 74%, rgba(255, 255, 255, 0.03), transparent 22%),
    linear-gradient(180deg, #101010, var(--gg-main-bg));
  color: var(--gg-main-ink);
}

body:not(.gg-opening-active) .gg-topbar {
  border-bottom: 1px solid var(--gg-main-border);
  background: rgba(8, 8, 8, 0.84);
  backdrop-filter: blur(10px);
}

body:not(.gg-opening-active) .gg-left {
  border-right: 1px solid var(--gg-main-border);
}

body:not(.gg-opening-active) .gg-box-title,
body:not(.gg-opening-active) .gg-settings-label,
body:not(.gg-opening-active) #resolutionNotice {
  color: var(--gg-main-muted);
}

body:not(.gg-opening-active) .gg-panel {
  border: 1px solid var(--gg-main-border);
  background: var(--gg-main-surface);
  border-radius: 20px;
  box-shadow: var(--gg-main-shadow);
  backdrop-filter: blur(8px);
}


body:not(.gg-opening-active) .gg-entry-footer {
  border-top: 1px solid var(--gg-main-border);
  background: rgba(8, 8, 8, 0.84);
  backdrop-filter: blur(10px);
}

body:not(.gg-opening-active) #osNotice {
  background: rgba(255, 245, 245, 0.96);
  border: 1px solid rgba(180, 35, 24, 0.18);
  color: #b42318;
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(180, 35, 24, 0.12);
}

body:not(.gg-opening-active) .gg-center-mark::before,
body:not(.gg-opening-active) .gg-center-mark::after {
  background: rgba(23, 23, 23, 0.72);
}

body:not(.gg-opening-active) .gg-coords-hud {
  color: #f4f4f4;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

body:not(.gg-opening-active) .gg-layer-list {
  border: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

body:not(.gg-opening-active) .gg-layer-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

body:not(.gg-opening-active) .gg-layer-placeholder,
body:not(.gg-opening-active) .gg-layer-opacity-value {
  color: var(--gg-main-muted);
}

body:not(.gg-opening-active) .gg-layer-name {
  color: var(--gg-main-ink);
}

body:not(.gg-opening-active) .gg-layer-row {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 20, 20, 0.9);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

body:not(.gg-opening-active) .gg-layer-row input[type="range"] {
  accent-color: var(--gg-main-accent);
}

body:not(.gg-opening-active) .gg-layer-row input[type="range"]::-webkit-slider-runnable-track,
body:not(.gg-opening-active) .gg-layer-row input[type="range"]::-moz-range-track {
  background: #5c6168;
}

body:not(.gg-opening-active) .gg-layer-row input[type="range"]::-webkit-slider-thumb,
body:not(.gg-opening-active) .gg-layer-row input[type="range"]::-moz-range-thumb {
  background: var(--gg-main-accent);
}

body:not(.gg-opening-active) .gg-language-select {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(245, 248, 252, 0.94);
  color: #0f1722;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

body:not(.gg-opening-active) .gg-language-select option {
  background: #f4f6f8;
  color: #111111;
}

body:not(.gg-opening-active) .gg-language-select-label {
  color: #ffffff;
}

body:not(.gg-opening-active) #mapArea.gg-map-placeholder {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 245, 245, 0.98)),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.015) 0 1px, transparent 1px 36px);
  border: 1px solid var(--gg-main-border);
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

body:not(.gg-opening-active) .gg-action-btn,
body:not(.gg-opening-active) .gg-layer-row button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(24, 24, 24, 0.96);
  color: var(--gg-main-ink);
  font-weight: 700;
}

body:not(.gg-opening-active) .gg-action-btn {
  min-height: 40px;
  padding: 10px 14px;
  letter-spacing: 0.03em;
}

body:not(.gg-opening-active) .gg-action-btn:hover,
body:not(.gg-opening-active) .gg-layer-row button:hover {
  opacity: 0.86;
}

body:not(.gg-opening-active) .gg-image-load-btn.is-primary {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

body:not(.gg-opening-active) .gg-image-load-btn.is-demo-disabled {
  border-color: rgba(96, 101, 108, 0.9);
  background: #101010;
  color: #7c838b;
}

body:not(.gg-opening-active) .gg-image-load-btn.is-primary:hover {
  background: #1f1f1f;
}

.gg-rune-jump-btn {
  width: calc((100% - 16px) / 3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-inline: 0;
}

.gg-rune-tool-btn {
  width: calc((100% - 16px) / 3);
  min-width: 0;
  padding-inline: 0;
  font-weight: 400 !important;
}

.gg-rune-tool-btn-glyph {
  font-family: var(--gg-rune-font-family);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.gg-rune-tool-btn-glyph.is-system {
  font-family: inherit;
  font-size: 18px;
  font-weight: 400;
}

.gg-rune-jump-btn-glyph {
  font-family: var(--gg-rune-font-family);
  font-size: 26px;
  line-height: 1;
}

body:not(.gg-opening-active) .gg-map-empty-message {
  display: none !important;
  color: #3f454c;
}

body:not(.gg-opening-active) .gg-map-drop-overlay {
  display: none !important;
  border: 0;
  background: transparent;
  color: transparent;
  box-shadow: none;
}

body:not(.gg-opening-active) #mapArea,
body:not(.gg-opening-active) #mapViewport {
  outline: none !important;
  border: 0;
  box-shadow: none;
}

body:not(.gg-opening-active) #mapArea.gg-map-placeholder {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.gg-place-card {
  position: fixed;
  top: 88px;
  right: 24px;
  z-index: 60;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  grid-auto-rows: max-content;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(16, 18, 23, 0.86);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

body.gg-opening-active .gg-place-card {
  display: none;
}

.gg-place-card[hidden] {
  display: none !important;
}

.gg-place-card.is-jump {
  top: 50%;
  left: 50%;
  right: auto;
  z-index: 1800;
  width: min(420px, calc(100vw - 32px));
  height: min(76vh, 720px);
  max-height: min(76vh, 720px);
  grid-template-rows: max-content max-content max-content max-content minmax(0, 1fr) max-content max-content;
  transform: translate(-50%, -50%);
}

.gg-place-card-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1750;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.gg-place-card-backdrop[hidden] {
  display: none !important;
}

.gg-place-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gg-place-card-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
}

.gg-place-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #f6f7fb;
}

.gg-place-card-label,
.gg-place-card-selected,
.gg-place-card-center,
.gg-place-card-status,
.gg-place-card-empty,
.gg-place-card-item-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  color: rgba(240, 242, 247, 0.82);
}

.gg-place-card-selected {
  min-height: 22px;
  padding-bottom: 4px;
}

.gg-place-card.is-jump .gg-place-card-list {
  grid-row: 5;
  align-self: stretch;
  overflow-y: auto;
  overflow-x: hidden;
}

.gg-place-card-item-name {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.gg-place-card-input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.gg-place-card-list {
  display: grid;
  align-content: start;
  gap: 6px;
  max-height: 240px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.gg-place-card.is-jump .gg-place-card-list {
  max-height: none;
}

.gg-place-card-item {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

.gg-place-card-item.is-selected {
  border-color: rgba(128, 205, 255, 0.75);
  background: rgba(68, 138, 186, 0.25);
}

.gg-place-card-item-read {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  color: rgba(240, 242, 247, 0.74);
}

.gg-place-card-item-meta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.gg-place-card-item.is-from-csv {
  border-color: rgba(210, 74, 74, 0.5);
  background: rgba(110, 28, 28, 0.18);
}

.gg-place-card-item.is-from-csv .gg-place-card-item-meta {
  color: #ff7f7f;
}

.gg-place-card-item.is-staged {
  border-color: rgba(222, 186, 67, 0.55);
  background: rgba(122, 98, 18, 0.22);
}

.gg-place-card-item.is-staged .gg-place-card-item-meta {
  color: #ffd76a;
}

.gg-place-card-item-meta.is-csv {
  color: #ff7f7f;
}

.gg-place-card-item-meta.is-browser {
  color: #ffd76a;
}

.gg-place-card-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.gg-place-card-button {
  min-width: 96px;
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(90, 145, 184, 0.95), rgba(45, 102, 144, 0.95));
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.gg-place-card-button.is-secondary {
  background: rgba(255, 255, 255, 0.08);
}

.gg-place-card-button.is-danger {
  background: rgba(255, 255, 255, 0.06);
}

.gg-travel-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
}

.gg-travel-overlay[hidden] {
  display: none !important;
}

.gg-travel-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.06), transparent 48%);
  opacity: var(--gg-travel-vignette, 0);
  transition: opacity 180ms linear;
}

.gg-travel-rune {
  position: absolute;
  left: var(--gg-travel-left, 50%);
  top: var(--gg-travel-top, 50%);
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin-left: -44px;
  margin-top: -44px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.98);
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.34);
  font-family: var(--gg-rune-font-family);
  font-size: 54px;
  line-height: 1;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 20px 50px rgba(0, 0, 0, 0.22);
  opacity: var(--gg-travel-opacity, 0);
  transform: translate3d(var(--gg-travel-x, 0px), var(--gg-travel-y, 0px), 0) scale(var(--gg-travel-scale, 0.6)) rotate(var(--gg-travel-rotate, 0deg));
}

.gg-travel-caption {
  position: absolute;
  left: var(--gg-travel-left, 50%);
  top: calc(var(--gg-travel-top, 50%) + 76px);
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.72);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: var(--gg-travel-caption-opacity, 0);
}

.gg-place-map-marker {
  position: absolute;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(78, 154, 255, 0.72);
  border: 6px solid rgba(18, 67, 140, 0.88);
  box-shadow: 0 0 0 2px rgba(145, 198, 255, 0.45);
}

.gg-map-tools-overlay {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  z-index: 40;
}

.gg-map-measure-overlay {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 7100;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.gg-map-measure-overlay[hidden] {
  display: none !important;
}

.gg-map-measure-overlay-value {
  min-width: 140px;
  padding: 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.84);
  color: #ffffff;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  backdrop-filter: blur(8px);
}

.gg-tool-measure-rune,
.gg-tool-polyline-rune,
.gg-tool-walker-rune {
  font-family: var(--gg-rune-font-family);
  font-size: 34px;
  font-weight: 400;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke fill;
  stroke: rgba(18, 18, 18, 0.88);
  stroke-width: 0.9;
}

.gg-tool-measure-rune,
.gg-tool-polyline-rune {
  fill: #ff4b4b;
}

.gg-tool-walker-rune {
  fill: #ff8b6a;
}

.gg-tool-circle-ring {
  fill: none;
  stroke: rgba(255, 82, 82, 0.95);
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
  pointer-events: stroke;
}

.gg-tool-circle-center,
.gg-tool-circle-rune {
  fill: rgba(255, 82, 82, 0.96);
  stroke: rgba(20, 8, 8, 0.78);
  stroke-width: 0.8;
  font-weight: 400;
  paint-order: stroke fill;
  dominant-baseline: middle;
  text-anchor: middle;
  user-select: none;
}

.gg-tool-circle-center {
  font-family: var(--gg-rune-font-family);
  font-size: 30px;
  pointer-events: all;
  opacity: 1;
  transform-origin: center center;
}

.gg-tool-circle-rune {
  font-family: var(--gg-rune-font-family);
  font-size: 34px;
  opacity: 0;
  transform-origin: center center;
  animation: gg-circle-rune-burst 980ms cubic-bezier(0.16, 0.82, 0.2, 1) forwards;
}

.gg-tool-circle-group.is-entering .gg-tool-circle-ring {
  opacity: 0;
  animation: gg-circle-expand 520ms cubic-bezier(0.12, 0.82, 0.22, 1) 620ms forwards;
  transform-origin: center;
}

.gg-tool-circle-group.is-entering .gg-tool-circle-center {
  opacity: 0;
  animation: gg-circle-center-settle 560ms cubic-bezier(0.16, 0.84, 0.2, 1) 180ms forwards;
}

.gg-tool-circle-group.is-removing .gg-tool-circle-ring,
.gg-tool-circle-group.is-removing .gg-tool-circle-center,
.gg-tool-circle-group.is-removing .gg-tool-circle-rune {
  animation: gg-circle-remove 760ms ease-in forwards;
}

.gg-tool-measure-line,
.gg-tool-polyline {
  fill: none;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
}

.gg-tool-measure-line {
  stroke: rgba(110, 195, 255, 0.94);
}

.gg-tool-polyline {
  stroke: rgba(129, 77, 39, 0.96);
}

.gg-tool-polyline.is-finishing,
.gg-tool-polyline-rune.is-finishing,
.gg-tool-walker-rune.is-finishing {
  animation: gg-tool-float-fade 620ms ease-in forwards;
}

.gg-tool-measure-point,
.gg-tool-polyline-point {
  vector-effect: non-scaling-stroke;
  stroke: rgba(15, 18, 22, 0.88);
  stroke-width: 2;
}

.gg-tool-measure-point {
  fill: rgba(110, 195, 255, 0.98);
}

.gg-tool-polyline-point {
  fill: rgba(255, 205, 84, 0.98);
}

.gg-map-tool-dialog {
  position: fixed;
  inset: 0;
  z-index: 7200;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(3px);
}

.gg-map-tool-dialog[hidden] {
  display: none;
}

.gg-map-tool-dialog-box {
  width: min(320px, calc(100vw - 32px));
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 18, 23, 0.96);
  color: #fff;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.32);
}

.gg-map-tool-dialog-title {
  font-size: 16px;
  font-weight: 800;
}

.gg-map-tool-dialog-row,
.gg-map-tool-dialog-actions,
.gg-map-tool-dialog-input-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.gg-map-tool-dialog-label {
  display: block;
  margin-top: 14px;
  font-size: 12px;
  color: #cdd5df;
}

.gg-map-tool-input {
  flex: 0 1 180px;
  width: min(180px, 100%);
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.gg-map-tool-unit {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  flex: 0 0 auto;
}

.gg-map-tool-toggle,
.gg-map-tool-button {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-weight: 400;
}

.gg-map-tool-toggle.is-active,
.gg-map-tool-button {
  background: rgba(68, 138, 186, 0.92);
}

.gg-map-tool-button.is-secondary {
  background: rgba(255, 255, 255, 0.08);
}

.gg-hint-card .gg-map-tool-toggle,
.gg-hint-card .gg-map-tool-button {
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  color: #ffffff;
}

.gg-hint-card .gg-map-tool-button,
.gg-hint-card .gg-map-tool-toggle.is-active {
  background: linear-gradient(180deg, rgba(90, 145, 184, 0.95), rgba(45, 102, 144, 0.95));
  color: #ffffff;
}

.gg-hint-card .gg-map-tool-button.is-secondary,
.gg-hint-card .gg-map-tool-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.gg-hint-card .gg-map-tool-input {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.gg-hint-card .gg-map-tool-dialog-label,
.gg-hint-card .gg-map-tool-unit {
  color: rgba(240, 242, 247, 0.82);
}

.gg-map-tool-hint {
  top: 150px;
}

.gg-tool-pin-pole {
  stroke: rgba(36, 36, 36, 0.92);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.gg-tool-pin-flag {
  fill: #4e8dff;
  stroke: rgba(24, 48, 96, 0.92);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  animation: gg-flag-wave 1.8s ease-in-out infinite;
  transform-origin: 0px -32px;
}

.gg-tool-pin.is-hover {
  opacity: 0.92;
  filter: drop-shadow(0 10px 14px rgba(78, 141, 255, 0.22));
}

.gg-tool-pin.is-hover .gg-tool-pin-pole,
.gg-tool-pin.is-hover .gg-tool-pin-flag {
  transform: translateY(-8px);
}

@keyframes gg-circle-rune-burst {
  0% {
    opacity: 0;
    fill: rgba(255, 241, 126, 0.92);
    transform: translateY(-160px) scale(0.18);
  }

  18% {
    opacity: 1;
    fill: rgba(255, 248, 188, 0.98);
    transform: translateY(-18px) scale(1.26);
  }

  40% {
    opacity: 0.96;
    fill: rgba(255, 238, 144, 0.94);
    transform: translateY(0) scale(0.92);
  }

  100% {
    opacity: 0;
    fill: rgba(255, 216, 94, 0.04);
    transform: translateY(10px) scale(18);
  }
}

@keyframes gg-circle-expand {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }

  70% {
    opacity: 1;
    transform: scale(1.02);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes gg-circle-center-settle {
  0% {
    opacity: 0;
    fill: rgba(255, 241, 126, 0.96);
    transform: translateY(-140px) scale(0.18);
  }

  52% {
    opacity: 1;
    fill: rgba(255, 244, 172, 0.98);
    transform: translateY(6px) scale(1.08);
  }

  100% {
    opacity: 1;
    fill: rgba(255, 82, 82, 0.96);
    transform: translateY(0) scale(1);
  }
}

@keyframes gg-circle-remove {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-72px) scale(0.86);
  }
}

@keyframes gg-flag-wave {
  0%, 100% {
    transform: skewY(0deg) scaleY(1);
  }

  50% {
    transform: skewY(-6deg) scaleY(1.02);
  }
}

@keyframes gg-tool-float-fade {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-18px);
  }
}
