@charset "UTF-8";

/* =========================================
   App Store版 九星気学講座
   ========================================= */

/* =========================
   講座ページ全体
========================= */

.lecture-container {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 20px 16px calc(34px + env(safe-area-inset-bottom));

  color: #2d2118;
  line-height: 1.9;
}

/* =========================================
   講座ページ専用：ヘッダー・フッター固定補正
   ========================================= */

/* ヘッダーを講座ページでも固定する */
body.ios-app-body .ios-app-header,
body.ios-app-body .pwa-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1000 !important;
}

/* footer_legal.jsp を講座ページでも下部固定にする */
body.ios-app-body .ios-app-footer,
body.ios-app-body .pwa-footer,
body.ios-app-body .footer-legal {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 900 !important;
}

/* 固定ヘッダー・固定フッター分、本文に逃げを作る */
.lecture-container {
  padding-top: calc(82px + env(safe-area-inset-top)) !important;
  padding-bottom: calc(104px + env(safe-area-inset-bottom)) !important;
}

/* footer_legal.jsp の背景を講座ページでも明示する */
body.ios-app-body .ios-app-footer,
body.ios-app-body .footer-legal,
body.ios-app-body .pwa-footer {
  background: rgba(255, 250, 242, 0.98) !important;
  border-top: 1px solid rgba(90, 60, 30, 0.14) !important;
  box-shadow: 0 -8px 24px rgba(58, 36, 16, 0.10) !important;
  color: #2d2118 !important;
  backdrop-filter: blur(10px);
}

/* =========================================
   講座ページ footer_legal コンパクト表示
   ========================================= */

body.ios-app-body .ios-app-footer,
body.ios-app-body .footer-legal,
body.ios-app-body .pwa-footer {
  padding:
    10px
    14px
    calc(8px + env(safe-area-inset-bottom)) !important;

  background: rgba(255, 250, 242, 0.98) !important;
  border-top: 1px solid rgba(90, 60, 30, 0.14) !important;
  box-shadow: 0 -8px 24px rgba(58, 36, 16, 0.10) !important;

  color: #2d2118 !important;
  line-height: 1.35 !important;
}

/* footer内のタイトル */
body.ios-app-body .ios-app-footer h2,
body.ios-app-body .ios-app-footer h3,
body.ios-app-body .footer-legal h2,
body.ios-app-body .footer-legal h3,
body.ios-app-body .pwa-footer h2,
body.ios-app-body .pwa-footer h3 {
  margin: 0 0 5px !important;
  font-size: 15px !important;
  line-height: 1.25 !important;
}

/* footer内の説明文・コピーライト */
body.ios-app-body .ios-app-footer p,
body.ios-app-body .footer-legal p,
body.ios-app-body .pwa-footer p {
  margin: 3px 0 !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
}

/* footer内リンク行 */
body.ios-app-body .ios-app-footer a,
body.ios-app-body .footer-legal a,
body.ios-app-body .pwa-footer a {
  color: #5b3518 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  text-decoration: none !important;
}

/* リンクの区切り線周辺の詰め */
body.ios-app-body .ios-app-footer nav,
body.ios-app-body .footer-legal nav,
body.ios-app-body .pwa-footer nav {
  margin: 4px 0 !important;
  line-height: 1.35 !important;
}





.lecture-container p,
.lecture-container li {
  color: #3a2d22;
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.02em;
}

.lecture-container p {
  margin: 0 0 15px;
}

.lecture-container p:last-child {
  margin-bottom: 0;
}

.lecture-container strong {
  color: #5b3518;
  font-weight: 900;
}

.lecture-container em {
  font-style: normal;
  color: #7a4b00;
  font-weight: 800;
}

.lecture-container a {
  color: #5b3518;
  text-decoration: none;
  font-weight: 900;
  -webkit-tap-highlight-color: rgba(91, 53, 24, 0.16);
}

.lecture-container a:hover,
.lecture-container a:focus {
  text-decoration: underline;
}

/* =========================
   ヒーロー
========================= */

