/*
 * 聖徳太子2.0 公開サイト用 LP CSS
 *
 * すべてのセレクタは .sh2- プレフィクスで Social9 既存 CSS と衝突しないようにしている。
 * カラートークンは Social9 共通の lavender 系を踏襲しつつ、
 * 公開サイトとしてのブランド色（紫＝聖徳太子の冠位、朱色＝アクセント）を採用。
 */

:root {
    --sh2-primary: #7c5cff;          /* 紫（メイン） */
    --sh2-primary-700: #6442e6;
    --sh2-primary-100: #ece7ff;
    --sh2-accent: #ff6f4d;            /* 朱色（アクセント） */
    --sh2-bg: #ffffff;
    --sh2-bg-soft: #faf8ff;           /* 薄紫の背景 */
    --sh2-bg-alt: #f3effd;
    --sh2-text: #1f1933;
    --sh2-text-soft: #4a4660;
    --sh2-text-mute: #6b6680;
    --sh2-border: #e6e0f7;
    --sh2-border-strong: #cabff0;
    --sh2-radius: 12px;
    --sh2-radius-lg: 18px;
    --sh2-shadow: 0 8px 24px rgba(124, 92, 255, 0.08);
    --sh2-shadow-lg: 0 18px 48px rgba(124, 92, 255, 0.16);
    /* ヘッダー・フッター・LP セクションは画面幅いっぱいに広げる（PC で左右の余白を活用） */
    --sh2-max: none;
    /* お題詳細・記事系の本文枠。読書効率（1行 60〜90 文字）を維持しつつ、
       旧 760px より少し広めに（議論 UI を見やすく） */
    --sh2-narrow: 1100px;
    --sh2-font: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

.sh2-body {
    margin: 0;
    background: var(--sh2-bg);
    color: var(--sh2-text);
    font-family: var(--sh2-font);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.sh2-skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px; height: 1px;
    overflow: hidden;
}
.sh2-skip-link:focus {
    position: fixed;
    left: 16px; top: 16px;
    width: auto; height: auto;
    padding: 8px 16px;
    background: var(--sh2-primary);
    color: #fff;
    border-radius: 8px;
    z-index: 9999;
}

.sh2-container {
    /* PC: 画面幅いっぱい（左右 32px パディング）。携帯は @media で 16px に縮める。
       特定の長文・議論 UI は .sh2-narrow を併用して読みやすい上限を設ける。 */
    width: 100%;
    max-width: var(--sh2-max);
    margin: 0 auto;
    padding: 0 32px;
}
.sh2-narrow { max-width: var(--sh2-narrow); }

/* ===== Header ===== */
.sh2-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--sh2-border);
}
.sh2-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    min-height: 68px;
    padding: 8px 0;
}
.sh2-header-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 14px;
}
.sh2-lang-group { display: flex; flex-direction: column; gap: 2px; }
.sh2-lang-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--sh2-text-mute);
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.sh2-lang-select {
    font-size: 13px;
    padding: 6px 28px 6px 8px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: var(--sh2-text);
    min-width: 110px;
    cursor: pointer;
}
.sh2-lang-select:hover { background: #eef2ff; }
.sh2-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--sh2-text);
}
.sh2-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--sh2-primary) 0%, #a78bfa 100%);
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    box-shadow: var(--sh2-shadow);
}
.sh2-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.sh2-brand-name { font-weight: 700; font-size: 17px; }
.sh2-brand-tag { font-size: 11px; color: var(--sh2-text-mute); letter-spacing: 0.04em; }

.sh2-nav-list {
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.sh2-nav-list a {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--sh2-text-soft);
    text-decoration: none;
    font-weight: 500;
    font-size: 14.5px;
    transition: background .15s, color .15s;
}
.sh2-nav-list a:hover { background: var(--sh2-bg-alt); color: var(--sh2-text); }
.sh2-nav-list a[aria-current="page"] {
    background: var(--sh2-primary-100);
    color: var(--sh2-primary-700);
}

