:root {
    /* Color Palette - Refined for "Afroaster" inspired clean look */
    --color-primary: #FFFFFF;
    /* White */
    --color-secondary: #333333;
    /* Soft Black */
    --color-accent: #0088CC;
    /* Water Blue (Modified for Special Blog) */
    --color-background-alt: #F9F9F9;
    /* Very light grey */
    --color-text: #444444;
    /* Dark Grey */
    --color-border: #EEEEEE;

    /* Typography */
    --font-serif: 'Noto Serif JP', serif;
    --font-sans: 'Inter', sans-serif;

    /* Spacing */
    --spacing-sm: 12px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 80px;

    /* Transition */
    --transition-speed: 0.2s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    background-color: #F8F9FA;
    background-image:
        linear-gradient(to right, #E9ECEF 1px, transparent 1px),
        linear-gradient(to bottom, #E9ECEF 1px, transparent 1px);
    background-size: 30px 30px;
    color: var(--color-secondary);
    line-height: 1.8;
    overflow-x: clip; /* 横ブレ防止 */
}

strong, b {
    background: linear-gradient(transparent 65%, rgba(255, 182, 193, 0.5) 65%);
    font-weight: bold;
    padding: 0 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-sans);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--color-accent);
}

/* Custom Decor Markers */
.marker-yellow {
    background: linear-gradient(transparent 65%, rgba(255, 241, 118, 0.6) 65%) !important;
}
.marker-latte {
    background: linear-gradient(transparent 65%, rgba(193, 154, 107, 0.3) 65%) !important;
}
.marker-blue {
    background: linear-gradient(transparent 65%, rgba(129, 212, 250, 0.4) 65%) !important;
}
.text-red {
    color: #C25250 !important;
    font-weight: bold;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

/* Header */
.site-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Use primary which is #FFFFFF */
    padding: var(--spacing-md) 0;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    color: var(--color-secondary);
    margin: 0;
}

.logo a, .logo.fade-in {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    height: 48px; /* Taller icon for visibility */
    width: auto;
    mix-blend-mode: multiply; /* Removes off-white bounds on white backgrounds */
    border-radius: 8px;
    object-fit: contain;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.main-nav a {
    font-weight: 500;
    font-family: var(--font-sans);
    color: var(--color-text);
}

.main-nav a:hover {
    color: var(--color-secondary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-secondary);
    transition: all 0.3s;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    overflow: hidden;
    /* Hide overflow from zooming background */
}

/* Background image with zoom animation */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-background-alt);
    /* Fallback */
    /* Add a subtle elegant background image if desired, or keep color */
    background-image: url('https://images.unsplash.com/photo-1507842217343-583bb7270b66?w=1600&q=80');
    background-size: cover;
    background-position: center;
    filter: brightness(0.8);
    /* Darken slightly so text pops */
    z-index: 0;
    animation: slowZoom 20s ease-out forwards;
}

@keyframes slowZoom {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-content h2 {
    font-size: 3rem;
    font-family: var(--font-serif);
    color: var(--color-primary);
    /* Changed to white for bg image contrast */
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.05em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1rem;
    color: var(--color-primary);
    /* Changed to white */
    font-family: var(--font-sans);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* Elegant Scroll Down Indicator */
.scroll-down-indicator {
    position: absolute;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--color-primary);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* About Section */
.about-section {
    text-align: center;
    background-color: transparent;
}

.about-section h3 {
    color: var(--color-secondary);
    font-size: 2rem;
    margin-bottom: var(--spacing-lg);
}

.about-section p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 2;
}

/* Articles Section */
.articles-section {
    background-color: transparent;
    padding-top: var(--spacing-md);
}

.articles-section h3 {
    text-align: center;
    margin: 0 auto var(--spacing-xl) auto;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--color-border);
    display: table;
    padding-bottom: var(--spacing-sm);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    justify-content: center; /* カード全体を中央揃え */
}

.article-card {
    background: var(--color-primary);
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    width: 100%;
    max-width: 400px; /* カードの最大幅を設定 */
    margin: 0 auto; /* カード自体を中央寄せ */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-12px);
    /* Fluffy, higher lift */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    /* Soft, wide shadow */
    opacity: 1;
    /* Override previous 0.8 opacity on hover */
}

