@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;600;700&display=swap");

:root {
    --brand-color: #962324;
    --brand-bright-color: #BE2C2E;
    --brand-sub-color: #962324;
    --brand-sub-bright-color: #BE2C2E;
    --brand-dark: #3E3E3E;
    --brand-black: #212529;
    --brand-gray: #7C7C7C;
    --border-gray: #d4d4d4;
    --bk-gray: #F0F0F0;
    --brand-blue: #334D6E;
    --brand-gray-light: #F5F5F5;
    --brand-light-black: #373F41;
}

.btn-darkblue, .btn-darkblue:hover {
    background-color: var(--brand-blue);
    color: #FFF;
    border-radius: 0;
}

.btn-darkblue:hover {
    opacity: .9;
}

.text-brand {
    color: var(--brand-color);
}

.modal .form-control,
.modal .form-select,
.modal .date-form-control {
    padding: .75rem 1.25rem;
}

#categoryAddModal .form-control::placeholder {
    color: #999999;
}

#tagAddModal .form-control::placeholder {
    color: #999999;
}

#userAddModal .form-control::placeholder {
    color: #999999;
}

#categoryAddModal .form-control,
#categoryAddModal .form-select {
    padding-top: 10px;
    padding-bottom: 10px;
}

#tagAddModal .form-control,
#tagAddModal .form-select {
    padding-top: 10px;
    padding-bottom: 10px;
}

#userAddModal .form-control,
#userAddModal .form-select {
    padding-top: 10px;
    padding-bottom: 10px;
}

.stack {
    display: flex;
    flex-direction: column;
}

.stack--50 {
    gap: 50px;
}

.stack--40 {
    gap: 40px;
}

.stack--30 {
    gap: 30px;
}

.stack--20 {
    gap: 20px;
}

.stack--10 {
    gap: 10px;
}

.stack--9 {
    gap: 9.5px;
}

.stack--2 {
    gap: 2px;
}

body {
    font-family: "Noto Sans JP", "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
    background: #f5f6f8;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.form-check-input:checked {
    background-color: var(--brand-color);
    border-color: var(--brand-color);
}

    .form-check-input:checked[type="checkbox"] {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3 6-6'/%3e%3c/svg%3e");
    }

.cms-multiselect-toggle {
    display: flex;
    align-items: center;
    width: 100%;
}

.cms-multiselect-menu {
    max-height: 280px;
    overflow: auto;
}

    .cms-multiselect-menu li label {
        width: 100%;
        padding: 6px 8px;
        border-radius: 4px;
        cursor: pointer;
    }

        .cms-multiselect-menu li label:hover {
            background: rgba(13, 110, 253, 0.08);
        }

.cms-navbar {
    min-height: 56px;
    color: var(--brand-blue);
}

.cms-layout {
    min-height: calc(100vh - 116px);
}

.cms-sidebar {
    background: #fff;
    min-height: calc(100vh - 116px);
    position: sticky;
    top: 56px;
    overflow-y: auto;
}

aside.cms-sidebar a.btn.btn-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1;
    min-height: 34px;
    border-radius: 0;
}

    aside.cms-sidebar a.btn.btn-brand > img {
        display: block;
    }

.cms-main {
    min-height: calc(100vh - 116px);
    background-color: #fff;
}

.page-title {
    font-size: 1.5rem;
    color: var(--brand-blue);
}

.cms-card {
    background: #fff;
}

.input-group {
    padding: 0.625rem;
    max-width: 652px;
    border: 1.5px solid var(--brand-blue);
    border-radius: 0px;
}

.cms-extra-conditions {
    background: var(--brand-gray-light);
    padding: 14px 16px;
    border-radius: 4px;
}

.cms-extra-conditions-inner {
    max-width: 642px;
}

.cms-extra-conditions__header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.cms-extra-conditions__clear {
    border: 0;
    background: transparent;
    color: var(--brand-black);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0;
    cursor: pointer;
}

.cms-extra-conditions__row {
    display: flex;
    align-items: center;
}

    .cms-extra-conditions__row + .cms-extra-conditions__row {
        margin-top: 12px;
    }

.cms-extra-conditions__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--brand-black);
}

.cms-extra-conditions__control {
    flex: 1 1 auto;
}

.cms-extra-conditions__control--range {
    display: flex;
    align-items: center;
    gap: 7px;
}

.cms-extra-conditions__tilde {
    flex: 0 0 auto;
    color: var(--brand-black);
    font-weight: 600;
    font-size: 0.875rem;
}

.cms-datetime {
    width: 240px;
}