.sh2-header-cta { display: flex; align-items: center; gap: 10px; }
.sh2-header-user {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--sh2-primary);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.sh2-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--sh2-border);
    border-radius: 10px;
    width: 40px; height: 40px;
    padding: 8px;
    cursor: pointer;
}
.sh2-nav-toggle span {
    display: block;
    height: 2px;
    background: var(--sh2-text);
    margin: 4px 0;
    border-radius: 2px;
}

.sh2-nav-mobile {
    border-top: 1px solid var(--sh2-border);
    background: #fff;
}
.sh2-nav-mobile ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}
.sh2-nav-mobile li a {
    display: block;
    padding: 14px 24px;
    color: var(--sh2-text);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--sh2-border);
}

/* ===== Buttons ===== */
.sh2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 14.5px;
    line-height: 1.2;
    transition: transform .12s, box-shadow .15s, background .15s, color .15s, border-color .15s;
}
.sh2-btn-lg { padding: 14px 28px; font-size: 16px; }
.sh2-btn-primary { background: var(--sh2-primary); color: #fff; }
.sh2-btn-primary:hover { background: var(--sh2-primary-700); box-shadow: var(--sh2-shadow); transform: translateY(-1px); }
.sh2-btn-outline { background: #fff; color: var(--sh2-primary-700); border-color: var(--sh2-border-strong); }
.sh2-btn-outline:hover { background: var(--sh2-primary-100); }
.sh2-btn-ghost { background: transparent; color: var(--sh2-text-soft); }
.sh2-btn-ghost:hover { background: var(--sh2-bg-alt); color: var(--sh2-text); }

/* ===== Hero ===== */
.sh2-hero {
    position: relative;
    padding: 96px 0 80px;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}
.sh2-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 800px 500px at 20% 0%, rgba(124, 92, 255, 0.18), transparent 60%),
        radial-gradient(ellipse 700px 500px at 80% 30%, rgba(255, 111, 77, 0.10), transparent 60%),
        linear-gradient(180deg, #faf8ff 0%, #ffffff 100%);
}
.sh2-hero-eyebrow {
    display: inline-block;
    padding: 6px 14px;
    background: var(--sh2-primary-100);
    color: var(--sh2-primary-700);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin: 0 0 20px;
}
.sh2-hero-title {
    font-size: clamp(32px, 5.5vw, 56px);
    line-height: 1.25;
    margin: 0 0 24px;
    letter-spacing: -0.02em;
    font-weight: 800;
}
.sh2-hero-lead {
    font-size: clamp(15px, 2vw, 18px);
    color: var(--sh2-text-soft);
    margin: 0 auto 36px;
    max-width: 640px;
}
.sh2-hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.sh2-hero-note {
    margin-top: 40px;
    font-size: 13px;
    color: var(--sh2-text-mute);
}

/* ===== Sections ===== */
.sh2-section { padding: 72px 0; }
.sh2-section-alt { background: var(--sh2-bg-soft); }
.sh2-section-title {
    font-size: clamp(24px, 3.5vw, 34px);
    font-weight: 700;
    text-align: center;
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}
.sh2-section-lead {
    font-size: 16px;
    color: var(--sh2-text-soft);
    text-align: center;
    margin: 0 auto 40px;
    max-width: 720px;
}

/* ===== Cards (4 principles) ===== */
.sh2-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    list-style: none;
    margin: 0; padding: 0;
}
.sh2-card {
    background: #fff;
    border: 1px solid var(--sh2-border);
    border-radius: var(--sh2-radius-lg);
    padding: 28px;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.sh2-card:hover { transform: translateY(-3px); box-shadow: var(--sh2-shadow-lg); border-color: var(--sh2-border-strong); }
.sh2-card-num {
    display: inline-block;
    color: var(--sh2-primary-700);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}
.sh2-card h3 { font-size: 18px; margin: 0 0 12px; line-height: 1.4; }
.sh2-card p  { margin: 0; font-size: 14.5px; color: var(--sh2-text-soft); line-height: 1.7; }

/* ===== Scopes (3 audience) ===== */
.sh2-scopes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    list-style: none;
    margin: 0; padding: 0;
}
.sh2-scope-card {
    background: #fff;
    border: 2px solid var(--sh2-border);
    border-radius: var(--sh2-radius-lg);
    padding: 32px 28px;
    text-align: center;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.sh2-scope-card:hover { border-color: var(--sh2-primary); transform: translateY(-3px); box-shadow: var(--sh2-shadow-lg); }
.sh2-scope-emoji { font-size: 44px; margin-bottom: 8px; }
.sh2-scope-card h3 { font-size: 20px; margin: 0 0 12px; }
.sh2-scope-card p  { margin: 0 0 12px; color: var(--sh2-text-soft); font-size: 14.5px; }
.sh2-scope-uses { font-size: 13px; color: var(--sh2-text-mute); }
.sh2-scope-public  { border-top: 5px solid #5b8def; }
.sh2-scope-org     { border-top: 5px solid var(--sh2-primary); }
.sh2-scope-group   { border-top: 5px solid var(--sh2-accent); }

/* ===== Steps ===== */
.sh2-steps {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    counter-reset: sh2step;
}
.sh2-steps li {
    background: #fff;
    border: 1px solid var(--sh2-border);
    border-radius: var(--sh2-radius-lg);
    padding: 24px 28px;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 20px;
    row-gap: 4px;
    align-items: start;
}
.sh2-steps .sh2-step-num {
    grid-column: 1;
    grid-row: 1 / span 2;
}
.sh2-steps li > h3 {
    grid-column: 2;
    grid-row: 1;
    margin: 0 0 4px;
    font-size: 18px;
    line-height: 1.4;
}
.sh2-steps li > p {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    color: var(--sh2-text-soft);
    font-size: 15px;
    line-height: 1.8;
}
.sh2-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--sh2-primary-100);
    color: var(--sh2-primary-700);
    font-weight: 800;
    font-size: 22px;
    flex-shrink: 0;
}

