/* --- 基本設定 --- */

:root {
  --bg-color: #E6E1D7;
  --border-color: #333333;
  --text-main: #333333;
  --text-sub: #707070;
  --text-thin: #adadad;
  --accent-red: #dc3241;
}

body {
  background-color: var(--bg-color);
  background-image: url(../images/bg.jpg);
  background-position: 50%;
  background-size: auto;
  font-family: "YakuHanJPs", "Manrope", "IBM Plex Sans JP", sans-serif;
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  box-sizing: border-box;
}

h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.5px;
  margin: 0 0 10px 0;
}

p {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 2.0;
  letter-spacing: 0.8px;
  text-align: justify;
  margin: 0;
}

a {
  text-decoration: none;
  color: inherit;
}


/* テキストリンク */
.text-link {
  position: relative;
  display: inline-block;
  text-decoration: none;
}

.text-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(1);
}

.text-link:hover::after {
  animation: line-slide 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes line-slide {
  0% {
    transform: scaleX(1);
    transform-origin: right center;
  }

  49.9% {
    transform: scaleX(0);
    transform-origin: right center;
  }

  50% {
    transform: scaleX(0);
    transform-origin: left center;
  }

  100% {
    transform: scaleX(1);
    transform-origin: left center;
  }
}


/* リストマーカー */
.custom-list {
  list-style: none;
  padding: 0;
}

.custom-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 2.0;
  letter-spacing: 0.5px;
  text-align: justify;
}

.custom-list li::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background-color: #DC3241;
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 11px;
}


/* --- グリッド全体・上部 --- */

#page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px 0 40px;
}

.grid-container,
.contact-section {
  display: grid;
  gap: 1px;
  background-color: var(--border-color);
  border: 1px solid var(--border-color);
  width: 100%;
  box-sizing: border-box;
}

.grid-container {
  grid-template-columns: repeat(3, 1fr);
}

.contact-section {
  grid-template-columns: 1fr 1fr;
  border-top: none;
  /* 上のグリッドの底辺と重なるため消す */
}

.grid-item,
.contact-left,
.contact-right {
  background-image: url(../images/bg.jpg);
  background-position: 50%;
  background-size: auto;
  padding: 40px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.grid-item {
  min-height: 320px;
}

/* 左上の大きな要素 (2カラム分の幅を持たせる) */
.item-large {
  grid-column: span 2;
}

.image-wrapper {
  margin-bottom: 3rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-grow: 1;
}

.image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.podcast-links {
  display: inline;
  margin-right: 12px;
}

/* テキストを常に要素の上部に配置する */
.text-content {
  margin-bottom: auto;
}

.grid-decorative {
  border-top: 1px solid var(--border-color);
  margin: 3px 0;
  position: relative;
}



@media (max-width: 1024px) {

  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-section {
    grid-template-columns: 1fr;
  }

  .item-large {
    grid-column: span 2;
  }

}


@media (max-width: 767px) {

  #page-wrapper {
    padding: 24px;
  }

  .grid-container {
    grid-template-columns: 1fr;
  }

  .item-large {
    grid-column: span 1;
  }

  .grid-item,
  .contact-left,
  .contact-right {
    padding: 24px 24px 30px 24px;
    min-height: auto;
  }

  .image-wrapper {
    margin-bottom: 24px;
  }

}


/* --- プレイヤー --- */

.episode-card {
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.episode-card:last-child {
  padding: 0;
  border-bottom: none;
}

.episode-body {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding-top: 15px;
}

.episode-head {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.episode-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  color: var(--text-sub);
  font-size: 12px;
  letter-spacing: 0.5px;
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-sub);
  flex: 0 0 auto;
}