@media (max-width: 767.98px) {
    .search-form .input-group {
        width: 100%;
        max-width: 100%;
    }

    .cms-main .cms-filter {
        display: grid;
        grid-template-columns: 72px 1fr;
        align-items: center;
        column-gap: 8px;
        row-gap: 0;
    }

    .cms-main .cms-filter-label {
        white-space: nowrap;
        text-align: left;
    }

    .cms-main .cms-filter-control {
        min-width: 0;
    }

    .cms-extra-conditions__row {
        flex-direction: column;
        align-items: stretch;
    }

    .cms-navbar .container-fluid {
        justify-content: space-between;
    }

    .cms-navbar .navbar-brand {
        margin-right: 0;
    }

    .cms-navbar__user {
        flex: 0 0 auto;
    }

    .cms-extra-conditions__label {
        min-width: 0;
    }

    .cms-extra-conditions__control--range {
        flex-direction: column;
        align-items: stretch;
    }
}

.date-form-control {
    border: 1px solid #dee2e6;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0%;
    width: 100%;
}

.edit-form .date-form-control {
    border: 1px solid #dee2e6;
    font-size: 1.125rem;
    line-height: 1.5;
    padding: 15px;
    border-radius: 0%;
}

#keyword.form-control {
    border: none !important;
}

#categoryMulti.form-select, #tagMulti.form-select, #publishDate.form-control,
#sort.form-select, #pageSize.form-select, #CsvExportMulti.form-select {
    border-radius: 0%;
}

#CsvExportMulti.form-select {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #FFF;
    font-size: 0.75em;
    padding-top: .4rem;
    padding-bottom: .4rem;
    background-image: url("../images/caret-down-fill_white.svg");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px 14px;
}

#publishDate.form-control {
    background-image: url("../images/calendar.png");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px 14px;
    padding-right: 2.25rem;
}

    #publishDate.form-control::-webkit-calendar-picker-indicator {
        opacity: 0;
    }

#editorPublishFrom.form-control,
#editorPublishTo.form-control {
    background-image: url("../images/calendar.png");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px 14px;
    padding-right: 2.25rem;
}

    #editorPublishFrom.form-control::-webkit-calendar-picker-indicator,
    #editorPublishTo.form-control::-webkit-calendar-picker-indicator {
        opacity: 0;
    }

#editorRelatedPublishDate.form-control {
    background-image: url("../images/calendar.png");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px 14px;
    padding-right: 2.25rem;
}

    #editorRelatedPublishDate.form-control::-webkit-calendar-picker-indicator {
        opacity: 0;
    }

#editorFreePublishFrom.form-control,
#editorFreePublishTo.form-control {
    background-image: url("../images/calendar.png");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px 14px;
    padding-right: 2.25rem;
}

    #editorFreePublishFrom.form-control::-webkit-calendar-picker-indicator,
    #editorFreePublishTo.form-control::-webkit-calendar-picker-indicator {
        opacity: 0;
    }

#editorSortArticleDatetime.form-control {
    background-image: url("../images/calendar.png");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px 14px;
    padding-right: 2.25rem;
}

    #editorSortArticleDatetime.form-control::-webkit-calendar-picker-indicator {
        opacity: 0;
    }

.cms-filter {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.cms-filter-label {
    flex: 0 0 auto;
}

.cms-filter-control {
    flex: 0 0 auto;
}

.cms-filter--category .cms-filter-label {
    width: 100%;
    max-width: 100%;
}

.cms-filter--category .cms-filter-control {
    width: 100%;
    max-width: 100%;
}

.cms-filter--tag .cms-filter-label {
    width: 100%;
    max-width: 100%;
}

.cms-filter--tag .cms-filter-control {
    width: 100%;
    max-width: 100%;
}

.cms-filter--publishDate .cms-filter-label,
.cms-filter--unpublishDate .cms-filter-label {
    width: 100%;
    max-width: 100%;
}

.cms-filter--publishDate .cms-filter-control,
.cms-filter--unpublishDate .cms-filter-control {
    width: 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .cms-filter {
        flex-direction: row;
        align-items: center;
        gap: 0px;
    }

    .cms-filter--category .cms-filter-label {
        width: 71px;
        max-width: 71px;
        font-size: 0.875rem;
    }

    .cms-main .cms-filter--category .cms-filter-control {
        width: 280px;
        max-width: 280px;
    }

    #articleEditorModal .cms-filter-control,
    #externalDeliveryModal .cms-filter-control {
        width: 350px;
        max-width: 350px;
    }

    .cms-filter--tag .cms-filter-label {
        width: 43px;
        max-width: 43px;
        font-size: 0.875rem;
    }

    .cms-filter--tag .cms-filter-control {
        width: 280px;
        max-width: 280px;
    }

    .cms-filter--publishDate .cms-filter-label {
        width: 57px;
        max-width: 57px;
        font-size: 0.875rem;
    }

    .cms-filter--unpublishDate .cms-filter-label {
        width: 87px;
        max-width: 87px;
        font-size: 0.875rem;
    }

    .cms-filter--publishDate .cms-filter-control,
    .cms-filter--unpublishDate .cms-filter-control {
        width: 180px !important;
        max-width: 180px !important;
    }
}

