/* =========================================================
   TAS 10h LMS Overrides (centralized)
   Scope: .tas-scope
========================================================= */

:root {
    --tas-green: #449079;
    --tas-green-dark: #2f6e5e;
    --tas-blue: #1736C3;
}

/* ---------------------------------------------------------
   0) Scope base
--------------------------------------------------------- */
.tas-scope {
    /* 必要なら講座だけ少し読みやすく */
    /* font-size: 16px; */
}

/* ---------------------------------------------------------
   1) Typography helpers
--------------------------------------------------------- */
.tas-scope .h1_tas,
.tas-scope .tas-page-title {
    font-size: 28px;
    line-height: 1.3;
    font-weight: 800;
}

.tas-scope .h2_tas {
    font-weight: 800;
    font-size: 22px;
    /* 18px/24pxの衝突を解消：中庸で統一 */
    line-height: 1.35;
    padding: 6px 14px;
    border-left: 6px solid var(--tas-blue);
    margin: 18px 0 18px 14px;
}

.tas-scope .h3_10h {
    margin: 16px auto;
    font-size: 18px;
    text-align: center;
    font-weight: 800;
}

.tas-scope .mt30_tas {
    margin-top: 30px;
}

.tas-scope .fs24 {
    font-size: 24px;
}

/* ---------------------------------------------------------
   2) Video blocks (yt_tas / review)
--------------------------------------------------------- */
.tas-scope .yt_tas {
    margin: 0 auto;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 16 / 9;
}

.tas-scope .yt_tas iframe {
    width: 100%;
    height: 100%;
}

.tas-scope .tas-review-video {
    margin: 50px 0;
    padding: 25px;
    border: 2px solid #1e4f63;
    border-radius: 8px;
    background: #f3f8fb;
}

.tas-scope .tas-review-title {
    margin-top: 0;
    font-size: 20px;
    color: #1e4f63;
    font-weight: 800;
}

.tas-scope .tas-review-lead {
    font-size: 14px;
    color: #444;
    margin-bottom: 20px;
}

.tas-scope .tas-review-embed iframe {
    width: 100%;
}

/* ---------------------------------------------------------
   3) Materials block
--------------------------------------------------------- */
.tas-scope .tas-material {
    margin: 20px 0;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
}

.tas-scope .tas-material--all {
    background: #f3f3f3;
}

.tas-scope .tas-material__title {
    font-weight: 700;
    margin-bottom: 10px;
}

.tas-scope .tas-material__btn {
    display: inline-block;
    margin-bottom: 8px;
}

.tas-scope .tas-material__desc {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* ---------------------------------------------------------
   4) Common buttons (course UI)
--------------------------------------------------------- */
.tas-scope .tas-btn-recommend {
    background: var(--tas-green);
    color: #fff !important;
    border-color: var(--tas-green);
}

.tas-scope .tas-btn-free {
    background: #f8f8f8;
}

.tas-scope .tas-nav-10h {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 30px 0;
}

.tas-scope .tas-nav-10h a {
    text-decoration: none;
    font-weight: 800;
}

/* Gate links (practice unlock button area) */
.tas-scope [id^="practiceGate-lesson-"] a {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid var(--tas-green);
    text-decoration: none;
    font-weight: 800;
    line-height: 1;
    background: var(--tas-green);
    color: #fff !important;
}

/* ---------------------------------------------------------
   5) Simple progress (/10h-course)
--------------------------------------------------------- */
.tas-scope .tas-course-progress {
    margin-top: 30px;
}

