.khs-heading {
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

.khs-heading,
.khs-heading * {
    box-sizing: border-box;
}

.khs-heading .khs-title {
    margin-block-start: 0;
    margin-block-end: 0;
}

.khs-heading .khs-prefix,
.khs-heading .khs-image {
    flex: 0 0 auto;
}

.khs-heading.khs-auto-wrap {
    clear: both;
}

.mce-content-body .khs-heading {
    min-height: 1.4em;
}

.mce-content-body .khs-heading:hover {
    outline: 1px solid rgba(47,115,83,.24);
    outline-offset: 3px;
}

.mce-content-body .khs-heading[data-mce-selected="1"] {
    outline: 2px solid rgba(47,115,83,.48);
    outline-offset: 3px;
}


.khs-heading .khs-eyebrow,
.khs-heading .khs-subtitle {
    box-sizing: border-box;
}

.khs-heading .khs-eyebrow-text,
.khs-heading .khs-subtitle-text {
    box-sizing: border-box;
}

.khs-heading .khs-eyebrow:has(.khs-eyebrow-text:empty),
.khs-heading .khs-subtitle:has(.khs-subtitle-text:empty) {
    display: none !important;
}

/* v0.4.0: 上ラベルをテーマCSSから守り、先頭パーツの有無に関係なく横書きに固定 */
.khs-heading .khs-eyebrow {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
}
.khs-heading .khs-eyebrow-text {
    display: inline-flex !important;
    width: max-content !important;
    max-width: 100% !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}
.khs-heading .khs-title {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
}