.cms-filter-control > .form-select,
.cms-filter-control > .form-control {
    width: 100%;
    border-radius: 0;
}

.form-select {
    /*--bs-form-select-bg-img: url("../images/down-fill.png");*/
    --bs-form-select-bg-img: url("../images/caret-down-fill.svg");
}

.form-select {
    background-image: var(--bs-form-select-bg-img), var(--bs-form-select-bg-icon, none);
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px 14px;
}

.btn-outline-brand-sub.form-select {
    background-image: url("../images/caret-down-fill_red.svg");
}

#articleTableBody td {
    margin: 1.5rem;
}


.cms-page-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    object-fit: contain;
}

.cms-table thead th {
    background: var(--bk-gray);
    color: var(--brand-black);
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
}

.cms-sort-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.cms-sort-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    object-fit: contain;
}

.cms-table {
    /*table-layout: fixed;*/
    border-collapse: collapse;
    width: 100%;
    /*min-width: 800px;*/
}

/* ==============================
 * 記事編集：関連記事（テーブル/列幅固定/余白調整）
 * - #articleEditorModal 配下にスコープ
 * ============================== */
#articleEditorModal .cms-table.cms-table-fixed {
    width: max-content;
    min-width: 0;
    border-collapse: collapse;
}

.cms-table th,
.cms-table td {
    vertical-align: middle;
    padding-right: 25px;
}

#articleEditorModal .cms-table.cms-table-fixed th,
#articleEditorModal .cms-table.cms-table-fixed td {
    box-sizing: border-box;
    padding-left: 10px;
    padding-right: 10px;
    background-clip: padding-box;
}

    #articleEditorModal .cms-table.cms-table-fixed th:first-child,
    #articleEditorModal .cms-table.cms-table-fixed td:first-child {
        padding-left: 20px;
    }

    #articleEditorModal .cms-table.cms-table-fixed th:last-child,
    #articleEditorModal .cms-table.cms-table-fixed td:last-child {
        padding-right: 20px;
    }

.cms-table th:last-child,
.cms-table td:last-child {
    padding-right: 0;
}

.cms-table th:nth-child(1),
.cms-table td:nth-child(1) {
    padding-right: 0;
}

#articleEditorModal .cms-table.cms-table-fixed th:nth-child(1),
#articleEditorModal .cms-table.cms-table-fixed td:nth-child(1) {
    padding-right: 10px;
}

#articleEditorModal .cms-related-table-wrap .cms-table.cms-table-fixed tbody tr {
    height: 90px;
}

#articleEditorModal .cms-related-table-wrap .cms-table.cms-table-fixed tbody td {
    height: 90px;
}

.cms-table td {
    white-space: normal;
    overflow-wrap: anywhere;
}

    .cms-table td > a {
        display: block;
        white-space: normal;
        overflow-wrap: anywhere;
    }

/*#articleTableBody tr {
    height: 90px;
}

#articleTableBody td {
    height: 90px;
}*/

#articleTableBody td {
    font-size: 0.875rem;
}

#articleEditorModal .cms-related-table-wrap .cms-table.cms-table-fixed tbody td {
    font-size: 1rem;
}

    #articleEditorModal .cms-related-table-wrap .cms-table.cms-table-fixed tbody td:nth-child(2) {
        font-size: 1.125rem;
    }

.cms-pagination {
    display: flex;
    justify-content: center;
}

.cms-pagination__list {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cms-category-simple {
    margin: 0 auto;
}

    .cms-category-simple .cms-category-simple__search.input-group {
        max-width: 650px;
        width: 100%;
    }

.cms-category-simple-table {
    /*min-width: 0;*/
    /*table-layout: fixed;*/
}

.cms-category-simple__name {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

    .cms-category-simple__name img {
        width: 16px;
        height: 16px;
        display: block;
    }

    .cms-category-simple__name a {
        color: #109cf1;
        text-decoration: none;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

        .cms-category-simple__name a:hover {
            text-decoration: underline;
        }

.cms-category-simple__ext {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    object-fit: contain;
    opacity: 0.8;
}

.cms-category-simple__name[data-depth="1"] {
    padding-left: 24px;
}

.cms-category-simple__name[data-depth="2"] {
    padding-left: 48px;
}

.cms-category-simple__slug {
    color: #999999;
    font-size: 12px;
}

.cms-category-simple .cms-category-simple-table td.cms-category-simple__slug {
    color: #999999 !important;
    font-size: 12px !important;
}

/*.cms-category-simple .cms-category-simple-table tbody td {
    padding-top: 20px;
    padding-bottom: 20px;
}

.cms-category-simple .cms-category-simple-table th,
.cms-category-simple .cms-category-simple-table td {
    vertical-align: top !important;
}*/

.cms-category-simple__desc {
    font-size: 0.875rem;
    color: var(--brand-black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cms-category-simple .cms-category-simple-table img[src$="trash-box.png"],
.cms-category-simple .cms-category-simple-table img[src$="edit.png"] {
    width: 20px;
    height: 20px;
    display: block;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(27%) sepia(11%) saturate(1217%) hue-rotate(172deg) brightness(95%) contrast(89%);
}

@media (max-width: 767.98px) {
    .cms-category-simple .cms-category-simple__search.input-group {
        max-width: 100%;
    }
}

/* ==============================
 * モーダル：メディア追加（#mediaAddModal）
 * - ヘッダー/タブ/フィルタ/グリッド/レスポンシブ
 * ============================== */

#mediaAddModal .cms-media-modal__header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: #f5f5f5;
}

#mediaAddModal .cms-media-modal__back {
    border: 0;
    background: transparent;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1;
}

#mediaAddModal .cms-media-modal__title {
    font-weight: 700;
    color: var(--brand-black);
}

#mediaAddModal .cms-media-modal__user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

#mediaAddModal .cms-media-modal__user-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 10px;
}

#mediaAddModal .cms-media-modal__container {
    width: 1280px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

#mediaAddModal .cms-media-modal__tabs {
    display: flex;
    gap: 8px;
    padding: 14px 0 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.12);
    flex-wrap: wrap;
}