.lecture-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;

  margin: 20px 0 18px;
  padding: 22px 20px;

  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 232, 0.96));
  border: 1px solid rgba(90, 60, 30, 0.13);
  box-shadow: 0 14px 32px rgba(58, 36, 16, 0.12);
}

.lecture-hero__text {
  min-width: 0;
}

.lecture-hero__text h1 {
  margin: 0 0 14px;

  color: #2d2118;
  font-size: clamp(28px, 6.8vw, 42px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.lecture-hero__text p {
  margin: 0 0 13px;
  color: #70645a;
  font-size: 14px;
  line-height: 1.85;
}

.lecture-hero__text p:last-child {
  margin-bottom: 0;
}

.lecture-hero__text strong {
  color: #5b3518;
  background: linear-gradient(transparent 62%, rgba(210, 164, 81, 0.28) 62%);
}

.lecture-hero__image {
  width: 190px;
  text-align: center;
}

.lecture-hero__image img {
  display: block;
  width: 100%;
  max-width: 210px;
  height: auto;

  border-radius: 20px;
  border: 1px solid rgba(90, 60, 30, 0.12);
  box-shadow: 0 10px 24px rgba(58, 36, 16, 0.14);
}

/* =========================
   章の導入ボックス
========================= */

.lecture-intro-box {
  margin: 18px 0;
  padding: 18px;

  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(90, 60, 30, 0.13);
  box-shadow: 0 14px 32px rgba(58, 36, 16, 0.10);
}

.lecture-intro-box p {
  color: #3a2d22;
}

/* =========================
   目次
========================= */

.lecture-toc {
  margin: 18px 0;
  padding: 18px;

  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(90, 60, 30, 0.13);
  box-shadow: 0 14px 32px rgba(58, 36, 16, 0.10);
}

.lecture-toc h2 {
  margin: 0 0 14px;
}

.lecture-toc ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.lecture-toc li {
  margin: 0 0 10px;
  padding: 0;
}

.lecture-toc li:last-child {
  margin-bottom: 0;
}

.lecture-toc li a {
  position: relative;

  display: block;
  padding: 13px 38px 13px 14px;

  border-radius: 16px;
  background: rgba(255, 250, 242, 0.86);
  border: 1px solid rgba(80, 55, 30, 0.11);

  color: #2d2118;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.55;
  box-shadow: 0 4px 12px rgba(58, 36, 16, 0.05);
}

.lecture-toc li a::after {
  content: "›";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);

  color: #8a5a2b;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.lecture-toc li a:hover,
.lecture-toc li a:focus {
  text-decoration: none;
  background: rgba(255, 245, 220, 0.96);
}

.lecture-toc-current {
  position: relative;

  display: block;
  padding: 13px 70px 13px 14px;

  border-radius: 16px;
  background: #2d2118;
  border: 1px solid #2d2118;

  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.55;

  box-shadow: 0 8px 18px rgba(45, 33, 24, 0.16);
}

.lecture-toc-current::after {
  content: "現在";
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);

  padding: 4px 8px;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;

  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}


/* =========================
   セクション共通
========================= */

.lecture-section {
  margin: 18px 0;
  padding: 20px 18px;

  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(90, 60, 30, 0.13);
  box-shadow: 0 14px 32px rgba(58, 36, 16, 0.10);
}

.lecture-section::after {
  content: "";
  display: block;
  clear: both;
}

.lecture-section h2,
.lecture-toc h2 {
  position: relative;

  margin: 0 0 16px;
  padding-left: 13px;

  color: #2d2118;
  font-size: clamp(19px, 4.2vw, 23px);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.lecture-section h2::before,
.lecture-toc h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;

  width: 5px;
  border-radius: 999px;
  background: #8a5a2b;
}

.lecture-section h2::after,
.lecture-toc h2::after {
  content: "";
  display: block;

  width: 80px;
  height: 3px;
  margin-top: 9px;

  border-radius: 999px;
  background: linear-gradient(to right, #8a5a2b, rgba(210, 164, 81, 0.38));
}

.lecture-section h3,
.lecture-container h3 {
  margin: 24px 0 10px;
  padding: 10px 12px;

  border-radius: 14px;
  background: rgba(255, 250, 242, 0.9);
  border-left: 5px solid #8a5a2b;

  color: #2d2118;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.55;
}

.lecture-section h3::after,
.lecture-container h3::after {
  content: "";
  display: block;

  width: 96px;
  height: 2px;
  margin-top: 7px;

  border-radius: 999px;
  background: linear-gradient(to right, #8a5a2b, transparent);
}

.lecture-section ul,
.lecture-section ol {
  margin: 16px 0 18px 1.2em;
  padding: 0;
}

.lecture-section li {
  margin-bottom: 8px;
}

.lecture-section li:last-child {
  margin-bottom: 0;
}

/* =========================
   画像
========================= */

.lecture-image {
  float: right;
  width: 210px;
  max-width: 40%;
  margin: 4px 0 16px 20px;
  text-align: center;
}

.lecture-image img {
  display: block;
  width: 100%;
  max-width: 210px;
  height: auto;

  border-radius: 18px;
  border: 1px solid rgba(90, 60, 30, 0.12);
  box-shadow: 0 10px 22px rgba(58, 36, 16, 0.12);
}

/* =========================
   補足ボックス
========================= */

.lecture-note,
.lecture-point,
.lecture-caution {
  margin: 18px 0;
  padding: 16px 15px;

  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(58, 36, 16, 0.06);
}

.lecture-note {
  background: rgba(247, 251, 255, 0.92);
  border: 1px solid rgba(80, 120, 170, 0.22);
  border-left: 6px solid #6c99cf;
}

.lecture-point {
  background: rgba(255, 253, 244, 0.94);
  border: 1px solid rgba(210, 164, 81, 0.28);
  border-left: 6px solid #c8a936;
}

.lecture-caution {
  background: rgba(255, 248, 246, 0.94);
  border: 1px solid rgba(212, 135, 118, 0.28);
  border-left: 6px solid #d48776;
}

.lecture-note p,
.lecture-point p,
.lecture-caution p {
  margin-bottom: 0;
}

.lecture-note strong,
.lecture-point strong,
.lecture-caution strong {
  color: #2d2118;
}

/* =========================
   講座ナビゲーション
========================= */

.lecture-nav {
  margin: 26px 0 8px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lecture-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 46px;
  padding: 12px 22px;

  border-radius: 999px;
  background: #2d2118;
  color: #ffffff !important;

  text-decoration: none;
  font-size: 14px;
  font-weight: 900;

  box-shadow: 0 10px 20px rgba(45, 33, 24, 0.16);
}

.lecture-nav a:hover,
.lecture-nav a:focus {
  text-decoration: none;
  opacity: 0.94;
}

.lecture-nav .next {
  margin-left: auto;
}

/* =========================
   表
========================= */

.lecture-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;

  margin: 18px 0 22px;
  border-radius: 16px;
  border: 1px solid rgba(80, 55, 30, 0.12);
}

.lecture-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 0;

  background: #ffffff;
}

.lecture-table th,
.lecture-table td {
  border: 1px solid rgba(80, 55, 30, 0.12);
  padding: 10px 11px;

  vertical-align: top;
  text-align: left;
  word-break: break-word;

  color: #3a2d22;
  font-size: 14px;
  line-height: 1.75;
}

.lecture-table th {
  background: rgba(255, 250, 242, 0.92);
  color: #2d2118;
  font-weight: 900;
}

.lecture-table td:first-child {
  background: rgba(255, 252, 246, 0.88);
  color: #2d2118;
  font-weight: 900;
}

/* =========================
   参考資料リンク
========================= */

.lecture-ref-links {
  margin: 16px 0;
  display: grid;
  gap: 10px;
}

.lecture-ref-link,
.lecture-ref-link:link,
.lecture-ref-link:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 44px;
  padding: 10px 16px;

  border-radius: 999px;
  background: rgba(255, 250, 242, 0.96);
  border: 1px solid rgba(80, 55, 30, 0.16);

  color: #2d2118 !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
}

