/* ---- Back confirm dialog ---- */
.confirm-overlay {
  z-index: 200;
  padding: 24px;
  background: var(--overlay-bg);
  backdrop-filter: blur(2px);
}

.confirm-dialog {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 340px;
  padding: 28px 24px 20px;
  box-shadow: var(--shadow-modal);
  animation: dialog-in 0.15s ease-out;
}
.confirm-icon  { font-size: 2rem; line-height: 1; }
.confirm-title { color: var(--text); font-size: 1rem; font-weight: 700; text-align: center; }
.confirm-body  { margin-bottom: 4px; color: var(--text-mid); font-size: 0.82rem; text-align: center; }
.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.confirm-btn { width: 100%; justify-content: center; }

/* ---- Card modal ---- */
#card-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  background: var(--overlay-bg-deep);
  cursor: pointer;
}
#card-modal.active { display: flex; }
#card-modal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: default;
}
#card-modal img {
  max-width: min(90vw, 400px);
  max-height: 80vh;
  border-radius: 8px;
  pointer-events: none;
}
/* Location cards are landscape — rotate and swap dimension constraints. */
#card-modal-inner.location #card-modal-img {
  max-width: 60vh;
  max-height: min(85vw, 560px);
  transform: rotate(90deg);
}
#card-modal-ctrl {
  display: flex;
  align-items: center;
  gap: 16px;
}
.card-modal-btn {
  width: 48px;
  height: 48px;
  background: rgb(255 255 255 / 0.15);
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: 50%;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s;
}
.card-modal-btn:hover:not(:disabled) { background: rgb(255 255 255 / 0.3); }
.card-modal-btn:disabled             { opacity: 0.4; cursor: default; }
#card-modal-count {
  min-width: 2ch;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
}