/* ===== Topics empty ===== */
.sh2-topics-empty {
    background: #fff;
    border: 1px dashed var(--sh2-border-strong);
    border-radius: var(--sh2-radius-lg);
    padding: 48px 32px;
    text-align: center;
    color: var(--sh2-text-soft);
}
.sh2-topics-empty p { margin: 0 0 12px; }

/* ===== FAQ ===== */
.sh2-faq {
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sh2-faq-item {
    background: #fff;
    border: 1px solid var(--sh2-border);
    border-radius: var(--sh2-radius);
    padding: 20px 24px;
}
.sh2-faq-item dt {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--sh2-text);
}
.sh2-faq-item dt::before { content: 'Q. '; color: var(--sh2-primary-700); margin-right: 4px; }
.sh2-faq-item dd { margin: 0; color: var(--sh2-text-soft); font-size: 14.5px; }
.sh2-faq-item dd::before { content: 'A. '; color: var(--sh2-accent); font-weight: 700; margin-right: 4px; }
.sh2-faq-large .sh2-faq-item { padding: 24px 28px; }

/* ===== Article (about/how/faq common) ===== */
.sh2-article { padding: 64px 0; }
.sh2-article-header { text-align: center; margin-bottom: 48px; }
.sh2-article-header h1 {
    font-size: clamp(28px, 4vw, 40px);
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}
.sh2-article-lead {
    font-size: 17px;
    color: var(--sh2-text-soft);
    margin: 0 auto;
    max-width: 600px;
}
.sh2-article section { margin-bottom: 48px; }
.sh2-article h2 {
    font-size: 22px;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--sh2-primary-100);
}
.sh2-article h3 { font-size: 17px; margin: 20px 0 8px; }
.sh2-article p, .sh2-article li { color: var(--sh2-text-soft); line-height: 1.85; }
.sh2-article ul, .sh2-article ol { padding-left: 24px; margin: 0 0 16px; }
.sh2-article li { margin-bottom: 8px; }
.sh2-article a { color: var(--sh2-primary-700); }
.sh2-article a:hover { text-decoration: underline; }
.sh2-article pre {
    background: var(--sh2-bg-soft);
    border: 1px solid var(--sh2-border);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
}
.sh2-article code { font-family: 'SF Mono', Menlo, Consolas, monospace; }