.lecture-ref-link::after {
  content: "›";
  margin-left: 8px;
  font-size: 18px;
  line-height: 1;
}

.lecture-ref-link:hover,
.lecture-ref-link:focus {
  text-decoration: none;
  background: rgba(255, 245, 220, 0.98);
}

/* =========================
   tools メニュー用
========================= */

.tool-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.tool-card {
  margin: 0;
  padding: 17px 16px 15px;

  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(90, 60, 30, 0.13);
  box-shadow: 0 10px 24px rgba(58, 36, 16, 0.08);
}

.tool-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 17px;
}

.tool-card p {
  margin-bottom: 0;
}

.tool-card.paid {
  border-left: none;
}

.tool-links {
  margin-top: 14px;

  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-links .tool-main,
.tool-links .tool-main:link,
.tool-links .tool-main:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 42px;
  padding: 10px 18px;

  border-radius: 999px;
  background: #2d2118;
  border: 1px solid #2d2118;

  color: #ffffff !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;

  box-shadow: 0 10px 20px rgba(45, 33, 24, 0.14);
}

.tool-links .tool-main:hover,
.tool-links .tool-main:focus {
  text-decoration: none;
  opacity: 0.94;
}

.tool-links .tool-sub,
.tool-links .tool-sub:link,
.tool-links .tool-sub:visited {
  display: inline-flex;
  align-items: center;

  min-height: 40px;
  padding: 8px 2px;

  color: #5b3518 !important;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  line-height: 1.2;
}