.episode-name-wrap {
  overflow: hidden;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.episode-name {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  white-space: nowrap;
  width: 100%;
  min-width: 0;
  display: flex;
}

.episode-name-text {
  white-space: nowrap;
  flex-shrink: 0;
}

.episode-name-wrap.is-marquee .episode-name {
  width: fit-content;
  gap: 32px;
  /* 1周目と2周目の間の余白（js内のgapと同じ値にする） */
  will-change: transform;
  animation-name: marquee-scroll;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(var(--marquee-distance, 0px) * -1));
  }
}


.player-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

button {
  font: inherit;
  border: 0;
}

.play-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: var(--bg-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  cursor: pointer;
  transition: background-color 0.2s;
}

.play-btn:hover {
  background-color: var(--text-main);
}

.play-btn svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
  display: block;
}

.play-btn[data-state="pause"] .icon-play {
  display: none;
}

.play-btn[data-state="play"] .icon-pause {
  display: none;
}

.timeline-wrap {
  min-width: 0;
  width: 100%;
  display: grid;
}

.timeline-control {
  position: relative;
  width: 100%;
  height: 12px;
  display: flex;
  align-items: center;
  min-width: 0;
}

.timeline {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.15);
  overflow: hidden;
  pointer-events: none;
}

.timeline-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--text-main);
  border-radius: inherit;
  transition: width 0.08s linear;
}

/* スライダー本体のデフォルトスタイルをリセット */
.timeline-button {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

/* iPhone（WebKit系）の「透明な丸」を消す */
.timeline-button::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  margin: 0;
}

.timeline-button::-moz-range-thumb {
  width: 0;
  height: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.timeline-button {
  appearance: none;
  width: 100%;
  height: 16px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.timeline-button:focus-visible {
  outline: none;
}

.timeline-button::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
  border: 0;
}

.timeline-button::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
  border: 0;
}

.timeline-button::-webkit-slider-runnable-track {
  height: 16px;
  background: transparent;
}

.timeline-button::-moz-range-track {
  height: 16px;
  background: transparent;
  border: 0;
}

.timeline-times {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.timeline-current,
.timeline-duration {
  white-space: nowrap;
}

.episode-empty {
  padding: 24px 0;
  color: var(--text-sub);
  font-size: 12px;
}


@media (max-width: 767px) {

  .player-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

}


/* --- グリッド下部 --- */

.privacy-heading {
  color: var(--text-main);
  border-bottom: 2px solid rgba(0, 0, 0, 0.25);
  padding-bottom: 10px;
  margin: 40px 0 0 0;
}


/* --- アコーディオン --- */

.accordion-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  padding: 14px 0;
}

.accordion-header {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: color 0.2s;
}

.accordion-header h3 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.8px;
}

/* トグルアイコン */
.toggle-icon {
  margin-left: auto;
  color: var(--text-sub);
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.accordion-header:hover .toggle-icon {
  opacity: 1;
}

.accordion-item.is-open .toggle-icon {
  transform: rotate(45deg);
  opacity: 1;
}

.accordion-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  margin-bottom: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.accordion-content .custom-list {
  margin: 20px 0;
}

.accordion-item.is-open .accordion-content {
  opacity: 1;
  margin-top: 10px;
}


@media (max-width: 767px) {

  .accordion-content p {
    font-size: 12px;
    line-height: 1.8;
  }

  .accordion-content .custom-list li {
    gap: 6px;
    font-size: 12px;
    line-height: 1.8;
  }

  .accordion-content .custom-list li::before {
    width: 4px;
    height: 4px;
    border-radius: 1px;
    margin-top: 9px;
  }

}


/* --- メールフォーム --- */

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.form-group label.radio-label {
  font-weight: 500;
}

.required {
  background-color: #d1cfc9;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 5px;
  color: var(--text-sub);
  font-weight: 700;
  letter-spacing: 1px;
}

.form-control {
  appearance: none;
  outline: none;
  box-sizing: border-box;
  border-radius: 4px;
  border: none;
  width: 100%;
  padding: 16px;
  background: #f2f0eb;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  letter-spacing: 0.5px;
  line-height: 2.0;
}

.form-control::placeholder {
  color: var(--text-thin);
}

.radio-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.radio-label input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 50%;
  margin-right: 5px;
  outline: none;
  position: relative;
  background-color: var(--bg-color);
  cursor: pointer;
  transition: border-color 0.2s;
}