.article-card h4 {
    font-size: 1.4rem;
    margin: var(--spacing-sm) 0;
    color: var(--color-secondary);
    font-family: var(--font-serif);
    line-height: 1.4;
}

.article-card p {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.8;
}

.article-card .category {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.1em;
    font-family: var(--font-sans);
}

/* Footer */
.site-footer {
    background-color: var(--color-secondary);
    color: var(--color-primary);
    text-align: center;
    padding: var(--spacing-lg) 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #FFFFFF;
        /* Fix undefined variable */
        padding: var(--spacing-md);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    .main-nav ul.active {
        display: flex;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }
}

/* Card Thumbnail */
.card-thumbnail {
    margin: var(--spacing-sm) 0;
    overflow: hidden;
    /* Aspect Ratio? Let's keep it simple first */
}

.card-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    /* Slightly rounded or sharp? Sharp for "Afroaster" vibe */
}

.article-card time {
    display: block;
    font-size: 0.8rem;
    color: #999;
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-sans);
}

/* Article Page Specifics */
.article-thumbnail {
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.article-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.article-thumbnail figcaption {
    margin-top: var(--spacing-sm);
    color: var(--color-text);
    font-size: 0.9rem;
    opacity: 0.8;
}

.article-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.article-header h1 {
    font-size: 2rem;
    color: var(--color-secondary);
    margin: var(--spacing-sm) 0;
}

.article-header .category {
    color: var(--color-accent);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-body {
    font-size: 18px;
    line-height: 2;
    color: var(--color-text);
}

.article-body p {
    margin-bottom: 2rem; /* 段落間のスペース（余白）を追加 */
}

.article-body h2 {
    font-size: 1.6rem;
    color: #5C4333; /* Dark roasted coffee color */
    background-color: #F8EFE4; /* Soft creamy latte base background */
    margin-top: 3.5rem; /* 上のマージンを縮小して余白を調整 */
    margin-bottom: var(--spacing-lg);
    font-family: var(--font-serif);
    padding: 20px 20px 20px 75px; /* Large left padding for absolute icon */
    border-radius: 12px;
    position: relative;
    text-align: left; /* Card styles usually left aligned */
    letter-spacing: 0.05em;
    line-height: 1.5;
}

/* Left Icon */
.article-body h2::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-image: url('images/h2-cup-large.svg'); /* Reusing our larger cup icon */
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Inside Bottom Dotted Line */
.article-body h2::after {
    content: '';
    position: absolute;
    bottom: 12px;
    left: 75px;
    right: 20px;
    border-bottom: 2px dotted #FFFFFF; /* White crisp dotted line matching card inner area */
}

.article-body h3 {
    position: relative;
    font-size: 1.3rem;
    color: var(--color-secondary);
    background: linear-gradient(to right, var(--color-background-alt), transparent);
    padding: var(--spacing-sm) var(--spacing-md);
    padding-left: 20px;
    margin: var(--spacing-md) 0;
    /* Reduced margin to remove excess whitespace */
    border-bottom: 1px solid var(--color-border);
}

.article-body h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background-color: var(--color-accent);
    border-radius: 3px;
}

.article-body ul {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-lg);
}

.article-body ol {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-lg);
}

.article-body ul li,
.article-body ol li {
    margin-bottom: 1rem; /* リストアイテム間のスペースを追加 */
    line-height: 1.8; /* 行間を確保 */
}

.article-body ul li:last-child,
.article-body ol li:last-child {
    margin-bottom: 0;
}
/* ==========================================
   Styled Table 
   ========================================== */
.table-container {
    margin: 2.5rem 0;
    width: 100%;
}

.styled-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.styled-table th {
    background-color: #C19A6B; /* Gold theme color as in previous articles */
    color: #FFFFFF;
    font-weight: bold;
    padding: 18px 20px;
    text-align: left;
    font-size: 18px;
    letter-spacing: 0.05em;
}

.styled-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #F5F0EA; /* Light latte border */
    vertical-align: middle;
    color: #444;
    font-size: 18px;
    text-align: left; /* 左揃えに統一 */
    transition: background-color 0.3s ease;
}

