:root {
  --sky: #8FCDE8;
  --navy: #2D4A66;
  --sunny: #FFE585;
  --pink: #FFC4D8;
  --line: #E5EDF2;
  --muted: #7B8FA1;
  --mist: #A9B9C6; /* 柱ではないものの帯色。--muted を白側へ薄めた青灰色 */
  --surface: rgba(255, 255, 255, .82);
  --page: #F7FBFD;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--navy);
  background:
    radial-gradient(circle at 10% 8%, rgba(143, 205, 232, .2), transparent 30rem),
    radial-gradient(circle at 90% 25%, rgba(255, 196, 216, .16), transparent 28rem),
    var(--page);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(1120px, calc(100% - 40px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  letter-spacing: .08em;
}

.brand-main { font-size: 15px; font-weight: 700; }
.brand-divider { width: 1px; height: 20px; background: var(--line); }
.brand-sub { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.logout-link { color: var(--muted); font-size: 13px; text-underline-offset: 4px; }

.site-main {
  width: min(1120px, calc(100% - 40px));
  flex: 1;
  margin: 0 auto;
  padding: 72px 0 96px;
}

.page-heading, .course-heading { max-width: 720px; margin-bottom: 38px; }
.eyebrow { margin: 0 0 8px; color: #527E94; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(28px, 4.5vw, 44px); line-height: 1.35; letter-spacing: .02em; }
h2 { line-height: 1.45; }
.lead { margin: 18px 0 0; color: #536E82; font-size: 16px; }
.muted, .form-note { color: var(--muted); }

.narrow-panel {
  width: min(580px, 100%);
  margin: 8px auto 0;
  padding: clamp(28px, 6vw, 54px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}

.auth-panel h1 { font-size: clamp(28px, 7vw, 38px); }
.login-form { display: grid; gap: 10px; margin-top: 32px; }
.login-form label { font-size: 13px; font-weight: 700; }
.login-form input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  color: var(--navy);
  background: #fff;
  border: 1px solid #C9D9E3;
  border-radius: 12px;
  outline: none;
}
.login-form input:focus { border-color: #5BAACD; outline: 3px solid rgba(143, 205, 232, .3); }
.login-form button {
  min-height: 52px;
  margin-top: 10px;
  padding: 12px 24px;
  border: 1px solid #6BB8D9;
  border-radius: 999px;
  color: var(--navy);
  background: var(--sky);
  font-weight: 700;
  cursor: pointer;
}
.login-form button:hover { background: #A7D9EE; }
.form-note { margin: 18px 0 0; font-size: 12px; }
.form-note a { color: #477991; text-underline-offset: 3px; }
.notice { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.notice-error { background: #FFF6F8; border-color: var(--pink); }
.sent-panel { text-align: center; }
.sent-panel .muted { margin: 22px 0 28px; font-size: 13px; }
.mail-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border: 1px solid #BBDDEB;
  border-radius: 50%;
  background: #EAF7FC;
  font-size: 24px;
}
.text-link { color: #477991; font-size: 13px; text-underline-offset: 4px; }

.course-group + .course-group { margin-top: 58px; }
.course-group-title { margin: 0 0 20px; font-size: 21px; }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.course-entry { min-width: 0; display: flex; flex-direction: column; }
.course-card {
  position: relative;
  flex: 1;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.course-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 7px; background: var(--sky); }
.course-card.pillar-mind::before { background: var(--pink); }
.course-card.pillar-flow::before { background: var(--sunny); }
.pillar-label { margin: 8px 0 18px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.course-card h3 { margin: 0 0 14px; font-size: 23px; line-height: 1.45; }
.course-card > p:not(.pillar-label, .lesson-count) { margin: 0; color: #61798B; font-size: 14px; }
.lesson-count { margin: auto 0 16px; padding-top: 28px; color: var(--muted); font-size: 12px; }
.card-link { align-self: flex-start; font-size: 14px; font-weight: 700; text-decoration-color: #9CCFE4; text-underline-offset: 5px; }
.course-card-locked { opacity: .52; }
.locked-course-note { margin: 12px 4px 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.course-card .course-byline, .course-heading .course-byline, .lesson-heading .course-byline { margin: 0 0 14px; color: #527E94; font-size: 12px; line-height: 1.7; }
.course-subtitle { margin: 10px 0 0; color: #527E94; font-size: 15px; }
.locked-course-link { align-self: flex-start; margin: 8px 4px 0; color: #2D4A66; font-size: 12px; text-underline-offset: 4px; }

.season-teaser { margin: 48px 0 0; color: var(--muted); font-size: 13px; }
.season-teaser a { text-underline-offset: 4px; }

/* 講座一覧の下の入口（季節だより・道具箱）。講座カードより軽く、でも見つかる大きさ */
.side-entrances { margin: 48px 0 0; }
.side-entrance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.side-entrance {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-decoration: none;
}
.side-entrance h3 { margin: 0 0 6px; font-size: 17px; }
.side-entrance p { margin: 0; color: var(--muted); font-size: 13px; }
.side-entrance::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--mist); }

/* 道具カードの帯。.season-row 本体（季節だより一覧の各回）には付けない */
.tool-card { position: relative; overflow: hidden; }
.tool-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--mist); }
.season-list { display: grid; gap: 14px; }
.season-row { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.season-row > a { min-height: 132px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 24px 28px; text-decoration: none; }
.season-row h2 { margin: 0 0 8px; font-size: 19px; }
.season-row p { margin: 8px 0 0; font-size: 13px; }
.season-meta { color: var(--muted); font-size: 12px; }
.season-meta span + span { margin-left: 16px; }
.season-credit { margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.season-credit a { text-underline-offset: 4px; }
.season-disclaimer { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.video-frame > p { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--surface); }
.faq-page { width: min(760px, 100%); margin: 0 auto; }
.faq-page dl { margin: 42px 0 0; }
.faq-page dt { margin-top: 34px; font-weight: 700; }
.faq-page dd { margin: 12px 0 0; color: var(--muted); }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: -28px 0 38px; color: var(--muted); font-size: 12px; }
.breadcrumbs a { text-underline-offset: 3px; }
.lesson-list { display: grid; gap: 12px; }
.lesson-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}
.lesson-main {
  min-width: 0;
  min-height: 104px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  text-decoration: none;
}
a.lesson-main:hover { background: rgba(143, 205, 232, .08); }
.lesson-main strong, .lesson-main small { display: block; }
.lesson-main strong { margin-bottom: 4px; font-size: 15px; }
.lesson-main small { color: var(--muted); font-size: 12px; line-height: 1.65; }
.lesson-number { color: #5C91A9; font-size: 19px; font-weight: 700; letter-spacing: .04em; }
.lesson-arrow { font-size: 20px; }
.progress-check {
  width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}
.progress-check input, .lesson-complete input { width: 20px; height: 20px; accent-color: #62B4D6; }
.is-pending { grid-template-columns: 90px 1fr; background: rgba(255, 255, 255, .56); }
.is-pending .lesson-main { opacity: .7; grid-template-columns: 48px minmax(0, 1fr); }
.pending-label { display: grid; place-items: center; border-right: 1px solid var(--line); color: var(--muted); font-size: 11px; }

.lesson-page { width: min(920px, 100%); margin: 0 auto; }
.lesson-heading { margin-bottom: 28px; }
.lesson-heading h1 { font-size: clamp(26px, 5vw, 38px); }
.video-frame { position: relative; width: 100%; padding-top: 56.25%; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #162838; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-summary { margin-top: 24px; padding: clamp(22px, 5vw, 34px); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.lesson-summary h2 { margin: 0 0 10px; font-size: 18px; }
.lesson-summary p { margin: 0; color: #61798B; font-size: 14px; }
.pending-lesson-panel { padding-block: clamp(34px, 8vw, 64px); text-align: center; }
.pending-lesson-panel p { font-size: 16px; }
.lesson-complete { display: flex; align-items: center; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 26px; }
.lesson-nav a { min-height: 86px; display: flex; flex-direction: column; justify-content: center; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; }
.lesson-nav a.next { text-align: right; }
.lesson-nav small { color: var(--muted); font-size: 10px; }
.lesson-nav span { font-size: 13px; font-weight: 700; }

.site-footer { background: var(--navy); color: #fff; }
.footer-inner { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 46px 0 34px; text-align: center; }
.site-footer p { margin: 8px 0; font-size: 12px; }
.site-footer a { color: #fff; text-underline-offset: 3px; }
.footer-brand { font-size: 15px !important; font-weight: 600; letter-spacing: .1em; }
.legal-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin: 16px 0; font-size: 11px; }
.copyright { margin-top: 22px !important; font-size: 11px !important; opacity: .7; }

@media (max-width: 820px) {
  .course-grid { grid-template-columns: 1fr; }
  .course-card { min-height: 260px; }
  .site-main { padding-top: 54px; }
}

@media (max-width: 560px) {
  .header-inner, .site-main, .footer-inner { width: min(100% - 28px, 1120px); }
  .header-inner { min-height: 58px; }
  .brand { gap: 8px; }
  .brand-main { font-size: 13px; }
  .brand-sub { font-size: 10px; }
  .brand-divider { height: 16px; }
  .logout-link { font-size: 11px; }
  .site-main { padding: 42px 0 70px; }
  .narrow-panel { padding: 28px 22px; border-radius: 18px; }
  .course-card { min-height: 0; padding: 26px 22px; }
  .lesson-count { margin-top: 22px; }
  .breadcrumbs { margin-top: -18px; }
  .lesson-row { grid-template-columns: 1fr; }
  .progress-check { width: auto; min-height: 42px; flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); }
  .progress-check input { width: 17px; height: 17px; }
  .lesson-main { min-height: 96px; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; padding: 16px; }
  .lesson-main small { display: none; }
  .is-pending { grid-template-columns: 1fr; }
  .pending-label { min-height: 34px; border-right: 0; border-bottom: 1px solid var(--line); }
  .is-pending .lesson-main { grid-template-columns: 38px minmax(0, 1fr); }
  .lesson-number { font-size: 16px; }
  .season-row > a { min-height: 0; gap: 14px; padding: 22px 18px; }
  .side-entrance { gap: 14px; padding: 18px; }
  .season-meta span { display: block; }
  .season-meta span + span { margin-left: 0; }
  .video-frame { margin-inline: -14px; width: calc(100% + 28px); border-radius: 12px; }
  .lesson-nav { grid-template-columns: 1fr; }
  .lesson-nav .nav-placeholder { display: none; }
  .lesson-nav a.next { text-align: left; }
  .legal-links { display: grid; gap: 6px; }
  .legal-links span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* 会員向け道具箱（P36）。配色トークンはそのまま・box-shadow は使わない */
.tool-form { display: grid; gap: 26px; width: min(680px, 100%); margin: 34px 0 0; }
.tool-field { display: grid; gap: 6px; }
.tool-field label { font-size: 14px; font-weight: 700; }
.tool-hint { margin: 0 0 4px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.tool-field input, .tool-field textarea, .tool-field select {
  width: 100%;
  padding: 12px 16px;
  color: var(--navy);
  background: #fff;
  border: 1px solid #C9D9E3;
  border-radius: 12px;
  outline: none;
}
.tool-field input, .tool-field select { min-height: 52px; }
.tool-field textarea { min-height: 168px; line-height: 1.8; resize: vertical; }
.tool-field input:focus, .tool-field textarea:focus, .tool-field select:focus {
  border-color: #5BAACD;
  outline: 3px solid rgba(143, 205, 232, .3);
}
.tool-form button {
  justify-self: start;
  min-height: 52px;
  padding: 12px 40px;
  border: 1px solid #6BB8D9;
  border-radius: 999px;
  color: var(--navy);
  background: var(--sky);
  font-weight: 700;
  cursor: pointer;
}
.tool-form button:hover { background: #A7D9EE; }
.tool-history { margin-top: 52px; }
.tool-history-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.tool-history-row { padding: 18px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.tool-history-row > a { font-size: 15px; font-weight: 700; text-underline-offset: 4px; }
.tool-history-row .season-meta { margin: 6px 0 0; }
.tool-history-row .text-link { display: inline-block; margin-top: 8px; }
.tool-quota { margin: 40px 0 0; color: var(--muted); font-size: 13px; }
.tool-note { margin-left: 6px; font-size: 11px; }
.tool-entry { display: flex; flex-direction: column; }
.tool-card-note { margin: 8px 4px 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.tool-keys-section { width: min(680px, 100%); margin-top: 44px; }
.tool-keys-section h2 { margin: 0 0 12px; font-size: 18px; }
.tool-keys-section p { margin: 0; color: #61798B; font-size: 14px; }
/* 「鍵のあずかり方」は約束なので、薄い muted ではなく本文色で置く */
.tool-keys-promises { margin: 12px 0 0; padding-left: 1.2em; color: var(--navy); font-size: 14px; line-height: 2; }
.tool-keys-consoles { margin: 12px 0 0; padding-left: 1.2em; color: #61798B; font-size: 14px; line-height: 2; }
.tool-keys-consoles a { text-underline-offset: 4px; }
.tool-keys-stored { width: min(680px, 100%); margin: 34px 0 0; padding: 26px 28px; text-align: left; }
.tool-keys-stored p { margin: 0 0 14px; font-size: 15px; }
.tool-keys-stored button {
  min-height: 46px;
  padding: 10px 28px;
  border: 1px solid #C9D9E3;
  border-radius: 999px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
}
.tool-keys-stored button:hover { background: #F1F8FC; }
.tool-keys-stored .tool-hint { margin: 14px 0 0; }

/* 完成画面のダウンロードは、フォームの送信ボタンと同じ塗りにする */
.tool-download { margin: 26px 0 0; }
.tool-button {
  display: inline-block;
  min-height: 52px;
  padding: 13px 40px;
  border: 1px solid #6BB8D9;
  border-radius: 999px;
  color: var(--navy);
  background: var(--sky);
  font-weight: 700;
  text-decoration: none;
}
.tool-button:hover { background: #A7D9EE; }

/* 「絵を変える」（AI は呼ばず、画像の組み合わせだけ差し替える） */
.tool-reimage { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; }
.tool-reimage button {
  min-height: 44px;
  padding: 10px 26px;
  border: 1px solid #C9D9E3;
  border-radius: 999px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
}
.tool-reimage button:hover { background: #F1F8FC; }

/* 受講特典（P43） */
:root { --dosha-kapha: #8FCDE8; --dosha-vata: #A0BCE0; --dosha-pitta: #FFC4D8; }
.bonus-button { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 20px; border: 1px solid var(--sky); border-radius: 999px; background: var(--sky); text-decoration: none; font-weight: 700; }
.bonus-intro, .dosha-result { max-width: 820px; }
.bonus-note { color: var(--muted); font-size: 13px; }
.dosha-form { max-width: 900px; margin-top: 32px; }
.nickname-field { display: grid; gap: 8px; max-width: 420px; font-weight: 700; }
.nickname-field input { min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; }
.remaining { position: sticky; top: 72px; z-index: 5; width: fit-content; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 700; }
.dosha-question { margin: 22px 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.dosha-question.is-unanswered { border: 2px solid var(--pink); }
.dosha-question legend { padding: 0 6px; font-weight: 700; }
.dosha-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.dosha-scale label { min-height: 60px; cursor: pointer; }
.dosha-scale input { position: absolute; opacity: 0; }
.dosha-scale span { min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: center; }
.dosha-scale input:checked + span { border-color: var(--sky); background: rgba(143, 205, 232, .25); }
.dosha-scale input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.dosha-scale small { font-size: 11px; line-height: 1.3; }
.dosha-form > button { min-height: 52px; padding: 10px 24px; border: 1px solid var(--sky); border-radius: 999px; color: var(--navy); background: var(--sky); font-weight: 700; cursor: pointer; }
.form-error { border-color: var(--pink); }
.score-list { display: grid; gap: 22px; margin: 36px 0; }
.score-row { display: grid; grid-template-columns: 90px minmax(120px, 1fr) 80px; align-items: center; gap: 14px; }
.score-track { height: 22px; overflow: hidden; border-radius: 999px; background: var(--line); }
.score-track span { display: block; height: 100%; border-radius: inherit; }
.score-kapha .score-track span { background: linear-gradient(90deg, #8FCDE8, #67A6C8); }
.score-vata .score-track span { background: linear-gradient(90deg, #C8E1F0, #A0BCE0); }
.score-pitta .score-track span { background: linear-gradient(90deg, #FFC4D8, #E098B5); }
.result-brand { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .16em; }
.pattern-name { margin: 8px 0 0; font-size: clamp(30px, 6vw, 52px); font-weight: 700; line-height: 1.35; }
.result-summary { max-width: 720px; }
.result-actions { display: flex; align-items: center; gap: 22px; margin-top: 32px; }
@media (max-width: 600px) {
  .dosha-question { padding: 18px 12px; }
  .dosha-scale { grid-template-columns: 1fr; }
  .dosha-scale label, .dosha-scale span { min-height: 48px; }
  .dosha-scale span { flex-direction: row; gap: 8px; }
  .score-row { grid-template-columns: 72px 1fr; }
  .score-row > span:last-child { grid-column: 2; }
  .result-actions { align-items: flex-start; flex-direction: column; }
}

/* 今月のテーマ（P59）：棚の添え文・講座ページの案内文・前置き動画・送る口 */
.shelf-lead { margin: -8px 0 20px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.course-intro { width: min(680px, 100%); margin: 8px 0 36px; }
.course-intro p { margin: 0 0 14px; font-size: 15px; line-height: 2; }
.course-intro p:last-child { margin-bottom: 0; }
.course-opening { margin: 0 0 40px; }
.course-opening .video-frame { max-width: 780px; }
.course-submit { margin: 44px 0 0; }
.course-submit .tool-form { margin-top: 20px; }
.submit-done { background: #F2FAFD; border-color: var(--sky, #8FCDE8); }
