:root {
    --k-bg: #F5F2EC; /* 深めの生成り */
    --k-text: #2C2A29; /* 墨黒 */
    --k-text-light: #5A5653; /* 薄い墨黒 */
    --k-accent: #6E3A2E; /* 深い赤茶 */
    --k-gold: #A89874; /* くすんだ金 */
    --k-border: rgba(44, 42, 41, 0.15);
    --font-serif: 'Noto Serif JP', serif;
    --font-sans: 'Inter', sans-serif;
}

body.kyosodo-portal,
body.kyosodo-about-page,
body.kyosodo-contact-page {
    background-color: var(--k-bg);
    color: var(--k-text);
    font-family: var(--font-serif);
    margin: 0;
    padding: 0;
    position: relative;
    /* ノイズテクスチャ（紙の質感） */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
}
body.kyosodo-portal {
    overflow-x: hidden;
}

/* --- Header --- */
.k-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 50px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 100;
}
.k-header .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}
.k-header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--k-text);
}
.k-header-logo .mark {
    font-size: 1.5rem;
    margin-right: 15px;
    color: var(--k-accent);
    font-family: var(--font-serif);
}
.k-header-logo .name {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.1em;
}

.k-header-nav ul {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.k-header-nav a {
    text-decoration: none;
    color: var(--k-text);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}
.k-header-nav a:hover {
    color: var(--k-accent);
}
.k-header-nav a[aria-current="page"] {
    color: var(--k-accent);
    font-weight: 600;
    padding-bottom: 4px;
}
/* Mobile menu toggle overrides for this specific header */
.k-header .menu-toggle {
    display: none; /* Desktop default */
}
.k-header .menu-toggle span {
    background-color: var(--k-text);
}

/* --- Hero --- */
.k-hero {
    min-height: clamp(700px, 88svh, 900px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 140px 20px 40px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}
.k-hero-book-line {
    position: absolute;
    bottom: -2%;
    left: 50%;
    transform: translateX(-50%);
    width: min(92vw, 1500px);
    height: 85%;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0.75;
    pointer-events: none;
}
.k-hero-book-line img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
}
.k-hero-content {
    position: relative;
    z-index: 2;
    margin-top: -12vh;
}
.k-hero-brand {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--k-text-light);
    display: block;
    margin-bottom: 35px;
    opacity: 0;
    transform: translateY(8px);
    animation: heroFadeIn 0.9s ease-out 0.35s forwards;
}
.k-hero-title {
    font-size: 2.8rem;
    line-height: 1.7;
    font-weight: 400;
    color: var(--k-text);
    margin-bottom: 35px;
    letter-spacing: 0.05em;
}
.hero-title-line {
    display: block;
    opacity: 0;
    transform: translateY(8px);
    animation: heroFadeIn 1s ease-out forwards;
}
.hero-title-line-1 { animation-delay: 0.9s; }
.hero-title-line-2 { animation-delay: 1.65s; }
.k-hero-sub {
    font-size: 1.15rem;
    line-height: 2.2;
    color: var(--k-text-light);
    letter-spacing: 0.08em;
    opacity: 0;
    transform: translateY(8px);
    animation: heroFadeIn 1s ease-out 2.45s forwards;
}

@keyframes heroFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .k-hero-brand, .hero-title-line, .k-hero-sub {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --- Two Stories (Split Layout) --- */
.k-stories {
    display: flex;
    min-height: 550px;
    max-width: 1200px;
    margin: 0 auto clamp(80px, 8vw, 120px);
    border: 1px solid var(--k-border);
    box-sizing: border-box;
    background-color: #FDFDFB; /* Fallback for left pane */
}
.k-story-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.k-story-pane:first-child {
    border-right: 1px solid var(--k-border);
}

.k-story-pane:hover {
    transform: scale(1.01);
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

.k-pane-content {
    padding: 80px 10%;
    flex: 1;
    display: flex;
    flex-direction: column;
    z-index: 2;
}
.k-pane-label {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--k-accent);
    margin-bottom: 25px;
    display: block;
}
.k-pane-title {
    font-size: 2.2rem;
    line-height: 1.6;
    font-weight: 400;
    margin-bottom: 30px;
    letter-spacing: 0.05em;
}
.k-pane-desc {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--k-text-light);
    margin-bottom: 50px;
    max-width: 400px;
}
.k-pane-action {
    margin-top: auto;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    color: var(--k-accent);
    transition: transform 0.3s;
}
.k-pane-action::after {
    content: '→';
    margin-left: 10px;
    transition: transform 0.3s;
}
.k-story-pane:hover .k-pane-action::after {
    transform: translateX(5px);
}

