/* =========================================
   Inori Kannatsumi Official Website
========================================= */
:root {
    --white: #fff;
    --ivory: #fdfbf8;
    --soft-ivory: #f7f2f6;
    --purple: #8b7598;
    --dark-purple: #51435b;
    --deep-purple: #352c3d;
    --lavender: #d9cadf;
    --pale-lavender: #eee6f1;
    --gold: #b89a61;
    --light-gold: #d9c69d;
    --text: #4c4550;
    --sub-text: #766e79;
    --border: rgba(139, 117, 152, 0.23);
    --shadow: 0 18px 45px rgba(73, 55, 84, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 16%, rgba(238,230,241,.72), transparent 26rem),
        radial-gradient(circle at 92% 40%, rgba(247,239,245,.75), transparent 24rem),
        var(--ivory);
    font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    line-height: 1.8;
    letter-spacing: .035em;
    overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.88);
    border-bottom: 1px solid rgba(184,154,97,.22);
    backdrop-filter: blur(14px);
}
.header-inner {
    width: min(calc(100% - 48px), 1180px);
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}
.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--dark-purple);
    font-family: "Cormorant Garamond", serif;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: .07em;
    white-space: nowrap;
}
.global-nav { display: flex; align-items: center; gap: 30px; }
.global-nav a {
    position: relative;
    padding: 8px 0;
    color: #62586a;
    font-family: "Cormorant Garamond", serif;
    font-size: 17px;
    letter-spacing: .08em;
    transition: color .2s ease;
}
.global-nav a::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 2px;
    width: 0; height: 1px;
    background: var(--gold);
    transform: translateX(-50%);
    transition: width .2s ease;
}
.global-nav a:hover, .global-nav a.current { color: var(--dark-purple); }
.global-nav a:hover::after, .global-nav a.current::after { width: 100%; }
.menu-button { display: none; width: 44px; height: 40px; padding: 8px; border: 0; background: transparent; cursor: pointer; }
.menu-button span { display: block; width: 25px; height: 1px; margin: 6px auto; background: var(--dark-purple); transition: .25s; }
.menu-button.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-button.active span:nth-child(2) { opacity: 0; }
.menu-button.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.section-inner { width: min(calc(100% - 48px), 1120px); margin: 0 auto; }
.content-section { padding: 90px 0; }
.section-heading { margin-bottom: 48px; text-align: center; }
.section-label, .profile-small-title {
    margin: 0;
    color: var(--gold);
    font-family: "Cormorant Garamond", serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .22em;
}
.section-heading h1, .section-heading h2 {
    margin: 3px 0 12px;
    color: var(--dark-purple);
    font-family: "Cormorant Garamond", "Yu Mincho", serif;
    font-size: clamp(44px, 6vw, 62px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: .035em;
}
.heading-decoration { display: flex; align-items: center; justify-content: center; gap: 9px; }
.heading-line { width: 72px; height: 1px; background: linear-gradient(to right, transparent, var(--light-gold), transparent); }
.heading-ribbon { color: var(--gold); font-size: 15px; }

.hero { position: relative; padding: 34px 0 76px; }
.hero-inner {
    position: relative;
    width: min(calc(100% - 120px), 900px);
    margin: 0 auto;
    overflow: visible;
    border-radius: 2px;
    box-shadow: 0 18px 45px rgba(73, 55, 84, 0.16);
}
.hero-image {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 380px;
    object-fit: cover;
    object-position: center;
}
.hero-copy,
.hero-subtitle {
    display: none !important;
}
.hero-lace { position: absolute; left: 13px; right: 13px; z-index: 2; }
.hero-lace-top { top: -8px; }
.hero-lace-bottom { bottom: -8px; transform: rotate(180deg); }
.scroll-button { position: absolute; left: 50%; bottom: 20px; width: 30px; height: 38px; transform: translateX(-50%); }
.scroll-button span { display:block; width:1px; height:30px; margin:auto; background:linear-gradient(var(--gold),transparent); animation: scroll 1.7s infinite; }
@keyframes scroll { 0%{transform:scaleY(0);transform-origin:top} 45%{transform:scaleY(1);transform-origin:top} 55%{transform:scaleY(1);transform-origin:bottom} 100%{transform:scaleY(0);transform-origin:bottom} }

.profile-section { position: relative; }
.profile-layout { display: grid; grid-template-columns: minmax(300px, 46%) 1fr; gap: 76px; align-items: center; }
.profile-left { min-width: 0; }
.profile-visual {
    min-height: 600px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 24px 24px 0;
    background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(238,230,241,.7));
    border: 1px solid rgba(184,154,97,.35);
    border-radius: 48% 48% 10px 10px / 12% 12% 10px 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.profile-visual img { width: auto; max-height: 590px; display:block; object-fit:contain; filter:drop-shadow(0 20px 15px rgba(61,46,70,.16)); }
.profile-text-links { display:flex; justify-content:center; flex-wrap:wrap; gap:9px 24px; margin-top:20px; }
.profile-text-links a { color:var(--purple); font-family:"Cormorant Garamond",serif; font-size:15px; letter-spacing:.08em; }
.profile-text-links a:hover { color:var(--gold); }
.profile-content { padding-left: 54px; border-left: 1px solid rgba(184,154,97,.4); }
.profile-heading { margin-bottom: 28px; text-align:left; }
.profile-heading .heading-decoration { justify-content:flex-start; }
.profile-name { margin:0; color:var(--deep-purple); font-family:"Yu Mincho",serif; font-size:38px; font-weight:500; letter-spacing:.12em; }
.profile-english-name { margin:0; color:var(--gold); font-family:"Cormorant Garamond",serif; font-size:18px; letter-spacing:.1em; }
.profile-divider { width:170px; margin:22px 0; display:flex; align-items:center; gap:10px; color:var(--gold); }
.profile-divider span { flex:1; height:1px; background:linear-gradient(to right,transparent,var(--light-gold)); }
.profile-divider span:last-child { background:linear-gradient(to left,transparent,var(--light-gold)); }
.profile-divider b { font-weight:400; }
.profile-description { margin:0 0 28px; color:var(--sub-text); font-size:14px; line-height:2; }
.profile-list { margin:0; border-top:1px solid var(--border); }
.profile-list > div { display:grid; grid-template-columns:120px 1fr; border-bottom:1px solid var(--border); }
.profile-list dt, .profile-list dd { padding:12px 8px; font-size:13px; }
.profile-list dt { color:var(--purple); font-weight:600; }
.profile-list dd { margin:0; }
.profile-detail-link-area, .section-button-area { margin-top:36px; text-align:center; }
.profile-detail-link { display:inline-flex; align-items:center; gap:20px; padding:12px 2px; color:var(--dark-purple); border-bottom:1px solid var(--gold); font-size:13px; }

.gallery-preview-section, .character-sheet-section, .character-story-section { background: linear-gradient(135deg, #f4edf5, #fbf8f4); }
.gallery-preview-inner { padding-top:80px; padding-bottom:82px; }
.lace-border-bottom { transform:rotate(180deg); }
.gallery-preview-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:30px; max-width:900px; margin:0 auto; }
.gallery-card { position:relative; display:block; overflow:hidden; padding:9px; background:#fff; border:1px solid rgba(184,154,97,.38); box-shadow:var(--shadow); }
.gallery-card img { width:100%; height:360px; display:block; object-fit:cover; transition:transform .45s ease; }
.gallery-card:hover img { transform:scale(1.025); }
.gallery-card-text { position:absolute; right:22px; bottom:20px; padding:6px 16px; color:#fff; background:rgba(67,52,75,.76); font-family:"Cormorant Garamond",serif; font-size:13px; letter-spacing:.1em; }
.more-button { min-width:270px; display:inline-flex; align-items:center; justify-content:space-between; gap:28px; padding:14px 24px; color:var(--dark-purple); background:rgba(255,255,255,.84); border:1px solid rgba(184,154,97,.55); box-shadow:0 8px 22px rgba(62,47,70,.08); font-size:13px; transition:.2s; }
.more-button:hover { transform:translateY(-2px); background:#fff; }

.news-section { background:rgba(255,255,255,.38); }
.news-list { max-width:820px; margin:0 auto; border-top:1px solid var(--border); }
.news-item { display:grid; grid-template-columns:145px 1fr; gap:22px; padding:22px 12px; border-bottom:1px solid var(--border); }
.news-item time { color:var(--gold); font-family:"Cormorant Garamond",serif; font-size:14px; letter-spacing:.08em; }
.news-item p { margin:0; font-size:13px; }

.site-footer { color:#f8f3fa; background:linear-gradient(135deg,#4c3e55,#302736); text-align:center; }
.footer-lace { filter:brightness(2); opacity:.35; }
.footer-inner { width:min(calc(100% - 40px),900px); margin:0 auto; padding:58px 0 34px; }
.footer-title { margin:0; font-family:"Cormorant Garamond",serif; font-size:34px; letter-spacing:.08em; }
.footer-message { margin:8px 0 25px; color:rgba(255,255,255,.7); font-size:12px; }
.footer-links { display:flex; justify-content:center; flex-wrap:wrap; gap:14px 30px; }
.footer-links a { color:rgba(255,255,255,.84); font-family:"Cormorant Garamond",serif; letter-spacing:.08em; }
.footer-links a:hover { color:#fff; }
.copyright { margin:34px 0 0; color:rgba(255,255,255,.48); font-family:"Cormorant Garamond",serif; font-size:11px; letter-spacing:.07em; }

/* Gallery detail page */
.gallery-page-hero { padding:88px 0 54px; }
.gallery-page-lead { margin:20px 0 0; color:var(--sub-text); font-size:14px; text-align:center; }
.gallery-main-section { padding:48px 0 100px; }
.gallery-full-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:30px; }
.gallery-full-item { margin:0; padding:8px; background:#fff; border:1px solid rgba(184,154,97,.38); box-shadow:var(--shadow); }
.gallery-full-item img { width:100%; aspect-ratio:1/1; display:block; object-fit:cover; }
.gallery-full-item figcaption { padding:14px 7px 6px; text-align:center; }
.gallery-item-title { display:block; color:var(--dark-purple); font-family:"Cormorant Garamond",serif; font-size:19px; }
.gallery-item-illustrator { display:block; color:var(--sub-text); font-size:10px; }
.detail-navigation-buttons { display:flex; justify-content:center; flex-wrap:wrap; gap:16px; margin-top:55px; }

/* =========================================
   Responsive
========================================= */
@media (max-width: 900px) {
    .gallery-full-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-layout { gap:45px; }
    .profile-content { padding-left:35px; }
}
@media (max-width: 700px) {
    .section-inner { width:min(100% - 28px,1120px); }
    .header-inner { width:calc(100% - 24px); min-height:66px; }
    .menu-button { display:block; }
    .global-nav { position:fixed; top:66px; right:0; left:0; display:grid; gap:0; padding:18px 22px 24px; background:rgba(255,255,255,.98); border-bottom:1px solid var(--border); box-shadow:var(--shadow); opacity:0; pointer-events:none; transform:translateY(-12px); transition:.25s; }
    .global-nav.open { opacity:1; pointer-events:auto; transform:translateY(0); }
    .global-nav a { padding:12px 4px; text-align:center; }
    .hero { padding: 0 0 16px; }
    .hero-inner { width: calc(100% - 16px); }
    .hero-image {
        width: 100%;
        height: 220px;
        min-height: 0;
        object-fit: cover;
        object-position: center;
    }
    .hero-lace { left:8px; right:8px; }
    .content-section { padding:65px 0; }
    .section-heading { margin-bottom:38px; }
    .section-heading h1, .section-heading h2 { font-size:40px; }
    .profile-layout { grid-template-columns:1fr; gap:44px; }
    .profile-visual { min-height:470px; }
    .profile-visual img { max-height:510px; }
    .profile-content { padding:36px 0 0; border-top:1px solid var(--border); border-left:0; text-align:center; }
    .profile-heading { text-align:center; }
    .profile-heading .heading-decoration, .profile-divider { justify-content:center; margin-right:auto; margin-left:auto; }
    .profile-list { text-align:left; }
    .gallery-preview-grid, .gallery-full-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
    .gallery-card { padding:5px; }
    .gallery-card img { height:190px; }
    .gallery-card-text { display:none; }
    .gallery-main-section { padding:62px 0 80px; }
    .gallery-full-item { padding:5px; }
    .gallery-full-item figcaption { padding:10px 3px 5px; }
    .gallery-item-title { font-size:16px; }
    .news-item { grid-template-columns:1fr; gap:3px; }
}
@media (max-width:430px) {
    .site-logo { font-size:19px; }
    .profile-visual { min-height:420px; }
    .profile-visual img { max-height:455px; }
    .profile-list > div { grid-template-columns:100px 1fr; }
    .gallery-card img { height:150px; }
    .gallery-item-illustrator { font-size:9px; }
    .more-button { min-width:225px; }
}


/* =========================================
   Requested visual corrections
========================================= */
.logo-pearl,
.heading-pearl,
.inline-pearl,
.button-pearl,
.category-pearl,
.pearl-decoration {
    display: inline-block;
    flex: 0 0 auto;
    background: transparent url("../images/pearl.png") center / contain no-repeat;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.logo-pearl { width: 18px; height: 18px; }
.heading-pearl { width: 17px; height: 17px; }
.heading-pearl-center { width: 23px; height: 23px; }
.inline-pearl { width: 18px; height: 18px; }
.button-pearl { width: 17px; height: 17px; }
.category-pearl { width: 21px; height: 21px; }
.pearl-decoration { width: 22px; height: 22px; }
.heading-ribbon { display: none; }

/* The supplied lace image is used on the hero, section borders, and footer. */
.hero-lace,
.lace-border,
.footer-lace {
    height: 30px;
    background-image: url("../images/lace.png");
    background-repeat: repeat-x;
    background-position: center;
    background-size: auto 30px;
}

.gallery-description {
    margin: 20px 0 0;
    color: var(--sub-text);
    font-size: 13px;
    text-align: center;
}
.gallery-category { margin-top: 64px; }
.gallery-category:first-of-type { margin-top: 0; }
.gallery-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 24px;
    padding-bottom: 10px;
    color: var(--dark-purple);
    border-bottom: 1px solid var(--border);
    font-family: "Cormorant Garamond", serif;
    font-size: 31px;
    font-weight: 500;
    letter-spacing: .04em;
}
.gallery-image-button {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    background: transparent;
    border: 0;
}
.gallery-image-button img { transition: transform .35s ease, filter .35s ease; }
.gallery-image-button:hover img { transform: scale(1.02); }
.gallery-click-label {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 4px 11px;
    color: #fff;
    background: rgba(53,44,61,.72);
    font-family: "Cormorant Garamond", serif;
    font-size: 12px;
    letter-spacing: .12em;
}
.gallery-full-item figcaption {
    max-height: 0;
    padding: 0 7px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height .35s ease, padding .35s ease, opacity .25s ease, transform .35s ease;
}
.gallery-full-item.is-open figcaption {
    max-height: 140px;
    padding: 14px 7px 6px;
    opacity: 1;
    transform: translateY(0);
}
.gallery-full-item.is-open .gallery-click-label { display: none; }
.gallery-empty-message {
    margin: 0;
    padding: 32px;
    color: var(--sub-text);
    background: rgba(255,255,255,.55);
    border: 1px dashed var(--border);
    text-align: center;
    font-size: 13px;
}
/* =========================================
   Gallery Lightbox
========================================= */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 32px;
    background: rgba(34, 28, 39, 0.82);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity .25s ease, visibility .25s ease;
}

.gallery-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gallery-lightbox-content {
    width: min(90vw, 760px);
    max-height: 90vh;
    padding: 12px;
    overflow: auto;

    background: #fff;
    border: 1px solid rgba(184, 154, 97, .55);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

.gallery-lightbox-image {
    display: block;
    width: 100%;
    max-height: calc(90vh - 110px);
    object-fit: contain;
    background: #f8f5f9;
}

.gallery-lightbox-info {
    padding: 14px 8px 4px;
    text-align: center;
}

.gallery-lightbox-title {
    margin: 0;
    color: var(--dark-purple);
    font-family: "Cormorant Garamond", serif;
    font-size: 23px;
}

.gallery-lightbox-illustrator {
    margin: 4px 0 0;
    color: var(--sub-text);
    font-size: 11px;
}

.gallery-lightbox-close {
    position: fixed;
    top: 18px;
    right: 22px;
    z-index: 10000;

    width: 46px;
    height: 46px;
    padding: 0;

    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 50%;

    cursor: pointer;
    font-size: 30px;
    line-height: 1;
}

body.gallery-lightbox-open {
    overflow: hidden;
}

@media (max-width: 700px) {
    .gallery-lightbox {
        padding: 58px 14px 18px;
    }

    .gallery-lightbox-content {
        width: 100%;
        padding: 8px;
    }

    .gallery-lightbox-image {
        max-height: calc(88vh - 110px);
    }

    .gallery-lightbox-close {
        top: 10px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 26px;
    }
}