.tas-scope .tas-lesson {
    margin: 12px 0;
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 16px;
    transition: transform .2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tas-scope .tas-done {
    background: #e9f6ef;
    border-left: 6px solid #2e8b57;
    color: #2e8b57;
    font-weight: 700;
}

.tas-scope .tas-done::before {
    content: "✔ ";
}

.tas-scope .tas-next {
    background: #f4f8ff;
    border-left: 6px solid #2f6fed;
}

.tas-scope .tas-next a {
    text-decoration: none;
    font-weight: 800;
    color: #2f6fed;
}

.tas-scope .tas-next:hover {
    transform: translateX(4px);
}

.tas-scope .tas-complete {
    background: #fff5e6;
    border-left: 6px solid #ff9800;
}

.tas-scope .tas-complete a {
    text-decoration: none;
    font-weight: 800;
    color: #ff9800;
}

.tas-scope .tas-lesson__review {
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
}

.tas-scope .tas-done .tas-lesson__review {
    color: #2e8b57;
}

/* Progress bar */
.tas-scope .tas-progress {
    margin: 18px 0 26px;
}

.tas-scope .tas-progress__label {
    font-weight: 800;
    margin-bottom: 8px;
}

.tas-scope .tas-progress__bar {
    height: 14px;
    border-radius: 999px;
    background: #e9eef5;
    overflow: hidden;
}

.tas-scope .tas-progress__bar span {
    display: block;
    height: 100%;
    width: 0;
    background: #3fbfa5;
    border-radius: 999px;
    transition: width .4s ease;
}

/* ---------------------------------------------------------
   6) Detailed tiles (/certificate10h)
--------------------------------------------------------- */
.tas-scope .tas-tiles {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 820px) {
    .tas-scope .tas-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .tas-scope .tas-tiles {
        grid-template-columns: 1fr;
    }
}

.tas-scope .tas-tile {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

.tas-scope .tas-tile__head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.tas-scope .tas-tile__title {
    font-weight: 800;
}

.tas-scope .tas-step {
    font-size: 14px;
    margin-top: 8px;
    line-height: 1.7;
}

.tas-scope .tas-meta {
    font-size: 12px;
    margin-top: 6px;
    opacity: .85;
}

.tas-scope .tas-tile__btn {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #ccc;
    text-decoration: none;
    line-height: 1;
}

.tas-scope .tas-tile--cert {
    grid-column: 1 / -1;
    border: 2px solid var(--tas-green);
}

/* Badge: “共通ベース + 状態” に統合（重複排除） */
.tas-scope .tas-badge {
    display: inline-block;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #ccc;
    font-weight: 800;
}

.tas-scope .tas-badge--done {
    background: #eafff6;
    border-color: #9bd9c1;
    color: #1f6b56;
}

.tas-scope .tas-badge--todo {
    background: #fff7e6;
    border-color: #f1d08a;
    color: #7a5a14;
}

/* ---------------------------------------------------------
   7) WP-Pro-Quiz overrides (10h scope only)
   “旧CSSが強い”ので必要箇所だけ !important を使う
--------------------------------------------------------- */
.tas-scope .wpProQuiz_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    padding: 12px 18px;
    border-radius: 10px;
    transition: .15s ease;
    text-decoration: none !important;
}

/* ベース：枠ボタン */
.tas-scope .wpProQuiz_content .wpProQuiz_button,
.tas-scope .wpProQuiz_content a.wpProQuiz_button,
.tas-scope .wpProQuiz_content input.wpProQuiz_button {
    background: #fff !important;
    border: 1px solid var(--tas-green) !important;
    color: var(--tas-green) !important;

    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    float: none !important;
    margin: 0 !important;
}

/* 主ボタン（進む系） */
.tas-scope #tas-go-test,
.tas-scope .wpProQuiz_button[name="startQuiz"],
.tas-scope .wpProQuiz_button[name="checkQuiz"] {
    background: var(--tas-green) !important;
    border-color: var(--tas-green) !important;
    color: #fff !important;
}

.tas-scope #tas-go-test:hover,
.tas-scope .wpProQuiz_button[name="startQuiz"]:hover,
.tas-scope .wpProQuiz_button[name="checkQuiz"]:hover {
    background: var(--tas-green-dark) !important;
    border-color: var(--tas-green-dark) !important;
}

/* 副ボタン（戻る系） */
.tas-scope .wpProQuiz_button[name="restartQuiz"],
.tas-scope .wpProQuiz_button[name="reShowQuestion"],
.tas-scope .wpProQuiz_button[name="back"] {
    background: #fff !important;
    border: 1px solid var(--tas-green) !important;
    color: var(--tas-green) !important;
}

.tas-scope .wpProQuiz_button[name="restartQuiz"]:hover,
.tas-scope .wpProQuiz_button[name="reShowQuestion"]:hover,
.tas-scope .wpProQuiz_button[name="back"]:hover {
    background: rgba(68, 144, 121, .08) !important;
}

/* 結果画面のボタン群：詰まり対策 */
.tas-scope .wpProQuiz_content .wpProQuiz_results input.wpProQuiz_button,
.tas-scope .wpProQuiz_content .wpProQuiz_results a.wpProQuiz_button {
    margin-right: 10px !important;
    margin-top: 8px !important;
}

/* モバイル：ボタンを縦積みに */
@media (max-width: 520px) {
    .tas-scope .wpProQuiz_button {
        width: 100%;
        font-size: 16px;
        padding: 14px;
    }
}

/* ---------------------------------------------------------
   8) “全過程修了” ブロック（certificate10hページのやつ）
--------------------------------------------------------- */
.tas-scope .tas-final-complete {
    margin: 18px 0 26px;
    padding: 16px 18px;
    border-radius: 8px;
    background: #fff5e6;
    border-left: 6px solid #ff9800;
}

.tas-scope .tas-final-complete__title {
    font-weight: 900;
    margin-bottom: 10px;
}

.tas-scope .tas-final-complete__btn {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 900;
    background: #ff9800;
    color: #fff !important;
}

/* ---------------------------------------------------------
   9) Certificate print page (certificate10h-print)
   ※あなたの“強力印刷最適化”をそのまま移設
--------------------------------------------------------- */
.tas-scope .tas-cert-print button {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--tas-green);
    background: var(--tas-green);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.tas-scope .tas-cert-print button:hover {
    opacity: .9;
}

@page {
    size: A4 portrait;
    margin: 12mm;
}

@media print {
    body * {
        visibility: hidden !important;
    }

    .tas-cert-wrap,
    .tas-cert-wrap * {
        visibility: visible !important;
    }

    .tas-cert-print {
        display: none !important;
    }

    .tas-cert-wrap {
        position: fixed !important;
        inset: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;

        width: 180mm !important;
        max-width: 180mm !important;
        margin: auto !important;
        padding: 18mm 16mm !important;
        background: #fff !important;
        box-sizing: border-box !important;

        border: 1px solid #222 !important;
    }

    .tas-cert-title {
        font-size: 26px !important;
        font-weight: 800 !important;
        letter-spacing: .12em !important;
        margin: 0 0 14mm 0 !important;
        text-align: center !important;
        width: 100% !important;
    }

    .tas-cert-body {
        font-size: 14px !important;
        line-height: 1.9 !important;
        text-align: center !important;
        margin: 0 0 16mm 0 !important;
        width: 100% !important;
    }

    .tas-cert-name {
        font-size: 18px !important;
        font-weight: 700 !important;
        align-self: flex-start !important;
        margin: 0 0 18mm 0 !important;
        padding-bottom: 4mm !important;
        border-bottom: 1px solid #222 !important;
        min-width: 70mm !important;
    }

    .tas-cert-meta {
        font-size: 12px !important;
        line-height: 1.7 !important;
        align-self: flex-end !important;
        text-align: right !important;
        margin-top: auto !important;
        width: 100% !important;
    }

    .tas-cert-footer {
        font-size: 12px !important;
        line-height: 1.7 !important;
        align-self: flex-end !important;
        text-align: right !important;
        margin-top: 8mm !important;
        width: 100% !important;
    }
}

/* ---------------------------------------------------------
   Nav buttons (tas_nav_10h)
--------------------------------------------------------- */
.tas-scope .tas-nav-10h a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, .14);
    background: #fff;
    text-decoration: none !important;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
    transition: transform .15s ease, opacity .15s ease;
}