/* Pane Backgrounds (Visuals merged with background) */
.ehon-pane {
    background-color: #FDFDFB;
    background-image: linear-gradient(to bottom, rgba(253, 253, 251, 0.2) 0%, rgba(253, 253, 251, 0.5) 100%), var(--wisea-bg-kyosodo-ehon);
    background-size: cover;
    background-position: center;
}
.memorial-pane {
    background-color: #F3EFE9;
    background-image: linear-gradient(to bottom, rgba(243, 239, 233, 0.2) 0%, rgba(243, 239, 233, 0.5) 100%), var(--wisea-bg-kyosodo-memorial);
    background-size: cover;
    background-position: center;
}

/* --- About Kyosodo (Removed) --- */

/* --- Shared Page Elements (about / contact) --- */
.k-about-hero {
    padding: 200px 20px 100px;
    text-align: center;
    position: relative;
}
.k-about-hero-content {
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 2s ease-out;
}
.k-about-hero-brand {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--k-text-light);
    display: block;
    margin-bottom: 25px;
}
.k-about-hero-title {
    font-size: 2.5rem;
    line-height: 1.8;
    font-weight: 400;
    color: var(--k-text);
    letter-spacing: 0.05em;
}
.k-about-section {
    padding: 100px 20px;
    border-top: 1px solid var(--k-border);
}
.k-about-container {
    max-width: 800px;
    margin: 0 auto;
}

.k-about-cta-btn {
    display: inline-block;
    background-color: var(--k-accent);
    color: #FDFDFB;
    padding: 18px 60px;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    text-decoration: none;
    border-radius: 0;
    margin-top: 20px;
    transition: background-color 0.3s, transform 0.3s;
}
.k-about-cta-btn:hover {
    background-color: #55271D;
    transform: translateY(-2px);
}

.text-center {
    text-align: center;
}

/* PC only break */
.pc-only-br {
    display: block;
}
@media (max-width: 900px) {
    .pc-only-br {
        display: none;
    }
}

