/* ゲームマップ([gg_map]ショートコード)。見た目はここだけで完結させる(functions/gg-map.php、js/gg-map.js) */
.gg-map{ margin: 1.5em 0; }
.gg-map button{ font: inherit; line-height: 1.2; cursor: pointer; }

.gg-map__filter{ display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.gg-map__chip{
	padding: 5px 12px; border: 1px solid #c9bba6; border-radius: 999px;
	background: #fff; color: #3f2c22;
}
.gg-map__chip:not(.is-on){ opacity: .45; }

.gg-map__sec{ margin: 0 0 2.4em; scroll-margin-top: 170px; /* 固定ヘッダーの高さぶん */ border-radius: 8px; }
@media (max-width: 767px){ .gg-map__sec{ scroll-margin-top: 120px; } }
.gg-map__sec.is-flash{ animation: gg-map-flash 1.4s ease-out; }
@keyframes gg-map-flash{ 0%, 55% { box-shadow: 0 0 0 4px #c8280a; } 100% { box-shadow: 0 0 0 0 rgba(200,40,10,0); } }
.gg-map .gg-map__title{ margin-top: 0; }

.gg-map__bar{ display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; min-height: 34px; }
.gg-map__back{ padding: 5px 12px; border: 1px solid #c9bba6; border-radius: 6px; background: #fff; color: #3f2c22; }
.gg-map__zoom{ display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.gg-map__zoom button{ width: 34px; height: 34px; border: 1px solid #c9bba6; border-radius: 6px; background: #fff; color: #3f2c22; font-size: 18px; padding: 0; }
.gg-map__pct{ min-width: 52px; text-align: center; color: #6b5a4c; font-size: .9em; }

/* 画像は左右いっぱいに表示し、拡大した時だけ枠の中でスクロールさせる */
.gg-map__scroller{ overflow: auto; border: 1px solid #d8ccb8; border-radius: 8px; background: #17120f; -webkit-overflow-scrolling: touch; }
.gg-map__scroller.is-zoomed{ max-height: 80vh; }
.gg-map__canvas{ position: relative; line-height: 0; margin: 0 auto; }
.gg-map__canvas > img{ display: block; width: 100%; height: auto; max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; border-radius: 0; }
.gg-map__layer{ position: absolute; inset: 0; }

/* アイコンは拡大しても大きさを変えない */
.gg-map__mk{ position: absolute; transform: translate(-50%, -50%); line-height: 1; }
button.gg-map__mk{
	width: 32px; height: 32px; padding: 0; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: #fff; border: 2px solid var(--gg-map-c, #8a1500); font-size: 18px;
	box-shadow: 0 1px 4px rgba(0,0,0,.55);
}
button.gg-map__mk:hover, button.gg-map__mk:focus-visible{ transform: translate(-50%, -50%) scale(1.15); outline: none; }
.gg-map__mk--warp{ --gg-map-c: #2f9bd6; }
.gg-map__mk--shard{ --gg-map-c: #e0a62b; }
.gg-map__mk--viewpoint{ --gg-map-c: #3fae6a; }
.gg-map__mk--chest{ --gg-map-c: #c9573f; }
.gg-map__mk--entrance{ --gg-map-c: #8a63d2; }
.gg-map__mk--place{
	color: #fff; font-weight: 700; font-size: 13px; white-space: nowrap; pointer-events: none;
	text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 6px #000;
}
.gg-map__nm{
	display: none; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 3px; z-index: 2;
	font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; pointer-events: none;
	text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 5px #000;
}
/* 地名(place)と二重にならないよう、アイコンの名前は触れた時だけ出す(押した時の詳細には常に名前が出る) */
button.gg-map__mk:hover .gg-map__nm, button.gg-map__mk:focus-visible .gg-map__nm{ display: block; }
.gg-map__mk.is-hidden{ display: none; }

.gg-map__modal{
	position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.7);
	display: flex; align-items: center; justify-content: center; padding: 16px;
}
.gg-map__modal[hidden]{ display: none; }
.gg-map__box{
	position: relative; box-sizing: border-box; width: min(92vw, 720px); max-height: 90vh; overflow: auto;
	background: #fffaf0; border-radius: 10px; padding: 18px 18px 20px; line-height: 1.7;
}
.gg-map__close{ position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; padding: 0; border: 1px solid #c9bba6; border-radius: 50%; background: #fff; font-size: 20px; color: #3f2c22; }
.gg-map__kind{ font-size: .8em; color: #8a1500; }
.gg-map__mtitle{ margin: 2px 40px 8px 0; font-size: 1.2em; font-weight: 700; color: #3f2c22; } /* 目次に拾われないよう見出し要素(h3)にはしない */
.gg-map__body img{ display: block; max-width: 100%; height: auto; margin: 8px 0; border-radius: 6px; }
.gg-map__body p{ margin: 6px 0 0; white-space: pre-wrap; }
body.gg-map-lock{ overflow: hidden; }
