@charset "UTF-8";

/* ==========================================================================
   シミュレーター専用スタイル
   ========================================================================== */
#simulator {
  width: 100%;
  background: #fff;
  padding: 20px 0 40px;
  margin-bottom: 40px;
}
.inner-container-sim {
  width: 100%;
  margin: 0 auto;
}
.sim-title {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.8rem;
  color: #333;
  font-weight: bold;
}
.simulator-guide {
  margin-bottom: 30px;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #eee;
}
.simulator-guide p {
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 15px;
  border-left: 4px solid #333;
  padding-left: 10px;
  text-align: left;
}
.simulator-guide ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: #555;
  line-height: 1.7;
  text-align: left;
}
.tab-group {
  display: flex;
  justify-content: center;
  margin-bottom: 35px;
}
.tab-btn {
  flex: 1;
  height: 50px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 15px;
  color: #666;
  transition: 0.2s;
  outline: none;
}
.tab-btn.active {
  background: #808080;
  color: #fff;
  border-color: #808080;
}
.tab-btn:first-child {
  border-radius: 6px 0 0 6px;
}
.tab-btn:last-child {
  border-radius: 0 6px 6px 0;
}
.simulator-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
}
.preview-column {
  flex: 1.2;
  min-width: 320px;
  position: sticky;
  top: 100px;
}
.preview-area {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
  margin: 0 auto 20px;
  border: 1px solid #eee;
  box-shadow: none;
  cursor: default;
}
.preview-area::after {
  content: "クリックで拡大";
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  pointer-events: none;
  transition: opacity 0.3s, background 0.3s;
  opacity: 0;
  z-index: 10;
}
.preview-area.is-complete {
  cursor: pointer;
}
.preview-area.is-complete::after {
  opacity: 1;
}
.preview-area.is-complete:hover::after {
  background: rgba(0, 0, 0, 0.8);
}
.image-layers img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#selection-summary {
  font-size: 20px;
  color: #333;
  font-weight: normal;
  text-align: center;
  line-height: 1.5;
  padding: 0px;
  background: transparent;
  box-shadow: none;
}
.control-area {
  flex: 1;
  min-width: 300px;
}
.option-group {
  margin-bottom: 30px;
  text-align: left;
}
.option-group h4 {
  margin: 0 0 15px 0;
  font-size: 18px;
  color: #333;
  border-bottom: 2px solid #333;
  padding-bottom: 5px;
  display: inline-block;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.choice-item {
  padding: 12px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  box-sizing: border-box;
  color: #333;
}
.choice-item:hover {
  background: #f0f0f0;
}
.choice-item.active {
  border-color: #808080;
  background: #808080 !important;
  color: #fff;
}
.sim-action-area {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
}
.sim-action-area .button2 {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  margin: 0;
  cursor: pointer;
  padding: 18px 10px;
}
.button2 {
  display: block;
  background-color: var(--accent-color);
  color: #fff;
  font-size: 16px;
  font-weight: normal;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  border: 2px solid var(--accent-color);
}
.button2:visited {
  color: #fff;
}
.button2:hover {
  background-color: #fff;
  color: var(--accent-color);
}
.button2:visited:hover {
  background-color: #fff;
  color: var(--accent-color);
}
.sim-order-notes {
  margin: 10px 0 20px;
  padding-left: 20px;
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  text-align: left;
  list-style-type: disc;
}
.simulator-notes {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
  text-align: left;
}
.simulator-notes p {
  font-size: 12px;
  color: #777;
  margin-bottom: 6px;
  line-height: 1.5;
}

/* ==========================================================================
   拡大モーダル
   ========================================================================== */
.sim-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.sim-modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  aspect-ratio: 4 / 3;
  background: transparent;
}
.sim-modal-content img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (max-width: 850px) {
  .simulator-container {
    flex-direction: column;
    gap: 30px;
  }
  .preview-column {
    position: static;
    width: 100%;
    min-width: auto;
  }
  .control-area {
    width: 100%;
    min-width: auto;
  }
  .choice-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .choice-item {
    min-height: 40px;
    padding: 6px 4px;
    font-size: 12px;
  }
  .preview-area {
    max-width: 500px;
  }
  #selection-summary {
    font-size: 18px;
  }
}

/* ==========================================================================
   モバイル時（1023px以下）はモーダル拡大機能を無効化
   ========================================================================== */
@media screen and (max-width: 1023px) {
  .preview-area.is-complete {
    cursor: default !important;
  }
  .preview-area.is-complete::after {
    display: none !important;
  }
}