/*
 * EmDash（giftgrace-site.pages.dev）で書いた記事（ブログ記事の EmDash 版）の見た目。doc/blog_emdash_import.md
 * blog_helper が本文を <div id="emdash-article" class="emdash-article"> で囲んでこの CSS を読む（管理画面の記事詳細も）。
 * サイトの CSS（p の中央寄せ・.post .postWrap .article h2 の中央寄せ・.blog_detail の h2/h3/ul/img/表など）より
 * 強くするため、全部 #emdash-article から書く。色は EmDash のテーマ（青 #1e63b5・橙 #f59e0b・枠 #e6e3e3）
 */

#emdash-article {
    color: #333;
    font-size: 15.5px;
    line-height: 1.85;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

/* ---- 段落の枠（EmDash の 1 ブロック＝1 section） ---- */

#emdash-article section {
    margin: 0 0 28px;
    padding: 0;
}

#emdash-article section:last-child {
    margin-bottom: 0;
}

#emdash-article .text-block {
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px 2.5%;
    border: 3px solid #e6e3e3;
}

#emdash-article .text-block__body > * + * {
    margin-top: 1em;
}

#emdash-article .article-split__inner {
    max-width: 1000px;
    margin: 0 auto;
}

#emdash-article .article-split__stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#emdash-article .article-split__media {
    margin: 0;
    border: 5px solid #e5e5e5;
    border-radius: 2px;
    background: #efefef;
    overflow: hidden;
}

#emdash-article .article-split__media img {
    display: block;
    width: 100%;
    margin: 0 auto;
}

#emdash-article .article-split__body {
    color: #333;
}

#emdash-article .article-split__body + .article-split__body {
    margin-top: 1em;
}

#emdash-article .article-split__caption,
#emdash-article figcaption {
    margin: 6px 0 0;
    color: #666;
    font-size: 13px;
    text-align: center;
}

#emdash-article .article-hero__intro {
    margin: 0;
    color: #333;
}

#emdash-article .emdash-html-block {
    margin: 24px 0;
}

#emdash-article .text-block__body > .emdash-html-block:first-child {
    margin-top: 0;
}

/* ---- 文字 ---- */

#emdash-article p {
    margin: 0;
    padding: 0;
    color: #333;
    font-size: 15.5px;
    line-height: 1.85;
    text-align: left;
}

#emdash-article .has-text-align-center,
#emdash-article p.has-text-align-center {
    text-align: center;
}

#emdash-article .has-text-align-right,
#emdash-article p.has-text-align-right {
    text-align: right;
}

#emdash-article .has-text-align-justify {
    text-align: justify;
}

#emdash-article h2,
#emdash-article .text-block__headline,
#emdash-article .article-split__headline {
    position: static;
    margin: 0 0 20px;
    padding: 11px 16px;
    border: 0;
    border-left: 5px solid #1e63b5;
    background: #efefef;
    color: #222;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.45;
    text-align: left;
}

#emdash-article .article-split__headline {
    margin-bottom: 18px;
}

#emdash-article .text-block__body h2 {
    margin-top: 36px;
}

#emdash-article .text-block__body > h2:first-child {
    margin-top: 0;
}

#emdash-article h3 {
    position: static;
    margin: 30px 0 14px;
    padding: 0 0 7px;
    border: 0;
    border-bottom: 2px solid #f59e0b;
    background: none;
    color: #222;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
    text-align: left;
}

#emdash-article h4,
#emdash-article h5,
#emdash-article h6 {
    position: static;
    margin: 24px 0 10px;
    padding: 0;
    border: 0;
    background: none;
    color: #222;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    text-align: left;
}

#emdash-article strong,
#emdash-article b {
    color: inherit;
    font-weight: 700;
}

#emdash-article em,
#emdash-article i {
    background: none;
    font-style: italic;
}

#emdash-article a {
    color: #1e63b5;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#emdash-article a:hover {
    opacity: .8;
}

#emdash-article hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid #e0e0e0;
}

#emdash-article blockquote {
    margin: 1.5rem 0;
    padding: 12px 18px;
    border-left: 4px solid #e6e3e3;
    background: #fafafa;
}

/* ---- 箇条書き（EmDash は ✓ の丸） ---- */

#emdash-article ul {
    margin: 16px 0;
    padding: 0;
    list-style: none;
}

#emdash-article ul > li {
    position: relative;
    padding: 0 0 0 26px;
    color: #222;
    list-style: none;
}

#emdash-article ul > li::before {
    content: "\2713";
    position: absolute;
    top: 4px;
    left: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f59e0b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

#emdash-article ul ul,
#emdash-article ol ol,
#emdash-article ul ol,
#emdash-article ol ul {
    margin: .45em 0 0;
}

#emdash-article ol {
    margin: 16px 0;
    padding: 0 0 0 1.4em;
    list-style: decimal;
}

#emdash-article ol > li {
    padding: 0;
    list-style: decimal;
}

#emdash-article ol > li::before {
    content: none;
    display: none;
}

#emdash-article li + li {
    margin-top: .45em;
}

/* ---- 画像 ---- */

#emdash-article img {
    max-width: 100%;
    height: auto !important;
    margin: 0;
    padding: 0;
    border: 0;
    vertical-align: bottom;
}

#emdash-article figure {
    margin: 0;
}

#emdash-article .emdash-image {
    margin: 1.5rem 0;
}

#emdash-article .emdash-image--align-center {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* ---- 表 ---- */

#emdash-article .emdash-table-wrapper {
    max-width: 100%;
    margin: 24px 0;
    overflow-x: auto;
}

#emdash-article table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.4px;
}

#emdash-article table tr:nth-child(2n) {
    background: transparent;
}

#emdash-article table tbody tr:nth-child(2n) {
    background: #fafafa;
}

#emdash-article table th,
#emdash-article table td {
    width: auto;
    padding: .75rem;
    border: 1px solid #ddd;
    color: #222;
    text-align: left;
    vertical-align: top;
}

#emdash-article table th {
    background: #fff;
    font-weight: 600;
}

#emdash-article table th p,
#emdash-article table td p {
    margin: 0;
    font-size: 14.4px;
    line-height: 1.7;
}

/* ---- スマホ ---- */

@media (max-width: 767px) {
    #emdash-article {
        font-size: 15px;
    }

    #emdash-article p {
        font-size: 15px;
    }

    #emdash-article h2,
    #emdash-article .text-block__headline,
    #emdash-article .article-split__headline {
        font-size: 18px;
    }

    #emdash-article h3 {
        font-size: 16.5px;
    }

    #emdash-article .text-block {
        padding: 10px 12px;
    }
}