#mediaAddModal .cms-media-modal__tab {
    border: 0;
    background: transparent;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 0;
    margin-bottom: -2px;
    position: relative;
    z-index: 0;
}

    #mediaAddModal .cms-media-modal__tab.is-active {
        border: 2px solid rgba(0, 0, 0, 0.12);
        border-bottom-color: transparent;
        background: #fff;
        z-index: 1;
    }

#mediaAddModal .cms-media-modal__panel-inner {
    padding: 18px 0;
}

#mediaAddModal .cms-media-modal__upload-box {
    border: 1px dashed rgba(0, 0, 0, 0.2);
    padding: 30px;
    border-radius: 4px;
    background: #fff;
}

#mediaAddModal .cms-media-modal__upload-box.is-dragover {
    outline: 2px dashed #999;
    outline-offset: 4px;
}

#mediaAddModal .cms-media-modal__upload-text {
    margin-bottom: 12px;
    color: var(--brand-gray);
}

#mediaAddModal .cms-media-modal__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    background: #fff;
}

#mediaAddModal .cms-media-modal__filter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#mediaAddModal .cms-media-modal__label {
    font-weight: 700;
    color: var(--brand-black);
    font-size: 0.875rem;
    white-space: nowrap;
}

#mediaAddModal .cms-media-modal__search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    position: relative;
}

    #mediaAddModal .cms-media-modal__search input {
        border-radius: 0;
        border: 1.5px solid var(--brand-blue);
        padding: 9px;
    }

#mediaAddModal .cms-media-modal__filters .form-control,
#mediaAddModal .cms-media-modal__filters .form-select {
    padding: 9px;
    width: 240px;
}

#mediaAddModal .cms-media-modal__filters input[type="date"].form-control {
    background-image: url("../images/calendar.png");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px 14px;
    padding-right: 2.25rem;
}

    #mediaAddModal .cms-media-modal__filters input[type="date"].form-control::-webkit-calendar-picker-indicator {
        opacity: 0;
    }

#mediaAddModal .cms-media-modal__search-btn {
    border: 0;
    background: transparent;
    position: absolute;
    top: 0;
    right: 0;
}

    #mediaAddModal .cms-media-modal__search-btn img {
        width: 18px;
        height: 18px;
    }

#mediaAddModal .cms-media-modal__grid {
    padding: 0 0 120px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
    background: #fff;
    width: 100%;
}

@media (max-width: 767.98px) {
    #mediaAddModal .cms-filter,
    #mediaAddModal .cms-filter .cms-filter--category,
    #mediaAddModal .cms-filter .cms-filter--tag,
    #mediaAddModal .cms-filter .cms-filter--publishDate,
    #mediaAddModal .cms-filter .cms-filter--unpublishDate {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }

    #mediaAddModal .cms-media-modal__container {
        width: 100%;
        padding: 0 16px;
        box-sizing: border-box;
    }

    #mediaAddModal .cms-media-modal__filters {
        flex-direction: column;
        align-items: stretch;
    }

    #mediaAddModal .cms-media-modal__filter {
        justify-content: space-between;
    }

    #mediaAddModal .cms-media-modal__filters .cms-media-modal__filter.ms-auto {
        width: 100%;
    }

    #mediaAddModal .cms-media-modal__filters .form-control,
    #mediaAddModal .cms-media-modal__filters .form-select {
        width: 100% !important;
        max-width: 100%;
    }

    #mediaAddModal .cms-media-modal__filter .d-flex {
        width: 100%;
        flex-wrap: wrap;
    }

    #mediaAddModal .cms-media-modal__search {
        width: 100%;
    }

        #mediaAddModal .cms-media-modal__search input {
            flex: 1 1 auto;
            min-width: 0;
            width: 100% !important;
            max-width: 100%;
        }

    #mediaAddModal .cms-media-modal__grid {
        width: 100%;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
        justify-content: stretch;
    }
}

