/* ズームモーダル — オーバーレイ */
.ships-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  touch-action: none;
  user-select: none;
}

.ships-zoom-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* 画像ラッパー（ドラッグ領域） */
.ships-zoom-canvas {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
}

.ships-zoom-canvas.is-dragging {
  cursor: grabbing;
}

.ships-zoom-canvas img {
  /* JS controls size via transform scale — no CSS size constraints */
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  display: block;
  transform-origin: center center;
  transition: transform 0.18s ease;
  pointer-events: none;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.6);
  border-radius: 2px;
}

/* コントロールバー */
.ships-zoom-controls {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100001;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 40px;
  padding: 8px 14px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.ships-zoom-overlay.is-open .ships-zoom-controls {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.ships-zoom-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
}

.ships-zoom-btn:hover {
  background: rgba(255, 255, 255, 0.26);
}

.ships-zoom-btn:active {
  transform: scale(0.9);
}

.ships-zoom-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ズーム率表示 */
.ships-zoom-level {
  color: #ddd;
  font-size: 12px;
  font-family: monospace;
  min-width: 40px;
  text-align: center;
}

/* 閉じるボタン */
.ships-zoom-close {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 100001;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(30, 30, 30, 0.75);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, transform 0.1s ease, opacity 0.22s ease;
  opacity: 0;
  pointer-events: none;
}

.ships-zoom-overlay.is-open .ships-zoom-close {
  opacity: 1;
  pointer-events: auto;
}

.ships-zoom-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ships-zoom-close:active {
  transform: scale(0.9);
}

/* 投稿コンテンツ内の画像 — クリック可能サイン */
.post_content img.ships-zoomable {
  cursor: zoom-in;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.post_content img.ships-zoomable:hover {
  opacity: 0.88;
  transform: scale(1.01);
}