.tas-scope .tas-nav-10h a:hover {
    opacity: .92;
    transform: translateY(-1px);
}

/* “進捗一覧へ” だけメイン色にしたい場合（中央リンク） */
.tas-scope .tas-nav-10h a[href*="certificate10h"] {
    background: var(--tas-green);
    border-color: var(--tas-green);
    color: #fff !important;
}

.tas-scope .tas-nav-10h__next {
    background: var(--tas-green);
    border-color: var(--tas-green);
    color: #fff !important;
}

.tas-scope .tas-practice-main {
    display: inline-block;
    padding: 16px 28px;
    font-size: 18px;
    font-weight: 800;
    border-radius: 14px;
    background: var(--tas-green);
    border: 1px solid var(--tas-green);
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .12);
    transition: .2s ease;
}

.tas-scope .tas-practice-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .15);
}

.tas-scope .tas-material__btn {
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    background: #1e4f63;
    /* 今の雰囲気を維持 */
    color: #fff !important;
}

.tas-scope .tas-material--all .tas-material__btn {
    background: #f3f3f3;
    border: 1px solid #ccc;
    color: #333 !important;
}

/* =========================================================
   Lesson page CTA hierarchy
   - Practice gate = Primary
   - Lesson PDF = Secondary
   - All ZIP = Tertiary
========================================================= */

