
@import url('https://fonts.googleapis.com/css2?family=Mochiy+Pop+P+One&family=Noto+Sans+JP:wght@400;700&display=swap');

/* ======================================= */
/* 1. ローディング画面 スタイル */
/* ======================================= */
.loading-screen {
    position: fixed; 
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #fce7ef; 
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    z-index: 9999; 
    opacity: 1;
    transition: opacity 1s ease-out; 
}
.loading-text {
    font-family: 'Mochiy Pop P One', sans-serif;
    font-size: 3em; color: #f08080;
    margin-bottom: 20px;
}
.loading-percentage { 
    font-family: 'Mochiy Pop P One', sans-serif;
    font-size: 4.5em; color: #f08080;
    margin-bottom: 20px;
}
.loading-bar-container {
    width: 400px; height: 20px;
    background-color: white; border-radius: 10px;
    overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}
.loading-bar {
    height: 100%; width: 0%; 
    background-color: #ffb6c1; 
    transition: width 0.3s ease-out; 
}
.loading-message-area { 
    display: flex; align-items: flex-end; 
    position: relative;
    width: 100%; max-width: 400px; 
    justify-content: center; 
}
.loading-char-img { 
    width: 80px; height: auto;
    position: relative;
    animation: runCharacter 0.8s steps(4) infinite; 
    transform: translateY(0); 
}
.loading-message-balloon { 
    background-color: white; border: 2px solid #ffb6c1; 
    border-radius: 20px; padding: 10px 15px;
    font-size: 1em; color: #555;
    position: relative; margin-left: 15px; 
    white-space: nowrap; 
}
.loading-message-balloon::before { 
    content: ''; position: absolute; left: -10px; bottom: 15px;
    width: 0; height: 0; border-style: solid;
    border-width: 10px 15px 10px 0;
    border-color: transparent #ffb6c1 transparent transparent; 
}
.loading-message-balloon::after { 
    content: ''; position: absolute; left: -7px; bottom: 15px;
    width: 0; height: 0; border-style: solid;
    border-width: 8px 13px 8px 0;
    border-color: transparent white transparent transparent; 
}
@keyframes runCharacter {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}
.loading-screen.hidden {
    opacity: 0;
    pointer-events: none; 
}

/* ======================================= */
/* 2. メニュー (ドロワー) スタイル */
/* ======================================= */
.drawer-menu {
    position: fixed;
    top: 0; right: 0;
    width: 280px; 
    height: 100%;
    background-color: #ffe4e1; 
    box-shadow: -4px 0 15px rgba(0,0,0,0.1);
    z-index: 5000; 
    transform: translateX(100%); 
    transition: transform 0.4s ease-out;
    padding: 20px; padding-top: 80px;
}
.drawer-menu.open {
    transform: translateX(0); 
}
.menu-list {
    list-style: none;
    padding: 0; margin: 0;
}
.menu-list li {
    margin-bottom: 15px;
    border-bottom: 1px dashed #f0808044;
    padding-bottom: 10px;
}
.menu-list li a {
    font-family: 'Mochiy Pop P One', sans-serif;
    display: block;
    text-decoration: none;
    color: #8c42a2;
    font-size: 1.4em;
    padding: 10px 0;
    transition: color 0.2s;
}
.menu-list li a:hover {
    color: #f08080;
    padding-left: 5px;
}
.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 4999;
    opacity: 0;
    pointer-events: none; 
    transition: opacity 0.4s ease-out;
}
.overlay.active {
    opacity: 1;
    pointer-events: auto; 
}


/* ======================================= */
/* 3. メインコンテンツ スタイル */
/* ======================================= */

body {
    background-color: #f7e7eb; 
    font-family: 'Noto Sans JP', sans-serif;
    color: #555555;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    display: grid;
    grid-template-columns: 200px 1fr 100px;
    grid-template-rows: auto 1fr auto auto;
    gap: 20px;
    position: relative;
}

