:root {
    --bg-color: #FDFBF7;
    --text-color: #4A4036;
    --heading-color: #3E3A39;
    --accent-color: #9DAF73;
    --accent-light: #F4F7EF;
    --white: #FFFFFF;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --font-sans: 'Noto Sans JP', sans-serif;
    --font-serif: 'Zen Old Mincho', serif;
    --header-height: 70px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    background-image: url('style/bg_pattern.png');
    background-repeat: repeat;
    color: var(--text-color);
    line-height: 1.8;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    overflow: hidden;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-serif);
    color: var(--heading-color);
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.2rem;
}

h3 {
    font-size: 1.9rem;
}

h4 {
    font-size: 1.5rem;
    /* Reverted to 1.9rem (Round 6) as per user request */
}

h5 {
    font-size: 1.2rem;
}

/* New class for feature descriptions */
.feature-text {
    font-size: 1.4rem;
    /* Reverted to 1.4rem (Round 6) as per user request */
    margin-top: 0.5rem;
    line-height: 1.6;
    color: var(--text-color);
    /* Reverted color */
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    display: block;
}

.img-responsive {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.small-img {
    max-width: 200px;
}

/* Opening Animation */
#intro-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: #fff;
    transition: opacity 1.5s ease-in-out;
}

/* Fixed Header */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(157, 175, 115, 0.2);
}

.header-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--heading-color);
    letter-spacing: 0.05em;
}

.fixed-header nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2.5rem;
}

.fixed-header nav a {
    text-decoration: none;
    color: var(--heading-color);
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s;
    position: relative;
}

.fixed-header nav a:hover {
    color: var(--accent-color);
}

