/* PHILOSOPHY & PROBLEM（専用ページ・アーカイブ・トップティーザー） */

/* ----- トップ: PHILOSOPHY ティーザー ----- */
.section--philosophy .section-heading__title {
    max-width: 22ch;
}

.philosophy-lede {
    margin: 18px 0 0;
    max-width: 40rem;
    font-size: var(--type-body-fixed, 16px);
    line-height: 1.85;
    color: var(--subtext);
}

.philosophy-actions {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

/* ----- 共通: PHILOSOPHY & PROBLEM ページ ----- */
.pp-page {
    padding-top: clamp(48px, 8vw, 104px);
    padding-bottom: clamp(48px, 10vw, 120px);
}

.pp-badge {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--brand);
}

.pp-variant-label {
    margin: 0 0 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--subtext);
}

.pp-problem {
    margin-bottom: 56px;
}

.pp-problem__eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--brand);
}

.pp-problem__title {
    margin: 0 0 22px;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.pp-problem__text p {
    margin: 0 0 16px;
    font-size: 17px;
    line-height: 1.85;
    color: var(--text);
}

.pp-problem__text p:last-child {
    margin-bottom: 0;
}

.pp-problem__strong {
    font-weight: 700;
    color: var(--brand-dark);
}

.pp-essay p {
    margin: 0 0 1.15em;
    font-size: 17px;
    line-height: 1.9;
    color: var(--text);
}

.pp-essay p:last-child {
    margin-bottom: 0;
}

.pp-back {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.pp-back a {
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
}

.pp-back a:hover,
.pp-back a:focus-visible {
    text-decoration: underline;
}

/* ----- 案A: エディトリアル ----- */
.pp-hero--a {
    padding: 72px 0 56px;
    margin-bottom: 48px;
    background: linear-gradient(
        180deg,
        rgba(230, 244, 237, 0.55),
        rgba(255, 255, 255, 0)
    );
    border-bottom: 1px solid var(--border);
}

.pp-hero--a h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.15;
    letter-spacing: -0.03em;
    max-width: 18ch;
}

.pp-hero--a .pp-hero-lede {
    margin: 0;
    max-width: 36rem;
    font-size: 18px;
    line-height: 1.75;
    color: var(--subtext);
}

.pp--a .pp-inner {
    width: min(100% - 48px, 720px);
    margin: 0 auto;
}

.pp--a .pp-essay {
    margin-top: 8px;
}

/* ----- 案B: 章立て + サイド目次 ----- */
.pp-layout-b {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

@media (min-width: 960px) {
    .pp-layout-b {
        grid-template-columns: 200px minmax(0, 1fr);
        gap: 48px;
    }
}

.pp-toc {
    position: sticky;
    top: 100px;
    padding: 20px 18px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.85);
}

.pp-toc-title {
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--subtext);
}

.pp-toc ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pp-toc a {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text);
    text-decoration: none;
    border-left: 2px solid transparent;
    padding-left: 10px;
    margin-left: -2px;
}

.pp-toc a:hover,
.pp-toc a:focus-visible {
    color: var(--brand);
    border-left-color: var(--brand);
}

.pp-chapter {
    scroll-margin-top: 100px;
    margin-bottom: 48px;
}

.pp-chapter h2 {
    margin: 0 0 16px;
    font-size: clamp(22px, 2.5vw, 28px);
    line-height: 1.3;
}

/* 正規ページ本文：章タイトル（h2）の上余白 */
.pp-reading-stream .pp-detail-section > h2 {
    margin-top: clamp(28px, 5vw, 52px);
    margin-bottom: clamp(14px, 2vw, 22px);
}

.pp-reading-stream .pp-detail-section > h2:first-child {
    margin-top: 0;
}

.pp-hero--b {
    margin-bottom: 40px;
}

.pp-hero--b h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.2;
}

.pp-hero--b .pp-hero-lede {
    margin: 0;
    max-width: 40rem;
    font-size: 16px;
    line-height: 1.75;
    color: var(--subtext);
}

/* ----- 案C: カードグリッド ----- */
.pp-hero--c {
    margin-bottom: 36px;
}

.pp-hero--c h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 44px);
}

