* {
    box-sizing: border-box;
}


/* 画面全体設定 */
html{
    overflow-x: hidden;
    width: 100%;
}

body {
    margin: 0;
    font-family: a-otf-ryumin-pr6n, serif;
    font-style: normal;
    font-weight: 500;
    text-align: center;
    background: linear-gradient(to bottom, #0b1a3d, #1a2b53, #2a4175);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
}


/* PC/SP 表示切り替えの基本設定 */
.pc-header {
    display: flex;
}
.pc-footer {
    display: block;
}
.sp-header {
    display: none;
}
.sp-footer {
    display: none;
}

header {
    z-index: 1000; /* ロゴやナビゲーションが見えるように確実に前面へ */
}

/*画像保存禁止設定*/
img {
    pointer-events: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-touch-callout: none;
    -moz-user-select: none;
    user-select: none;
}

/* 星空アニメーション */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 20px 30px, #eee, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 40px 70px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1.5px 1.5px at 90px 40px, #ddd, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 160px 120px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 200px 50px, #eee, rgba(0, 0, 0, 0)),
        radial-gradient(1.5px 1.5px at 250px 140px, #ddd, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 300px 80px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 350px 160px, #eee, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 80vw 20vh, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1.5px 1.5px at 60vw 60vh, #ddd, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 20vw 80vh, #fff, rgba(0, 0, 0, 0));
    background-size: 100% 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
    animation: twinkle 10s infinite alternate;
}

@keyframes twinkle {
    0% {
        opacity: 0.4;
    }

    100% {
        opacity: 0.8;
    }
}

body::after {
    content: "";
    position: fixed;
    width: 150px;
    height: 1.5px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 80%, rgba(255, 255, 255, 1) 100%);
    border-radius: 50%;
    transform: rotate(-45deg);
    animation: shootingStar1 8s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    box-shadow:
        400px -300px 0 -0.5px rgba(255, 255, 255, 0.5),
        -500px 200px 0 -0.2px rgba(255, 255, 255, 0.7),
        200px 600px 0 0.5px rgba(255, 255, 255, 0.8),
        -700px 800px 0 -0.5px rgba(255, 255, 255, 0.6),
        800px 100px 0 -0.2px rgba(255, 255, 255, 0.9);
}