.styled-table tr:last-child td {
    border-bottom: none;
}

.styled-table tbody tr:hover td {
    background-color: #FCF9F6; /* Creamy foam */
}

.styled-table td strong {
    color: #5C4333;
}

.styled-table td:nth-child(3) { /* Rental Fee column */
    font-weight: bold;
    color: #C19A6B; /* Accent coffee color */
}

/* Responsive Table (Cards) */
@media (max-width: 768px) {
    .styled-table, 
    .styled-table thead, 
    .styled-table tbody, 
    .styled-table th, 
    .styled-table td {
        display: block !important;
    }

    .styled-table {
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .styled-table thead {
        display: none !important;
    }

    .styled-table tr {
        display: grid !important;
        grid-template-columns: 1fr !important;
        background: #FFFFFF !important;
        border-radius: 12px !important;
        margin-bottom: 20px !important;
        box-shadow: 0 5px 15px rgba(0,0,0,0.03) !important;
        border: 1px solid #ECE3D9 !important;
        overflow: hidden !important;
    }

    .styled-table td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 15px 20px !important;
        border-bottom: 1px dashed #F5F0EA !important;
        text-align: right !important;
    }

    .styled-table td:last-child {
        border-bottom: none;
    }

    .styled-table td:first-child {
        background-color: #F8EFE4;
        font-weight: bold;
        justify-content: center;
        font-size: 1.1rem;
        border-bottom: 2px solid #C19A6B;
    }

    .styled-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #5C4333;
        margin-right: 15px;
        flex-shrink: 0;
        text-align: left;
    }

    .styled-table td:first-child::before {
        display: none;
    }
}

.article-footer {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid #ddd;
    text-align: center;
}

/* Visual Headings */
.visual-heading {
    position: relative;
    width: 100%;
    margin-top: calc(var(--spacing-xl) * 1.5);
    margin-bottom: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.visual-heading img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    /* slight soft shadow on image */
}

.visual-heading h2 {
    position: relative;
    margin-top: -45px;
    background-color: #FFFFFF;
    color: var(--color-secondary);
    font-size: 1.5rem;
    font-family: var(--font-serif);
    font-weight: 700;
    text-align: center;
    padding: var(--spacing-md) var(--spacing-lg);
    z-index: 10;
    letter-spacing: 0.1em;
    width: 85%;
    max-width: 650px;
    border-radius: 2px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-bottom: 2px solid var(--color-accent);
    /* Golden elegant line */
    line-height: 1.5;
}

/* Article Header Specifics for H1 */
.article-header-visual {
    position: relative;
    width: 100%;
    height: 400px;
    /* Taller for main hero */
    overflow: hidden;
    margin-bottom: var(--spacing-xl);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.article-header-visual img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
    z-index: 1;
}

.article-header-visual .content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #FFFFFF;
    /* Fix undefined variable */
    padding: var(--spacing-lg);
}

.article-header-visual h1 {
    color: #FFFFFF;
    /* Override any body/h1 color directly */
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.6);
    /* Stronger shadow for readability */
    font-weight: 700;
}

.article-header-visual .category {
    color: var(--color-accent);
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: var(--spacing-md);
    display: inline-block;
}

.article-header-visual time {
    display: block;
    margin-top: var(--spacing-md);
    opacity: 0.8;
}

/* スマホ用のレスポンシブ対応 */
@media (max-width: 768px) {
    .article-header-visual {
        height: auto !important;
        min-height: 250px !important;
        padding: 60px 16px 30px 16px !important;
        margin-bottom: var(--spacing-lg) !important;
    }

    .article-header-visual .content {
        padding: 0 !important;
        width: 100%;
        max-width: 100%;
    }

    .article-header-visual h1 {
        font-size: 1.4rem !important;
        line-height: 1.4 !important;
        word-break: break-all;
    }
    
    /* 途中の大きなサブ見出し画像重ね合わせも調整 */
    .visual-heading h2 {
        font-size: 1.2rem !important;
        padding: 12px 16px !important;
        width: 90% !important;
    }
}

/* Remove old article header styles */
.article-header {
    display: none;
}

