/* Shared article body styles (public page + manage editor preview) */
.markdown-body {
    color: #0f172a;
    line-height: 1.85;
    font-size: 16px;
}
.markdown-body h2 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin: 2.4rem 0 0.8rem;
    line-height: 1.35;
    position: relative;
    padding-bottom: 0.35rem;
}
.markdown-body h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #12c2cd 0%, #04cc00 100%);
}
.markdown-body h3 {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    margin: 1.8rem 0 0.6rem;
    line-height: 1.5;
}
.markdown-body h1 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin: 1.6rem 0 0.8rem;
    line-height: 1.35;
}
.markdown-body .markdown-heading {
    position: relative;
    scroll-margin-top: 96px;
}
.markdown-body .markdown-heading .anchor {
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0.2rem;
    font-size: 0.9rem;
}
.markdown-body .markdown-heading:hover .anchor {
    opacity: 0.7;
}
.markdown-body p {
    margin: 0 0 1.1rem;
    word-break: break-word;
    text-align: left !important;
}
.markdown-body ul,
.markdown-body ol {
    margin: 0 0 1.2rem 1.2rem;
    padding: 0;
}
.markdown-body li {
    margin: 0 0 0.45rem;
}
.markdown-body blockquote {
    margin: 1.4rem 0;
    padding: 1rem 1.2rem;
    border-left: 4px solid #12c2cd;
    background: linear-gradient(90deg, rgba(18, 194, 205, 0.08), rgba(4, 204, 0, 0.05));
    color: #0f172a;
    border-radius: 12px;
}
.markdown-body a:not(.btn-common):not(.btn-contents) {
    color: #0f766e;
    text-decoration: none;
    border-bottom: 1px solid rgba(15, 118, 110, 0.4);
    transition: color 0.2s ease, border-color 0.2s ease;
}
.markdown-body a:not(.btn-common):not(.btn-contents):hover {
    color: #0ea5a4;
    border-color: rgba(14, 165, 164, 0.7);
}
.markdown-body hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0));
    margin: 2rem 0;
}
.markdown-body code {
    background: #f1f5f9;
    color: #0f172a;
    padding: 0.15rem 0.35rem;
    border-radius: 6px;
    font-size: 0.95em;
}
.markdown-body pre {
    background: #0b1220;
    color: #e2e8f0;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    overflow: auto;
}
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2rem 0;
    font-size: 0.95rem;
}
.markdown-body table th,
.markdown-body table td {
    border: 1px solid #e5e7eb;
    padding: 0.6rem 0.8rem;
}
.markdown-body table th {
    background: #f8fafc;
    text-align: left;
}
.markdown-body img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: unset !important;
    object-fit: contain !important;
    margin: 1.5rem auto !important;
    background: #f8fafc !important;
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(15, 23, 42, 0.08);
}
.markdown-body img[width][height] {
    aspect-ratio: auto !important;
    height: auto !important;
}
.markdown-body figure img {
    margin: 0 auto !important;
}
.markdown-body iframe,
.markdown-body video {
    display: block !important;
    width: 100% !important;
    max-width: min(100%, 900px) !important;
    aspect-ratio: 16 / 9;
    height: auto !important;
    margin: 1.5rem auto !important;
}
.markdown-body iframe[width][height],
.markdown-body video[width][height] {
    aspect-ratio: auto !important;
    height: auto !important;
}
.markdown-body .btn-common.btn-contents,
.markdown-body a.btn-common.btn-contents {
    display: block !important;
    width: fit-content !important;
    min-width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 52px !important;
    padding: 12px 28px !important;
    border: 1px solid #fff !important;
    border-radius: 900px !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    text-align: center !important;
    text-decoration: none !important;
    margin: 1.5rem auto !important;
    transition: all 0.3s ease !important;
    background: linear-gradient(96.77deg, #04CC00 -0.96%, #12C2CD 100%) !important;
    box-shadow: 0 12px 24px rgb(62 239 127 / 20%) !important;
    white-space: nowrap !important;
    position: relative !important;
}
.markdown-body .btn-common.btn-contents.cta_btn_color,
.markdown-body a.btn-common.btn-contents.cta_btn_color {
    background: linear-gradient(96.77deg, #04CC00 -0.96%, #12C2CD 100%) !important;
    box-shadow: 0 12px 24px rgb(62 239 127 / 20%) !important;
}
.markdown-body .btn-common.btn-contents:hover,
.markdown-body a.btn-common.btn-contents:hover {
    filter: brightness(1.1) !important;
    text-decoration: none !important;
}
.markdown-body .btn-contents {
    width: fit-content !important;
    text-align: center !important;
}
.markdown-body .btn-contents .icons-arrow-textgo {
    display: none !important;
}
.markdown-body p .btn-common,
.markdown-body p a.btn-common {
    display: block !important;
    margin: 1.5rem auto !important;
}
.markdown-body div[style*="background"],
.markdown-body div[style*="background-color"],
.markdown-body p[style*="background"],
.markdown-body p[style*="background-color"] {
    display: block !important;
    width: fit-content !important;
    min-width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 52px !important;
    padding: 12px 28px !important;
    border: 1px solid #fff !important;
    border-radius: 900px !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    text-align: center !important;
    text-decoration: none !important;
    margin: 1.5rem auto !important;
    transition: all 0.3s ease !important;
    background: linear-gradient(96.77deg, #04CC00 -0.96%, #12C2CD 100%) !important;
    box-shadow: 0 12px 24px rgb(62 239 127 / 20%) !important;
    white-space: nowrap !important;
    position: relative !important;
    cursor: pointer !important;
}
.markdown-body div[style*="background"] *,
.markdown-body div[style*="background-color"] *,
.markdown-body p[style*="background"] *,
.markdown-body p[style*="background-color"] * {
    color: #fff !important;
    text-decoration: none !important;
}
.markdown-body .callout,
.markdown-body .info-box {
    display: block !important;
    width: fit-content !important;
    min-width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 52px !important;
    padding: 12px 28px !important;
    border: 1px solid #fff !important;
    border-radius: 900px !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    text-align: center !important;
    text-decoration: none !important;
    margin: 1.5rem auto !important;
    transition: all 0.3s ease !important;
    background: linear-gradient(96.77deg, #04CC00 -0.96%, #12C2CD 100%) !important;
    box-shadow: 0 12px 24px rgb(62 239 127 / 20%) !important;
    white-space: nowrap !important;
    position: relative !important;
    cursor: pointer !important;
}
.markdown-body .btn-common,
.markdown-body a.btn-common,
.markdown-body button.btn-common,
.markdown-body .btn,
.markdown-body a.btn,
.markdown-body button.btn {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
}

/* Bold highlight (public pc.css) */
.markdown-body strong,
.markdown-body b {
    display: inline;
    font-weight: bold;
    background-position: left -100% center;
    padding-bottom: 0.9em;
    background-size: 200% 0.5rem;
    background-repeat: repeat-x;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0) 50%, rgb(255, 255, 102) 50%);
}

/* Manage editor: match public article typography (Quill defaults are tighter) */
.rich-html-editor-wrap[data-editor-variant="article"] .announcement-editor-wrap .ql-container.ql-snow {
    font-size: 16px !important;
    font-family: 'Noto Sans JP', system-ui, sans-serif !important;
}

.rich-html-editor-wrap[data-editor-variant="article"] .announcement-editor-wrap .ql-editor.markdown-body {
    line-height: 1.85 !important;
    font-size: 16px !important;
    font-family: 'Noto Sans JP', system-ui, sans-serif !important;
}

.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body p,
.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body ol,
.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body ul,
.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body pre,
.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body blockquote,
.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body h1,
.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body h2,
.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body h3,
.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body h4 {
    margin-top: 0;
    padding-top: 0;
}

.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body p {
    margin: 0 0 1.1rem !important;
    line-height: 1.85 !important;
    word-break: break-word;
}

.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body ul,
.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body ol {
    margin: 0 0 1.2rem 1.2rem !important;
    padding: 0 !important;
}

.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body li {
    margin: 0 0 0.45rem !important;
    line-height: 1.85 !important;
}

.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body h2 {
    margin: 2.4rem 0 0.8rem !important;
    line-height: 1.35 !important;
}

/* 編集画面では H2 下の緑ラインは非表示（公開ページ・プレビューのみ） */
.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body h2::after {
    display: none;
}

.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body h3 {
    margin: 1.8rem 0 0.6rem !important;
    line-height: 1.5 !important;
}

.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body a:not(.btn-common):not(.btn-contents) {
    color: #0f766e;
    text-decoration: none;
    border-bottom: 1px solid rgba(15, 118, 110, 0.4);
}

/* Manage editor: keep editable images practical */
.rich-html-editor-wrap[data-editor-variant="article"] .ql-editor.markdown-body img {
    width: auto !important;
    max-width: 100% !important;
    aspect-ratio: unset !important;
    box-shadow: none !important;
    border-radius: 4px !important;
    margin: 0.75rem 0 !important;
    object-fit: contain !important;
}