@keyframes shootingStar1 {
    0% {
        top: -20%;
        left: 80%;
        transform: translate(200px, -200px) rotate(-45deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    47% {
        top: 100%;
        left: -20%;
        transform: translate(-1000px, 1000px) rotate(-45deg);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

.main::after {
    content: "";
    position: fixed;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 80%, rgba(255, 255, 255, 1) 100%);
    border-radius: 50%;
    transform: rotate(-45deg);
    animation: shootingStar3 10s ease-in-out infinite 2s;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    box-shadow:
        300px -100px 0 0.5px rgba(255, 255, 255, 0.8),
        -800px 600px 0 0 rgba(255, 255, 255, 0.6),
        100px 900px 0 -0.5px rgba(255, 255, 255, 0.7);
}

@keyframes shootingStar3 {
    0% {
        top: -10%;
        left: 40%;
        transform: translate(100px, -100px) rotate(-45deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    50% {
        top: 80%;
        left: -30%;
        transform: translate(-800px, 800px) rotate(-45deg);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}


/* テキスト選択時の色 */
::selection {
    background-color: #3868c9;
    color: #ffffff;
}

::-moz-selection {
    background-color: #3868c9;
    color: #ffffff;
}

/* プリロード中はアニメーションとトランジションを停止 */
.preload * {
    transition: none !important;
    animation: none !important;
}

/* スクロールしてheaderを出現 */
.header.on {
  top: 0 !important;
}

/* ヘッダー */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem 0 1rem;
    background-color: rgba(235, 240, 250, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #324f8b;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(50, 79, 139, 0.2);
    z-index: 100;
}

.header-logo a {
    font-size: 1.5rem;
    color: #324f8b;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px 5px 0;
    border-radius: 5px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo .emblem {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.header-logo a:hover {
    background-color: rgba(50, 79, 139, 0.1);
}

/* ナビゲーション */
.header-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    transform-origin: center top;
}

.header-nav ul.animate-in {
    animation: desktopMenuIn 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes desktopMenuIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.nav-item {
    position: relative;
    margin-left: 10px;
}

.nav-item a {
    color: #324f8b;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 10px 20px;
    display: block;
    transition: background-color 0.3s;
    border-radius: 5px;
}

.nav-item>a:hover {
    background-color: rgba(50, 79, 139, 0.1);
}

/* ドロップダウンメニュー */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    padding: 10px 0;
    min-width: 150px;
    z-index: 200;
}

.dropdown a {
    color: #333;
    padding: 10px 20px;
    font-size: 1rem;
    white-space: nowrap;
    display: block;
}

.dropdown a:hover {
    background-color: #f0f0f0;
    color: #3868c9;
}

.nav-item:hover .dropdown {
    display: block;
    animation: fadeInDropdown 0.3s ease-out;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes fadeInDropdownRight {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* メニュー切り替え */
.menu-toggle {
    display: block;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    right: 2rem;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0.3s, background-color 0.3s;
    border-radius: 5px;
    box-sizing: content-box;
}

.menu-toggle:hover {
    background-color: rgba(50, 79, 139, 0.1);
}

.menu-toggle span {
    display: block;
    width: 30px;
    height: 3px;
    background: #324f8b;
    transition: all 0.3s cubic-bezier(0.45, 0.05, 0.55, 0.95);
    position: absolute;
    left: 8px;
    border-radius: 2px;
}

.menu-toggle span:nth-child(1) {
    top: 12px;
}

.menu-toggle span:nth-child(2) {
    top: 19px;
}

.menu-toggle span:nth-child(3) {
    top: 26px;
}

/* レスポンシブ対応 (767px以下をSPとする) */
@media (max-width: 767px) {
    .pc-header, .pc-footer {
        display: none !important;
    }
    .sp-header {
        display: flex !important;
    }
    .sp-footer {
        display: block !important;
    }
    .menu-toggle {
        opacity: 1;
        visibility: visible;
        position: relative;
        right: auto;
        transform: scale(1);
    }

    .header-nav {
        opacity: 0;
        visibility: hidden;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(235, 240, 250, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transition: right 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }

    .header-nav.active {
        right: 0;
        opacity: 1;
        visibility: visible;
    }

    .header-nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding-top: 80px;
        padding-bottom: 50px;
    }

    .nav-item {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }

    .nav-item a {
        font-size: 1.25rem;
        font-weight: bold;
    }

    .dropdown {
        display: block;
        position: static;
        background-color: transparent;
        box-shadow: none;
        transform: none;
        padding: 0;
        margin-top: 10px;
    }

    .dropdown a {
        font-size: 1.1rem;
        font-weight: 500;
    }

    .header-nav.active .nav-item {
        opacity: 0;
        animation: mobileItemFadeUp 0.4s ease-out forwards;
    }

    .header-nav.active .nav-item:nth-child(1) {
        animation-delay: 0.1s;
    }

    .header-nav.active .nav-item:nth-child(2) {
        animation-delay: 0.15s;
    }

    .header-nav.active .nav-item:nth-child(3) {
        animation-delay: 0.2s;
    }

    .header-nav.active .nav-item:nth-child(4) {
        animation-delay: 0.25s;
    }

    .header-nav.active .nav-item:nth-child(5) {
        animation-delay: 0.3s;
    }

    @keyframes mobileItemFadeUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .dropdown a {
        color: #324f8b;
        padding: 8px 0;
        font-size: 1rem;
        opacity: 0.9;
    }

    .dropdown a:hover {
        background-color: rgba(50, 79, 139, 0.1);
        color: #324f8b;
    }

    .nav-item:hover .dropdown {
        animation: none;
    }

    .menu-toggle.active span:nth-child(1) {
        top: 19px;
        transform: rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }

    .menu-toggle.active span:nth-child(3) {
        top: 19px;
        transform: rotate(-45deg);
    }
}

@media (min-width: 768px) {
    .nav-item:last-child .dropdown {
        left: auto;
        right: 0;
        transform: none;
        animation: fadeInDropdownRight 0.3s ease-out;
    }
}

/* メインコンテンツ */
.main {
    padding: 110px 20px 40px;
    flex: 1 0 auto;
}

.page-title {
    font-size: 2.5em;
    margin: 20px auto;
    color: #fff;
    background: linear-gradient(135deg, #3868c9, #7a64d1);
    width: 90%;
    max-width: 800px;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* パンくずリスト */
.breadcrumbs {
    width: 90%;
    max-width: 800px;
    margin: 10px auto 20px;
    text-align: left;
}

.breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    row-gap: 5px;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.breadcrumbs li:not(:last-child)::after {
    content: '>';
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.breadcrumbs span[aria-current="page"] {
    color: #ffffff;
    font-weight: bold;
}

/* ==========================================================================
   フッター設定
   ========================================================================== */

.footer_upper {
    background: linear-gradient(180deg, #0b1a3d 0%, #050d1f 100%);
    color: #ffffff;
    padding: 80px 0 60px;
    position: relative;
    z-index: 10;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.footer-sitemap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 25px;
}

.sitemap-column {
    display: flex;
    flex-direction: column;
}

.sitemap-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
}


.sitemap-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sitemap-title a:hover {
    color: #7a64d1;
}

.sitemap-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sitemap-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sitemap-list li i {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.sitemap-list li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.sitemap-list li a:hover {
    color: #ffffff;
    transform: translateX(3px);
}

.ext-links-row {
    margin-top: 25px;
}

.sitemap-toggle {
    display: none;
}

.social-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 16px;
}

.social-icons img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.social-icons a:hover img {
    transform: scale(1.1);
}

.footer_lower {
    background-color: #050d1f;
    color: rgba(255, 255, 255, 0.5);
    padding: 25px 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright {
    margin: 0;
}

.privacy-link {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.privacy-link a {
    color: rgba(255, 255, 255, 0.5);
}

/* フッターのレスポンシブ個別調整 */
@media (max-width: 767px) {
    .footer_upper {
        padding: 60px 0 40px;
    }

    .footer-sitemap {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .sitemap-column {
        align-items: stretch;
        text-align: left;
    }

    .sitemap-title {
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0;
        padding: 18px 5%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        gap: 20px;
    }

    /* アコーディオン設定 */
    .sitemap-toggle {
        display: block;
        transition: transform 0.3s ease;
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.5);
    }

    .sitemap-column.active .sitemap-toggle {
        transform: rotate(180deg);
    }


    .sitemap-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        padding: 0;
    }

    .sitemap-column.active .sitemap-list {
        max-height: 300px;
        padding: 10px 5% 25px;
    }

    .ext-links-row {
        margin-top: 10px;
        padding-left: 0;
    }

    .social-icons img {
        width: 30px;
        height: 30px;
    }

    .privacy-link {
        display: flex;
        justify-content: center;
        gap: 20px;
        margin-top: 10px;
    }
    
    .privacy-link a {
        color: rgba(255, 255, 255, 0.5);
    }
}