/* Text color classes for span tags */
.color-liella { color: #aa80eae6; }
.color-sayu { color: #ff7f27; }
.color-li { color: #a0fff9; text-shadow: -1px -1px 0 #cccccc, 1px -1px 0 #cccccc, -1px 1px 0 #cccccc, 1px 1px 0 #cccccc;}
.color-nako { color: #ff6e90; }
.color-pei { color: #74f466; }
.color-nagi { color: #0000a0; }
.color-non { color: #fff442; text-shadow: -1px -1px 0 #cccccc, 1px -1px 0 #cccccc, -1px 1px 0 #cccccc, 1px 1px 0 #cccccc; }
.color-yabu { color: #ff3535; }
.color-kuma { color: #b2ffdd; text-shadow: -1px -1px 0 #cccccc, 1px -1px 0 #cccccc, -1px 1px 0 #cccccc, 1px 1px 0 #cccccc; }
.color-emo { color: #ff51c4; }
.color-yui { color: #e49dfd; }
.color-saku { color: #76dddf; }


.container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100vh;
}

/* Responsive header navigation */
header {
    z-index: 1000;
    gap: 16px;
    box-sizing: border-box;
}

header h1 {
    flex: 0 1 auto;
    min-width: 0;
}

header h1 a {
    overflow-wrap: anywhere;
}

nav.pc-nav {
    margin: 0 0 0 auto;
}

nav.pc-nav ul {
    align-items: center;
    gap: 8px;
    padding: 0;
}

nav.pc-nav li,
nav.pc-nav .li_nav {
    margin: 0;
}

@media screen and (max-width: 760px) {
    header {
        width: 100vw;
        max-width: 100vw;
        min-height: 60px;
        padding: 14px 16px;
        align-items: center;
    }

    header h1 {
        max-width: calc(100% - 58px);
        font-size: 18px;
        line-height: 1.3;
    }

    nav.pc-nav {
        position: relative;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        margin-left: auto;
        border: 1px solid rgba(255, 255, 255, 0.74);
        border-radius: 8px;
        cursor: pointer;
    }

    nav.pc-nav::before {
        content: "";
        position: absolute;
        left: 11px;
        top: 13px;
        width: 20px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        box-shadow: 0 8px 0 #fff, 0 16px 0 #fff;
    }

    nav.pc-nav ul {
        display: none;
        position: absolute;
        right: 0;
        top: calc(100% + 8px);
        min-width: min(78vw, 260px);
        box-sizing: border-box;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px;
        border: 1px solid #d8c5f5;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    }

    nav.pc-nav:hover ul,
    nav.pc-nav:focus-within ul {
        display: flex;
    }

    nav.pc-nav li,
    nav.pc-nav .li_nav {
        width: 100%;
        margin: 0;
        font-size: 1rem;
    }

    nav.pc-nav a,
    nav.pc-nav .dropbtn {
        display: block;
        box-sizing: border-box;
        width: 100%;
        min-height: 42px;
        padding: 10px 12px;
        border-radius: 6px;
        color: #5d348f !important;
        line-height: 1.4;
    }

    nav.pc-nav a:hover,
    nav.pc-nav .dropbtn:hover {
        background: #fbf8ff;
    }

    nav.pc-nav .dropdown {
        display: block;
    }

    nav.pc-nav .dropdown-content {
        position: static;
        display: block;
        min-width: 0;
        padding-left: 10px;
        background: transparent;
        box-shadow: none;
    }

    nav.pc-nav .dropdown-content a {
        color: #5d348f;
        padding: 9px 12px;
    }
}

.goods-page {
    width: min(1120px, calc(100% - 24px));
    margin: 24px auto;
}

.goods-hero,
.goods-search,
.goods-empty,
.goods-detail,
.goods-card {
    border: 1px solid #d8c5f5;
    border-radius: 8px;
    background: #fff;
}

.goods-hero,
.goods-empty {
    padding: 18px;
    text-align: center;
}

.goods-search {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    gap: 10px;
    margin: 16px 0;
    padding: 14px;
}

.goods-search input,
.goods-search select,
.goods-search button {
    min-height: 40px;
    box-sizing: border-box;
}

.goods-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.goods-card {
    overflow: hidden;
}

.goods-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fbf8ff;
}

.goods-card-body,
.goods-detail {
    padding: 16px;
}

.goods-card h3,
.goods-detail h2 {
    margin: 6px 0;
}

.goods-meta,
.goods-summary {
    color: #666;
    font-size: 0.9rem;
}

.goods-price,
.goods-detail-link {
    color: #7f57b5;
    font-weight: 700;
}

.goods-detail-grid {
    display: grid;
    grid-template-columns: minmax(180px, 320px) 1fr;
    gap: 20px;
}

.goods-detail-image {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
}

.goods-detail-body {
    margin-top: 18px;
    line-height: 1.8;
}

.goods-detail-link {
    display: inline-block;
    margin-top: 10px;
}

.goods-link-buttons {
    margin-top: 10px;
}

.goods-link-buttons a.btn-link {
    width: auto;
    min-width: 120px;
    margin: 4px;
    padding: 8px 14px;
}

.goods-link-buttons .rakuten {
    background-color: #bf0000;
}

.goods-affiliate-html img[width="0"],
.goods-affiliate-html img[width="1"],
.goods-affiliate-html img[height="0"],
.goods-affiliate-html img[height="1"],
.goods-affiliate-html img[hight="1"] {
    position: absolute !important;
    width: auto !important;
    height: auto !important;
    max-width: 1px !important;
    max-height: 1px !important;
    opacity: 0;
    pointer-events: none;
}

@media screen and (max-width: 900px) {
    .goods-search,
    .goods-grid,
    .goods-detail-grid {
        grid-template-columns: 1fr;
    }
}

.revenue-category-links {
    margin: 20px auto 24px;
    padding: 14px 16px;
    width: 90%;
    box-sizing: border-box;
    border: 1px solid #d8c5f5;
    border-radius: 10px;
    background: #fbf8ff;
}

.revenue-category-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.revenue-category-header h2 {
    margin: 0;
    color: #7f57b5;
    font-size: 1.05rem;
}

.revenue-category-header p {
    margin: 0;
    color: #666;
    font-size: 0.85rem;
    text-align: right;
}

.revenue-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.revenue-category-grid a {
    display: flex;
    min-height: 44px;
    box-sizing: border-box;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 7px 10px;
    border: 2px solid #aa80eae6;
    border-radius: 5px;
    background: #fff;
    color: #7f57b5;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
}

.revenue-category-grid a:hover {
    background: #aa80eae6;
    color: #fff;
}

.revenue-category-grid a span {
    display: block;
    font-size: 0.94rem;
}

.revenue-category-grid a small {
    display: block;
    color: #7a6a8f;
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.3;
}

.revenue-category-grid a:hover small {
    color: #fff;
}

.pr-note {
    color: #666;
    font-size: 0.9rem;
    text-align: center;
}

.popup-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.popup-tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border: 1px solid #d8c5f5;
    border-radius: 999px;
    padding: 2px 9px;
    background: #fbf8ff;
    color: #6d46a0;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.popup-tag-deadline {
    border-color: #f0b5b5;
    background: #fff5f5;
    color: #9b2c2c;
}

.popup-actions,
#popup-URL-text,
#popup-admin-edit-text {
    margin: 12px 0 0;
}

#popup-URL-text {
    font-size: 0;
}

#popup-URL,
#popup-admin-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid #aa80eae6;
    border-radius: 5px;
    padding: 0 14px;
    background: #aa80eae6;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    word-break: normal;
    font-size: 0.95rem;
}

#popup-admin-edit {
    border-color: #777;
    background: #777;
}

.popup-related {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eadfff;
}

.popup-related h3 {
    margin: 0 0 8px;
    color: #7f57b5;
    font-size: 1rem;
}

.popup-related p {
    margin: 0;
}

.popup-related-list {
    display: grid;
    gap: 8px;
}

.popup-related-card {
    display: grid;
    gap: 3px;
    border: 1px solid #eadfff;
    border-radius: 6px;
    padding: 10px;
    background: #fbf8ff;
    color: #333;
    text-decoration: none;
}

.popup-related-card span {
    color: #7f57b5;
    font-size: 0.82rem;
    font-weight: 700;
}

.category-page {
    width: 90%;
    max-width: 980px;
    margin: 22px auto 36px;
}

.category-hero {
    box-sizing: border-box;
    margin-bottom: 14px;
    padding: 18px 20px;
    border: 1px solid #d8c5f5;
    border-radius: 10px;
    background: #fbf8ff;
}

.category-hero h2 {
    margin: 2px 0 8px;
    color: #7f57b5;
    font-size: 1.8rem;
}

.category-hero p {
    margin: 0;
}

.category-eyebrow {
    color: #7f57b5;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0;
}

.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.category-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    box-sizing: border-box;
    padding: 5px 12px;
    border: 2px solid #aa80eae6;
    border-radius: 5px;
    background: #fff;
    color: #7f57b5;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.category-nav a.active,
.category-nav a:hover {
    background: #aa80eae6;
    color: #fff;
}

.category-section {
    margin: 18px 0;
    padding: 16px 18px;
    border: 1px solid #d8c5f5;
    border-radius: 10px;
    background: #fff;
}

.category-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.category-section-header h3 {
    margin: 0;
    color: #7f57b5;
}

.category-section-header span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fbf8ff;
    color: #7f57b5;
    font-size: 0.82rem;
    font-weight: 700;
}

.category-list,
.category-card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.category-list li,
.category-card-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fff;
}

.category-card-list a {
    display: block;
    color: #4b3572;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.category-list-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.category-list-main strong {
    color: #333;
    overflow-wrap: anywhere;
}

.category-date,
.category-cast {
    display: inline-block;
    color: #666;
    font-size: 0.84rem;
}

.category-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid #d8c5f5;
    border-radius: 999px;
    color: #7f57b5;
    font-size: 0.8rem;
    font-weight: 700;
}

.category-empty {
    margin: 0;
    color: #666;
}

.category-pr-note {
    margin: 16px 0 0;
}

.cast-page {
    width: 90%;
    max-width: 980px;
    margin: 22px auto 36px;
}

.cast-hero {
    box-sizing: border-box;
    margin-bottom: 16px;
    padding: 18px 20px;
    border: 1px solid #d8c5f5;
    border-radius: 10px;
    background: #fbf8ff;
}

.cast-hero h2 {
    margin: 2px 0 8px;
    color: #7f57b5;
    font-size: 1.8rem;
}

.cast-hero p {
    margin: 0;
}

.cast-eyebrow {
    color: #7f57b5;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0;
}

.cast-section {
    margin: 18px 0;
    padding: 16px 18px;
    border: 1px solid #d8c5f5;
    border-radius: 10px;
    background: #fff;
}

.cast-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.cast-quick-links a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    box-sizing: border-box;
    padding: 5px 12px;
    border: 2px solid #aa80eae6;
    border-radius: 5px;
    background: #fff;
    color: #7f57b5;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.cast-quick-links a:hover {
    background: #aa80eae6;
    color: #fff;
}

.cast-event-details {
    display: block;
}

.cast-event-details summary {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    box-sizing: border-box;
    margin-bottom: 12px;
    padding: 5px 12px;
    border: 2px solid #aa80eae6;
    border-radius: 5px;
    background: #fff;
    color: #7f57b5;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
}

.cast-event-details summary:hover {
    background: #aa80eae6;
    color: #fff;
}

.cast-event-details:not([open]) summary {
    margin-bottom: 0;
}

.cast-product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cast-detail-link,
.cast-tab-detail a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    box-sizing: border-box;
    padding: 5px 12px;
    border: 2px solid #aa80eae6;
    border-radius: 5px;
    background: #fff;
    color: #7f57b5;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.cast-detail-link:hover,
.cast-tab-detail a:hover {
    background: #aa80eae6;
    color: #fff;
}

.cast-tab-detail {
    margin-top: 12px;
}

.control-dashboard {
    width: 90%;
    max-width: 960px;
    margin: 24px auto;
}

.control-wide {
    max-width: 1200px;
}

.control-note {
    color: #555;
}

.control-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.control-menu-sections {
    display: grid;
    gap: 18px;
}

.control-menu-section {
    padding: 16px;
    border: 1px solid #ddd;
    background: #fff;
}

.control-menu-section h3 {
    margin: 0 0 12px;
    color: #7f57b5;
}

.control-menu-section .control-dashboard-grid {
    margin: 0;
}

.control-card {
    display: block;
    padding: 16px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    text-decoration: none;
}

.control-card:hover {
    background: #f5f5f5;
}

.control-card-title {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.control-card-text {
    display: block;
    color: #666;
    font-size: 0.9rem;
}

.control-section {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid #ddd;
    background: #fff;
}

.control-section ul {
    display: block;
    padding-left: 1.2em;
}

.control-section li {
    margin: 6px 0;
}

.control-message {
    padding: 10px 12px;
    border: 1px solid #b8e0c2;
    background: #f1fff4;
    color: #276738;
}

.control-error {
    padding: 10px 12px;
    border: 1px solid #f0b5b5;
    background: #fff5f5;
    color: #9b2c2c;
}

.control-status-panel {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #eadfff;
    border-radius: 6px;
    background: #fbf8ff;
    color: #4b3572;
}

.registration-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.registration-status-badge.is-complete {
    background: #eefbf1;
    color: #287044;
}

.registration-status-badge.is-partial {
    background: #fff7e6;
    color: #95620f;
}

.registration-status-badge.is-empty {
    background: #f4f1fa;
    color: #6c5a82;
}

.control-form {
    display: grid;
    gap: 12px;
}

.control-form label {
    display: grid;
    gap: 5px;
    font-weight: 700;
}

.control-form input[type="text"],
.control-form input[type="url"],
.control-form input[type="number"],
.control-form input[type="date"],
.control-form input[type="time"],
.control-form input[type="month"],
.control-form input[type="datetime-local"],
.control-form select,
.control-form textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 36px;
    border: 1px solid #d8c5f5;
    border-radius: 5px;
    padding: 6px 8px;
    font: inherit;
    font-weight: 400;
}

.control-form textarea {
    min-height: 96px;
    resize: vertical;
}

.control-field-hint {
    color: #6c5a82;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.5;
}

.control-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.event-basic-grid {
    align-items: start;
}

.event-basic-grid > label,
.event-basic-grid > div {
    align-self: start;
}

.cast-tab-form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.control-check {
    display: flex !important;
    min-height: 36px;
    align-items: center;
    gap: 8px !important;
}

.control-repeat-list {
    display: grid;
    gap: 8px;
    margin: 6px 0 10px;
}

.control-repeat-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px !important;
    align-items: center;
}

.control-priority-custom {
    margin-top: 6px;
}

.control-priority-custom.is-hidden {
    display: none;
}

.control-form label.is-disabled {
    color: #8a8193;
    opacity: 0.65;
}

.control-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-subnav {
    margin-bottom: 16px;
}

.control-actions button,
.control-inline-form button,
.control-form .btn,
.control-button-link,
.section-header button {
    min-height: 34px;
    border: 1px solid #aa80eae6;
    border-radius: 5px;
    padding: 0 14px;
    background: #aa80eae6;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.control-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.control-button-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.control-form .btn-danger,
.control-inline-form button {
    border-color: #d65f72;
    background: #d65f72;
}

.control-form .btn-secondary {
    border-color: #777;
    background: #777;
}

.control-table-wrap {
    overflow-x: auto;
}

.control-table {
    width: 100%;
    border-collapse: collapse;
}

.control-table th,
.control-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    vertical-align: top;
}

.control-table th {
    background: #fbf8ff;
    color: #7f57b5;
}

.control-thumb {
    display: block;
    width: 72px;
    height: 72px;
    border: 1px solid #eadfff;
    border-radius: 6px;
    object-fit: cover;
    background: #fbf8ff;
}

.control-inline-form {
    display: inline-block;
    margin-left: 8px;
}

.control-detail-list {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 8px 14px;
    margin-top: 16px;
}

.control-detail-list dt {
    color: #7f57b5;
    font-weight: 700;
}

.control-detail-list dd {
    min-width: 0;
    margin: 0;
}

.control-detail-list pre {
    max-height: 240px;
    overflow: auto;
    margin: 0;
    padding: 10px;
    border: 1px solid #eadfff;
    border-radius: 6px;
    background: #fbf8ff;
    white-space: pre-wrap;
    word-break: break-word;
}

.control-item-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.control-item-preview {
    padding: 12px;
    border: 1px solid #eadfff;
    border-radius: 6px;
    background: #fff;
}

.control-item-preview img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    background: #fbf8ff;
}