#mediaAddModal .cms-media-modal__item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    padding: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

    #mediaAddModal .cms-media-modal__item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    #mediaAddModal .cms-media-modal__item.is-selected {
        outline: 3px solid var(--brand-color);
        outline-offset: -3px;
    }

#mediaAddModal .cms-media-modal__footer {
    border-top: 0;
    background: #fff;
    position: sticky;
    bottom: 0;
    height: 100px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 2;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}

#mediaAddModal .cms-media-modal__add {
    width: 170px;
    height: 44px;
    border-radius: 0;
}

.cms-media-modal__library-layout {
    display: grid;
    grid-template-columns: 1fr;
}

    .cms-media-modal__library-layout.has-detail {
        grid-template-columns: 1fr 260px;
    }

@media (max-width: 768px) {
    .cms-media-modal__detail {
        display: none !important;
    }

    .cms-media-modal__library-layout.has-detail {
        grid-template-columns: 1fr !important;
    }
}

.cms-page-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f0f0f0;
    color: var(--brand-gray);
    font-weight: 600;
    font-size: 22px;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

    .cms-page-btn img {
        display: block;
        width: 11px;
        height: 18px;
    }

    .cms-page-btn.is-active {
        background: var(--brand-color);
        border-color: var(--brand-color);
        color: #fff;
    }

    .cms-page-btn:disabled {
        opacity: 0.5;
    }

.cms-article-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .cms-article-cell .cms-thumb {
        flex: 0 0 44px;
    }

    .cms-article-cell .cms-article-link {
        display: block;
        flex: 1 1 auto;
        min-width: 0;
    }

.cms-table thead td,
.cms-table tbody td {
    font-size: 1rem;
}

.cms-thumb {
    width: 60px;
    height: 60px;
    background: #d9d9d9;
    display: flex;
    align-items: center; /* 縦中央 */
    justify-content: center;
}

    .cms-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.cms-article-link,
.cms-category-link {
    color: #109cf1;
    text-decoration: none;
}

    .cms-article-link:hover,
    .cms-category-link:hover {
        text-decoration: underline;
    }

.cms-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cms-status-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    object-fit: contain;
}

.cms-nav .nav-link {
    color: #1f2d3d;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding-left: 14px;
}

.nav-link .cms-nav-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    object-fit: contain;
}

.cms-nav .nav-link:hover {
    background: rgba(13, 110, 253, 0.08);
}

.cms-nav .nav-link.active {
    background-color: transparent !important;
    color: var(--brand-blue) !important;
}

.cms-nav .nav-link {
    color: var(--brand-blue) !important;
    font-weight: 400;
}

    .cms-nav .nav-link.active::before {
        content: "";
        position: absolute;
        left: 0;
        top: 6px;
        bottom: 6px;
        width: 4px;
        border-radius: 2px;
        background: var(--brand-blue);
    }

.cms-footer {
    height: 60px;
    width: 100%;
    background: #fff;
    position: relative;
    z-index: 1;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
    align-content: center;
}

/* ==============================
 * モーダル：記事編集（#articleEditorModal）
 * - モーダル内にCOPYRIGHTフッターを表示（固定なし）
 * ============================== */

#articleEditorModal {
    min-height: calc(100vh - 116px);
}

#articleEditorModal .modal-body {
    padding-bottom: 0;
}

#articleEditorModal .cms-modal-copyright-footer {
    height: 60px;
    min-height: 60px;
    flex: 0 0 60px;
    width: 100%;
    background: #fff;
    position: relative;
    z-index: 1;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==============================
 * モーダル：外部配信設定（#externalDeliveryModal）
 * - 最大幅1280px
 * - 4ブロック(289.25px) + セパレータ(1px×3) + gap(20px×6) = 1280px
 * ============================== */
#externalDeliveryModal .cms-external-delivery__container {
    width: 1280px;
    max-width: 100%;
    margin: 0 auto;
    padding: 18px 0;
}

@media (max-width: 991.98px) {
    #externalDeliveryModal .cms-external-delivery__container {
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
    }
}

#externalDeliveryModal .cms-external-delivery__bulk {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 18px;
    color: var(--brand-light-black);
}

#externalDeliveryModal .cms-external-delivery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(289.25px, 1fr));
    gap: 20px;
    align-items: start;
}

.cms-external-delivery__block.is-full {
    grid-column: 1 / -1;
}

#externalDeliveryModal .cms-external-delivery__sep {
    display: none;
}

#externalDeliveryModal .cms-external-delivery__channel {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--brand-light-black);
    margin: 0 0 10px;
}

