/* =========================
 * Exhibition Map Block  共通スタイル
 * ========================= */

/* ===== マップ本体（フロント） ===== */

.emb-map-editor img {
  pointer-events: auto !important;
}

.emb-map-container {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "ヒラギノ角ゴ ProN", "Hiragino Kaku Gothic ProN", "游ゴシック体", "YuGothic", "メイリオ", Meiryo, sans-serif;
}

.emb-map-container img {
  display: block;
  width: 100%;
  height: auto;
}

/* ピン（フロント） */
.emb-map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
}

/* ピン本体（番号＋タイトル） */
.emb-map-pin a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0px 10px;
  box-sizing: border-box;

  /* ▼ ここを変えればだいたい雰囲気が変えられます ▼ */
  background: rgba(0,0,0,0.80);          /* 背景色＆透過 */
  color: #ffffff;                        /* 文字色 */
  font-size: 14px;                       /* 文字サイズ */
  font-weight: 400;                      /* フォント太さ（400=ノーマル） */
  font-family: inherit;                  /* 上の Noto Sans を継承 */
  border-radius: 999px;

  text-decoration: none;
  box-shadow: 0 3px 10px rgba(0,0,0,0.30); /* 影の強さ */
  transition:
    transform .18s ease-out,
    box-shadow .18s ease-out,
    filter .18s ease-out,
    background .18s ease-out;
}

/* PC：数字のあとにタイトルを横並びで表示（1. カーポート） */
@media (min-width: 769px) {
  .emb-map-pin a {
    white-space: nowrap;
	border-radius: 0px;  
  }
  .emb-map-pin a::after {
    content: '. ' attr(data-title);
    margin-left: 4px;
    font-size: 14px;
    font-weight: 400;
  }
}

/* ホバー時：少し持ち上がる感じ */
.emb-map-pin a:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  filter: brightness(1.06);
}

/* =========================
 * モーダル（フロント）
 * ========================= */

.emb-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity .22s ease-out;
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "ヒラギノ角ゴ ProN", "Hiragino Kaku Gothic ProN", "游ゴシック体", "YuGothic", "メイリオ", Meiryo, sans-serif;
}

.emb-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.emb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  transition: opacity .22s ease-out;
}

.emb-modal.is-open .emb-modal__backdrop {
  opacity: 1;
}

/* ダイアログ本体（Snow Monkey と相性よさげな感じ） */
.emb-modal__dialog {
  position: relative;
  background: #ffffff;
  border-radius: 0;
  padding: 20px 22px 22px;
  max-width: 720px;
  width: 90%;
  max-height: 90%;
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  gap: 12px;

  /* ふわっと出るアニメーション用 */
  transform: translateY(8px) scale(0.97);
  opacity: 0;
  transition:
    transform .22s ease-out,
    opacity .22s ease-out;
}

/* モーダルオープン時にふわっと */
.emb-modal.is-open .emb-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* モバイルでは全画面寄せ */
@media (max-width: 768px) {
  .emb-modal__dialog {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }
}

.emb-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.emb-modal__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.emb-modal__close {
  border: none;
  background: #f3f3f3;
  color: #555;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}

.emb-modal__close:hover {
  background: #e0e0e0;
}

.emb-modal__body {
  font-size: 14px;
  line-height: 1.7;
  overflow-y: auto;
}

.emb-modal__desc {
  margin: 0 0 12px;
}

/* YouTube 埋め込み */
.emb-modal__video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 0;
  overflow: hidden;
  background: #000;
}

.emb-modal__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}


/* =========================
 * エディタ用（ブロック編集時）
 * ========================= */

.emb-editor-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 960px) {
  .emb-editor-wrapper {
    flex-direction: row;
  }
}

.emb-editor-image-container {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.emb-editor-image-container img {
  max-width: 100%;
  height: auto;
  display: block;
  cursor: crosshair;
}

/* グリッド線（編集時のみ表示） */
.emb-editor-image-container.emb-debug-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.18) 1px, transparent 1px);
  background-size: calc(100% / var(--emb-cols, 30)) calc(100% / var(--emb-rows, 20));
}

/* 編集画面でのピン表示 */
.emb-editor-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  min-width: 24px;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emb-editor-pin-list {
  flex: 1;
}

.emb-editor-pin-item {
  border: 1px solid #ddd;
  padding: 8px;
  margin-bottom: 8px;
  background: #fafafa;
  border-radius: 4px;
}

/* エディタのグリッドオーバーレイはクリック無効 */
.emb-editor-image-container.emb-debug-grid::before {
  pointer-events: none;
}

/* スマホ用：ピン一覧（PCでは非表示） */
.emb-mobile-list { display: none; }

@media (max-width: 768px){
  .emb-mobile-list{
    display: block;
    margin-top: 12px;
  }
  .emb-mobile-list__title{
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
  }
  .emb-mobile-list__items{
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
  }
  .emb-mobile-list__btn{
    width: 100%;
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 10px;
    align-items: center;
    text-align: left;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.15);
    cursor: pointer;
    border-radius: 0; /* 角丸なし */
  }
  .emb-mobile-list__num{
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
  }
  .emb-mobile-list__text{
    font-size: 14px;
    line-height: 1.35;
  }
}
.emb-scroll-hint {
	display: none;
}

@media (max-width: 768px){
	.emb-map-scroll{
	  overflow-x: auto;
	  overflow-y: hidden;
	  -webkit-overflow-scrolling: touch;
	  padding: 12px 0;
	}

	.emb-map-scroll .emb-map-container{
	  position: relative;
	  width: 800px;     /* ←ここを増やすほど拡大 */
	  max-width: none;
	  margin: 0 auto;    /* 中央寄せ */
	}

	.emb-map-scroll .emb-map-container > img{
	  display: block;
	  width: 100%;
	  height: auto;
	}

	.emb-scroll-hint{
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  gap: 12px;
	  font-size: 14px;
	  color: #666;
	  margin: 14px 0;
	  opacity: 0.85;
	}

	/* 左矢印 */
	.emb-scroll-hint .fa-arrow-left{
	  animation: embArrowLeft 1.4s ease-in-out infinite;
	}

	/* 右矢印 */
	.emb-scroll-hint .fa-arrow-right{
	  animation: embArrowRight 1.4s ease-in-out infinite;
	}

	/* 左にふわふわ */
	@keyframes embArrowLeft{
	  0%   { transform: translateX(0); }
	  50%  { transform: translateX(-8px); }
	  100% { transform: translateX(0); }
	}

	/* 右にふわふわ */
	@keyframes embArrowRight{
	  0%   { transform: translateX(0); }
	  50%  { transform: translateX(8px); }
	  100% { transform: translateX(0); }
	}
}