.header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    position: relative;
    z-index: 10;
}

.logo {
    font-family: 'Mochiy Pop P One', sans-serif;
    font-size: 2.5em;
    color: #8c42a2; 
    letter-spacing: 2px;
    position: relative;
    top: 5px;
}

.menu-button {
    background-color: #f08080;
    color: #ffffff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 0.8em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    margin-left: auto; /* 時計との間隔を確保 */
}
.menu-button::before {
    content: '•••';
    font-size: 1.5em;
    line-height: 0.5;
    margin-bottom: 3px;
}

/* リアルタイム時計のスタイル */
.realtime-clock {
    font-family: 'Mochiy Pop P One', sans-serif;
    font-size: 1.8em;
    color: #f08080;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-left: auto; /* 右寄せ */
    margin-right: 20px; /* メニューボタンとの間隔 */
}

.main-illustration {
    grid-column: 2 / 3;
    grid-row: 1 / span 2;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    height: calc(100% - 100px);
    width: 80%;
    max-width: 800px;
}
.main-illustration img {
    width: auto;
    max-width: 60%; 
    height: auto;
    max-height: 80vh; 
    object-fit: contain;
    
    padding: 50px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    background-image: repeating-linear-gradient(
        135deg, 
        #fff8e1 0, 
        #fff8e1 15px,
        #ffee5833 15px, 
        #ffee5833 30px
    );
    opacity: 1; 
    transition: opacity 1s ease-in-out; 
}

.left-sidebar {
    grid-column: 1 / 2;
    grid-row: 2 / span 1;
    padding: 15px;
    margin-top: 20px;
    z-index: 5;
    text-align: left;
}

