/* 🔒 本文の選択禁止。フォームと編集可能な場所は常に除外します。 */
html.erlis-block-selection body {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

html.erlis-block-selection input,
html.erlis-block-selection textarea,
html.erlis-block-selection select,
html.erlis-block-selection option,
html.erlis-block-selection [contenteditable="true"],
html.erlis-block-selection [contenteditable=""] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

/* 💻 設定がONならソースコードだけ選択・コピーできます。 */
html.erlis-block-selection.erlis-allow-code-copy pre,
html.erlis-block-selection.erlis-allow-code-copy pre *,
html.erlis-block-selection.erlis-allow-code-copy code,
html.erlis-block-selection.erlis-allow-code-copy code * {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

/* 🖼️ 画像ドラッグとiPhone・iPadの長押しメニュー対策 */
html.erlis-block-image-drag img {
  -webkit-user-drag: none;
  user-drag: none;
}

html.erlis-block-image-callout img {
  -webkit-touch-callout: none;
}

/* ✋ 一本指のスクロールと二本指のピンチズームを維持 */
html.erlis-allow-pinch-zoom body {
  touch-action: pan-x pan-y pinch-zoom;
  -ms-touch-action: pan-x pan-y pinch-zoom;
}

/* 💞 吹き出し風ここちゃんメッセージ */
.erlis-save-blocker-warning {
  position: fixed;
  left: 50%;
  bottom: 60px;
  z-index: 99999;
  max-width: min(82vw, 520px);
  padding: 12px 24px;
  border-radius: 24px;
  background: rgba(255, 245, 250, 0.95);
  color: #444;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 20px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.erlis-save-blocker-warning.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .erlis-save-blocker-warning {
    transition: none;
  }
}