.control-item-preview pre {
    max-height: 180px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.control-choice-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.control-choice-list label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid #d8c5f5;
    border-radius: 999px;
    background: #fff;
    color: #4b3572;
    font-size: 0.9rem;
    font-weight: 400;
}

.article-search-grid {
    grid-template-columns: minmax(0, 2fr) minmax(160px, 1fr);
}

.article-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-ai-panel {
    display: grid;
    gap: 12px;
}

.article-ai-panel h3,
.article-ai-panel p {
    margin: 0;
}

.tox-tinymce {
    border-color: #d8c5f5 !important;
    border-radius: 6px !important;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-header h3,
.section-header .section-title {
    margin: 0;
    color: #7f57b5;
}

.dynamic-section {
    margin-bottom: 18px;
}

.slide-item,
.shop-item {
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid #d8c5f5;
    border-radius: 6px;
    background: #fff;
}

.item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.item-title {
    color: #4b3572;
    font-weight: 700;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.form-row .form-col-small {
    max-width: 180px;
}

.preview-section,
.json-output {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #d8c5f5;
    border-radius: 6px;
    background: #fbf8ff;
}

.preview-title {
    margin-bottom: 8px;
    color: #7f57b5;
    font-weight: 700;
}

.preview-content,
.json-content,
.script-output {
    min-height: 80px;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
}

.json-content,
.preview-html {
    white-space: pre-wrap;
    overflow-y: auto;
    max-height: 300px;
    font-family: monospace;
    font-size: 0.85rem;
}

.preview-image {
    max-width: 300px;
    max-height: 200px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.preview-caption,
.preview-link {
    margin-top: 8px;
    color: #666;
}

.preview-error {
    color: #9b2c2c;
}

@media screen and (max-width: 900px) {
    .event-basic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 700px) {
    .revenue-category-grid {
        grid-template-columns: 1fr 1fr;
    }

    .revenue-category-links {
        width: 92%;
    }

    .revenue-category-header {
        display: block;
    }

    .revenue-category-header p {
        margin-top: 4px;
        text-align: left;
    }

    .revenue-category-grid a {
        min-height: 42px;
        padding: 7px 8px;
    }

    .control-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .control-form-grid {
        grid-template-columns: 1fr;
    }

    .event-basic-grid {
        grid-template-columns: 1fr;
    }

    .control-repeat-row {
        grid-template-columns: 1fr;
    }

    .control-table-wrap {
        overflow-x: visible;
    }

    .control-table,
    .control-table tbody,
    .control-table tr,
    .control-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .control-table thead {
        display: none;
    }

    .control-table tr {
        margin-bottom: 12px;
        border: 1px solid #d8c5f5;
        border-radius: 6px;
        background: #fff;
        overflow: hidden;
    }

    .control-table td {
        display: grid;
        grid-template-columns: minmax(6.5em, 34%) minmax(0, 1fr);
        gap: 8px;
        align-items: start;
        border: 0;
        border-bottom: 1px solid #eee;
        padding: 9px 10px;
        word-break: break-word;
    }

    .control-table td:last-child {
        border-bottom: 0;
    }

    .control-table td::before {
        content: attr(data-label);
        color: #7f57b5;
        font-weight: 700;
        min-width: 0;
    }

    .control-table td:not([data-label]) {
        display: block;
    }

    .control-table td:not([data-label])::before {
        content: none;
    }

    .control-table td .control-inline-form,
    .control-table td .inline-form {
        display: inline-flex;
        margin: 4px 6px 4px 0;
        vertical-align: middle;
    }

    .control-detail-list {
        grid-template-columns: 1fr;
    }

    .control-item-preview-grid {
        grid-template-columns: 1fr;
    }

    #popup-wrapper {
        padding: 10px;
    }

    #popup-inside {
        max-height: calc(100vh - 20px);
        padding: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row .form-col-small {
        max-width: none;
    }

    .category-page {
        width: 92%;
        margin-top: 16px;
    }

    .category-hero {
        padding: 14px;
    }

    .category-hero h2 {
        font-size: 1.45rem;
    }

    .category-nav {
        gap: 6px;
    }

    .category-nav a {
        min-height: 32px;
        padding: 4px 9px;
        font-size: 0.82rem;
    }

    .category-section {
        padding: 14px;
    }

    .category-list li,
    .category-card-list li {
        display: block;
    }

    .cast-page {
        width: 92%;
    }

    .cast-hero {
        padding: 14px;
    }

    .cast-event-list li {
        display: block;
    }

    .cast-detail-link {
        margin-top: 8px;
    }

    .cast-quick-links a,
    .cast-event-details summary {
        width: 100%;
        justify-content: center;
    }

    .cast-product-list {
        grid-template-columns: 1fr;
    }

    .category-badge {
        margin-top: 8px;
    }
}

body {
    margin: 0;
    padding: 0;
    font-family: "Hiranogi Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", メイリオ, Meiryo, "ＭＳ Ｐゴシック", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #fff;
}

header {
    width: auto;
    padding: 30px 4% 10px;
    background-color: #aa80eae6;
    position: sticky;
    top: 0;

    display: flex;
    align-items: center;
}

footer {
    display: block;
    margin-top: auto;
    width: 100%;
    background-color: #aa80eae6;
    justify-content: center;
    text-align: center;
    color: white;
}

h1 {
    margin: 0;
    padding: 0;
    font-size: 20px;
}

p {
    overflow-wrap: break-word;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
    margin: 0;
    display: flex;
}

li_nav {
    margin: 0 0 0 15px;
    font-size: 10px;
}

li {
    margin: 0 1em 0 1em;
    font-size: 1em;
}

nav {
    margin: 0 50px 0 auto;
}

.head_article{
    margin: 20px auto;
    width: 85%;
    padding: 10px;
    border: 1px solid #aa80eae6;
    border-radius: 10px;
}

.footer-wrapper{
    padding: 0 auto;
}

#anniversary{
    text-align: center;
    width: 80%;
    margin: 10px auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.anniversary-banner{
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    box-sizing: border-box;
    background: #fff;
}

.anniversary-banner h3,
.anniversary-banner p{
    margin: 0.35em 0;
}

#calendar-top{
    display: flex;
    align-items: center;
    width: 30%;
    margin: 0 auto;
}

#calendar-filter {
    width: 90%;
    margin: 18px auto 0 auto;
    display: block;
    padding: 10px 12px;
    border: 1px solid #d8c5f5;
    border-radius: 10px;
    background: #fbf8ff;
}