.date-info {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
.date-info .year {
    font-size: 1.2em;
    font-weight: bold;
    color: #8c42a2;
}
.date-info .today {
    font-family: 'Mochiy Pop P One', sans-serif;
    font-size: 3em;
    color: #f08080;
    line-height: 1;
}
.location-list {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}
.location-list li {
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #777;
    display: flex; 
    align-items: center; 
}
.weather-emoji { 
    font-size: 1.2em;
    margin-right: 5px;
}
.location-list li.live::after {
    content: 'LIVE';
    background-color: #f08080;
    color: #ffffff;
    font-size: 0.7em;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
    font-weight: bold;
}

.right-sidebar {
    grid-column: 3 / 4;
    grid-row: 2 / span 1;
    padding: 15px;
    margin-top: 20px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.social-icons {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    margin-bottom: 50px;
    text-align: right;
}
.social-icons li {
    margin-bottom: 15px;
}
.social-icons a {
    color: #8c42a2;
    font-size: 1.5em;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.social-icons li:nth-child(1) a::before { content: 'X'; }
.social-icons li:nth-child(2) a::before { content: '📸'; }
.social-icons li:nth-child(3) a::before { content: '▶️'; }
.social-icons li:nth-child(4) a::before { content: '@'; }
.social-icons li:nth-child(5) a::before { content: '🎵'; }


.pickup-box {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: left;
    width: 180px;
}
.pickup-box .title {
    font-weight: bold;
    color: #f08080;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.pickup-box .title::before {
    content: '💖';
    margin-right: 5px;
    font-size: 1.2em;
}
.pickup-box p {
    font-size: 0.9em;
    line-height: 1.5;
}

/* ======================================= */
/* 4. 新規セクション スタイル (PROFILE / GALLERY / RELATIONSHIP) */
/* ======================================= */
.section {
    grid-column: 1 / -1; 
    padding: 50px 20px;
    margin-top: 40px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    scroll-margin-top: 80px;
}
.section-title {
    font-family: 'Mochiy Pop P One', sans-serif;
    font-size: 2.5em;
    color: #8c42a2;
    border-bottom: 4px solid #f08080;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

/* PROFILE スタイル (変更) */
.profile-section {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: #aed9ed; 
    border-radius: 20px;
    height: 700px; 
    overflow: hidden;
    padding: 20px; 
}

/* PROFILE: サイドの小さなキャラクターリスト */
.profile-side-chars {
    position: absolute;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
}
.profile-side-char-item {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid transparent; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: border-color 0.3s, transform 0.2s;
}
.profile-side-char-item.active {
    border-color: #e91e63; 
    transform: scale(1.1);
}
.profile-side-char-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* PROFILE: メインキャラクターと情報 */
.profile-main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
}

.profile-main-char-img {
    width: 300px; 
    height: 300px;
    object-fit: contain;
    margin-bottom: 20px;
    transition: opacity 0.5s ease-in-out;
}

.profile-name {
    font-family: 'Mochiy Pop P One', sans-serif;
    font-size: 3em;
    color: #4a148c; 
    margin-bottom: 10px;
}

.profile-description {
    font-size: 1.2em;
    color: #333;
    line-height: 1.6;
    text-align: center;
    max-width: 500px;
}

/* PROFILE: BACK/NEXTボタン */
.profile-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ff80ab; 
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 2em;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s, transform 0.2s;
    z-index: 20;
}
.profile-nav-button:hover {
    background-color: #e91e63;
    transform: translateY(-50%) scale(1.05);
}
.profile-nav-button.back {
    left: 100px; 
}
.profile-nav-button.next {
    right: 100px; 
}
/* PROFILE: 右上の追加ボタン群 */
.profile-top-right-buttons {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 20;
}
.profile-top-right-button {
    background-color: #ff80ab;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s, transform 0.2s;
}
.profile-top-right-button:hover {
    background-color: #e91e63;
    transform: scale(1.05);
}

/* ポップアップ/モーダル スタイル */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 6000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.profile-modal {
    background-color: #fffaf0; 
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}
.modal-overlay.active .profile-modal {
    transform: translateY(0);
}
.profile-modal h3 {
    font-family: 'Mochiy Pop P One', sans-serif;
    color: #f08080;
    font-size: 2em;
    margin-bottom: 20px;
}
.profile-modal p {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 10px;
}
.profile-modal .close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8em;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}
.profile-modal .close-button:hover {
    color: #333;
}

/* GALLERY スタイル */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.gallery-item {
    background-color: #fffaf0;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s;
}
.gallery-item img:hover {
    transform: scale(1.05);
}

/* RELATIONSHIP スタイル */
.relationship-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}
.relationship-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
.relationship-description {
    font-size: 1.1em;
    line-height: 1.8;
    color: #333;
    max-width: 600px;
    text-align: left;
    padding: 20px;
    white-space: pre-wrap;
    background-color: #fffaf0;
    border: 2px dashed #ffb6c1;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-top: 10px;
}