/* 1) 練習問題に進む：主ボタン化（ゲート内だけ強制） */
.tas-scope p[id^="practiceGate-lesson-"]>a.wpProQuiz_button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px 28px !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    border-radius: 14px !important;

    background: var(--tas-green) !important;
    border: 1px solid var(--tas-green) !important;
    color: #fff !important;

    box-shadow: 0 6px 14px rgba(0, 0, 0, .14) !important;
    text-shadow: none !important;
    margin: 0 !important;
}

.tas-scope p[id^="practiceGate-lesson-"]>a.wpProQuiz_button:hover {
    background: var(--tas-green-dark) !important;
    border-color: var(--tas-green-dark) !important;
    transform: translateY(-1px);
}

/* ヒント文の余白（見た目の呼吸） */
.tas-scope p[id^="practiceHint-lesson-"] {
    margin-top: 10px;
}

/* 2) 教材PDF（この時限）：セカンダリ */
.tas-scope .tas-material:not(.tas-material--all) .tas-material__btn.wpProQuiz_button {
    padding: 12px 18px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    border-radius: 12px !important;

    background: #1e4f63 !important;
    border: 1px solid #1e4f63 !important;
    color: #fff !important;

    box-shadow: none !important;
}

/* 3) 教材一式（まとめ）：弱め（グレー） */
.tas-scope .tas-material--all .tas-material__btn.wpProQuiz_button {
    padding: 12px 18px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    border-radius: 12px !important;

    background: #f3f3f3 !important;
    border: 1px solid #d0d0d0 !important;
    color: #333 !important;

    box-shadow: none !important;
}

/* 4) 教材カード内のボタンがデカすぎるのを抑える（共通） */
.tas-scope .tas-material__btn.wpProQuiz_button {
    min-width: 220px;
    /* 見栄え用。不要なら削除 */
}