.article-thumbnail {
    display: none;
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 50px;
    height: 50px;
    background-color: var(--color-secondary);
    color: var(--color-primary);
    border: none;
    border-radius: 50%;
    /* Circle shape */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    z-index: 999;
}

/* Hover effect */
.back-to-top:hover {
    background-color: var(--color-accent);
    /* Golden latte color */
    transform: translateY(-3px);
    /* Slight lift on hover */
}

/* Show button class */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Elegant Loading Screen */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-primary);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

.loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.loader-line {
    width: 0;
    height: 1px;
    background-color: var(--color-secondary);
    animation: expandLine 1.5s ease-out forwards;
}

@keyframes expandLine {
    0% {
        width: 0;
    }

    100% {
        width: 100px;
    }
}

/* Interactive Nav Links */
.main-nav a {
    position: relative;
    padding-bottom: 4px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--color-secondary);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

/* Magnetic Button Utility */
.magnetic {
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Responsive adjustment for mobile */
@media (max-width: 768px) {
    .back-to-top {
        bottom: var(--spacing-md);
        right: var(--spacing-md);
        width: 45px;
        height: 45px;
    }
}

/* ==========================================
   Author Profile 
   ========================================== */
.author-profile {
    display: flex;
    align-items: center;
    gap: var(--spacing-md, 24px);
    background-color: #FFFFFF;
    padding: var(--spacing-md, 24px);
    border-radius: 12px;
    margin: var(--spacing-xl, 80px) 0 var(--spacing-md, 24px) 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-border, #EEEEEE);
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.author-profile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--color-accent, #C19A6B);
}

.author-profile-avatar {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #FFFFFF;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.author-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-profile-info {
    flex-grow: 1;
}

.author-profile-title {
    font-size: 0.85rem;
    color: var(--color-accent, #C19A6B);
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
    display: block;
    font-family: var(--font-sans, sans-serif);
}

.author-profile-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-secondary, #333333);
    font-family: var(--font-serif, serif);
}

.author-profile-bio {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-text, #444444);
    margin: 0;
}

@media (max-width: 600px) {
    .author-profile {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-md, 24px);
    }
    
    .author-profile::before {
        width: 100%;
        height: 4px;
        top: 0;
    }
    
    .author-profile-avatar {
        width: 100px;
        height: 100px;
        margin-bottom: var(--spacing-sm, 12px);
    }
}

/* ==========================================
   Summary Box ("この記事で分かること")
   ========================================== */
.summary-box {
    background-color: #FDFBF7; /* Soft cream */
    border: 1px solid #EAE5DD;
    border-radius: 12px;
    padding: 28px 32px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    position: relative;
}

.summary-box-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.15rem;
    color: #5C4333; /* Dark roast */
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* タイトル前のアイコン (チェックマーク) */
.summary-box-title::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23C19A6B'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.summary-box ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0;
}

.summary-box ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 15px;
    color: #444;
    font-size: 1rem;
    line-height: 1.6;
    list-style-type: none !important;
}

.summary-box ul li:last-child {
    margin-bottom: 0;
}

/* リストアイテム前のアイコン (小さなチェックマーク) */
.summary-box ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23C19A6B'%3E%3Cpath d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* ==========================================
   Table of Contents (TOC)
   ========================================== */
.toc-container {
    background-color: #FFFFFF;
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-accent); /* ゴールドのトップライン */
    border-radius: 8px;
    padding: 32px 32px 32px 24px;
    margin: 48px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.toc-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-secondary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center; /* センタリングを追加 */
    gap: 8px;
}

/* タイトル前のアイコン */
.toc-title::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('images/h2-cup-large.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.9;
}

/* リスト連番（CSS Counter） */
.toc-container ul {
    counter-reset: toc-counter;
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toc-container > ul > li {
    counter-increment: toc-counter;
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 16px;
    border-bottom: 1px dashed #F3EFEA;
    padding-bottom: 12px;
}

.toc-container > ul > li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.toc-container > ul > li::before {
    content: counter(toc-counter, decimal-leading-zero);
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    top: 4px;
}

.toc-container li a {
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 1rem;
    line-height: 1.5;
}

.toc-container li a:hover {
    color: var(--color-accent);
    transform: translateX(4px);
}

.toc-container ul ul {
    padding-left: 1.2rem;
    margin-top: 10px;
    margin-bottom: 4px;
}

.toc-container ul ul li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 8px;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.toc-container ul ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    opacity: 0.6;
    font-size: 1.1rem;
    top: -2px;
}