/* レスポンシブ調整 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr auto auto auto auto;
        gap: 15px;
        padding: 15px;
    }
    .main-illustration { 
        grid-row: 3; 
        position: relative;
        transform: none;
        top: auto; left: auto; 
        height: auto; 
        width: 100%; 
        padding: 20px 0;
    }
    .header { grid-column: 1 / -1; flex-wrap: wrap; justify-content: center; }
    .logo { order: 1; width: 100%; text-align: center; margin-bottom: 10px; }
    .realtime-clock { order: 2; margin: 0 auto 10px auto; }
    .menu-button { order: 3; margin: 0 auto; }

    .left-sidebar { grid-column: 1 / -1; grid-row: 2; margin-top: 0; }
    .right-sidebar { grid-column: 1 / -1; grid-row: 4; margin-top: 0; align-items: center; }
    .social-icons { margin-top: 15px; text-align: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
    .social-icons li { margin-bottom: 0; }
    .pickup-box { width: 90%; max-width: 300px; }
    .profile-card-container {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    .profile-card {
        width: 90%;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .loading-bar-container { width: 80%; max-width: 400px; }
    .loading-message-area { left: 0; transform: none; justify-content: center; }
    .loading-text, .loading-percentage { font-size: 2.5em; }
    .loading-percentage { font-size: 3.5em; }
    .drawer-menu { width: 70%; max-width: 280px; }
    .relationship-description {
        font-size: 1em;
        padding: 15px; 
    }

    /* PROFILE レスポンシブ調整 */
    .profile-section {
        height: auto;
        min-height: 500px;
        padding: 10px;
    }
    .profile-side-chars {
        flex-direction: row;
        flex-wrap: wrap;
        position: static;
        margin-bottom: 20px;
        justify-content: center;
    }
    .profile-side-char-item {
        width: 60px;
        height: 60px;
    }
    .profile-nav-button {
        width: 45px;
        height: 45px;
        font-size: 1.5em;
        left: 10px;
        right: 10px;
    }
    .profile-nav-button.back { left: 10px; }
    .profile-nav-button.next { right: 10px; }

    .profile-main-char-img {
        width: 200px;
        height: 200px;
    }
    .profile-name {
        font-size: 2em;
    }
    .profile-description {
        font-size: 1em;
        padding: 0 10px;
    }
    .profile-top-right-buttons {
        flex-direction: row;
        bottom: 10px;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        gap: 5px;
    }
    .profile-top-right-button {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
}
.manga-content {
    /* flexboxを使って内部の要素（画像とpタグ）を中央に寄せる */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; 
    padding: 20px 0;
}

.manga-content img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px; 
}

.manga-description {
    /* pタグの幅を制限し、margin: auto で中央寄せを確実にする */
    max-width: 600px;
    margin: 0 auto;   
    line-height: 1.6;
}
/* MANGAセクションの中央寄せ */
.manga-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; 
    padding: 20px 0;
}

.manga-content img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px; 
}

.manga-description {
    max-width: 600px;
    margin: 0 auto;   
    line-height: 1.6;
}
/* MANGAセクションの中央寄せ */
.manga-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; 
    padding: 20px 0;
}

.manga-content img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px; 
}

.manga-description {
    max-width: 600px;
    margin: 0 auto;   
    line-height: 1.6;
}

/* -------------------------------------- */
/* コンパクトフッターのスタイル */
/* -------------------------------------- */
.compact-footer {
    /* 画像のフッターの背景色に合わせて薄い色に設定 */
    background-color: #f7f7f7; 
    padding: 25px 5%;
    margin-top: 50px;
    font-size: 0.85rem;
    line-height: 1.6;
    border-top: 1px solid #eee; /* 上部に細い線を追加 */
}

.footer-main-area {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* 下端に揃える */
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 10px;
}

.footer-left {
    /* ロゴ、住所、連絡先、著作権情報を含むエリア */
    max-width: 50%;
}

/* ロゴ部分 (おにぎりーずのロゴとして) */
.footer-logo-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.footer-address p {
    margin: 0;
}

.footer-contact-links {
    margin-top: 15px;
}

.footer-contact-links a {
    color: #555;
    text-decoration: none;
    margin-right: 15px;
}

.footer-contact-links a:hover {
    text-decoration: underline;
}

.footer-copyright {
    margin-top: 10px;
    color: #888;
}

.footer-right-image {
    /* Page Topと小さなキャラクター画像を含むエリア */
    text-align: right;
    position: relative;
}

.footer-right-image .page-top-link {
    display: block;
    margin-bottom: 10px;
    color: #555;
    text-decoration: none;
    font-size: 0.9em;
}

.footer-right-image img {
    max-height: 80px; /* 画像の大きさを調整 */
    width: auto;
    display: block;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .footer-main-area {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-left {
        max-width: 100%;
        margin-bottom: 20px;
    }
    .footer-right-image {
        width: 100%;
        text-align: left; /* 画像とPage Topを左寄せにする */
    }
}