#calendar-filter .calendar-filter-header {
    font-size: 1rem;
    font-weight: 700;
    color: #7f57b5;
    margin-bottom: 10px;
}

#calendar-filter .calendar-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#calendar-filter .calendar-filter-group {
    min-width: 0;
}

#calendar-filter .calendar-filter-label {
    margin: 0 0 6px 0;
    font-size: 0.9em;
    font-weight: 700;
    color: #7f57b5;
}

#calendar-filter .calendar-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: none;
    overflow: visible;
}

#calendar-filter .calendar-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 5px 10px;
    font-size: 0.9em;
    color: #4b3572;
    cursor: pointer;
    border: 1px solid #d8c5f5;
    border-radius: 999px;
    background: #fff;
}

#calendar-filter .calendar-filter-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #aa80eae6;
}

#calendar-filter .calendar-filter-empty {
    margin: 0;
    font-size: 0.9em;
    color: #8b8b8b;
}

#calendar-filter button {
    height: 34px;
    border: 1px solid #c4a4ef;
    border-radius: 6px;
    padding: 0 14px;
    cursor: pointer;
    background: #aa80eae6;
    color: #fff;
    border-color: #aa80eae6;
    font-weight: 700;
}

#calendar-filter button:hover {
    background: #9b70df;
}