.hero-spacer {
    height: var(--header-height);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 2rem 1rem;
    background: linear-gradient(to bottom, #fff, var(--bg-color));
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-container {
    position: relative;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.image-note {
    position: absolute;
    bottom: 10px;
    right: 15px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.hero-text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(255, 255, 255, 0.7);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 800px;
    opacity: 0;
    transition: opacity 1s ease-out;
}

.catchphrase-container {
    margin-bottom: 2rem;
    text-align: left;
    display: inline-block;
}

.main-title,
.sub-title {
    font-family: var(--font-serif);
    color: var(--heading-color);
    font-style: italic;
    font-size: 1.8rem;
    line-height: 1.6;
    margin: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1s ease-out, transform 1s ease-out;
    letter-spacing: 0.05em;
}

.sub-title {
    margin-left: 3rem;
    margin-top: 0.5rem;
}

.hero-lead {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Layout Utilities */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 4rem 0;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-6 {
    margin-top: 4rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.text-center {
    text-align: center;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.gap-small {
    gap: 1.5rem;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.9rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

/* Background Wrapper */
.bg-maison-wrapper {
    position: relative;
    background-image: url('images/maisonimage.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.bg-overlay {
    background-image: url('style/bg_pattern.png');
    background-repeat: repeat;
    background-color: rgba(253, 251, 247, 0.92);
    /* Blend mode to allow texture to show while keeping some tint if needed, or just opaque texture */
    padding: 2rem 0;
}

/* Cards & Content */
.card-style,
.feature-card,
.info-card,
.card-style-simple {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    height: 100%;
    box-sizing: border-box;
}

.card-style-simple {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 3rem;
}

/* Location Table */
.access-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin-top: 1rem;
}

.access-table th,
.access-table td {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.access-table th {
    font-weight: 600;
    color: var(--heading-color);
    width: 30%;
    font-family: var(--font-serif);
}

.lead-text-left {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.caption {
    font-size: 0.9rem;
    color: #777;
    margin-top: 0.5rem;
    text-align: center;
    font-style: italic;
    font-family: var(--font-serif);
}

.map-container-large {
    position: relative;
    padding-bottom: 50%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
}

.map-container-large iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Subsections */
.subsection-title {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
}

.subsection-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
    margin: 0.5rem auto 0;
}

/* H3, H4 Emphasis */
h3,
h4 {
    padding-left: 0;
}

h4 {
    border-left: 5px solid var(--accent-color);
    padding-left: 1rem;
}

.highlight-box {
    background-color: #fff;
    border: 2px solid var(--accent-light);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    margin-top: 3rem;
    box-shadow: var(--shadow);
}

.highlight-text {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.emphasis-text strong {
    font-size: 1.6rem;
    color: #B8860B;
    font-weight: 700;
}

strong {
    color: #B8860B;
    font-weight: 600;
}

.link {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-color);
}

/* Exit Section Design */
.exit-section {
    margin-top: 4rem;
}

.exit-box {
    background-color: #FFF5F5;
    border-left: 5px solid #C0392B;
    padding: 2rem;
    border-radius: 4px;
}

.exit-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.exit-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
}

.exit-list li::before {
    content: '●';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.8rem;
}

/* Socket Container */
.socket-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    width: 100%;
}

.socket-item {
    flex: 1;
}

.socket-img {
    height: 200px;
    width: 100%;
    object-fit: contain;
    background-color: #f5f5f5;
}

/* Breaker Images - same size as door images */
.breaker-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Vertical Stack for Window */
.vertical-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vertical-section-group {
    display: block;
    /* Ensures vertical stacking */
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem;
    background-color: var(--heading-color);
    color: var(--white);
    font-family: var(--font-serif);
}

.disclaimer {
    font-size: 0.8rem;
    margin-top: 1rem;
    opacity: 0.8;
}

/* Responsive Utility Classes - Default (PC) */
.pc-only {
    display: block;
}

.sp-only {
    display: none;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .grid-2-col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .main-title,
    .sub-title {
        font-size: 1.4rem;
    }

    .section {
        padding: 3rem 0;
    }

    .bg-maison-wrapper {
        background-attachment: scroll;
    }

    .fixed-header nav ul {
        gap: 1rem;
        font-size: 0.8rem;
    }

    .hero-text-overlay {
        width: 90%;
        padding: 2rem;
    }

    .socket-container {
        flex-direction: column;
    }

    .sub-title {
        margin-left: 1rem;
    }

    /* Horizontal Scroll / Slideshow */
    .horizontal-scroll-container {
        display: flex;
        overflow-x: auto;
        gap: 1.5rem;
        padding: 1rem 0.5rem;
        -webkit-overflow-scrolling: touch;
        /* smooth scroll on iOS */
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .horizontal-scroll-container::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .scroll-item {
        flex: 0 0 80%;
        /* Show 80% of item on mobile */
        max-width: 300px;
        scroll-snap-align: start;
    }

    .scroll-item img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        margin-bottom: 0.5rem;
    }

    /* Mobile-specific Utility Classes */
    .pc-only {
        display: none !important;
    }

    .sp-only {
        display: block !important;
    }

    /* Mobile Layout Optimizations */
    .fixed-header {
        height: 60px;
    }

    .logo {
        font-size: 1.1rem;
    }

    .hero-spacer {
        height: 60px;
    }

    .card-style,
    .feature-card,
    .info-card {
        padding: 1.5rem;
    }

    .subsection-title {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }

    /* Adjust map container aspect ratio for mobile */
    .map-container-large {
        padding-bottom: 75%;
        /* Taller map on mobile */
    }

    .hero-title-large {
        font-size: 1.8rem;
        /* Smaller title on mobile */
    }

    .section-title {
        font-size: 1.6rem;
    }

    .access-list-item {
        border-bottom: 1px solid #eee;
        padding: 1rem 0;
    }

    .access-list-item:last-child {
        border-bottom: none;
    }

    .access-station {
        font-weight: bold;
        color: var(--heading-color);
        font-size: 1.1rem;
        display: block;
        margin-bottom: 0.2rem;
    }

    .emphasis-text strong {
        font-size: 1.2rem;
        /* Reduced to prevent wrap on mobile */
    }

    .highlight-text {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .highlight-box {
        padding: 1rem 0.8rem;
        margin-top: 2rem;
    }

    .highlight-box small {
        font-size: 0.7rem;
        line-height: 1.5;
    }
}

/* New Design Additions */

/* Sharp Green Text for Room Features */
.sharp-green-text {
    font-family: 'Zen Old Mincho', serif;
    color: #1a4d33;
    /* Deep Green */
    font-weight: 600;
    font-size: 1.4rem;
    line-height: 1.4;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    display: block;
    border-bottom: 1px solid #1a4d33;
    padding-bottom: 0.5rem;
}

/* Room Layout: Image Left, Text Right (on PC) */
.room-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.room-layout img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.room-description {
    text-align: left;
}

@media (max-width: 768px) {
    .room-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .sharp-green-text {
        font-size: 1.2rem;
        text-align: left;
        border-bottom: none;
        border-left: 4px solid #1a4d33;
        padding-left: 1rem;
        padding-bottom: 0;
    }
}

/* Refined Horizontal Scroll (SUUMO-like) */
.horizontal-scroll-section {
    position: relative;
    padding: 0 1rem;
}

.horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scroll-behavior: smooth;
}

.scroll-item {
    flex: 0 0 280px;
    /* Fixed width for consistency */
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
    overflow: hidden;
}

.scroll-item img {
    width: 100%;
    height: 180px;
    /* Consistent height */
    object-fit: cover;
    margin-bottom: 0;
}

.scroll-item .caption {
    padding: 0.8rem;
    font-size: 0.9rem;
    color: #333;
    background: #fff;
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .scroll-item {
        flex: 0 0 85%;
    }
}

/* Desktop Defaults for Utilities */
.pc-only {
    display: block;
}

/* Simple Slider Styles */
.slider-section {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: #fff;
    overflow: hidden;
}

.slider-container {
    position: relative;
}

.slide {
    display: none;
    width: 100%;
}

.slide.active {
    display: block;
    animation: fadeEffect 0.5s;
}

.slide img {
    width: 100%;
    height: 400px;
    /* Fixed height for consistency */
    display: block;
    object-fit: cover;
}

.slider-caption {
    padding: 1rem;
    text-align: center;
    font-weight: 500;
    background: #fff;
    color: #333;
    border-top: 1px solid #eee;
}

.slider-nav {
    position: absolute;
    top: 40%;
    /* Align with image center aprox */
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    padding: 0 10px;
}

.slider-btn {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.slider-btn:hover {
    background: #fff;
    transform: scale(1.1);
}

@keyframes fadeEffect {
    from {
        opacity: 0.6;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .slide img {
        height: 250px;
    }

    .slider-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* Lightbox Gallery Styles */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: #fff;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    font-size: 1rem;
    text-align: center;
}

/* Lightbox Controls */
.lightbox-close {
    position: absolute;
    top: -40px;
    right: -40px;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s;
    z-index: 10001;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 1rem 0.5rem;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10001;
    border-radius: 4px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: -60px;
}

.lightbox-next {
    right: -60px;
}

/* Mobile Adjustments for Lightbox */
@media (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        position: fixed;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        font-size: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .lightbox-prev,
    .lightbox-next {
        position: fixed;
        /* Fix to screen edges on mobile */
        padding: 1.5rem 0.8rem;
        background: rgba(0, 0, 0, 0.3);
    }

    .lightbox-prev {
        left: 0;
    }

    .lightbox-next {
        right: 0;
    }

    .lightbox-image {
        max-height: 70vh;
    }
}