/* ===== Final CTA ===== */
.sh2-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--sh2-primary) 0%, #a78bfa 100%);
    color: #fff;
}
.sh2-cta h2 { color: #fff; font-size: clamp(24px, 3.5vw, 32px); margin: 0 0 16px; }
.sh2-cta p  { color: rgba(255,255,255,0.92); font-size: 16px; margin: 0; }
.sh2-cta .sh2-btn-primary { background: #fff; color: var(--sh2-primary-700); }
.sh2-cta .sh2-btn-primary:hover { background: #f3effd; }
.sh2-cta .sh2-btn-ghost { background: rgba(255,255,255,0.1); color: #fff; }
.sh2-cta .sh2-btn-ghost:hover { background: rgba(255,255,255,0.2); }

/* ===== Footer ===== */
.sh2-footer {
    background: #1a1530;
    color: #c5c0d8;
    padding: 56px 0 24px;
    margin-top: 0;
}
.sh2-footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 2fr;
    gap: 48px;
    margin-bottom: 32px;
}
.sh2-footer-brand-row { display: flex; align-items: center; gap: 12px; color: #fff; }
.sh2-footer-brand-row strong { font-size: 18px; }
.sh2-footer-tagline { font-size: 13.5px; line-height: 1.7; margin-top: 12px; color: #9d97b5; }

.sh2-footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.sh2-footer-nav h2 { font-size: 13px; color: #fff; margin: 0 0 12px; letter-spacing: 0.05em; text-transform: uppercase; }
.sh2-footer-nav ul { list-style: none; margin: 0; padding: 0; }
.sh2-footer-nav li { margin-bottom: 8px; }
.sh2-footer-nav a { color: #9d97b5; text-decoration: none; font-size: 13.5px; }
.sh2-footer-nav a:hover { color: #fff; }

.sh2-footer-copyright {
    border-top: 1px solid #2a2350;
    padding-top: 16px;
    text-align: center;
    color: #6b6587;
    font-size: 12.5px;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
    .sh2-nav { order: 3; width: 100%; }
    .sh2-nav-list { flex-wrap: wrap; }
    .sh2-header-tools { order: 2; margin-left: auto; }
}
@media (max-width: 880px) {
    .sh2-nav { display: none; }
    .sh2-nav-toggle { display: inline-flex; }
    .sh2-header-cta .sh2-btn-ghost { display: none; }
    .sh2-header-tools { width: 100%; margin-left: 0; justify-content: flex-end; }
}
@media (max-width: 720px) {
    /* タブレット〜小型 PC: 左右パディングを少し抑える */
    .sh2-container { padding: 0 20px; }
    .sh2-hero { padding: 64px 0 56px; }
    .sh2-section { padding: 56px 0; }
    .sh2-footer-inner { grid-template-columns: 1fr; gap: 32px; }
    .sh2-footer-nav { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .sh2-steps li { grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; padding: 20px; }
    .sh2-step-num { width: 44px; height: 44px; font-size: 18px; }
    .sh2-header-inner { min-height: 56px; gap: 12px; }
    .sh2-brand-tag { display: none; }
    .sh2-header-tools {
        flex-wrap: wrap;
        justify-content: flex-end;
        row-gap: 8px;
    }
    .sh2-lang-select {
        min-width: 0;
        max-width: 100%;
        flex: 1 1 120px;
    }
}
@media (max-width: 480px) {
    .sh2-container { padding: 0 16px; }
    .sh2-hero-cta .sh2-btn { width: 100%; }
    .sh2-footer-nav { grid-template-columns: 1fr; }
}

/* topic.php 403（組織・グループ限定）の案内ブロック */
.sh2-forbidden-box {
    text-align: center;
    padding: 24px 0 48px;
}
.sh2-forbidden-hint {
    color: var(--sh2-text-soft);
    line-height: 1.65;
    margin: 16px 0 0;
}
.sh2-forbidden-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}
