/* --- Base Colors & Fonts --- */
:root {
    --dark-color: #222222;
    --accent-color: #ffd700;
    --default-title-bg-color: #ffee9b; 
    --segment-1-color: #ffb3ba; 
    --segment-2-color: #ffdfba; 
    --segment-3-color: #ffffba; 
    --segment-4-color: #baffc9; 
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--dark-color);
    background-color: #ffffff;
    line-height: 1.7; 
    font-size: 1rem; 
    font-weight: 400; 
    margin: 0;
}

html { scroll-behavior: smooth; }
.body-text { color: var(--dark-color); }

/* --- Layout Utility --- */
.section-container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}
@media (min-width: 640px) { .section-container { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .section-container { padding-left: 2rem; padding-right: 2rem; } }

/* --- Preloader --- */
.preloader-layer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: #ffffff;
    transition: transform 1s ease-in-out;
}

/* --- Header --- */
.main-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: #ffffff;
    border-bottom: 1px solid #f3f4f6;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.header-nav {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 1rem;
}

.site-logo {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    text-decoration: none;
    color: inherit;
    font-size: 1rem;
}
@media (min-width: 640px) { .site-logo { font-size: 1.25rem; } }

.icon-button {
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark-color);
}
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }

/* --- Mobile Menu --- */
.mobile-menu-layer {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(100%); 
    background-color: var(--accent-color); 
}

.mobile-menu-open { z-index: 60 !important; pointer-events: auto !important; opacity: 1 !important; transform: translateX(0) !important; }

.menu-content-container { position: relative; height: 100%; }

.close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark-color);
}
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }

.menu-links-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 2rem;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.mobile-link {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s;
}
.mobile-link:hover { color: #ffffff; }

@media (min-width: 768px) {
    .mobile-menu-layer { background-color: rgba(0, 0, 0, 0.4); transform: translateX(0); }
    .menu-content-container { 
        left: 60%; right: 0; width: 40vw; 
        background-color: var(--accent-color); 
        position: absolute; top: 0; bottom: 0; 
        transform: translateX(100%); 
        transition: transform 0.3s ease; 
    }
    .mobile-menu-open .menu-content-container { transform: translateX(0) !important; }
}

/* --- Hero --- */

/* --- Hero --- */
.hero-section { 
    height: 100vh; 
    position: relative; 
    overflow: hidden; 
}

.hero-image-container { 
    position: absolute; 
    inset: 0; 
    width: 100%; 
    height: 100vh; 
}

/* 元の layer から背景指定を抜き、擬似要素を作成 */
.hero-image-layer { 
    width: 100%; 
    height: 100%; 
    position: absolute; 
    top: 0;
    left: 0;
}

.hero-image-layer::before {
    content: "";
    position: fixed; /* ブラウザの画面に対して固定 */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url("image/top.png");
    background-size: cover;
    background-position: center;
    will-change: transform; /* iOSのレンダリングをスムーズにするおまじない */
    z-index: -1; /* コンテンツの背面に配置 */
}

/* ぼかし用のクローンも同様に擬似要素で対応する場合 */
#blurred-image-clone::before {
    filter: blur(10px); /* 既存のスクリプトでopacityを操作する想定 */
}


/* --- Main Content Area --- */
.main-body-container { position: relative; z-index: 20; background-color: #ffffff; margin-top: -0.25rem; }

/* --- Section Titles --- */
.section-title-wrapper { display: flex; justify-content: center; }
.section-title {
    --title-bg-color: var(--default-title-bg-color); 
    position: relative; 
    padding: 8px 8px;  
    font-family: 'Noto Sans JP', sans-serif; 
    font-size: 24px;  
    letter-spacing: 0.1em;  
    color: #333;  
    font-weight: 700;  
    display: block;  
    box-sizing: border-box;  
    max-width: fit-content; 
    text-align: center;   
    margin-bottom: 2rem; 
    z-index: 10; 
}

.section-title::before, .section-title::after {  
    content:'';  
    position: absolute;  
    left: 50%;  
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg); 
    width: 48px; 
    height: 48px; 
    display: inline-block;  
    z-index: -1; 
    border-radius: 4px; 
}
.section-title::before { background: linear-gradient(to top, var(--segment-1-color) 50%, var(--segment-3-color) 50%); }
.section-title::after { background: linear-gradient(to left, var(--segment-2-color) 50%, var(--segment-4-color) 50%); opacity: 0.9; }