.tool-links .tool-sub:hover,
.tool-links .tool-sub:focus {
  text-decoration: underline;
}

/* =========================
   レスポンシブ
========================= */

@media (max-width: 768px) {

  .lecture-container {
    padding: 16px 12px calc(34px + env(safe-area-inset-bottom));
  }

  .lecture-container p,
  .lecture-container li {
    font-size: 14px;
    line-height: 1.88;
  }

  .lecture-hero {
    grid-template-columns: 1fr;
    padding: 20px 16px;
    border-radius: 22px;
  }

  .lecture-hero__text h1 {
    font-size: 26px;
  }

  .lecture-hero__image {
    width: 100%;
  }

  .lecture-hero__image img {
    width: min(230px, 80vw);
    margin: 0 auto;
  }

  .lecture-section,
  .lecture-toc,
  .lecture-intro-box {
    padding: 18px 16px;
    border-radius: 22px;
  }

  .lecture-section h2,
  .lecture-toc h2 {
    font-size: 20px;
  }

  .lecture-image {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 18px 0 21px;
  }

  .lecture-image img {
    width: min(360px, 100%);
    max-width: 360px;
    margin: 0 auto;
  }

  .lecture-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .lecture-nav a,
  .lecture-nav .next {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }

  .tool-card {
    padding: 16px 14px 14px;
  }

  .tool-links {
    gap: 9px;
  }

  .tool-links .tool-main,
  .tool-links .tool-main:link,
  .tool-links .tool-main:visited,
  .tool-links .tool-sub,
  .tool-links .tool-sub:link,
  .tool-links .tool-sub:visited {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 430px) {

  .lecture-container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .lecture-hero,
  .lecture-section,
  .lecture-toc,
  .lecture-intro-box {
    border-radius: 20px;
  }

  .lecture-toc li a {
    padding: 12px 36px 12px 12px;
    font-size: 13px;
  }

  .lecture-toc-current {
    padding: 12px 58px 12px 12px;
    font-size: 13px;
  }

  .lecture-toc-current::after {
    right: 10px;
    font-size: 10px;
  }

  .lecture-note,
  .lecture-point,
  .lecture-caution {
    padding: 15px 14px;
  }

  .lecture-table th,
  .lecture-table td {
    padding: 9px 10px;
    font-size: 13px;
  }
}