#calendar-filter-toggle {
    width: 100%;
}

#calendar-filter-body {
    margin-top: 10px;
}

#filter-reset {
    margin-top: 10px;
}

p#month-display{
    font-size: 20px;
    margin: 0 auto;
    text-align: center;
}

#calendar {
    display: flex;
}

table{
    table-layout: fixed;
    width: 100%;
}

table.calendar{
    margin: 0 auto 0 auto;
    padding-top: 1em;
    table-layout: fixed;
    width:90%;
}

table.calendar th{
    padding: 8px;
    background-color: white;
    text-align: center;
    border: 1px solid #CCC;
}

table.calendar td{
    padding: 8px;
    background-color: white;
    text-align: left;
    vertical-align: top;
    border: 1px solid #CCC;
}

/* 行の最初のtdは日曜日なため赤く */
table.calendar th:first-of-type, table.calendar td:first-of-type{
    background-color: #ffefef;
    color: red;
    font-weight: bold;
}

/* 行の最後のtdは土曜日なため青く */
table.calendar th:last-of-type, table.calendar td:last-of-type{
    background-color: #ededff;
    color: blue;
    font-weight: bold;
}

/* 今日の日付 */
table.calendar td.today{
    background-color: #fbffa3;
    font-weight: bold;
}

table.calendar p.date{
    margin-top: 0;
}

