/* 画面表示：それなりに整える */
.tas-scope .tas-cert-print button {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #2f7d6a;
    background: #3b8f79;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.tas-scope .tas-cert-print button:hover {
    opacity: .9;
}

.tas-scope .tas-cert-wrap {
    max-width: 900px;
    margin: 18px auto 0;
    padding: 28px 26px;
    background: #fff;
    border: 2px solid #222;
    box-sizing: border-box;
}

/* 印刷時：サンドボックス以外は出さない（displayで“高さごと消す”） */
@page {
    size: A4 portrait;
    margin: 12mm;
}

@media print {
    body.tas-cert-printing>*:not(#tas-cert-print-root) {
        display: none !important;
    }

    #tas-cert-print-root {
        display: block !important;
        padding: 0 !important;
    }

    /* サンドボックス内のボタン等は不要なら消す */
    #tas-cert-print-root .tas-cert-print {
        display: none !important;
    }

    /* A4内で中央寄せ・固定 */
    #tas-cert-print-root .tas-cert-wrap {
        position: fixed !important;
        inset: 0 !important;
        width: 180mm !important;
        max-width: 180mm !important;
        margin: auto !important;
        padding: 18mm 16mm !important;
        box-sizing: border-box !important;
        border: 1px solid #222 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }

    #tas-cert-print-root .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-print-root .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-print-root .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-print-root .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-print-root .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;
    }
}

/* =========================
   Certificate screen view
   ========================= */

/* ボタン：中央寄せ */
.tas-scope .tas-cert-print {
    display: flex;
    justify-content: center;
    margin: 18px 0 22px;
}

/* 証明書ブロック：画面上でも“それっぽく” */
.tas-scope .tas-cert-wrap {
    max-width: 920px;
    margin: 0 auto 40px;
    padding: 48px 56px;
    border: 2px solid #222;
    background: #fff;
    box-sizing: border-box;
}

/* タイトル・本文などの見やすさ（画面用） */
.tas-scope .tas-cert-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: .12em;
    text-align: center;
    margin: 0 0 26px;
}

.tas-scope .tas-cert-body {
    font-size: 16px;
    line-height: 2.0;
    text-align: center;
    margin: 0 0 28px;
}

.tas-scope .tas-cert-name {
    font-size: 20px;
    font-weight: 700;
    margin: 10px auto 34px;
    text-align: center;
    display: inline-block;
    padding-bottom: 8px;
    border-bottom: 1px solid #222;
    min-width: 240px;
}

.tas-scope .tas-cert-meta,
.tas-scope .tas-cert-footer {
    font-size: 13px;
    line-height: 1.8;
    text-align: right;
}

.tas-cert-company {
    text-align: center;
}

.tas-cert-footer {
    margin-top:1em;
}