/* 選択時の状態 */
.radio-label input[type="radio"]:checked {
  border-color: var(--text-main);
}

.radio-label input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: var(--text-main);
  border-radius: 50%;
}

.age-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 入力欄の幅を数字に合わせて少し狭くする */
.age-input-wrapper input[type="number"] {
  width: 100px;
}

/* 単位（歳）のテキスト */
.age-unit {
  font-size: 14px;
  color: var(--text-main);
}

select.form-control {
  appearance: none;
  padding: 16px 40px 16px 16px;
  background-image: url("../images/select_arrow.svg");
  background-repeat: no-repeat;
  background-position: right 1rem top 50%;
  background-size: 0.65rem auto;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-sub);
  letter-spacing: 0.5px;
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  letter-spacing: 0.5px;
  line-height: 2.0;
}

.form-note {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 10px;
  line-height: 1.6;
}

.submit-btn {
  width: 100%;
  background-color: #1f1f1f;
  color: var(--bg-color);
  border: none;
  padding: 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  transition: background-color 0.2s;
}

.submit-btn:hover {
  background-color: #0a0a0a;
}

.arrow-box {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-left: 10px;
}

.arrow-box svg {
  width: 16px;
  height: auto;
  display: block;
  fill: var(--bg-color);
  transition: fill 0.4s, transform 0s;
}

@keyframes arrowLoop {
  0% {
    transform: translateX(0);
    opacity: 1;
  }

  40% {
    transform: translateX(120%);
    opacity: 0;
  }

  50% {
    transform: translateX(-120%);
    opacity: 0;
  }

  60% {
    opacity: 1;
  }

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

.submit-btn:hover .arrow-box svg {
  animation: arrowLoop 0.5s cubic-bezier(0.5, 0, 0.2, 1) forwards;
}

/* エラー時のスタイル */
.form-control.is-error,
input[type="radio"].is-error {
  border: 1px solid rgba(220, 50, 65, 0.8) !important;
}

.error-text {
  color: var(--accent-red);
  font-size: 0.7rem;
  margin-left: auto;
}


/* エラー時のスタイル */
.is-sending #btn-text {
  animation: blink 1.2s infinite ease-in-out;
}

.is-sending .arrow-box {
  display: none;
}

@keyframes blink {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }

  100% {
    opacity: 1;
  }
}


/* ポップアップ（トースト通知）のスタイル */
.toast-popup {
  position: fixed;
  display: flex;
  align-items: center;
  gap: 20px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  padding: 20px 30px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  z-index: 1000;
  pointer-events: none;
  box-sizing: border-box;
}

.toast-popup.is-visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.toast-popup.is-success,
.toast-popup.is-error {
  background-color: #f7f6f3;
  color: var(--text-main);
  border: 1px solid #f2f0eb;
}

.toast-close {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.toast-close:hover {
  opacity: 1;
}


@media (max-width: 767px) {

  .toast-popup {
    flex-direction: column;
    gap: 0;
    width: auto;
    min-width: 75%;
    padding: 15px 20px;
  }

}


/* --- フッター --- */

footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px 60px 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-left {
  display: flex;
  gap: 30px;
}

.footer-links {
  margin-top: -8px;
}

.copyright {
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  letter-spacing: 1.0px;
  margin-top: -8px;
}

@media (max-width: 767px) {

  footer {
    padding: 24px 24px 60px 24px;
    display: flex;
    flex-direction: column;
  }

  .footer-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .footer-links {
    margin: 0;
  }

  .copyright {
    font-size: 10px;
    margin-top: 20px;
  }

}