.event{
    font-size: 0.5em;
    font-weight: bold;
    color: #000;
    padding: 10px;
    border-radius: 0 15%;
}

#close {
    font-size: 100%;/*ボタンの大きさ*/
    font-weight: bold;
    border: 1px solid #999;
    background: #fff;
    color: #999;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 100%;
    width: 32px;
    height: 32px;
    line-height: 1;
    cursor: pointer;
    transition: .2s;
    margin-left: auto;
}

#close:hover {
    background: #333;
    border-color: #333;
    color: white;
}

#popup-wrapper {
    background-color: rgba(0,0,0,.5);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 1000;
    overflow: auto;
    padding: 24px 12px;
    box-sizing: border-box;
}

#popup-inside {
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: white;
    margin: 0 auto;
    padding: 22px;
    position: relative;
    border-radius: 8px;
    box-sizing: border-box;
}

#popup-date {
    text-align: left;
    color: #666;
    font-weight: 700;
}

#popup-title {
    margin: 6px 0 8px;
    color: #4b3572;
}

#popup-detail,
#popup-summary,
#popup-venue {
    margin: 8px 0;
    line-height: 1.6;
}

body.popup-open {
    overflow: hidden;
}

#bottom-ad {
    justify-content: center;
    display: flex;
}

#pickup-banner {
    --pickup-slides-per-view: 3;
    position: relative;
    margin: 20px auto 0 auto;
    width: 90%;
    max-width: 1120px;
}

.pickup-slider-viewport {
    position: relative;
    overflow: hidden;
    width: 100%;
}

#pickup-banner ul{
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0;
    transition: transform 0.35s ease;
    will-change: transform;
}

#pickup-banner ul.is-centered {
    justify-content: center;
}

#pickup-banner li {
    box-sizing: border-box;
    flex: 0 0 calc(100% / var(--pickup-slides-per-view));
    width: calc(100% / var(--pickup-slides-per-view));
    max-width: 100%;
    padding: 0 7px;
    margin: 0;
}

#pickup-banner a {
    display: block;
    width: 100%;
    margin: 0 auto;
}

#pickup-banner .banner {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.pickup-slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    width: 36px;
    height: 36px;
    border: 1px solid #b17bea;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: #7f43cc;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

.pickup-slider-control[hidden],
.pickup-slider-dots[hidden] {
    display: none;
}

.pickup-slider-prev {
    left: 8px;
}

.pickup-slider-next {
    right: 8px;
}

.pickup-slider-control:hover,
.pickup-slider-control:focus-visible {
    background: #f6edff;
    outline: none;
}

.pickup-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.pickup-slider-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #d8c5f4;
    cursor: pointer;
}

.pickup-slider-dot.is-active {
    background: #8d50d8;
}

.pickup-slider-note {
    text-align: center;
}

@media screen and (max-width: 900px) {
    #pickup-banner {
        --pickup-slides-per-view: 2;
        max-width: 720px;
    }
}

.tab-button-container {
    display: flex;
    width: 800px;
    margin: auto;
}

.tab-button-container ul {
    flex-wrap: wrap;
    margin: auto;
    padding: auto;
}

.tab-button-container li {
    padding: 0;
    width: 110px;
    text-align: center;
    margin: 2px;
}

#tab-Liella {
    color: #aa80eae6;
    border: 2px solid #aa80eae6;
    border-radius: 5px;
}
#tab-Liella.active {
    background: #aa80eae6;
    color: white;
}

#tab-sayu {
    color: #ff7f27;
    border: 2px solid #ff7f27;
    border-radius: 5px;
}
#tab-sayu.active {
    background: #ff7f27;
    color: white;
}

#tab-li {
    color: #a0fff9;
    border: 2px solid #a0fff9;
    border-radius: 5px;
}
#tab-li.active {
    background: #a0fff9;
    color: white;
}

#tab-nako {
    color: #ff6e90;
    border: 2px solid #ff6e90;
    border-radius: 5px;
}
#tab-nako.active {
    background: #ff6e90;
    color: white;
}

#tab-pei {
    color: #74f466;
    border: 2px solid #74f466;
    border-radius: 5px;
}
#tab-pei.active {
    background: #74f466;
    color: white;
}

#tab-nagi {
    color: #0000a0;
    border: 2px solid #0000a0;
    border-radius: 5px;
}
#tab-nagi.active {
    background: #0000a0;
    color: white;
}