/* 5) モバイル：ボタン幅を揃える（読みやすさUP） */
@media (max-width: 520px) {

    .tas-scope p[id^="practiceGate-lesson-"]>a.wpProQuiz_button,
    .tas-scope .tas-material__btn.wpProQuiz_button {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* =========================================================
   Materials cards spacing/polish
========================================================= */
.tas-scope .tas-material {
    margin-top: 18px;
    /* 上の呼吸 */
    padding: 18px;
    /* 中の余白 */
    border-radius: 12px;
}

.tas-scope .tas-material__title {
    margin-bottom: 12px;
    font-weight: 800;
}

/* ボタンの上下の呼吸（本文に食い込むのを防ぐ） */
.tas-scope .tas-material__btn.wpProQuiz_button {
    margin: 6px 0 10px !important;
}

/* まとめ版は「弱め＋分かりやすい」 */
.tas-scope .tas-material--all {
    background: #f7f7f7;
    /* 薄い背景を追加 */
    border-color: #e3e3e3;
}

/* まとめボタンも“弱い”けど押せる感は残す */
.tas-scope .tas-material--all .tas-material__btn.wpProQuiz_button {
    background: #ffffff !important;
    border: 1px solid #d0d0d0 !important;
    color: #333 !important;
}

.tas-scope .tas-material--all .tas-material__btn.wpProQuiz_button:hover {
    background: #fafafa !important;
}

/* =========================================================
   tas_nav_10h_v2 hierarchy
   left: weak / center: medium / right: primary
========================================================= */
.tas-scope .tas-nav-10h {
    margin: 34px 0;
    gap: 12px;
}

.tas-scope .tas-nav-10h a {
    min-width: 140px;
    padding: 12px 16px;
}

/* 左：学習トップ（弱） */
.tas-scope .tas-nav-10h__home {
    background: #fff !important;
    border-color: rgba(0, 0, 0, .12) !important;
    color: #333 !important;
    box-shadow: none !important;
}

/* 中央：進捗（詳細）（準主：緑枠＋薄緑） */
.tas-scope .tas-nav-10h__detail {
    background: rgba(68, 144, 121, .10) !important;
    border-color: rgba(68, 144, 121, .45) !important;
    color: var(--tas-green) !important;
    box-shadow: none !important;
}

/* 右：次へ（主） */
.tas-scope .tas-nav-10h__next {
    background: var(--tas-green) !important;
    border-color: var(--tas-green) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .12) !important;
}

.tas-scope .tas-nav-10h__next:hover {
    background: var(--tas-green-dark) !important;
    border-color: var(--tas-green-dark) !important;
}

/* 進捗（詳細）の文字色を強制的に戻す（最終上書き） */
.tas-scope .tas-nav-10h a.tas-nav-10h__detail {
    color: var(--tas-green) !important;
}

/* もし detail が緑背景になってしまっている場合の保険 */
.tas-scope .tas-nav-10h a.tas-nav-10h__detail {
    background: rgba(68, 144, 121, .10) !important;
    border-color: rgba(68, 144, 121, .45) !important;
}
/* 練習問題ボタンの上下マージン強化 */
.tas-scope p[id^="practiceGate-lesson-"] {
    margin: 28px 0 36px !important;
}

/* ヒント文との距離を少し広げる */
.tas-scope p[id^="practiceHint-lesson-"] {
    margin-top: -10px;
    margin-bottom: 26px;
}

/* 直後の教材カードが詰まらないように */
.tas-scope .tas-material {
    margin-top: 24px;
}
.tas-scope p[id^="practiceGate-lesson-"]>a {
    margin-top: 6px;
}

.tas-scope .h2_tas {
    font-size:24px;
}

.tas-scope .tas-material {
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

/* =========================================================
   WP-Pro-Quiz Answer State Redesign
========================================================= */

/* 正解 */
.tas-scope .wpProQuiz_answerCorrect {
    background: rgba(68, 144, 121, .12) !important;
    /* ブランド緑の薄塗り */
    border: 1px solid rgba(68, 144, 121, .35) !important;
    color: #1f3f37 !important;
    /* 濃い文字で可読性UP */
    font-weight: 600;
}

/* 正解のラジオ選択マークも濃く */
.tas-scope .wpProQuiz_answerCorrect input {
    accent-color: var(--tas-green);
}

/* 不正解 */
.tas-scope .wpProQuiz_answerIncorrect {
    background: rgba(200, 40, 40, .10) !important;
    /* 落ち着いた赤系 */
    border: 1px solid rgba(200, 40, 40, .35) !important;
    color: #5a1f1f !important;
    font-weight: 600;
}

/* 不正解の選択マーク */
.tas-scope .wpProQuiz_answerIncorrect input {
    accent-color: #c62828;
}

.tas-scope .wpProQuiz_answerCorrect {
    border-left: 6px solid var(--tas-green) !important;
}

.tas-scope .wpProQuiz_answerIncorrect {
    border-left: 6px solid #c62828 !important;
}