.pp-hero--c .pp-hero-lede {
    margin: 0;
    max-width: 42rem;
    font-size: 16px;
    line-height: 1.75;
    color: var(--subtext);
}

.pp-badge--after-strip {
    margin-top: 12px;
}

.pp-problem-strip {
    margin-bottom: 40px;
    padding: 28px 28px 30px;
    border-radius: 24px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.pp-card-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .pp-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.pp-card {
    padding: 24px 22px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(247, 249, 248, 0.65);
}

.pp-card h3,
.pp-card-heading {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-dark);
    letter-spacing: 0.02em;
}

/* カード見出し（本文色でコンパクトに見せる） */
.pp-card-heading {
    color: var(--text);
}

/* eyebrow / 見出しは専用クラスのタイポを優先（.pp-card p だと上書きされる） */
.pp-card p:not(.pp-detail-eyebrow):not(.pp-card-heading) {
    margin: 0;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
}

/* ----- 案E: PROBLEM帯 + 目次 + 長文 ----- */
.pp-hero--e {
    margin-bottom: 28px;
}

.pp-hero--e h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.2;
}

.pp-hero--e .pp-hero-lede {
    margin: 0;
    max-width: 42rem;
    font-size: 16px;
    line-height: 1.75;
    color: var(--subtext);
}

.pp-layout-e {
    padding-top: 8px;
}

.pp--e .pp-problem-strip {
    margin-bottom: 0;
}

/* ----- 正規ページ: カード目次 → 詳細本文 ----- */
.pp-hero--philosophy-page {
    margin-bottom: clamp(56px, 11vw, 132px);
    padding-bottom: clamp(8px, 2vw, 24px);
}

.pp-hero--philosophy-page h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.2;
}

.pp-hero--philosophy-page .pp-hero-lede {
    margin: 0;
    max-width: 42rem;
    font-size: 16px;
    line-height: 1.75;
    color: var(--subtext);
}

.pp-shell {
    width: min(100% - 48px, 920px);
    margin: 0 auto;
}

.pp-intro-lead {
    margin: 0 0 22px;
    font-size: 15px;
    line-height: 1.75;
    color: var(--subtext);
}

.pp-card-grid--toc {
    margin-bottom: 48px;
    align-items: stretch;
}

.pp-card--toc {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 0;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

.pp-card--toc .pp-card-heading {
    flex-shrink: 0;
    margin-bottom: 0;
}

.pp-card-thumb {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    margin-top: 14px;
}

.pp-card-thumb img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 右下：トップへ戻る（フローティング） */
.pp-scroll-top {
    position: fixed;
    z-index: 950;
    right: max(20px, env(safe-area-inset-right, 0px));
    bottom: max(24px, env(safe-area-inset-bottom, 0px));
    width: 130px;
    height: 130px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 123, 67, 0.35);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 4px 18px rgba(26, 31, 28, 0.12),
        0 1px 3px rgba(26, 31, 28, 0.06);
    color: var(--brand);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition:
        opacity 0.22s ease,
        visibility 0.22s ease,
        transform 0.22s ease,
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

.pp-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pp-scroll-top:hover {
    border-color: var(--brand);
    background: rgba(230, 244, 237, 0.95);
    box-shadow: 0 8px 26px rgba(0, 123, 67, 0.18);
}

.pp-scroll-top:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
}

.pp-scroll-top__glyph {
    font-size: 55px;
    font-weight: 700;
    line-height: 1;
}

.pp-card--toc:hover,
.pp-card--toc:focus-visible {
    border-color: var(--brand);
    box-shadow: 0 8px 24px rgba(0, 123, 67, 0.12);
    transform: translateY(-1px);
}

.pp-card--toc:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
}

.pp-reading-stream {
    padding-top: clamp(44px, 8vw, 72px);
    margin-top: clamp(8px, 2vw, 24px);
    border-top: 1px solid var(--border);
}

/*
 * PROBLEM と PHILOSOPHY開始章の間だけ区切り線あり。
 * PHILOSOPHY 章どうし（第3章以降）は線なし・余白のみ。
 */
.pp-reading-stream > .pp-chapter + .pp-chapter {
    padding-top: clamp(40px, 7vw, 88px);
}

.pp-reading-stream > .pp-chapter.pp-chapter--philosophy-open {
    border-top: 1px solid var(--border);
}