#tab-non {
    color: #fff442;
    border: 2px solid #fff442;
    border-radius: 5px;
}
#tab-non.active {
    background: #fff442;
    color: white;
}

#tab-yabu {
    color: #ff3535;
    border: 2px solid #ff3535;
    border-radius: 5px;
}
#tab-yabu.active {
    background: #ff3535;
    color: white;
}

#tab-kuma {
    color: #b2ffdd;
    border: 2px solid #b2ffdd;
    border-radius: 5px;
}
#tab-kuma.active {
    background: #b2ffdd;
    color: white;
}

#tab-emo {
    color: #ff51c4;
    border: 2px solid #ff51c4;
    border-radius: 5px;
}
#tab-emo.active {
    background: #ff51c4;
    color: white;
}

#tab-yui {
    color: #e49dfd;
    border: 2px solid #e49dfd;
    border-radius: 5px;
}
#tab-yui.active {
    background: #e49dfd;
    color: white;
}

#tab-saku {
    color: #76dddf;
    border: 2px solid #76dddf;
    border-radius: 5px;
}
#tab-saku.active {
    background: #76dddf;
    color: white;
}

.tab-content-container {
    width: 70%;
    margin: 0 auto;
    padding-top: 10px;
}

.cast-tab-content {
        display: none;
}

.cast-tab-content.show {
    display: block;
    border: 2px solid #aa80eae6;
    border-radius: 5px;
    padding: 10px;
}    
.cast-tab-content h5{
    margin: 0;
}

.cast-tab-body {
    display: grid;
    gap: 8px;
}

/* Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: transparent;
    color: white;
    padding: 16px;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    background-color: transparent;
}
.cast-tab-content p{
    margin: 2px 0;
}
.cast-tab-content span{
    display: inline-block;
}

.footer-ad ul{
    display: block;
    padding: 0;
}

.footer-ad li{
    display: block;
    width: fit-content;
    margin: 0 auto;
}

.footer-ad p{
    text-align: center;
}

.footer-wrap{
    width: 80%;
    margin: 0 auto;
    display: flex !important;
    justify-content: space-between;
}

.footer-wrap li a{
    color: white;
    text-decoration: none;
}

.footer-wrap li a:hover{
    text-decoration: underline;
}

.footer-wrap p{
    margin: 0;
    padding: 0 0 20px 0;
}

.footer-wrap .box {
    width: 30%;
}

.footer-wrap .box ul{
    margin: 0;
    padding: 0 0 20px 0;
    list-style: none;
    display: block;
}

.back-purple {
    padding: 5px 0 5px 10px;
    background-color: #aa80eae6;
    color: white;
}

.back-white {
    padding: 5px 0 5px 10px;
    background-color: white;
    color: #aa80eae6;
    border: 1px solid #aa80eae6;
}

/*page*/
.page-wrapper{
    margin: 20px auto;
    width: 60%;
    padding: 10px;
}

.page-title {
    margin-bottom: 0;
    text-align: center;
}

.page-content {
    padding: 0 15px;
}

.page-content p{
    padding: 0 10px;
}

.page-h3 {
    border: solid 3px #aa80eae6;
    border-radius: 30px;
    width: auto;
    margin: 5 auto;
    padding: 5px 50px;
}

.page-h4 {
    padding: 0 10px;
}

/*article-index.php*/

.article-list {
    margin: 20px auto 0 auto;
    width: 60%;
    padding: 10px;
}

.article-list ul{
    width: 100%;
    padding-inline-start: 0;
    display: block;
}

.article-list a{
    display: block;
}

.article-item {
    float: none;
    padding: 5%;
    height: fit-content;
    border: solid 3px #aa80eae6;
    border-radius: 30px;
    margin: 10px 0;
}

.article-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 20px auto 0;
}

.article-pagination a,
.article-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 0 12px;
    border: solid 2px #aa80eae6;
    border-radius: 999px;
    color: #6b3bb2;
    background: #fff;
    font-weight: 700;
    text-decoration: none;
}

.article-pagination .is-current {
    color: #fff;
    background: #aa80eae6;
}

.article-pagination .is-disabled {
    opacity: 0.45;
}

.paging-article {
    margin: auto;
}

.prev-button {
    color: #fff;
    background-color: #aa80eae6;
}

.next-button {
    color: #fff;
    background-color: #aa80eae6;
}

/*article*/
.article-wrapper {
    margin: 20px auto;
    width: 60%;
    padding: 10px;
}

.article-title {
    margin-bottom: 0;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border: 1px solid #d8c5f5;
    border-radius: 999px;
    padding: 2px 9px;
    background: #fbf8ff;
    color: #6d46a0;
    font-size: 0.82rem;
    font-weight: 700;
}

.article-content {
    padding: auto;
}

.ad-info {
    color: #aa80eae6;
    border: solid 1.5px #aa80eae6;
    border-radius: 30px;
    width: fit-content;
    margin: 0 auto;
    padding: 5px 30px;
}

.article-content .a8ad img{
    max-width: 300px;
    max-height: 300px;
}

.article-shortcode-ad {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 20px auto;
}

.article-shortcode-ad img {
    max-width: 100%;
    height: auto;
}

.article-shortcode-item {
    display: grid;
    grid-template-columns: minmax(120px, 180px) 1fr;
    gap: 16px;
    align-items: center;
    margin: 20px 0;
    padding: 16px;
    border: solid 2px #aa80eae6;
    border-radius: 12px;
    background: #fff;
}

.article-shortcode-item-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.article-shortcode-item-body h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
}

.article-shortcode-item-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.article-shortcode-item-links a,
.article-shortcode-item-body > p > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #aa80eae6;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.article-shortcode-empty {
    margin: 16px 0;
    padding: 12px;
    border: solid 1px #d8c7f1;
    border-radius: 8px;
    color: #6b3bb2;
}

@media screen and (max-width: 640px) {
    .article-shortcode-item {
        grid-template-columns: 1fr;
    }
}

a.btn--purple {
    color: #fff;
    background-color: #aa80eae6;
}

