@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500&family=Noto+Serif+JP:wght@600;700&display=swap");

:root {
  --moss: #3b5e3a;
  --moss-lt: #4e7a4c;
  --red: #b50000;
  --sand: #f5f0e8;
  --cream: #fdfaf4;
  --amber: #b07d3a;
  --amber-lt: #d4a05a;
  --text: #2c2416;
  --muted: #6b5e4a;
  --divider: #d8cdb8;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* デフォルト（モバイル）表示 */
.sp-only {
  display: inline !important;
}
.pc-only {
  display: none !important;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  background: var(--cream);
  color: var(--text);
  font-size: clamp(16px, 1.5vw + 10px, 18px);
  line-height: 1.8;
}

/* ─── Header (画像デザインの再現) ─── */
header {
  background-color: var(--red);
  position: relative;
  overflow: hidden;
}

/* ヘッダーの中に設けた、最大幅を制限するセクション */
.header-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

/* ヘッダー内のテキスト用セクション */
.header-text-section {
  position: relative;
  z-index: 2;
  color: var(--white);
  font-family: "Noto Serif JP", serif;
  width: 100%;
  padding: 30px 16px;
  text-align: center;
}

.program-title {
  font-size: clamp(28px, 4vw + 16px, 48px);
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.program-desc {
  font-size: clamp(14px, 1.5vw + 8px, 18px);
  margin-bottom: 20px;
  line-height: 1.6;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.broadcast-time {
  font-size: clamp(16px, 1.5vw + 8px, 21px);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* ヘッダー内の画像用セクション */
.header-image-section {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  z-index: 1;
  pointer-events: none;
}

/* 右側の漢方素材イメージ画像 */
.herb-image {
  position: absolute;
  top: 50%;
  right: -80px; /* スマホでは右端に大きく見切れさせる */
  transform: translateY(-50%);
  width: 220px;
  height: 220px;
  background-image: url(../img/bg-kanpou.png);
  background-size: cover;
  background-position: center;
  filter: brightness(0.8);
}

/* ─── Main ─── */
main {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 0 40px;
}

/* ─── Section card ─── */
.card {
  background: var(--white);
  margin: 16px 16px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  display: flex;
  flex-direction: column;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sand);
  padding: 14px 14px; /* 360px画面でも収まるよう左右パディングを微調整 */
  border-bottom: 1px solid var(--divider);
}
.card-icon {
  width: 28px; /* 360px画面向けに少し小さく */
  height: 28px;
  background: var(--moss);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-icon svg {
  color: #fff;
  width: 14px; /* アイコンサイズに合わせて縮小 */
  height: 14px;
}
.card-title {
  font-family: "Noto Serif JP", serif;
  font-size: clamp(16px, 4.5vw, 22px);
  font-weight: 600;
  color: var(--moss);
  letter-spacing: 0.02em; /* 字間も少し詰める */
}
.card-body {
  padding: 20px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ─── About ─── */
.about-text {
  font-size: clamp(16px, 1.5vw + 10px, 18px);
  color: var(--muted);
  line-height: 1.9;
}
.about-text strong {
  color: var(--text);
  font-weight: 500;
}
/* ─── About (出演者画像のレイアウト) ─── */
.about-card-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 出演者画像を囲む枠。16:9を維持します */
.about-image {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9; 
  background: var(--sand);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.cast-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* ─── Cast ─── */
.cast-list {
  list-style: none;
}
.cast-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
  font-size: clamp(16px, 1.5vw + 10px, 18px);
}
.cast-list li:last-child {
  border-bottom: none;
}
.cast-role,
.contact-label {
  font-size: clamp(13px, 1vw + 8px, 14px);
  background: var(--sand);
  color: var(--muted);
  border: 1px solid var(--divider);
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
}
.cast-name {
  color: var(--text);
  font-weight: 500;
}

/* ─── Letter / Contact ─── */
.letter-desc {
  font-size: clamp(16px, 1.5vw + 10px, 18px);
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 20px;
}
.btn {
  display: block;
  text-align: center;
  background: var(--moss);
  color: #fff;
  text-decoration: none;
  font-size: clamp(16px, 1.5vw + 10px, 18px);
  font-weight: 500;
  padding: 14px;
  border-radius: 8px;
  transition: background 0.2s;
  margin-top: auto;
}
.btn:hover {
  background: var(--moss-lt);
}
.btn-amber {
  background: var(--amber);
}
.btn-amber:hover {
  background: var(--amber-lt);
}

/* ─── Pharmacy contact ─── */
.contact-rows {
  list-style: none;
}
.contact-rows li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
  font-size: clamp(16px, 1.5vw + 10px, 18px);
}
.contact-rows li:last-child {
  border-bottom: none;
}
.contact-value {
  color: var(--text);
  font-weight: 500;
  word-break: break-word;
}
.contact-value a {
  color: var(--moss);
  text-decoration: none;
}
.contact-value a:hover {
  text-decoration: underline;
}
.contact-note {
  display: block;
  font-size: clamp(13px, 1vw + 8px, 14px);
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}

/* ─── はがきデザイン ─── */
.hagaki-wrapper {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
  width: 100%;
}
.hagaki-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 260px; /* ハガキの最大幅 */
}
.hagaki-card {
  width: 100%;
  aspect-ratio: 100 / 148; /* 官製はがきの縦横比 */
  background: #fff;
  border: 1px solid #5d4037; /* 茶色の枠線 */
  position: relative;
  padding: 20px;
  font-family: "Noto Sans JP", sans-serif;
  color: #000;
}
.hagaki-stamp {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 46px;
  height: 60px;
  border: 1px solid #3b5e3a; /* 切手の緑枠 */
  color: #000;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.4;
  padding: 2px;
}
.hagaki-zip {
  position: absolute;
  top: 28px;
  left: 76px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.hagaki-address {
  margin-top: 100px;
  margin-left: 10px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.6;
}
.hagaki-card.back-side {
  padding: 30px 24px;
}
.hagaki-list {
  list-style: none;
  font-size: 20px;
  font-weight: 800;
  line-height: 2.3;
}
.hagaki-caption {
  margin-top: 14px;
  font-size: 20px;
  font-weight: 800;
  color: #000;
  letter-spacing: 0.05em;
}

/* ─── Footer ─── */
footer {
  text-align: center;
  padding: 24px 16px 32px;
  font-size: clamp(13px, 1vw + 8px, 15px);
  color: var(--muted);
}
/* ─── Leaf deco ─── */
.leaf-deco {
  text-align: center;
  padding: 20px 0 4px;
  opacity: 0.35;
}

/* ========================================================
       メディアクエリ: PC・タブレット向けレイアウト (768px以上)
       ======================================================== */
@media (min-width: 768px) {
  .sp-only {
    display: none !important;
  }
  .pc-only {
    display: inline !important;
  }
  .header-container {
    flex-direction: row;
    align-items: stretch;
    min-height: 240px;
  }
  .header-text-section {
    width: 70%;
    padding: 40px 24px 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
  }
  .broadcast-time {
    white-space: nowrap; /* PCでは絶対に改行させず強制的に1行にする */
  }
  .header-image-section {
    position: relative;
    width: 35%;
    overflow: visible;
  }
  .herb-image {
    /* .header-container(最大900px)の右端から少しだけはみ出させる設定 */
    right: -30px;
    width: 320px;
    height: 320px;
    filter: brightness(1); /* PC版では明るさを元に戻す */
  }

  main {
    max-width: 900px;
    padding: 40px 24px 60px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .card {
    margin: 0;
  }
  .card:nth-of-type(1) {
    grid-column: 1 / -1;
  }
  .hagaki-section {
    grid-column: 1 / -1; /* ハガキセクションもPCで全幅に */
  }
  .card-head {
    padding: 18px 24px;
  }
  .card-icon {
    width: 32px;
    height: 32px;
  }
  .card-icon svg {
    width: 15px;
    height: 15px;
  }
  .card-title {
    white-space: nowrap; /* タイトルもPCで2カラムになった際におかしくならないよう1行化 */
    font-size: clamp(15px, 2vw + 6px, 18px); /* 1行に収まるように微調整 */
  }
  .card-body {
    padding: 24px;
  }
  /* PC表示時の出演者画像のレイアウト（左右2カラム） */
  .about-card-body {
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }
  .about-content {
    flex: 1; /* 左側のテキストエリア */
  }
  .about-image {
    width: 45%; /* 右側に画像を配置し、幅を45%に設定 */
    flex-shrink: 0;
  }
  /* PC表示時はハガキを横に2枚並べる */
  .hagaki-wrapper {
    flex-direction: row;
    justify-content: center;
    gap: 40px;
  }
}