.toc-container ul ul li a {
    font-size: 0.92rem;
    color: #666666;
}

@media (max-width: 768px) {
    .toc-container {
        padding: 24px;
        margin: 24px 0;
    }
}

/* ==========================================
   Guide Section (5 Steps)
   ========================================== */
.guide-section {
    background-color: transparent;
    padding-bottom: var(--spacing-xl);
}

.section-desc {
    text-align: center;
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
    font-size: 1rem;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-md);
}

@media (max-width: 1024px) {
    .guide-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .guide-grid {
        grid-template-columns: 1fr;
    }
}

.guide-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: var(--spacing-md);
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.guide-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.guide-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--color-accent);
}

.guide-step {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.guide-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.guide-card h4 {
    font-size: 1.2rem;
    color: var(--color-secondary);
    margin-bottom: 8px;
    font-family: var(--font-serif);
}

.guide-card p {
    font-size: 0.85rem;
    color: var(--color-text);
    line-height: 1.6;
    margin-top: auto; /* Push to bottom if text is short */
}

/* ==========================================
   Category Sections
   ========================================== */
.category-section {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

.category-section.alt-bg {
    background-color: #F4F0EA; /* Soft creamy beige */
    background-image: none; /* Remove grid dots for contrast */
}

.category-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.category-tag {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.2em;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--color-accent);
}

.category-header h3 {
    font-size: 1.8rem;
    color: var(--color-secondary);
    margin-bottom: 8px;
    font-family: var(--font-serif);
}

.category-header p {
    font-size: 0.95rem;
    color: var(--color-text);
}

/* ==========================================
   会話形式（吹き出し）
   ========================================== */
.chat-container {
    margin: var(--spacing-lg, 48px) 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md, 24px);
    width: 100%;
}

.chat-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    max-width: 85%;
}

.chat-item.left {
    align-self: flex-start;
}

.chat-item.right {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 3px solid #E9ECEF;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #FFFFFF;
}

.chat-balloon {
    position: relative;
    padding: 18px 22px;
    border-radius: 20px;
    background-color: #FFFFFF;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    line-height: 1.6;
    font-size: 1rem;
    color: var(--color-secondary);
}

/* 吹き出しの三角 */
/* 吹き出しの三角（回転させた正方形） */
.chat-balloon::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    z-index: 1; /* 吹き出し本体の枠線を隠すため、z-indexを設定 */
}

.chat-item.left .chat-balloon::before {
    top: 22px;
    left: -6px;
}

.chat-item.right .chat-balloon::before {
    top: 22px;
    right: -6px;
}

/* 特定のキャラクター/タイプ */
/* タイプA（読書犬、左側） */
.chat-item.type-reading .chat-avatar {
    border-color: var(--color-accent, #C19A6B);
}
.chat-item.type-reading .chat-balloon {
    background-color: #FDFBF7; /* クリーム */
    border: 1px solid #F3E5D8;
}
.chat-item.type-reading.left .chat-balloon::before {
    background-color: #FDFBF7;
    border-left: 1px solid #F3E5D8;
    border-bottom: 1px solid #F3E5D8;
}

/* タイプB（コーヒー犬、右側） */
.chat-item.type-coffee .chat-avatar {
    border-color: #D35400;
}
.chat-item.type-coffee .chat-balloon {
    background-color: #FDF2E9; /* 薄オレンジ */
    border: 1px solid #F5CBA7;
}
.chat-item.type-coffee.right .chat-balloon::before {
    background-color: #FDF2E9;
    border-right: 1px solid #F5CBA7;
    border-top: 1px solid #F5CBA7;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .chat-item {
        max-width: 95%;
    }
    .chat-avatar {
        width: 55px;
        height: 55px;
    }
    .chat-balloon {
        padding: 15px;
        font-size: 0.95rem;
    }
}

/* ==========================================
   目次（Table of Contents）
   ========================================== */
/* ==========================================
   Internal Link Card 
   ========================================== */