.pp-detail-section {
    scroll-margin-top: 100px;
}

.pp-detail-eyebrow {
    margin: 0 0 clamp(14px, 2.5vw, 22px);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand);
}

/* アイブロウ直後の h2 は上マージンを二重にしない */
.pp-reading-stream .pp-detail-section > .pp-detail-eyebrow + h2 {
    margin-top: 0;
}

/* 目次カード：本文の .pp-detail-eyebrow と同じクラス・同じ見た目 */
.pp-card--toc .pp-detail-eyebrow {
    align-self: flex-start;
}

.pp-detail-emphasis {
    margin: 0;
    font-size: 17px;
    line-height: 1.85;
    font-weight: 700;
    color: var(--brand-dark);
}

@media (min-width: 900px) {
    .pp-card-grid--toc {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* 詳細本文（PROBLEM / PHILOSOPHY 共通トーン） */
.pp-reading-essay .pp-problem-catch {
    margin: 0 0 28px;
    padding: 22px 24px;
    border-left: 4px solid var(--brand);
    border-radius: 0 16px 16px 0;
    background: rgba(230, 244, 237, 0.5);
    font-size: clamp(16px, 2.2vw, 18px);
    line-height: 1.75;
    color: var(--text);
}

.pp-reading-essay .pp-problem-catch p {
    margin: 0 0 12px;
}

.pp-reading-essay .pp-problem-catch p:last-child {
    margin-bottom: 0;
}

.pp-problem-h3 {
    margin: clamp(40px, 6vw, 64px) 0 clamp(14px, 2vw, 18px);
    font-size: clamp(17px, 2vw, 20px);
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: -0.02em;
    color: var(--brand-dark);
}

/* キャッチ直下の最初の h3 は、キャッチの下マージンとまとめて間隔をとる */
.pp-reading-essay .pp-problem-catch + .pp-problem-h3 {
    margin-top: clamp(28px, 5vw, 44px);
}

.pp-problem-list {
    margin: 16px 0 20px;
    padding-left: 1.25em;
}

.pp-problem-list li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.pp-problem-list li:last-child {
    margin-bottom: 0;
}

.pp-problem-ol {
    margin: 16px 0 20px;
    padding-left: 1.4em;
    list-style: decimal;
}

.pp-problem-ol li {
    margin-bottom: 8px;
    line-height: 1.75;
}

.pp-problem-pull {
    margin: 18px 0;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(247, 249, 248, 0.95);
    border: 1px solid var(--border);
    font-size: 16px;
    line-height: 1.75;
}

/* ----- 案D: 二カラム分割 ----- */
.pp-split {
    display: grid;
    gap: 0;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

@media (min-width: 900px) {
    .pp-split {
        grid-template-columns: 1fr 1fr;
        min-height: 520px;
    }
}

.pp-split__philosophy {
    padding: 40px 32px 48px;
    background: linear-gradient(
        165deg,
        rgba(230, 244, 237, 0.95),
        rgba(255, 255, 255, 0.92)
    );
}

.pp-split__phil-h {
    margin: 0 0 14px;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.pp-split__philosophy .pp-split-lede {
    margin: 0 0 22px;
    font-size: 15px;
    line-height: 1.75;
    color: var(--subtext);
}

.pp-split__philosophy .pp-essay p {
    font-size: 15px;
}

.pp-split__problem {
    padding: 40px 32px 48px;
    background: linear-gradient(
        200deg,
        #1a1f1c,
        #2a3430 55%,
        #1e2622
    );
    color: #e8ebe9;
}

.pp-split__problem .pp-problem__eyebrow {
    color: #7dcea0;
}

.pp-split__problem .pp-problem__title {
    color: #f4f7f5;
}

.pp-split__problem .pp-problem__text p {
    color: rgba(232, 235, 233, 0.92);
}

.pp-split__problem .pp-problem__strong {
    color: #a8e6c5;
}

.pp-hero--d-top {
    margin-bottom: 28px;
}

.pp-hero--d-top h1 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3.5vw, 38px);
}

.pp-hero--d-top .pp-hero-lede {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--subtext);
    max-width: 48rem;
}

@media (max-width: 899px) {
    .pp-toc {
        position: static;
    }
}
