*, *::before, *::after {
    box-sizing: border-box;
}
/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(30, 30, 30, 0.9);
    color: #fff;
    z-index: 3000;
    display: none; /* JSで .show クラスを付与して表示 */
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
}
.cookie-consent-banner.show {
    display: flex;
}
.cookie-consent-banner p {
    margin: 0;
    text-align: center;
}
.cookie-consent-banner a {
    color: var(--primary-dark);
    text-decoration: underline;
}
.cookie-actions-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
}
.cookie-actions-container .button-group {
    display: contents;
}
.cookie-actions-container .cta-button {
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 5px;
    border: 2px solid var(--primary-dark);
    font-weight: bold;
    text-decoration: none;
    box-sizing: border-box;
    min-width: auto;
    transition: opacity 0.3s;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    flex: 1;
}
/* 「全て承諾する」ボタン */
.cookie-actions-container .cta-button:not(.settings-button) {
    background-color: var(--primary-dark);
    color: #fff;
}
/* 「全て拒否する」「クッキー設定」ボタン */
.cookie-actions-container .settings-button {
    background-color: #fff;
    color: var(--primary-dark);
}
.cookie-actions-container .cta-button:hover {
    opacity: 0.8;
}
/* Cookie Settings Modal */
.cookie-settings-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: none; /* .showで表示 */
    justify-content: center;
    align-items: center;
    z-index: 3000;
}
.cookie-settings-modal.show {
    display: flex;
}
.cookie-settings-content {
    font-family: 'Inter', sans-serif;
    background-color: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}
.cookie-settings-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cookie-settings-header h3 {
    margin: 0;
    font-size: 18px;
}
.cookie-settings-close {
    color: var(--primary-dark);
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}
.cookie-settings-body {
    padding: 20px;
    overflow-y: auto;
}
.cookie-settings-body p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #555;
}
.cookie-category {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.cookie-category h4 {
    margin: 0 0 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cookie-category p {
    font-size: 14px;
    color: #555;
    margin: 0;
}
.always-active {
    font-size: 12px;
    font-weight: bold;
    color: #888;
}
.toggle-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.toggle-switch input {
    display: none;
}
.toggle-switch .slider {
    position: relative;
    width: 40px;
    height: 20px;
    background-color: #ccc;
    border-radius: 20px;
    transition: 0.3s;
}
.toggle-switch .slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    top: 2px;
    background-color: #fff;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle-switch input:checked + .slider {
    background-color: var(--primary-dark);
}
.toggle-switch input:checked + .slider::before {
    transform: translateX(20px);
}

.cookie-settings-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}
.cookie-settings-footer .cta-button {
    background-color: var(--primary-dark);
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 5px;
    min-width: auto;
    transition: opacity 0.3s;
    color: #fff;
    border: none;
}
.cookie-settings-footer .cta-button:hover {
    opacity: 0.8;
}

@media (min-width: 768px) {
    .cookie-consent-banner {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 20px;
    }
    .cookie-consent-banner p {
        text-align: left;
        flex-grow: 1;
        flex-shrink: 1;
    }
    .cookie-consent-banner .cookie-actions-container {
        flex-direction: row;
        flex-shrink: 0;
        gap: 10px;
    }
    .cookie-actions-container .cta-button {
        flex: 0 0 auto;
    }
}