/* 音シフトごとの解説ページ（/patterns/<slug>・change0916 (E2) Task 3.3）。
   /patterns（templates/patterns.html）と同じ部品の考え方: 見出しは Outfit、カードは var(--surface) と var(--border)、
   発生条件の枠はシアン、コツは青の左線。色はページごとの --pd-accent（/patterns の分類の色）だけ変える。 */
.pd {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
    --pd-accent: var(--helix-cyan);
    line-break: strict;   /* のばし棒・小さい仮名を行頭に置かない（「ナラロ／ー」を防ぐ） */
}
.pd-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.5rem 0 1.5rem;
}
.pd-crumbs a { color: var(--helix-cyan); text-decoration: none; }
.pd-crumbs a:hover { text-decoration: underline; }

/* ── Hero ── */
.pd-hero {
    text-align: center;
    padding: 1rem 0 2rem;
}
.pd-eyebrow {
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--pd-accent);
    margin-bottom: 0.6rem;
}
.pd-h1 {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-weight: 800;
    font-size: clamp(1.7rem, 1.2rem + 2vw, 2.3rem);
    line-height: 1.3;
    margin: 0 0 0.8rem;
}
.pd-h1-sub {
    font-size: 0.6em;
    font-weight: 700;
    color: var(--text-muted);
}
.pd-hero-lead {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin: 0 auto;
    max-width: 560px;
}

/* ── Sections ── */
.pd-section { margin: 2.5rem 0 0; }
.pd-h2 {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 0 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--border);
}
.pd-lead, .pd-text {
    font-size: 0.93rem;
    line-height: 1.9;
    color: var(--text-muted);
    margin: 0 0 1rem;
}
.pd-text strong, .pd-lead strong { color: var(--text); }
.pd-lead a, .pd-text a { color: var(--helix-cyan); }

.pd-rule {
    background: rgba(43,107,242,0.06);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    margin: 0 0 1rem;
}
.pd-rule-label, .pd-card-label, .pd-why-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}
.pd-rule-body {
    font-family: 'JetBrains Mono', 'Noto Sans JP', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--helix-cyan);
    line-height: 1.7;
    overflow-wrap: anywhere;
}
/* 条件が複数あるページ（リンキング・音の同化）は、条件ごとに名前と区切り線をつける（スマホで続けて読めてしまうため） */
.pd-rule-body + .pd-rule-body {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px dashed rgba(43,107,242,0.2);
}
.pd-rule-name {
    display: block;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--pd-accent);
}
.pd-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin: 0 0 1rem;
}
.pd-list { margin: 0; padding-left: 1.2rem; }
.pd-list li {
    font-size: 0.88rem;
    line-height: 1.8;
    color: var(--text-muted);
}
.pd-list li strong { color: var(--text); }
.pd-list.pd-points { margin: 0 0 1rem; }          /* 本文の中の箇条書き（下の枠との間をあける） */
.pd-points li + li { margin-top: 0.3rem; }
.pd-text.pd-text-tight { margin: 0; font-size: 0.88rem; line-height: 1.8; }   /* 枠の中の短い説明 */
.pd-why {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.8;
    padding: 0.9rem 1.1rem;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border-left: 3px solid var(--pd-accent);
}

/* ── Examples（SSD の実物） ── */
.pd-example {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    margin: 0 0 1.2rem;
}
.pd-ex-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 0.9rem;
    margin-bottom: 0.8rem;
}
.pd-ex-sentence {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: #fff;
}
.pd-ex-translation {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.pd-ssd { margin: 0 0 0.8rem; min-width: 0; }
.pd-ex-note {
    font-size: 0.86rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin: 0;
    padding: 0.6rem 0.9rem;
    background: rgba(43,107,242,0.04);
    border-radius: 8px;
    border-left: 3px solid rgba(43,107,242,0.25);
}

/* ── よく出る語句 ── */
.pd-words {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.45rem;
}
.pd-words li {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    padding: 0.55rem 0.8rem;
    background: rgba(255,255,255,0.025);
    border-radius: 6px;
    font-size: 0.9rem;
}
.pd-word { font-weight: 600; color: var(--text); }
.pd-arrow { color: var(--text-muted); opacity: 0.5; font-size: 0.8em; }
.pd-kana { color: var(--pd-accent); font-weight: 600; }
.pd-where { margin-left: auto; font-size: 0.72rem; color: var(--text-muted); }

/* ── 練習のしかた・関連 ── */
.pd-steps { margin: 0; padding-left: 1.3rem; }
.pd-steps li, .pd-related li {
    font-size: 0.9rem;
    line-height: 1.85;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.pd-steps li strong { color: var(--text); }
.pd-related { margin: 0; padding-left: 1.2rem; }
.pd-related a { color: var(--helix-cyan); font-weight: 600; }

/* ── CTA・戻る ── */
.pd-cta {
    margin: 3rem 0 0;
    padding: 1.5rem 1.2rem;
    text-align: center;
    border: 1px solid rgba(0,212,255,0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0,212,255,0.06), rgba(10,191,176,0.05));
}
.pd-cta-title {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
}
.pd-cta p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.8; margin: 0 0 1rem; }
.pd-cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
.pd-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.2rem;
    border-radius: 8px;
    border: 1px solid rgba(0,212,255,0.3);
    color: var(--helix-cyan);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}
.pd-btn-primary {
    background: linear-gradient(135deg, var(--helix-cyan), var(--helix-teal));
    border-color: transparent;
    color: #06131f;
}
/* ── 音シフトごとの解説（ページどうしの行き来） ── */
.pd-series { margin: 2.5rem 0 0; }
.pd-series-title {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 0.8rem;
}
.pd-series-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.pd-series-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}
.pd-series-item:hover { border-color: rgba(0,212,255,0.4); }
.pd-series-item[aria-current="page"] { border-color: var(--pd-accent); color: var(--pd-accent); }
.pd-series-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.pd-back {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.6rem;
    margin: 2rem 0 0;
    font-size: 0.88rem;
}
.pd-back a { color: var(--helix-cyan); text-decoration: none; }
.pd-back a:hover { text-decoration: underline; }

@media (max-width: 575.98px) {
    .pd-example, .pd-card { padding: 0.9rem 0.9rem; }
    .pd-ex-sentence { font-size: 1.08rem; }
    .pd-where { margin-left: 0; }
}