/* --- Footer (Dark & Compact) --- */
.k-footer {
    background-color: #232120; /* さらに深い墨黒 */
    color: #D5D1CB; /* 暗い背景用の生成り文字 */
    padding: 70px 40px 40px;
    text-align: center;
}
.k-footer-logo {
    font-size: 1.6rem;
    margin-bottom: 35px;
    color: #F5F2EC;
    letter-spacing: 0.1em;
    font-family: var(--font-serif);
}
.k-footer-nav {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 50px;
    list-style: none;
    padding: 0;
}
.k-footer-nav a {
    color: #D5D1CB;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    transition: color 0.3s;
}
.k-footer-nav a:hover {
    color: var(--k-gold);
}
.k-footer-credits {
    border-top: 1px solid rgba(245, 242, 236, 0.1);
    padding-top: 35px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: rgba(213, 209, 203, 0.6);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.k-footer-credits a {
    color: rgba(213, 209, 203, 0.6);
    text-decoration: none;
    transition: color 0.3s;
}
.k-footer-credits a:hover {
    color: #D5D1CB;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1024px) {
    .k-header-nav a:hover {
        color: #fff;
    }
    .k-header .menu-toggle {
        display: flex; /* Show hamburger on mobile if script.js handles it */
    }
    .k-header-nav a {
        color: #FAFAFA;
    }
    .k-header .menu-toggle.active span {
        background-color: #FAFAFA; /* Keep active hamburger spans white on dark menu drawer */
    }
}

@media (max-width: 900px) {
    .k-stories {
        flex-direction: column;
        margin-bottom: 64px;
    }
    .k-story-pane:first-child {
        border-right: none;
        border-bottom: 1px solid var(--k-border);
    }
    .k-header {
        padding: 20px;
    }
    .k-hero-title {
        font-size: 2.2rem;
    }
    .k-hero-book-line {
        width: 140vw; /* Make it larger to show the central pages clearly */
        height: 70%;
        opacity: 0.45; /* Lower opacity so text remains readable */
        bottom: -5%;
    }
    .k-hero-content {
        margin-top: -6vh; /* Adjust for mobile */
    }
    .k-pane-content {
        padding: 60px 8%;
    }
    .k-pane-title {
        font-size: 1.8rem;
    }
    .k-about-hero {
        padding: 150px 20px 70px;
    }
    .k-about-hero-title {
        font-size: 1.8rem;
        line-height: 1.6;
    }
    .k-about-section {
        padding: 70px 20px;
    }
    .k-footer-nav {
        flex-direction: column;
        gap: 20px;
    }
}

/* ==========================================================================
   Kyosodo Brand Styles (moved from ../style.css)
   ========================================================================== */
.kyosodo-nav {
    background-color: rgba(250, 246, 242, 0.95) !important;
    border-bottom: 1px solid rgba(130, 48, 27, 0.1) !important;
}

.kyosodo-nav .nav-menu a {
    color: #82301B !important;
}

.kyosodo-nav .nav-menu a:hover {
    color: #C24A29 !important;
}

.kyosodo-nav .nav-menu a.btn-contact {
    background-color: #82301B !important;
    color: #fff !important;
}

.kyosodo-nav .nav-menu a.btn-contact:hover {
    background-color: #C24A29 !important;
    color: #fff !important;
}

@media (max-width: 1024px) {
    .kyosodo-nav .nav-menu a {
        color: var(--color-text-light) !important; /* Force light text inside mobile menu on Kyosodo pages */
    }

    .kyosodo-nav .nav-menu.active a:hover {
        color: #fff !important;
    }

    .kyosodo-nav .menu-toggle span,
    .kyosodo-nav:not(.scrolled) .menu-toggle span {
        background-color: #82301B !important; /* Brand reddish-brown for light header before scroll */
    }

    .kyosodo-nav .menu-toggle.active span {
        background-color: #fff !important;
    }
}

.kyosodo-logo {
    display: flex;
    align-items: baseline;
    color: #82301B !important;
}

.kyosodo-main {
    font-size: 1.5rem;
    font-weight: 700;
}

.kyosodo-sub {
    font-size: 0.8rem;
    margin-left: 8px;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.kyosodo-footer {
    background-color: #FAF6F2 !important;
    border-top: 1px solid rgba(130, 48, 27, 0.1) !important;
    color: #555 !important;
}

.kyosodo-footer .logo-text {
    color: #82301B !important;
}

.kyosodo-footer a {
    color: #82301B !important;
}

.kyosodo-footer a:hover {
    color: #C24A29 !important;
}

/* 企業向け絵本 / メモリアルブック（1ページ完結LP）の中央寄せフッターナビ */
/* site.css の .footer-nav ul（詳細度0,1,1）より詳細度を上げて縦並びへの上書きを防ぐ */
.footer-nav .kyosodo-product-footer-nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.kyosodo-operator {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #888;
}

.kyosodo-operator a {
    color: #888 !important;
    text-decoration: underline;
}

.kyosodo-operator a:hover {
    color: #555 !important;
}

/* Kyosodo Brand Intro Section on Wise.A Home */
.kyosodo-brand-section {
    background-color: #FAF6F2;
    color: #333;
    border-top: 1px solid rgba(130, 48, 27, 0.08);
    border-bottom: 1px solid rgba(130, 48, 27, 0.08);
}

.kyosodo-brand-section .section-header h2 {
    color: #82301B;
}

.kyosodo-brand-section .divider {
    background-color: #82301B;
}

.kyosodo-brand-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    margin-top: 50px;
}

@media (max-width: 992px) {
    .kyosodo-brand-container {
        flex-direction: column;
        gap: 40px;
    }
}

.kyosodo-brand-content {
    flex: 1.2;
}

.kyosodo-brand-content .brand-tag {
    font-size: 0.9rem;
    font-weight: 600;
    color: #82301B;
    letter-spacing: 0.15em;
    margin-bottom: 15px;
    display: block;
}

.kyosodo-brand-text {
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 35px;
    color: #555;
}

.kyosodo-brand-image {
    flex: 0.8;
    position: relative;
    max-width: 420px;
    width: 100%;
}

.kyosodo-brand-image img {
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(130, 48, 27, 0.1);
    border: 1px solid rgba(130, 48, 27, 0.05);
}

.btn-kyosodo {
    display: inline-block;
    padding: 12px 36px;
    border-radius: 30px;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
    background-color: #82301B;
    color: #fff;
    border: 2px solid #82301B;
}

.btn-kyosodo:hover {
    background-color: transparent;
    color: #82301B;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(130, 48, 27, 0.15);
}