#externalDeliveryModal .cms-external-delivery__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#externalDeliveryModal input[type="datetime-local"].form-control {
    background-image: url("../images/calendar.png");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px 14px;
    padding-right: 2.25rem;
}

    #externalDeliveryModal input[type="datetime-local"].form-control::-webkit-calendar-picker-indicator {
        opacity: 0;
    }

#externalDeliveryModal .cms-external-delivery__field .form-select,
#externalDeliveryModal .cms-external-delivery__field .form-control {
    padding: 15px;
}

#externalDeliveryModal .cms-external-delivery__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-black);
}

.modal .search-form .form-control, .modal .search-form .form-select, .modal .search-form .date-form-control {
    padding: .375rem 2.25rem .375rem .75rem;
}

#externalDeliveryHistoryModal .cms-external-history__container {
    width: 100%;
    min-height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 44px 16px;
}

#externalDeliveryHistoryModal .cms-external-history__platform-row {
    width: 486px;
    max-width: 100%;
    display: grid;
    grid-template-columns: 136px 350px;
    column-gap: 0;
    align-items: center;
}

#externalDeliveryHistoryModal .cms-external-history__platform-label {
    font-size: 14px;
    font-weight: 500;
    text-align: right;
    padding-right: 10px;
}

#externalDeliveryHistoryModal .cms-external-history__platform-select.form-select {
    font-size: 18px;
    font-weight: 500;
    border-radius: 0;
}

#externalDeliveryHistoryModal .cms-external-history__empty {
    margin-top: 48px;
    font-size: 18px;
    font-weight: 500;
    color: var(--brand-light-black);
}

@media (max-width: 767.98px) {
    #externalDeliveryHistoryModal .cms-external-history__container {
        align-items: stretch;
        padding: 24px 16px;
    }

    #externalDeliveryHistoryModal .cms-external-history__platform-row {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    #externalDeliveryHistoryModal .cms-external-history__platform-label {
        text-align: left;
        padding-right: 0;
        white-space: nowrap;
    }

    #externalDeliveryHistoryModal .cms-external-history__platform-select.form-select {
        width: 100%;
    }
}

.btn-brand {
    color: #FFF;
    background-color: var(--brand-color);
    border-color: var(--brand-color);
}

    .btn-brand:hover, .btn-brand:focus, .btn-brand.active {
        color: #FFF;
        background-color: var(--brand-bright-color);
        border-color: var(--brand-bright-color);
    }

.btn-outline-brand {
    color: var(--brand-color);
    border-color: var(--brand-color);
}

    .btn-outline-brand:hover, .btn-outline-brand:focus, .btn-outline-brand:active {
        color: var(--brand-bright-color);
        border-color: var(--brand-bright-color);
    }

.btn-brand-sub {
    color: #FFF;
    background-color: var(--brand-sub-color);
    border-color: var(--brand-sub-color);
}

    .btn-brand-sub:hover, .btn-brand-sub:focus, .btn-brand-sub.active {
        color: #FFF;
        background-color: var(--brand-sub-bright-color);
        border-color: var(--brand-sub-bright-color);
    }

.btn-outline-brand-sub {
    color: var(--brand-sub-color);
    border-color: var(--brand-sub-color);
}

    .btn-outline-brand-sub:hover, .btn-outline-brand-sub:focus, .btn-outline-brand-sub:active {
        color: var(--brand-sub-bright-color);
        border-color: var(--brand-sub-bright-color);
    }

.btn-danger {
    background-color: var(--brand-color);
    border-color: var(--brand-color);
}

.btn-outline-danger {
    color: var(--brand-color);
    border-color: var(--brand-color);
}

#addConditionBtn,
.add-condition-btn,
.add-condition-btn:hover {
    background-color: var(--brand-gray-light);
    border-color: var(--brand-gray-light);
    border-radius: 3px;
}

/* ==============================
 * モーダル：ヘッダー共通（記事編集 / メディア追加）
 * - 高さ/左右配置/縦中央揃え
 * - 戻るアイコンの縦ズレ防止
 * ============================== */
@media (min-width: 768px) {
    .modal-header,
    #mediaAddModal .modal-header,
    #externalDeliveryModal .modal-header,
    #externalDeliveryHistoryModal .modal-header {
        padding: 0rem 3rem;
    }

    #articleEditorModal .row {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .edit-header {
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (max-width: 767.98px) {
    .modal-header {
        padding: 0rem 1rem;
    }

    #articleEditorModal .row {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .edit-header {
        padding-left: 12px;
        padding-right: 12px;
    }
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-header,
#mediaAddModal .modal-header,
#externalDeliveryModal .modal-header,
#externalDeliveryHistoryModal .modal-header {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 戻るアイコンがテキストのベースラインに引っ張られて上寄りにならないようにする */
#articleEditorModal .modal-header > button,
#mediaAddModal .cms-media-modal__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

    #articleEditorModal .modal-header > button img,
    #mediaAddModal .cms-media-modal__back img {
        display: block;
    }

.user-info {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--brand-black);
}

