/* 汎用モーダル（MokuModalService） */

.mmx-modal-root {
  position: fixed;
  inset: 0;
  /* NOTE: ゲーム内の固定UI（モバイルデバッグ等）で 100000 超の z-index が存在するため、
     モーダルがクリックを奪われないよう十分に上げる */
  z-index: 200000;
}

.mmx-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.mmx-modal-backdrop.is-closable {
  cursor: pointer;
}

.mmx-modal-dialog {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: min(90vw, 500px);
  max-height: 80vh;
  overflow: auto;
  animation: mmxModalSlideIn 0.28s ease-out;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: default;
}

/* 雰囲気一覧（スプリント）だけ横幅を広げる */
.mmx-modal-dialog:has(.sprint-mood-table-modal) {
  max-width: 1120px;
  width: min(67vw, 1120px);
  max-height: 88vh;
}

/* ====== Warm Natural: work-resume modal 専用スキン（他モーダルには影響させない） ====== */
.mmx-modal-dialog:has(.work-resume-modal) {
  background: rgba(255, 255, 255, 0.98);
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(6px) saturate(120%);
  overflow: hidden;
  isolation: isolate;
}

.mmx-modal-dialog:has(.work-resume-modal)::before {
  display: none;
}

.mmx-modal-dialog:has(.work-resume-modal)::after {
  display: none;
}

.mmx-modal-dialog:has(.work-resume-modal) .mmx-modal-header {
  background: transparent;
  border-bottom: 1px solid rgba(15, 23, 42, 0.10);
}

.mmx-modal-dialog:has(.work-resume-modal) .mmx-modal-title {
  color: #1f2937;
  text-shadow: none;
}

.mmx-modal-dialog:has(.work-resume-modal) .mmx-modal-body {
  padding: 12px;
}

@keyframes mmxWarmDrift {
  0% { transform: translate3d(-8px, -6px, 0) rotate(-1deg); }
  100% { transform: translate3d(10px, 8px, 0) rotate(1deg); }
}

.mmx-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.mmx-modal-header.is-closable {
  justify-content: space-between;
}

.mmx-modal-title {
  margin: 0;
  font-size: 18px;
  color: #1f2937;
  font-weight: 800;
}

.mmx-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.mmx-modal-close:hover {
  background: rgba(15, 23, 42, 0.06);
}

.mmx-modal-close:active {
  background: rgba(15, 23, 42, 0.1);
}

.mmx-modal-body {
  padding: 24px;
  pointer-events: auto;
  touch-action: manipulation;
}

@keyframes mmxModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