.internal-link-card {
    display: flex;
    align-items: center;
    background-color: #FFFFFF;
    border: 1px solid var(--color-border, #EEEEEE);
    border-radius: 8px;
    padding: 16px;
    margin: 24px 0;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.internal-link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.internal-link-card-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    margin-right: 20px;
    border-radius: 4px;
    overflow: hidden;
}

.internal-link-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.internal-link-card-content {
    flex-grow: 1;
}

.internal-link-card-title {
    font-weight: 700;
    color: #0066c0; /* Blue link title */
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-family: var(--font-sans);
    line-height: 1.4;
}

.internal-link-card:hover .internal-link-card-title {
    text-decoration: underline;
}

.internal-link-card-desc {
    font-size: 0.9rem;
    color: var(--color-text, #444444);
    line-height: 1.6;
}

@media (max-width: 600px) {
    .internal-link-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .internal-link-card-image {
        width: 100%;
        height: 180px;
        margin-right: 0;
        margin-bottom: 12px;
    }
}



/* ==========================================
   Highlight Box (Tips / Warning)
   ========================================== */
.highlight-box {
    padding: 24px;
    border-radius: 12px;
    margin: 32px 0;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.highlight-box h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-weight: 700;
}

/* Type Tips (Good / Light Bulb) */
.highlight-box.type-tips {
    background-color: #F5F9F0; /* Soft green-cream */
    border: 1px solid #E6EFE1;
    border-top: 4px solid #A5C284; /* Sage green accent */
}

.highlight-box.type-tips h4 {
    color: #4A5D23;
}

.highlight-box.type-tips h4::before {
    content: '💡';
    display: inline-block;
}

/* Type NG (Warning / Cross) */
.highlight-box.type-ng {
    background-color: #FCF5F5; /* Soft pink-cream */
    border: 1px solid #F5EAE9;
    border-top: 4px solid #D39594; /* Rose accent */
}

.highlight-box.type-ng h4 {
    color: #8A4A48;
}

.highlight-box.type-ng h4::before {
    content: '⚠️';
    display: inline-block;
}

/* Type Important (Warning/Important) */
.highlight-box.type-important {
    background-color: #FFFDF0; /* Soft yellow-cream */
    border: 1px solid #FAF0D7;
    border-top: 4px solid #F3CC65; /* Yellow/Gold accent */
}

.highlight-box.type-important h4 {
    color: #8A6818;
}

.highlight-box.type-important h4::before {
    content: '✨';
    display: inline-block;
}

/* Type Check (Search / Point) */
.highlight-box.type-check {
    background-color: #F0F8FF; /* Soft blue-cream */
    border: 1px solid #E0F0F8;
    border-top: 4px solid #7FAAD4; /* Blue accent */
}

.highlight-box.type-check h4 {
    color: #3A5D7F;
}

.highlight-box.type-check h4::before {
    content: '🔍';
    display: inline-block;
}

.highlight-box ul {
    margin: 0 !important;
    padding-left: 24px !important;
}

.highlight-box ul li {
    margin-bottom: 8px !important;
    font-size: 0.95rem;
    color: var(--color-text);
    list-style-type: disc !important;
}

.highlight-box ul li:last-child {
    margin-bottom: 0 !important;
}

/* ==========================================
   Beautiful Responsive Table
   ========================================== */
.table-container {
    overflow-x: auto;
    margin: 32px 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--color-border, #EEEEEE);
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    background: #FFFFFF;
    text-align: left;
    min-width: 600px;
}

.table-container th, 
.table-container td {
    padding: 16px;
    border-bottom: 1px solid var(--color-border, #EEEEEE);
    vertical-align: middle;
}

.table-container th {
    background-color: var(--color-accent, #C19A6B);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    text-align: center;
}

.table-container td {
    font-size: 0.92rem;
    color: var(--color-text, #444444);
}

.table-container tr:last-child td {
    border-bottom: none;
}

.table-container tr:nth-child(even) {
    background-color: #FAFAFA;
}

/* 記号や数字を見やすく中央揃え */
.table-container td:not(:first-child) {
    text-align: center;
    font-weight: 500;
}

/* ==========================================
   Recommend Slider (Swiper)
   ========================================== */
.slider-section {
    padding: var(--spacing-xl) 0;
    background-color: #F0F4F8; /* Subtle blueish background */
    overflow: hidden;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-size: 1.8rem;
    color: var(--color-secondary);
    position: relative;
    letter-spacing: 0.05em;
}

.recommend-slider {
    padding: 20px 0 60px 0; /* Space for pagination */
    overflow: visible !important; /* Allow slides to show fully */
}

.card-slide {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: auto;
    display: flex;
    flex-direction: column;
}

.card-slide:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 136, 204, 0.1);
}

.card-slide a {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.slide-image {
    position: relative;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    overflow: hidden;
    height: 180px;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-slide:hover .slide-image img {
    transform: scale(1.05);
}

.category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--color-accent);
    color: #FFFFFF;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.category-badge.warning { background-color: #E64A19; }
.category-badge.vscolor { background-color: #7B1FA2; }
.category-badge.baby { background-color: #F06292; }

.slide-content {
    padding: var(--spacing-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.slide-content h4 {
    font-size: 1.1rem;
    color: var(--color-secondary);
    margin-bottom: 10px;
    line-height: 1.4;
    font-family: var(--font-serif);
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.slide-content p {
    font-size: 0.85rem;
    color: var(--color-text);
    line-height: 1.5;
    margin-bottom: 0;
}

/* Swiper Controls Customization */
.recommend-slider .swiper-pagination-bullet-active {
    background: var(--color-accent);
}

.recommend-slider .swiper-button-next,
.recommend-slider .swiper-button-prev {
    color: var(--color-accent);
    background: rgba(255, 255, 255, 0.9);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.recommend-slider .swiper-button-next::after,
.recommend-slider .swiper-button-prev::after {
    font-size: 1.2rem;
    font-weight: bold;
}

/* ==========================================
   Homepage Redesign (2-Column & Sidebar)
   ========================================== */

/* 1. Announcement Bar */
.announcement-bar {
    background-color: #ffeeb2; /* 控えめなイエロー */
    color: #333;
    padding: 10px 0;
    font-size: 0.9rem;
    text-align: center;
    border-bottom: 1px solid #f2e19e;
}
.announcement-bar .badge {
    background-color: #d9534f;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 8px;
    font-weight: bold;
}

/* 2. 2-Column Layout */
.main-wrapper {
    display: flex;
    width: 100%; /* 明示的に 100% を指定 */
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 60px;
    align-items: flex-start;
}

.main-content {
    flex: 1;
    min-width: 0;
}

/* 3. Hero Section (Banner Style) */
.hero-section {
    background-color: #f9fbfd; /* 薄い水色系背景 */
    padding: 40px 0;
}
.hero-banner a {
    display: flex;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-banner a:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}
.banner-image {
    flex: 1.2;
    min-height: 250px;
}
.banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.banner-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.banner-content h2 {
    font-size: 1.5rem;
    line-height: 1.4;
    margin: 10px 0 15px;
    color: #333;
}
.banner-content p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 20px;
}
.banner-content .btn-primary {
    align-self: flex-start;
    padding: 10px 24px;
    background: var(--color-primary, #0076bb);
    color: #fff;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.9rem;
}

/* 4. Sidebar Styles */
.sidebar {
    width: 320px;
    position: sticky;
    top: 100px; /* navbar 高さ等に合わせる */
}

.widget {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 25px;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: bold;
    border-bottom: 2px solid var(--color-primary, #0076bb);
    padding-bottom: 12px;
    margin-bottom: 20px;
    color: #333;
}

.widget-profile {
    text-align: center;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #f0f7f9;
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-name {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 8px;
}
.profile-bio {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
    text-align: left;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget ul li {
    border-bottom: 1px solid #f0f4f8;
}
.widget ul li:last-child {
    border-bottom: none;
}
.widget ul li a {
    display: block;
    padding: 12px 5px;
    color: #444;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.widget ul li a:hover {
    color: var(--color-primary, #0076bb);
}

/* 5. Responsive */
@media (max-width: 992px) {
    .main-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    .sidebar {
        width: 100% !important;
        position: static !important;
    }
    .hero-banner a {
        flex-direction: column;
    }
    .banner-content {
        padding: 20px;
    }
}