#articleEditorModal .modal-header button {
    color: var(--brand-black);
}

.save-preview-button {
    display: flex;
    align-items: center;
    gap: 10px;
}

#articleEditorModal .btn-secondary {
    background-color: #969696;
    border-color: #969696;
}

#articleEditorModal .save-preview-button .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1;
}

.edit-form .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--brand-black);
}

.account-editor .edit-form .form-label {
    font-size: 1rem;
}

.edit-form .form-control {
    font-size: 1.125rem;
    line-height: 1.5;
    padding: 15px;
    border-radius: 0%;
}

.edit-form .form-select {
    font-size: 1.125rem;
    line-height: 1.5;
    padding: 15px;
    border-radius: 0%;
}

.status-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--brand-black);
}

.account-editor .status-label {
    font-size: 1rem;
}

.status-form {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--brand-black);
}

#articleEditorModal .cms-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #969696;
    color: #fff;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

#articleEditorModal .cms-chip-remove {
    border: 0;
    background: transparent;
    padding: 0;
    line-height: 1;
    color: inherit;
    cursor: pointer;
}

    #articleEditorModal .cms-chip-remove img {
        width: 16px;
        height: 16px;
        display: block;
    }

#articleEditorModal .cms-editor-main {
    max-width: 890px;
}

#articleEditorModal .cms-editor-side {
    max-width: 350px;
    width: 100%;
}

@media (max-width: 1088.98px) {
    #articleEditorModal .cms-editor-side {
        max-width: none;
        width: 100%;
    }

    #articleEditorModal .cms-editor-main {
        max-width: none;
        width: 100%;
    }
}

#articleEditorModal .cms-image-card {
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    width: 156px;
    height: 100%;
}

#articleEditorModal .cms-image-thumb {
    width: 100%;
    height: 156px;
    aspect-ratio: 1 / 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
    padding: 5px;
    box-sizing: border-box;
}

#articleEditorModal .cms-image-thumb__text {
    font-weight: 700;
    color: var(--brand-black);
}

#articleEditorModal .cms-image-thumb__placeholder {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: none;
    display: block;
    background-color: #fafafa;
}

#articleEditorModal .cms-image-thumb img,
#articleEditorModal .cms-pressroom-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#articleEditorModal .cms-image-actions {
    display: flex;
    gap: 8px;
}

    #articleEditorModal .cms-image-actions .btn {
        flex: 1 1 0;
    }

#articleEditorModal .cms-image-settings .js-image-edit {
    background-color: #969696;
    border-color: #969696;
    color: #fff;
}

    #articleEditorModal .cms-image-settings .js-image-edit:hover,
    #articleEditorModal .cms-image-settings .js-image-edit:focus {
        background-color: #969696;
        border-color: #969696;
        color: #fff;
    }

#articleEditorModal .cms-image-settings .js-image-edit,
#articleEditorModal .cms-image-settings .js-image-delete {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px;
    justify-content: center;
}

/* ==============================
 * 記事編集：プレスルーム画像
 * - 並び（ハンドル/サムネ/入力）
 * - サムネ枠（padding含む）
 * - 画像削除（画像タイトル枠内に配置）
 * ============================== */
#articleEditorModal .cms-image-settings .cms-btn-icon {
    width: 14px;
    height: 14px;
    display: block;
    object-fit: contain;
    flex: 0 0 14px;
}

#articleEditorModal .cms-pressroom-item {
    display: grid;
    grid-template-columns: 28px 180px 1fr;
    gap: 12px;
    align-items: start;
    padding: 12px;
    background: #fff;
}

#articleEditorModal .cms-eye-catch {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    align-items: start;
    padding: 12px;
    background: #fff;
}

#articleEditorModal .cms-pressroom-media {
    width: 180px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#articleEditorModal .cms-pressroom-item__handle {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-gray);
}

#articleEditorModal .cms-pressroom-item__handle-icon {
    width: 16px;
    height: 16px;
    display: block;
    object-fit: contain;
}

#articleEditorModal .cms-pressroom-item__thumb {
    width: 156px;
    height: 156px;
    aspect-ratio: 1 / 1;
    border: 1px solid rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 5px;
    box-sizing: border-box;
}

#articleEditorModal .cms-pressroom-item__thumb--empty {
    background: #fafafa;
    flex-direction: column;
    gap: 6px;
}

#articleEditorModal .cms-pressroom-item__fields {
    min-width: 0;
}

#articleEditorModal .cms-pressroom-item__remove {
    flex: 0 0 auto;
}

#articleEditorModal .js-pressroom-remove {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-gray);
    font-size: 0.875rem;
    font-weight: 500;
}

#articleEditorModal .cms-pressroom-item__remove-icon {
    width: 14px;
    height: 14px;
    display: block;
    object-fit: contain;
}

#articleEditorModal .cms-pressroom-item__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ==============================
 * 記事編集：プレスルーム画像 追加ボタン
 * ============================== */