a.btn--purple:hover {
    color: #fff;
    background: #aa80ea;
}

a.btn--gema {
    color: #fff;
    background-color: #ff8224;
}

a.btn--gema:hover {
    color: #fff;
    background: #fa9a50;
}

a.btn-c {
    display: inline-block;
    font-size: 0.8rem;
    position: relative;
    padding: 0rem 1.5rem;
    border-radius: 100vh;
    margin: 0.2rem;
}

.carousel-container {
    display: block;
    width: 500px;
    height: 250px;
    margin: 3rem auto 5rem auto;
    padding: 0 auto;
    position: relative;
    align-items: center;
}

.carousel-area {
    height: 100%;
    display: flex;
    position: relative;
    padding: 0;
    margin: 0 auto;
}

.carousel-block {
    width: fit-content;
    height: auto;
    align-items: center;
    display: flex;
}

.carousel-area img{
    max-width: 300px;
}

.arrow-wrap {
    width: 90%;
    height: 100%;
    margin: 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
}
.arrow-btn {
    width: 48px;
    height: 48px;
    background-color: #aa80eae6;
    border: none;
    border-radius: 50%;
    transition: .2s;
}
.arrow-btn:focus {
    box-shadow: 0px 1px 10px -2px rgba(185, 185, 185, 0.8);
}
.arrow-btn:hover {
    background-color: #a070e7e6;
    box-shadow: 0px 1px 10px -2px rgba(0, 0, 0, 0.8);
}

/* 左 */
.arrow-left {
    position: relative
}
  /* ボタン左の中身（三角を擬似要素で表現） */
.arrow-left:before {
    content: "";
    width: 10px;
    height: 10px;
    border-top: 2px solid #fefefe;
    border-left: 2px solid #fefefe;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-30%, -50%)rotate(-45deg);
}
  /* 右 */
.arrow-right {
    position: relative
}
  /* ボタン右の中身（三角を擬似要素で表現） */
.arrow-right:before {
    content: "";
    width: 10px;
    height: 10px;
    border-top: 2px solid #fefefe;
    border-left: 2px solid #fefefe;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-70%, -50%)rotate(135deg);
}

.pagination {
    margin: 5% auto 0;
    display: flex;
    justify-content: space-around;
}
.pagination-circle {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background-color: #c8afece6;
}
/* jsでtargetクラスがついたら背景色を変える */
.pagination-circle.target {
    background-color: #aa80eae6;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.staging-list .filters {
    margin: 16px 0;
}

.staging-list .staging-table {
    width: 100%;
    border-collapse: collapse;
}

.staging-list .staging-table th,
.staging-list .staging-table td {
    border: 1px solid #ccc;
    padding: 8px;
    font-size: 14px;
}

.staging-list .status-pill {
    padding: 2px 8px;
    border-radius: 12px;
    background: #f0f0f0;
    display: inline-block;
}

.staging-list .status-new {
    background: #ffe0b2;
}

.staging-list .status-updated {
    background: #ffccbc;
}

.staging-list .status-published {
    background: #c8e6c9;
}

.staging-list .status-rejected {
    background: #e0e0e0;
}

.staging-list .url-cell a {
    display: inline-block;
    max-width: 100%;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.staging-list .source-cell {
    word-break: break-all;
    overflow-wrap: anywhere;
}

.staging-list .table-wrap {
    overflow-x: auto;
}

@media screen and (max-width:990px) {

    nav {
        margin: 0 5px 0 auto;
    }

    #calendar-top{
        display: flex;
        align-items: center;
        width: 60%;
        margin: 0 auto;
    }

    #calendar-filter {
        width: 92%;
        padding: 8px;
    }

    #calendar-filter .calendar-filter-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #calendar-filter .calendar-filter-options {
        gap: 6px;
    }

    #calendar-filter button {
        width: 100%;
    }

    table.calendar{
        margin: 0 auto 0 auto;
        padding-top: 1em;
        table-layout: fixed;
        width:80%;
        writing-mode: vertical-lr;
    }

    table.calendar tbody{
        width: 80%;
    }

    table.calendar tr{
        height: auto;
    }

    table.calendar th,td{
        padding: 8px;
        background-color: white;
        text-align: center;
        border: 1px solid #CCC;
        writing-mode:horizontal-tb;
        height: auto;
    }

    table.calendar th{
        width: 15%;
    }

    table.calendar td{
        overflow-wrap: normal;
        width:60%
    }

    /* 行の最初のtdはPCで赤指定のため白で上書き */
    table.calendar th:first-of-type, table.calendar td:first-of-type{
        background-color: #FFF;
        color: black;
        font-weight: normal;
    }
    
    /* ６番目のtdは土曜日なため青く */
    table.calendar th:nth-of-type(6), table.calendar td:nth-of-type(6){
        background-color: #ededff;
        color: blue;
        font-weight: bold;
    }

    /* 最後のtdは日曜日なため赤く */
    table.calendar th:last-of-type, table.calendar td:last-of-type{
        background-color: #ffefef;
        color: red;
        font-weight: bold;
    }

    #bottom-ad img{
        justify-content: center;
        display: flex;
        width: 100vw;
    }

    #pickup-banner{
        --pickup-slides-per-view: 1;
        width: 90%;
        max-width: 320px;
    }
    
    #pickup-banner ul {
        padding-left: 0;
        gap: 0;
    }

    #pickup-banner li {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    #pickup-banner a {
        width: 100%;
    }

    #pickup-banner .banner {
        width: 100%;
        max-width: 100%;
    }

    .pickup-slider-control {
        width: 32px;
        height: 32px;
        font-size: 24px;
    }

    .tab-button-container{
        width: 70%;
    }

    .cast-tab-ul{
        flex-wrap: wrap;
        justify-content: center;
        padding: 0;
        li{
            margin: 2px;
        }
    }

    .footer-wrap li a{
        color: white;
        text-decoration: none;
    }
    
    .footer-wrap li a:hover{
        text-decoration: underline;
    }
    
    .footer-wrap{
        width: 80%;
        margin: 0 auto;
        display: block;
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    
    .footer-wrap p{
        margin: 0;
        padding: 0 0 20px 0;
    }
    
    .footer-wrap .box {
        width: 95%;
        margin: 0 auto;
    }
    
    .footer-wrap .box ul{
        margin: 0;
        padding: 0 0 20px 0;
        list-style: none;
        display: block;
    }
    
    .footer-wrap .box ul{
        padding-bottom: 10px;
    }

    .article-list {
        margin: 20px auto 0 auto;
        width: 80%;
        padding: 10px;
    }

    .article-wrapper {
        margin: 20px auto;
        width: 80%;
        padding: 10px;
    }

    .article-content img{
        max-width: 330px;
    }

    .grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    
}

