#contents {
  z-index: 0;
  text-align: center;
  margin: 0 0 10px 0;
  padding: 5px 30px;
  background-color: #0a1c32;
}
#contents p{
  font-size:100%;
  text-align: center;
  color: #ffffff;
  margin: 4px 0;
}

#contents_1 {
  z-index: 0;
  font-size: 1.25rem;
}
.page-txt {
  margin: 30px 0 0;
  height: 2000px;
}
/*#modal-open {
  color: #3572b0;
}*/
#modal-open_1 {
  color: #3572b0;
}
#modal-main {
  display: none;
  width: 960px;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #666666;
  position: fixed;
  z-index: 2;
}
#modal-bg {
  display: none;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
}
#modal-main_1 {
  display: none;
  width: 960px;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #666666;
  position: fixed;
  z-index: 2;
}
#modal-bg_1 {
  display: none;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
}
@media only screen and (max-width:768px) {
  #modal-main {
    width: 100%;
    height: auto;
  }
  #modal-main_1 {
    width: 100%;
    height: auto;
  }
}

/* =========================================================
   男着物セット診断 モーダルスタイル
========================================================= */
:root {
  --ks-ink: #2b3a55;
  --ks-ink-soft: #5b6b84;
  --ks-paper: #ece5d6;
  --ks-paper-card: #f7f3ea;
  --ks-line: #cfc4a8;
  --ks-accent: #a6373c;
  --ks-accent-soft: #c98b3a;
  --ks-white: #fffdf8;
}

/* ページ上のバナー */
.ks-diag-banner-wrap {
  margin: 15px auto;
  padding: 0 10px;
  max-width: 800px;
}
.ks-diag-open-btn {
  display: block;
  width: 100%;
  background: var(--ks-white);
  border: 2px solid var(--ks-accent);
  border-radius: 6px;
  padding: 14px 16px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(43, 58, 85, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ks-diag-open-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 4px rgba(43, 58, 85, 0.12);
}
.ks-diag-badge {
  display: inline-block;
  background: var(--ks-accent);
  color: #ffffff;
  font-size: 20px;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 10px;
  margin-bottom: 15px;
  letter-spacing: 0.05em;
}
.ks-diag-title {
  display: block;
  font-size: 20px;
  font-weight: bold;
  color: var(--ks-ink);
  margin-bottom: 4px;
}
.ks-diag-sub {
  display: block;
  font-size: 12px;
  color: var(--ks-ink-soft);
}

/* モーダル外枠・オーバーレイ */
.ks-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.ks-modal.is-show {
  opacity: 1;
  visibility: visible;
}
.ks-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 36, 48, 0.7);
  backdrop-filter: blur(2px);
}
.ks-modal-container {
  position: relative;
  width: 92%;
  max-width: 480px;
  max-height: 90vh;
  background: var(--ks-paper);
  border-radius: 8px;
  overflow-y: auto;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  color: var(--ks-ink);
}

/* モーダルヘッダー */
.ks-modal-header {
  position: sticky;
  top: 0;
  background: var(--ks-white);
  border-bottom: 1px solid var(--ks-line);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}
.ks-modal-eyebrow {
  font-size: 12px;
  color: var(--ks-ink-soft);
  letter-spacing: 0.05em;
  font-weight: bold;
}
.ks-modal-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--ks-ink-soft);
  cursor: pointer;
  padding: 0 6px;
}

/* ボディ・プログレスバー */
.ks-modal-body {
  padding: 20px 18px 24px;
}
.ks-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}
.ks-progress span {
  height: 4px;
  flex: 1;
  background: var(--ks-line);
  border-radius: 2px;
  overflow: hidden;
}
.ks-progress span i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--ks-accent);
  transition: width 0.3s ease;
}

/* 質問カード */
.ks-card {
  background: var(--ks-paper-card);
  border: 1px solid var(--ks-line);
  border-radius: 6px;
  padding: 22px 18px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
}
.ks-q-label {
  font-size: 12px;
  color: var(--ks-accent);
  font-weight: bold;
  margin-bottom: 8px;
}
.ks-q-text {
  font-size: 18px;
  font-weight: bold;
  line-height: 1.5;
  margin-bottom: 6px;
  color: var(--ks-ink);
}
.ks-q-hint {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ks-ink-soft);
  margin-bottom: 16px;
}