.add-pressroom-btn {
    background-color: var(--brand-gray-light);
    border-color: var(--brand-gray-light);
    border-radius: 3px;
    padding: 5px 10px;
    max-width: 696px;
    font-size: 0.875rem;
    line-height: 1.3;
    font-weight: 500;
}

    .add-pressroom-btn:hover {
        background-color: #969696;
        border-color: #969696;
        color: #fff;
    }

@media (max-width: 1088.98px) {
    .add-pressroom-btn {
        max-width: none;
        width: 100%;
    }
}

/* =========================================
   ログイン中ローディング
========================================= */
.cms-loading {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

    .cms-loading.is-active {
        display: block;
    }

.cms-loading__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(1px);
}

.cms-loading__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.cms-loading__spinner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 5px solid #d8e0ea;
    border-top-color: var(--brand-color);
    animation: cms-spin 0.8s linear infinite;
}

.cms-loading__text {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brand-blue);
    letter-spacing: 0.02em;
}

@keyframes cms-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 背景暗転 */
.cms-logout-modal.modal {
    background: rgba(0,0,0,0.45);
}

/* モーダル幅 */
.cms-logout-modal__dialog {
    max-width: 640px;
}

/* 本体 */
.cms-logout-modal__content {
    border: none;
    border-radius: 0px;
    padding: 50px 50px 46px;
    position: relative;
}

/* バツボタン */
.cms-logout-modal__close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: none;
    background: none;
    font-size: 28px;
    font-weight: 300;
    color: #9aa6b2; /* ← グレーに変更 */

    cursor: pointer;
}

    .cms-logout-modal__close:hover {
        color: #344d6e;
    }

/* タイトル */
.cms-logout-modal__title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #344d6e;
}

/* ボタンエリア */
.cms-logout-modal__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

/* ログアウトボタン */
.cms-logout-modal__submit {
    width: 260px;
    height: 48px;
    background: #b9c8db;
    border: 1px solid #b9c8db;
    font-size: 16px;
    font-weight: 700;
    color: #344d6e;
    border-radius: 4px;
}

    /* hover */
    .cms-logout-modal__submit:hover {
        background: #aebfd5;
    }

/* キャンセル */
.cms-logout-modal__cancel {
    width: 260px;
    height: 48px;
    background: #ffffff;
    border: 1px solid #b9c8db;
    font-size: 16px;
    font-weight: 700;
    color: #344d6e;
    border-radius: 4px;
}

    .cms-logout-modal__cancel:hover {
        background: #f5f7fb;
    }

.cms-navbar-userbtn {
    border: none;
    background: transparent;
}

.cms-navbar-userbtn__name {
    font-size: 18px;
    color: #000;
}

.cms-navbar-userbtn__icon {
    width: 26px;
}

/* =========================================
   トースト
========================================= */

.toast-success {
    background-color: #e6f4ea;
    color: #2e7d32;
}

.toast-danger {
    background-color: #fdecea;
    color: #c62828;
}

/* =========================================
   Quill
========================================= */
.ql-container {
    font-size: var(--bs-body-font-size);
}

/* =========================================
   プレスルーム画像並び替え
========================================= */

.cms-pressroom-item {
    cursor: move;
}

    .cms-pressroom-item.is-dragging {
        opacity: 0.5;
    }

/* =========================================
   リビジョン
========================================= */
.revision-diff-box {
    white-space: normal;
    line-height: 1.8;
}

.revision-diff-removed {
    background: #ffc6c6;
}

.revision-diff-added {
    background: #86eabe;
}

#revisionCompareModal .form-check-input {
    border-color: #000;
}

#revisionCompareModal .revision-compare-next,
#revisionCompareModal .revision-compare-author {
    color: #999999 !important;
}

.deleted-title {
    padding: 10px 20px;
}

.added-title {
    padding: 10px 20px;
}

.deleted-content {
    border-radius: 0;
    background: #fff;
    min-height: 360px;
    line-height: 1.5;
    padding: 10px 20px;
}

.added-content {
    border-radius: 0;
    background: #fff;
    min-height: 360px;
    line-height: 1.5;
    padding: 10px 20px;
}

/* =========================================
   画像編集
========================================= */

#editModal .fEgGvl {
    box-shadow: none;
}

.cBtcgK,
.cBtcgK:active,
.cBtcgK:hover {
    background-color: var(--brand-blue);
}

.cBtcgK:active,
.cBtcgK:hover {
    opacity: .9;
}

/* =========================================
   並び替え
========================================= */

.drag-handle {
    cursor: grab;
}

    .drag-handle:active {
        cursor: grabbing;
    }

.sortable-row {
    transition: background-color 0.15s ease;
}

.sortable-chosen {
    background: #fff8e1;
}

.sortable-ghost {
    opacity: 0.4;
    background: #e3f2fd;
}

.sortable-drag {
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