/* Contact Title White Overwrite */
.contact-section .section-title[style*="--title-bg-color: #ffffff;"]::before,
.contact-section .section-title[style*="--title-bg-color: #ffffff;"]::after {
    background: #ffffff !important;
    opacity: 1 !important;
}

/* --- News --- */
.news-section { padding-top: 3rem; padding-bottom: 3rem; padding-left:1.5em; padding-right:1.5em; }
@media (min-width: 640px) { .news-section { padding-top: 5rem; padding-bottom: 5rem; } }
.news-content-flex { display: flex; justify-content: center; }
.news-item-box { width: 100%; max-width: 32rem; text-align: left; }

/* --- Works General --- */
.works-bg-section { padding-top: 3rem; padding-bottom: 3rem; background-color: #f9fafb; }
@media (min-width: 640px) { .works-bg-section { padding-top: 5rem; padding-bottom: 5rem; } }
.works-container { margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
@media (min-width: 640px) { .works-container { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 768px) { .works-container { width: 85%; max-width: 1000px; padding-left: 0; padding-right: 0; } }

/* --- Work 1 & 2 Layout --- */
.work-full-wrapper { margin-bottom: 6rem; }
@media (min-width: 768px) { .work-full-wrapper { width: 90%; max-width: 1100px; margin-left: auto; margin-right: auto; } }

.work-details-grid { 
    display: flex; flex-direction: column; gap: 0; overflow: hidden; 
    border-radius: 0.5rem; background-color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06); 
}
@media (min-width: 768px) { .work-details-grid { display: grid; grid-template-columns: 1fr 2fr; align-items: stretch; text-align: left; } }

.work-item-ratio { width: 100%; padding-bottom: 150%; position: relative; }
.absolute-fill-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.work-image-rounded-fix { border-radius: 0.5rem 0.5rem 0 0 !important; }
@media (min-width: 768px) {
    .work-image-rounded-fix { border-top-left-radius: 0.5rem !important; border-bottom-left-radius: 0.5rem !important; border-bottom-right-radius: 0 !important; border-top-right-radius: 0 !important; }
}

.work-status-tag { 
    position: absolute; top: 0px; left: 0px; z-index: 30;
    background-color: var(--accent-color); color: var(--dark-color); 
    padding: 5px 12px; border-radius: 0 0 4px 0; 
    font-size: 0.8rem; font-weight: 700; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.3); line-height: 1.2; letter-spacing: 0.05em; 
}

/* --- Work Text Area --- */
.work-info-box { background-color: var(--accent-color); padding: 1rem; color: var(--dark-color); margin-bottom: 1.5rem; }
@media (min-width: 768px) { .work-info-box { border-top-right-radius: 0.5rem; } }
.work-old-info-box { background-color: #edead3 !important; }

.work-info-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.25rem; margin-top: 0; }
.work-info-date { font-size: 0.875rem; color: #1f2937; margin: 0; }

.work-text-col { display: flex; flex-direction: column; height: 100%; }
.work-text-content-wrapper { flex-grow: 1; overflow-y: auto; padding: 1rem; }
@media (min-width: 768px) { .work-text-content-wrapper { padding: 0 1rem 1.5rem 1rem !important; } }

.catchphrase-heading {
    font-family: 'Zen Old Mincho', serif;
    color: #787878; 
    font-size: 1.4rem; 
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 0.5rem; 
}
.section-text-left { text-align: left; margin: 0; }

/* Read Link Style */
.work-read-icon-wrapper { display: inline-flex; flex-direction: column; align-items: flex-start; margin-bottom: 1rem; font-weight: 700; font-size: 1rem; }
.flex-center-y-mb-2 { display: flex; align-items: center; margin-bottom: 0.5rem; }
.work-read-link { display: flex; align-items: center; color: var(--dark-color); text-decoration: none; transition: color 0.2s; }
.work-read-link:hover { color: #666666; }
.link-text { text-decoration: underline; text-underline-offset: 2px; }

.material-icons.custom-menu-book-icon { font-size: 18px; line-height: 18px; color: var(--dark-color); background-color: var(--accent-color); padding: 3px; border-radius: 4px; border: 1px solid var(--dark-color); vertical-align: middle; }
.material-icons.custom-menu-book-icon.work-old-icon { background-color: #edead3 !important; }
.material-icons.custom-open-new-icon { font-size: 14px; color: #6b7280; margin-left: 0.3rem; vertical-align: middle; }

/* --- Kindle Button --- */
.kindle-button {
    display: inline-flex; align-items: center; text-decoration: none;
    background-color: var(--accent-color); color: var(--dark-color); 
    padding: 8px 24px; border-radius: 9999px; 
    font-weight: 700; font-size: 0.9rem; 
    transition: all 0.2s ease; border: 2px solid var(--dark-color); 
    margin-top: 1rem;
}
.kindle-button:hover { background-color: var(--dark-color); color: var(--accent-color); transform: translateY(-2px); }
.ml-1-text-sm { margin-left: 0.25rem; font-size: 0.875rem; }

/* --- Work Grid 3-6 --- */
.works-grid-quad { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) { .works-grid-quad { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .works-grid-quad { grid-template-columns: repeat(4, 1fr); } }

.work-card-tile { cursor: pointer; }
.work-tile-decoration { background-color: #ffffff; border-radius: 0.5rem; overflow: hidden; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
@media (min-width: 768px) { .work-tile-decoration { border-radius: 0.5rem; } }

.work-overlay {
    position: absolute; inset: 0; z-index: 10;
    display: flex; flex-direction: column; justify-content: flex-end; 
    padding: 1rem; color: white; transition: opacity 0.4s ease; pointer-events: none;
}
.overlay-gradient-bg { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2), transparent); pointer-events: none; }
.relative-z-10 { position: relative; z-index: 10; }

.work-overlay-title { font-weight: 700; font-size: 1.125rem; margin: 0; }
.work-overlay-subtitle { font-size: 0.75rem; line-height: 1.625; margin-top: 0.25rem; margin-bottom: 0; }

@media (min-width: 768px) {
    .work-item-ratio:hover .work-overlay { opacity: 0; }
    .work-overlay-title { font-size: 1rem; } 
}
.overlay-hidden { opacity: 0 !important; }

/* --- Dojinshi --- */
.dojinshi-section { padding-top: 3rem; padding-bottom: 3rem; }
.carousel-relative { position: relative; }
.carousel-btn { 
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 30;
    padding: 0.5rem; border: none; border-radius: 9999px; cursor: pointer;
    background-color: rgba(255, 255, 255, 0.7); color: var(--dark-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.btn-prev { left: 0; }
.btn-next { right: 0; }
.carousel-btn svg { width: 1.5rem; height: 1.5rem; }

.carousel-flex-container { 
    display: flex; overflow-x: scroll; scroll-snap-type: x mandatory; 
    gap: 1.5rem; padding-top: 1rem; padding-bottom: 1rem; padding-left: 0.5rem; padding-right: 0.5rem; 
    scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; 
}
.carousel-flex-container::-webkit-scrollbar { display: none; }

.dojinshi-item-wrapper { flex-shrink: 0; scroll-snap-align: start; width: 55vw; max-width: 250px; }
.block-link { display: block; text-decoration: none; }
.dojinshi-img-decoration { border-radius: 0.5rem; overflow: hidden; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }

/* --- About --- */
.about-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
    background-color: #ffffff;
}
@media (min-width: 640px) {
    .about-section {
        padding-top: 5rem;

    }
}

.about-flex-layout { display: block; }
@media (min-width: 768px) { .about-flex-layout { display: flex; gap: 3rem; align-items: flex-start; } }
@media (min-width: 768px) { .about-content-container { max-width: 650px; margin-left: auto; margin-right: auto; } }

.about-profile-col { display: flex; flex-direction: column; align-items: center; margin-bottom: 2rem; }


.about-bg-section { padding-top: 3rem; padding-bottom: 3rem; background-color: #f9fafb; }
.about-flex-layout { display: block; }
.about-section {
    background-color: #ffffff;
}
@media (min-width: 768px) { .about-flex-layout { display: flex; gap: 3rem; align-items: flex-start; } }
@media (min-width: 768px) { .about-content-container { max-width: 650px; margin-left: auto; margin-right: auto; } }

.about-profile-col { display: flex; flex-direction: column; align-items: center; margin-bottom: 2rem; }
@media (min-width: 768px) { .about-profile-col { margin-bottom: 0; } }

.profile-icon-box { 
    width: 7rem; height: 7rem; background-color: #d1d5db; border-radius: 9999px; 
    overflow: hidden; margin-bottom: 1rem; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); 
    position: relative; display: flex; align-items: center; justify-content: center;
}
@media (min-width: 640px) { .profile-icon-box { width: 10rem; height: 10rem; } }
.profile-name { font-size: 1.125rem; font-weight: 500; margin: 0; }

.about-text-col { flex: 1; text-align: left; 
        padding-bottom: 5rem;
padding-left: 2rem;
        padding-right: 2rem;
}
.mt-4 { margin-top: 1rem; }

.social-links-flex { display: flex; align-items: center; gap: 1.5rem; margin-top: 1.5rem; }
.social-icon-link { transition: opacity 0.2s; text-decoration: none; }
.social-icon-link:hover { opacity: 0.7; }
.social-img-x, .social-img-pixiv, .social-img-booth { height: 24px; width: auto; object-fit: contain; }

/* --- Contact --- */
.contact-section { padding-top: 3rem; padding-bottom: 3rem; background-color: var(--accent-color); text-align: center; 
padding-left: 2rem;
        padding-right: 2rem;}
.contact-lead-text { margin-bottom: 2rem; }

.contact-form { max-width: 32rem; margin-left: auto; margin-right: auto; text-align: left; }
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.25rem; }
.form-input, .form-textarea { width: 100%; box-sizing: border-box; padding: 0.5rem; }
.form-textarea { resize: vertical; }

.input-focus-yellow { border: 2px solid var(--dark-color); color: var(--dark-color); background-color: #ffffff; border-radius: 0.5rem; transition: box-shadow 0.2s ease, background-color 0.2s ease; }
.input-focus-yellow:focus { outline: none; background-color: #f6f7ed; box-shadow: 0 0 0 3px rgba(246, 247, 237, 0.8); }

.form-submit-wrapper { padding-top: 1rem; text-align: center; }
.submit-btn { padding: 0.75rem 2rem; font-size: 1.125rem; font-weight: 500; cursor: pointer; background-color: #ffffff; }
.submit-btn:hover { background-color: #f3f4f6; }

/* --- Footer --- */
.site-footer { background-color: var(--dark-color); color: #9ca3af; padding-top: 2rem; padding-bottom: 2rem; text-align: center; font-size: 0.875rem; }
.footer-nav-links { margin-bottom: 0.5rem; display: flex; justify-content: center; gap: 1rem; font-weight: 500; }
.footer-link { color: inherit; text-decoration: none; transition: color 0.2s; }
.footer-link:hover { color: #ffffff; }
.site-footer p { margin: 0; }


/* --- Journal Section --- */
.journal-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
}
@media (min-width: 640px) {
    .journal-section {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

.journal-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.journal-lead-text {
    margin-bottom: 2rem;
}

.journal-links-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

.journal-item-link {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--dark-color);
    transition: background-color 0.2s ease;
}

@media (min-width: 640px) {
    .journal-item-link {
        flex-direction: row;
        gap: 1.5rem;
        align-items: center;
    }
}

.journal-item-link:hover {
    background-color: #f9fafb;
}

.journal-date {
    font-size: 0.875rem;
    color: #6b7280;
    min-width: 100px;
}

.journal-item-title {
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.journal-more-wrapper {
    margin-top: 2rem;
}

.note-button {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    background-color: #ffffff;
    color: var(--dark-color);
    padding: 8px 24px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 2px solid var(--dark-color);
}

.note-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.journal-bg-section {
    background-color: #f7f7f7; /* WORKSセクションと同じ灰色 */
    padding-top: 3rem;
    padding-bottom: 3rem;
}

@media (min-width: 640px) {
    .journal-bg-section {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

