/* チェキ風：写真＋下余白コメント */

.cheki-lead {
  margin: -8px 0 14px;
  font-size: 13px;
  color: var(--muted, #9ca3af);
}

.cheki-photo-label {
  display: block;
  cursor: pointer;
  margin-bottom: 12px;
}

.cheki-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 240px;
  border-radius: 12px;
  overflow: hidden;
  background: #0b1220;
  border: 2px dashed #374151;
  display: grid;
  place-items: center;
}

.cheki-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cheki-placeholder {
  font-size: 15px;
  color: #6b7280;
  text-align: center;
  padding: 16px;
}

.cheki-caption-label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted, #9ca3af);
}

.cheki-caption-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.cheki-caption-row input {
  flex: 1;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid #374151;
  background: #0b1220;
  color: var(--text, #f9fafb);
  font-size: 15px;
}

.caption-count {
  flex: 0 0 auto;
  font-size: 11px;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}

.sign-advanced {
  margin: 12px 0;
  font-size: 13px;
  color: var(--muted, #9ca3af);
}

.sign-advanced summary {
  cursor: pointer;
  color: #93c5fd;
  margin-bottom: 8px;
}

.sign-advanced label {
  display: block;
  margin-bottom: 10px;
}

/* 地図上のチェキピン */
.cheki-marker-wrap {
  background: transparent !important;
  border: none !important;
}

/* 遠景用ミニドット（z≤11） */
.cheki-dot {
  border-radius: 4px;
  overflow: hidden;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  background: #374151;
  box-sizing: border-box;
}

.cheki-dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cheki-dot-emoji {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 10px;
  line-height: 1;
}

.cheki-pin {
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
  pointer-events: auto;
}

.cheki-pin .cheki-photo {
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  border: 2px solid #fff;
  border-bottom: none;
  background: #1f2937;
  box-sizing: border-box;
}

.cheki-pin .cheki-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cheki-pin.cheki-noimg .cheki-photo {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #4b5563, #1f2937);
}

.cheki-emoji {
  font-size: 1.6em;
  line-height: 1;
}

.cheki-pin .cheki-cap {
  background: #fff;
  color: #111827;
  line-height: 1.25;
  padding: 3px 5px;
  text-align: center;
  border-radius: 0 0 6px 6px;
  border: 2px solid #fff;
  border-top: 1px solid #e5e7eb;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  word-break: break-all;
  box-sizing: border-box;
}

/* ポップアップ・プレビュー内のチェキ枠 */
.cheki-frame {
  width: 220px;
  max-width: 60vw;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  margin-bottom: 8px;
}

.cheki-frame-lg {
  width: min(300px, 85vw);
}

.cheki-frame-lg img {
  max-height: min(300px, 55vh);
}

.cheki-noimg-frame {
  background: linear-gradient(145deg, #4b5563, #1f2937);
}

.cheki-emoji-lg {
  font-size: 64px;
  text-align: center;
  padding: 24px 0 16px;
}

.cheki-frame img {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.cheki-cap-bar {
  background: #fff;
  color: #111827;
  font-size: 13px;
  line-height: 1.35;
  padding: 8px 10px;
  min-height: 36px;
  border-top: 1px solid #e5e7eb;
  word-break: break-word;
}

.cheki-cap-bar.preview {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 32px;
  font-size: 12px;
  padding: 6px 8px;
}

.cheki-preview:has(img) {
  border-style: solid;
  border-color: #374151;
}

.cheki-popup .meta {
  margin-top: 4px;
}

.cheki-popup-actions {
  margin-top: 10px;
}

.cheki-popup-actions .sign-delete-btn,
.btn-danger {
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: #dc2626;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

.cheki-photo-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.cheki-photo-actions .ghost {
  flex: 1;
  font-size: 12px;
  padding: 8px 6px;
}

.cheki-preview {
  cursor: pointer;
}

/* クリック時の拡大ポップアップ */
.leaflet-popup.cheki-popup-wrap .leaflet-popup-content-wrapper {
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}

.leaflet-popup.cheki-popup-wrap .leaflet-popup-content {
  margin: 10px 12px 12px;
  min-width: 200px;
}

.leaflet-popup.cheki-popup-wrap .cheki-frame-lg {
  margin-bottom: 10px;
}