@media screen and (max-width:450px) {
    .article-wrapper {
        margin: 5px auto;
        width: 95%;
        padding: 0;
    }

    #bottom-ad img{
        justify-content: center;
        display: flex;
        width: 100vw;
    }

    .footer-ad {
        margin: 0 calc(50% - 50vw);
        width: 100vw;
    }
    
    .tab-button-container{
        width: 90%;
    }

    .article-content img{
        max-width: 200px;
    }

    .carousel-container {
        display: block;
        width: 280px;
        height: 250px;
        margin: 3rem auto 5rem auto;
        padding: 0 auto;
        position: relative;
        align-items: center;
    }
    
    .carousel-area {
        height: 100%;
        display: flex;
        position: relative;
        padding: 0;
        margin: 0 auto;
    }
    
    .carousel-block {
        width: fit-content;
        height: auto;
        align-items: center;
        display: flex;
    }
    
    .carousel-area img{
        max-width: 200px;
    }
    
    .arrow-wrap {
        width: 90%;
        height: 100%;
        margin: 5%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: absolute;
        top: 0;
        left: 0;
    }
    .arrow-btn {
        width: 20px;
        height: 20px;
        background-color: #aa80eae6;
        border: none;
        border-radius: 50%;
        transition: .2s;
    }
    .arrow-btn:focus {
        box-shadow: 0px 1px 10px -2px rgba(185, 185, 185, 0.8);
    }
    .arrow-btn:hover {
        background-color: #a070e7e6;
        box-shadow: 0px 1px 10px -2px rgba(0, 0, 0, 0.8);
    }
    
    /* 左 */
    .arrow-left {
        position: relative
    }
      /* ボタン左の中身（三角を擬似要素で表現） */
    .arrow-left:before {
        content: "";
        width: 5px;
        height: 5px;
        border-top: 1px solid #fefefe;
        border-left: 1px solid #fefefe;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-30%, -50%)rotate(-45deg);
    }
      /* 右 */
    .arrow-right {
        position: relative
    }
      /* ボタン右の中身（三角を擬似要素で表現） */
    .arrow-right:before {
        content: "";
        width: 5px;
        height: 5px;
        border-top: 1px solid #fefefe;
        border-left: 1px solid #fefefe;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-70%, -50%)rotate(135deg);
    }
    
    .pagination {
        margin: 3% auto 0;
        display: flex;
        justify-content: space-around;
    }
    .pagination-circle {
        width: 15px;
        height: 15px;
        border: none;
        border-radius: 50%;
        background-color: #c8afece6;
    }
    .grid {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Responsive header navigation */
header {
    z-index: 1000;
    gap: 16px;
    box-sizing: border-box;
}

header h1 {
    flex: 0 1 auto;
    min-width: 0;
}

header h1 a {
    overflow-wrap: anywhere;
}

nav.pc-nav {
    margin: 0 0 0 auto;
}

nav.pc-nav ul {
    align-items: center;
    gap: 8px;
    padding: 0;
}

nav.pc-nav li,
nav.pc-nav .li_nav {
    margin: 0;
}

@media screen and (max-width: 760px) {
    header {
        width: 100vw;
        max-width: 100vw;
        min-height: 60px;
        padding: 14px 16px;
        align-items: center;
    }

    header h1 {
        max-width: calc(100% - 58px);
        font-size: 18px;
        line-height: 1.3;
    }

    nav.pc-nav {
        position: relative;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        margin-left: auto;
        border: 1px solid rgba(255, 255, 255, 0.74);
        border-radius: 8px;
        cursor: pointer;
    }

    nav.pc-nav::before {
        content: "";
        position: absolute;
        left: 11px;
        top: 13px;
        width: 20px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        box-shadow: 0 8px 0 #fff, 0 16px 0 #fff;
    }

    nav.pc-nav ul {
        display: none;
        position: absolute;
        right: 0;
        top: calc(100% + 8px);
        min-width: min(78vw, 260px);
        box-sizing: border-box;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px;
        border: 1px solid #d8c5f5;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    }

    nav.pc-nav:hover ul,
    nav.pc-nav:focus-within ul {
        display: flex;
    }

    nav.pc-nav li,
    nav.pc-nav .li_nav {
        width: 100%;
        margin: 0;
        font-size: 1rem;
    }

    nav.pc-nav a,
    nav.pc-nav .dropbtn {
        display: block;
        box-sizing: border-box;
        width: 100%;
        min-height: 42px;
        padding: 10px 12px;
        border-radius: 6px;
        color: #5d348f !important;
        line-height: 1.4;
    }

    nav.pc-nav a:hover,
    nav.pc-nav .dropbtn:hover {
        background: #fbf8ff;
    }

    nav.pc-nav .dropdown {
        display: block;
    }

    nav.pc-nav .dropdown-content {
        position: static;
        display: block;
        min-width: 0;
        padding-left: 10px;
        background: transparent;
        box-shadow: none;
    }

    nav.pc-nav .dropdown-content a {
        color: #5d348f;
        padding: 9px 12px;
    }
}

/* Keep mobile header anchored to the viewport even when page content overflows horizontally. */
@media screen and (max-width: 760px) {
    header {
        width: 100vw;
        max-width: 100vw;
    }
}

/* Mobile hamburger placement override. */
@media screen and (max-width: 760px) {
    header {
        position: sticky;
    }

    nav.pc-nav {
        position: absolute !important;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        display: block !important;
    }
}