/* 選択肢ボタン */
.ks-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
button.ks-choice {
  padding: 13px 15px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid var(--ks-ink);
  background: var(--ks-white);
  color: var(--ks-ink);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: left;
}
button.ks-choice:hover, button.ks-choice:active {
  background: var(--ks-ink);
  color: var(--ks-white);
}
button.ks-choice small {
  display: block;
  font-size: 11px;
  font-weight: normal;
  opacity: 0.85;
  margin-top: 3px;
}

/* 戻るナビゲーション */
.ks-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 12px;
}
.ks-nav button {
  background: none;
  border: none;
  color: var(--ks-ink-soft);
  cursor: pointer;
  padding: 6px 0;
  text-decoration: underline;
}
.ks-nav button:disabled {
  visibility: hidden;
}

/* 結果表示パーツ */
.ks-result-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ks-accent-soft);
  border: 1px solid var(--ks-accent-soft);
  padding: 2px 8px;
  border-radius: 100px;
  margin-bottom: 10px;
  font-weight: bold;
}
.ks-result-title {
  font-size: 19px;
  font-weight: bold;
  line-height: 1.5;
  margin: 0 0 4px;
  color: var(--ks-ink);
}
.ks-result-sub {
  font-size: 12px;
  color: var(--ks-ink-soft);
  margin-bottom: 12px;
}
.ks-result-points {
  font-size: 12px;
  color: var(--ks-accent-soft);
  font-weight: bold;
  margin-bottom: 6px;
}
.ks-items {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}
.ks-item {
  background: var(--ks-white);
  border: 1px solid var(--ks-line);
  border-radius: 3px;
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.5;
}
.ks-result-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ks-ink-soft);
  margin-bottom: 14px;
}
.ks-result-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ks-ink);
  background: var(--ks-paper);
  border-radius: 4px;
  padding: 9px 12px;
  margin-bottom: 12px;
}
.ks-result-note.soft {
  color: var(--ks-ink-soft);
  font-size: 11px;
}

/* CTAボタン */
.ks-cta {
  display: block;
  text-align: center;
  background: var(--ks-accent);
  color: #ffffff !important;
  text-decoration: none;
  font-weight: bold;
  padding: 14px;
  border-radius: 4px;
  margin: 6px 0 10px;
  font-size: 14px;
  box-shadow: 0 3px 8px rgba(166, 55, 60, 0.25);
}
.ks-cta.pending {
  background: var(--ks-white);
  color: var(--ks-ink-soft) !important;
  border: 1px dashed var(--ks-line);
  font-weight: normal;
  font-size: 13px;
  line-height: 1.6;
  box-shadow: none;
}
.ks-cta.secondary {
  background: var(--ks-white);
  color: var(--ks-ink) !important;
  border: 1px solid var(--ks-ink);
  font-weight: 500;
  font-size: 13px;
  box-shadow: none;
}

/* 補足リンク・サイズ・オーダー案内 */
.ks-sublink {
  display: block;
  margin-top: 12px;
  background: none;
  border: none;
  padding: 0;
  color: var(--ks-accent);
  font-size: 12px;
  line-height: 1.6;
  text-decoration: underline;
  cursor: pointer;
  text-align: left;
}
.ks-size-notice {
  font-size: 11px;
  background: var(--ks-white);
  border: 1px solid var(--ks-line);
  border-radius: 4px;
  padding: 8px 10px;
  margin-bottom: 12px;
  line-height: 1.6;
  color: var(--ks-ink-soft);
}
.ks-size-notice a {
  color: var(--ks-accent);
  font-weight: bold;
  text-decoration: underline;
}
.ks-custom {
  border-top: 1px solid var(--ks-line);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--ks-ink-soft);
}
.ks-custom b {
  display: block;
  color: var(--ks-ink);
  font-size: 12px;
  margin-bottom: 2px;
}
.ks-restart {
  display: block;
  text-align: center;
  background: none;
  border: 1px solid var(--ks-line);
  color: var(--ks-ink-soft);
  padding: 12px;
  border-radius: 4px;
  width: 100%;
  font-size: 13px;
  cursor: pointer;
  margin-top: 12px;
}