/*
Theme Name:   GOLD MEDIA CHILD
Theme URI:    https://fit-theme.com/
Description:  フィット株式会社が提供するWP子テーマ
Author:       Kota Naito　@FIT(フィット株式会社)
Template:     gold-media
Version:      1.2.3 (Refactored: Unified Flexbox 3-Col, Bento Grid, Modern l-info_search)
License:      GNU GENERAL PUBLIC LICENSE
*/
@charset "UTF-8";

/* ============================================================
   1. Design System Variables & Base Styles
   ============================================================ */
:root {
  /* ── カラー ── */
  --bg-color:       #f8f7f4;        /* ウォームクリーム（専門誌感） */
  --green-main:     #edf5f0;
  --pastel-border:  #d0e4dc;
  --accent-green:   #004d40;        /* ブランド深緑に統一 */
  --link-color:     #004d40;        /* リンクもブランド緑（信頼感） */
  --text-base:      #1a1a1a;        /* やや濃く（可読性UP） */
  --text-muted:     #5c6b65;        /* 補助テキスト */
  --surface-white:  #ffffff;
  --surface-warm:   #f5f4f0;        /* カード背景 */
  --brand-green:    #004d40;
  --brand-light:    #e8f5e9;
  /* ── レイアウト ── */
  --content-padding-inline: 20px;
  --grid-gap-desktop: 30px;
  --grid-gap-mobile:  24px;
  /* ── カード共通 ── */
  --radius-card:  10px;             /* 控えめな角丸（雑誌感） */
  --shadow-card:  0 2px 10px rgba(0,0,0,0.07);
  --shadow-hover: 0 6px 20px rgba(0,77,64,0.12);
}

body {
    background-color: var(--bg-color);
    color: var(--text-base);
    font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", Meiryo, sans-serif;
    font-size: 16px;
    line-height: 1.85;             /* 製造業ペルソナ向け可読性重視 */
    overflow-x: hidden;
    letter-spacing: 0.01em;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: 0.3s;
}

strong, b {
    background: linear-gradient(transparent 60%, #FFF9C4 60%);
}

#content > #primary h2 {
    font-size: 1.3rem;
    border-bottom: 2px solid var(--pastel-border);
    padding-bottom: 8px;
    margin-top: 30px;
    margin-bottom: 20px;
    color: var(--accent-green);
}

/* ============================================================
   2. Global Layout & Flexbox 3-Column Engine
   ============================================================ */
body #page,
body #primary-layout {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background-color: var(--bg-color);
    box-sizing: border-box;
}

.main-layout-wrapper {
    padding: 1.5rem 3rem !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    box-sizing: border-box;
}

/* Base Flex Container */
body #primary-layout > .main-flex-wrapper,
body #primary-layout > #content.container,
body #custom-main-layout .custom-flex-container.main-layout-inner {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box;
    position: static !important;
    float: none !important;
}

/* Desktop 3-Column Flexbox (1024px and up) */
@media (min-width: 1024px) {
    body #primary-layout > .main-flex-wrapper,
    body #primary-layout > #content.container,
    body #custom-main-layout .custom-flex-container.main-layout-inner {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: var(--grid-gap-desktop) !important;
    }

    .left-sidebar {
        flex: 0 0 220px !important;
        width: 220px !important;
        max-width: 220px !important;
        order: 1 !important;
        margin: 0 !important;
    }

    #primary,
    .main-content {
        flex: 1 1 0% !important;
        min-width: 0 !important;
        order: 2 !important;
        margin: 0 !important;
    }

    #secondary,
    aside.right-sidebar {
        flex: 0 0 300px !important;
        width: 300px !important;
        max-width: 300px !important;
        order: 3 !important;
        margin: 0 !important;
    }
}

/* Mobile Responsive (Stack Layout) */
@media screen and (max-width: 1023px) {
    .main-layout-wrapper {
        padding: 1rem 1.5rem !important;
    }

    body #primary-layout > .main-flex-wrapper,
    body #primary-layout > #content.container,
    body #custom-main-layout .custom-flex-container.main-layout-inner {
        flex-direction: column !important;
        gap: var(--grid-gap-mobile) !important;
    }

    .left-sidebar,
    #primary,
    .main-content,
    #secondary,
    aside.right-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        margin: 0 !important;
        order: unset !important;
    }
}

/* ============================================================
   3. Info & Search Bar (Modern Flat & Aligned)
   ============================================================ */
.l-info_search {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important; /* 中央寄せを徹底 */
    justify-content: space-between !important;
    gap: 20px !important;
    margin-bottom: var(--grid-gap-desktop) !important;
    width: 100% !important;
}

/* 共通の高さとボックスモデル設定 */
.l-info_search .info_bar,
.l-info_search .search_bar {
    height: 48px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* --- Info Bar --- */
.l-info_search .info_bar {
    flex: 1 !important;
    min-width: 0 !important;
    background-color: #ffffff !important;
    border: 1px solid var(--pastel-border) !important;
    border-radius: 24px !important; /* フラット＆モダンカプセル */
    padding: 0 20px 0 5px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    align-items: center !important; /* 内部も中央寄せ */
    transition: all 0.3s ease !important;
}

.l-info_search .info_bar:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05) !important;
}

.l-info_search .info_bar__title-is-circle {
    background-color: #004d40 !important;
    color: #ffffff !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    height: 36px !important;
    padding: 0 16px !important;
    border-radius: 18px !important;
    margin-right: 15px !important;
    letter-spacing: 0.05em !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.l-info_search .info_bar__item {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: var(--text-base) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
}

.l-info_search .info_bar__item a {
    color: var(--text-base) !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.l-info_search .info_bar__item a:hover {
    color: var(--accent-green) !important;
}

/* --- Search Bar --- */
.l-info_search .search_bar {
    width: 320px !important;
    max-width: 100% !important;
    background-color: #ffffff !important;
    border: 1px solid var(--pastel-border) !important;
    border-radius: 24px !important; /* Info Barと合わせたカプセル */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important;
}

.l-info_search .search_bar form {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
}

/* 入力欄の高さを親に合わせる */
.l-info_search .search_bar input[type="search"],
.l-info_search .search_bar input[type="text"] {
    flex: 1 !important;
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    padding: 0 15px 0 20px !important;
    font-size: 0.9rem !important;
    color: var(--text-base) !important;
    outline: none !important;
    box-sizing: border-box !important;
    appearance: none !important;
}

/* ボタンの高さを親に合わせる */
.l-info_search .search_bar button,
.l-info_search .search_bar input[type="submit"] {
    height: 100% !important;
    background-color: var(--accent-green) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0 24px !important;
    font-weight: bold !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.l-info_search .search_bar button:hover,
.l-info_search .search_bar input[type="submit"]:hover {
    background-color: #004d40 !important;
}

/* スマホ表示時の挙動 */
@media screen and (max-width: 768px) {
    .l-info_search {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .l-info_search .search_bar {
        width: 100% !important;
    }
}

/* ============================================================
   4. Hero Section (Edge-to-Edge)
   ============================================================ */
.l-keyvisual_top {
    position: relative;
    height: 450px;
    background: url('https://images.unsplash.com/photo-1677756119517-756a188d2d94?q=80&w=2070&auto=format&fit=crop') center center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background-color: #1a2322;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.l-keyvisual_top::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 61, 55, 0.55);
    z-index: 1;
}

.l-keyvisual_top .hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    max-width: calc(100% - (var(--content-padding-inline) * 2));
    width: 100%;
    box-sizing: border-box;
}

.l-keyvisual_top .hero-content .hero_title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

/* ============================================================
   5. Bento Grid System (Unified)
   ============================================================ */
.sort_tab,
#primary .archive-tabs {
    display: none !important;
}

#primary .tab_content {
    display: none;
}

/* AI Topics Module */
#primary .bento-grid-module {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: var(--grid-gap-desktop);
    margin-bottom: var(--grid-gap-desktop);
}

.bento-item {
    background-color: #ffffff;
    border: 1px solid var(--pastel-border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bento-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 121, 107, 0.1);
}

.bento-item-link {
    display: block;
    text-decoration: none;
    color: var(--text-base);
    height: 100%;
}

.bento-item-thumb {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.bento-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bento-item:hover .bento-item-thumb img {
    transform: scale(1.05);
}

.bento-item-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bento-item-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-green);
    margin: 0 0 5px 0;
}

.bento-item-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px 0;
    color: var(--text-base);
}

.bento-item-excerpt {
    font-size: 0.875rem;
    color: #555;
    margin: 0 0 10px 0;
    flex-grow: 1;
}

.bento-item-date {
    font-size: 0.75rem;
    color: #888;
    margin-top: auto;
}

/* Bento Module Layouts */
.bento-item-large .bento-item-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    padding: 20px;
}

.bento-item-large .bento-item-title { font-size: 1.5rem; color: #fff; }
.bento-item-large .bento-item-category,
.bento-item-large .bento-item-date { color: #f0f0f0; }
.bento-item-large .bento-item-excerpt { color: #e0e0e0; }
.bento-item-small { min-height: 120px; }
.bento-item-small .bento-item-content { justify-content: space-between; }

@media screen and (min-width: 769px) {
    .bento-item-1 { grid-column: 1 / 3; grid-row: 1 / 3; }
    .bento-item-2 { grid-column: 3 / 5; grid-row: 1 / 2; }
    .bento-item-3 { grid-column: 3 / 5; grid-row: 2 / 3; }
    .bento-item-4 { grid-column: 1 / 3; grid-row: 3 / 4; }
    .bento-item-5 { grid-column: 3 / 4; grid-row: 3 / 4; }
    .bento-item-6 { grid-column: 4 / 5; grid-row: 3 / 4; }
    .bento-item-large .bento-item-thumb { height: 100%; }
    .bento-item-medium .bento-item-thumb { height: 120px; }
}

@media screen and (max-width: 768px) {
    #primary .bento-grid-module {
        display: flex;
        flex-direction: column;
        gap: var(--grid-gap-mobile);
    }
}

/* Article Archive Bento Layout */
#content #primary .archive,
body #custom-main-layout .main-content .archive {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    margin-top: 20px !important;
}

#content #primary .archive > article:first-of-type,
#content #primary .archive > .archive__item:first-of-type,
#content #primary .archive .archive__item-bento-large,
body #custom-main-layout .main-content .archive .archive__item:first-of-type,
body #custom-main-layout .main-content .archive .archive__item-bento-large {
    grid-column: 1 / -1 !important;
}

#content #primary .archive > article,
#content #primary .archive > .archive__item,
body #custom-main-layout .main-content .archive__item {
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    width: 100% !important;
    border: none !important;
    min-height: auto !important;
}

#content #primary .archive > article:hover,
#content #primary .archive > .archive__item:hover,
body #custom-main-layout .main-content .archive__item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 25px rgba(0, 121, 107, 0.1) !important;
    background-color: #ffffff !important;
}

#content #primary .archive > article .eyecatch,
#content #primary .archive > .archive__item .eyecatch,
body #custom-main-layout .main-content .archive__item .eyecatch {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    flex-shrink: 0 !important;
}

#content #primary .archive > article .eyecatch img,
#content #primary .archive > .archive__item .eyecatch img,
body #custom-main-layout .main-content .archive__item .eyecatch img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

#content #primary .archive > article .archive__contents,
#content #primary .archive > .archive__item .archive__contents,
body #custom-main-layout .main-content .archive__item .archive__contents {
    padding: 20px !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}

#content #primary h3.heading,
#content #primary h2.entry-title,
#content #primary .archive__item .heading {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    padding: 0;
    border: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#content #primary .date_list,
#content #primary .archive__item .date_list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.6875rem;
    color: #999999;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 8px;
    margin-top: auto;
}

#content #primary .date_list__item a[rel="category tag"] {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    color: var(--accent-green);
    line-height: 1.4;
    margin: 0;
    background-color: #f0f0f0;
}

body.category-google #primary .date_list__item a[rel="category tag"] { background-color: #E3F2FD; }
body.category-apple #primary .date_list__item a[rel="category tag"] { background-color: #F5F5F5; }
body.category-marp #primary .date_list__item a[rel="category tag"] { background-color: #E0F2F1; }
body.category-chatgpt #primary .date_list__item a[rel="category tag"] { background-color: #E8F5E9; }
body.category-gemini #primary .date_list__item a[rel="category tag"] { background-color: #F3E5F5; }
body.category-stablediffusion #primary .date_list__item a[rel="category tag"] { background-color: #E1F5FE; }

#content #primary article .avatar,
#content #primary article .post-author img,
#content #primary .archive__item .avatar_box,
#content #primary .archive__item .phrase,
#content #primary .archive__item .entry-summary,
#content #primary .archive__item .post_excerpt,
#content #primary .archive__item .eyecatch__cat,
#primary .tab_content .avatar {
    display: none;
}

#content #primary .archive > .pagination,
#content #primary .pagination,
body #custom-main-layout .main-content .archive .pagination,
body #custom-main-layout .main-content .pagination {
    grid-column: 1 / -1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 50px 0 !important;
}

@media screen and (max-width: 768px) {
    #content #primary .archive,
    body #custom-main-layout .main-content .archive {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================================
   6. Sidebar & Widgets (Modernized)
   ============================================================ */
.left-sidebar ul, .left-sidebar ol,
.right-sidebar ul, .right-sidebar ol,
aside.widget ul, aside.widget ol {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

aside.widget li::before {
    content: none !important;
}

.left-sidebar .widget,
.right-sidebar .widget,
#secondary .widget {
    background: #ffffff !important;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#secondary .widget:last-child,
.right-sidebar .widget:last-child,
.left-sidebar .widget:last-child {
    margin-bottom: 0;
}

aside.widget .widget-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--accent-green);
    border-left: 4px solid var(--accent-green);
    border-bottom: none;
    padding-left: 10px;
    margin-bottom: 15px;
    margin-top: 0;
}

/* Left Sidebar Menu */
.left-sidebar #nav_menu-2 {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.left-sidebar #nav_menu-2 ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.left-sidebar #nav_menu-2 li a {
    display: block !important;
    background: #ffffff !important;
    color: var(--text-base) !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    padding: 16px 20px !important;
    border-radius: 12px !important;
    border: 1px solid var(--pastel-border) !important;
    text-decoration: none !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02) !important;
}

.left-sidebar #nav_menu-2 li a:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 15px rgba(0, 121, 107, 0.08) !important;
    color: var(--accent-green) !important;
    border-color: var(--accent-green) !important;
}

.left-sidebar #nav_menu-2 li a::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 4px !important;
    background-color: var(--accent-green) !important;
    transform: scaleY(0) !important;
    transform-origin: bottom !important;
    transition: transform 0.3s ease !important;
}

.left-sidebar #nav_menu-2 li a:hover::before {
    transform: scaleY(1) !important;
}

/* Right Sidebar Post List */
#secondary {
    color: #666666;
}

#secondary .widget li {
    display: flex;
    align-items: flex-start;
    border-bottom: 1px dashed var(--pastel-border);
    padding: 10px 0;
}

#secondary .widget li:first-child { padding-top: 0; }
#secondary .widget li:last-child { border-bottom: none; padding-bottom: 0; }

#secondary .widget .widget-post-thumb img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
}

#secondary .widget .widget-post-content {
    flex: 1;
    min-width: 0;
}

#secondary .widget .widget-post-content a {
    color: #333333;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    word-break: break-all;
}

#secondary .widget .widget-post-content a:hover {
    color: var(--accent-green);
}

#secondary .widget .post-date {
    font-size: 0.75rem;
    color: #666666;
    margin-top: 4px;
    display: block;
}

/* Ranking Module Specific */
.bento-item-ranking { padding: 20px; }
.bento-ranking-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-green);
    margin: 0 0 15px 0;
    border-bottom: 2px solid var(--pastel-border);
    padding-bottom: 10px;
}

.bento-item-ranking ul {
    list-style: none;
    padding: 0; margin: 0;
    counter-reset: ranking-counter;
}

.bento-item-ranking li {
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    margin: 0 -10px 4px -10px;
    padding: 8px 10px 8px 35px;
}

.bento-item-ranking li:last-child { margin-bottom: 0; }
.bento-item-ranking li:hover { background-color: #f0fdfa; }

.bento-item-ranking li::before {
    counter-increment: ranking-counter;
    content: counter(ranking-counter);
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    color: var(--accent-green);
    width: 20px;
    text-align: center;
}

.bento-item-ranking a { color: var(--text-base); }
.bento-item-ranking a:hover { color: var(--accent-green); }

body aside.right-sidebar .widget_search,
body aside.right-sidebar .widget_pages,
body aside.right-sidebar .widget_archive,
body aside.right-sidebar .widget_categories {
    display: none;
}

/* Tag Cloud */
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 400px;
    overflow-y: auto;
}
.tagcloud a {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--pastel-border);
    color: var(--accent-green);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 15px;
    text-decoration: none;
}
.tagcloud a:hover {
    background: var(--pastel-border);
}

/* ============================================================
   7. Header & Navigation Fixes
   ============================================================ */
.site_title__link {
    color: #004d40 !important;
    text-decoration: none !important;
}

.l-top_header, 
.global_navi,
.global_navi__inner {
    background-color: #ffffff !important;
}

.global_navi__item a,
.global_navi__list .global_navi__item a {
    color: #333333 !important;
}

.global_navi__item a:hover {
    color: var(--accent-green) !important;
}

/* ============================================================
   🚀 UI RECOVERY: Info Bar Flow & Height Alignment
   ============================================================ */

/* 1. 全体コンテナの整列（上下中央揃え） */
.l-info_search .c-info_search {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important; /* これで上下を揃える */
    justify-content: space-between !important;
    gap: 20px !important;
    padding: 10px 0 !important;
}

/* 2. ニュースバーの「流れ」を復活させる修正 */
.info_bar {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    height: 46px !important; /* 基準の高さ */
    background-color: #ffffff !important;
    border-radius: 50px !important;
    overflow: visible !important; /* 流れを妨げないようにする */
    border: 1px solid var(--pastel-border) !important;
}

.info_bar__item {
    overflow: visible !important; /* ellipsis(文字省略)を解除して流れを戻す */
    text-overflow: clip !important;
    white-space: nowrap !important;
}

/* 3. 検索バーの高さをニュースバーに完全同期 */
.search_bar {
    flex: 0 0 320px !important; /* 検索バーの横幅 */
}

.search_bar__form {
    height: 46px !important; /* ニュースバーと同じ高さ */
    display: flex !important;
    border-radius: 50px !important; /* カプセル型で統一 */
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid var(--pastel-border) !important;
}

.search_bar__input {
    height: 100% !important;
    border: none !important;
    padding: 0 20px !important;
    font-size: 0.9rem !important;
    flex: 1 !important;
}

/* 4. 検索ボタンの配色（ブランドカラー深緑） */
.search_bar__submit {
    height: 100% !important;
    width: 60px !important;
    background-color: #004d40 !important; /* 聖域：ブランド深緑 */
    color: #ffffff !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
}

.search_bar__submit:hover {
    background-color: var(--accent-green) !important;
}

/* スマホ表示での最適化 */
@media screen and (max-width: 768px) {
    .l-info_search .c-info_search {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .search_bar {
        width: 100% !important;
    }
}

/* ============================================================
   🚀 ADDITIVE PATCH: AI Trend Pulse (Tag Cloud Magic)
   ============================================================ */

/* タグクラウドのコンテナ最適化 */
body aside.right-sidebar .tagcloud {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    max-height: none !important; /* スクロールを無くし全表示へ */
    padding: 5px 0 !important;
}

/* AI Trend Pulse: カプセル型ベースデザイン */
body aside.right-sidebar .tagcloud a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #ffffff !important;
    color: #004d40 !important; /* 聖域：ブランドカラー */
    border: 1px solid #004d40 !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    padding: 6px 16px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    position: relative !important;
}

/* ホバー時の浮遊エフェクトと色反転 */
body aside.right-sidebar .tagcloud a:hover {
    background-color: #004d40 !important;
    color: #ffffff !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 12px rgba(0, 77, 64, 0.2) !important;
    border-color: #004d40 !important;
}

/* 脈打つパルスアニメーション（トレンド感の演出） */
@keyframes trendPulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 77, 64, 0.3); }
    70% { box-shadow: 0 0 0 6px rgba(0, 77, 64, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 77, 64, 0); }
}

/* トレンド上位（1番目と2番目のタグ）にのみパルスと特別色を付与 */
body aside.right-sidebar .tagcloud a:nth-child(1),
body aside.right-sidebar .tagcloud a:nth-child(2) {
    animation: trendPulse 2s infinite !important;
    background-color: #f0fdfa !important; /* 薄いミントグリーンで強調 */
    border-width: 2px !important;
}

body aside.right-sidebar .tagcloud a:nth-child(1):hover,
body aside.right-sidebar .tagcloud a:nth-child(2):hover {
    background-color: #004d40 !important;
    animation: none !important; /* ホバー時はパルスを止める */
}

/* ============================================================
   🚀 ADDITIVE PATCH: Bento Card 2 (Category/Tag Chips)
   ============================================================ */

/* Bento Card コンテナ（掟に基づきサイドバーのカードUIに同化させる） */
.bento-card.card-2-tags {
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

/* タイトル（既存のウィジェットタイトルデザインを継承） */
.bento-card.card-2-tags .bento-title {
    font-size: 0.95rem !important;
    font-weight: bold !important;
    color: var(--accent-green) !important;
    border-left: 4px solid var(--accent-green) !important;
    padding-left: 10px !important;
    margin: 0 !important;
}

/* 高密度チップコンテナ */
.bento-card.card-2-tags .chip-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

/* チップUI（通常時：控えめなグレー） */
.bento-card.card-2-tags .chip-item {
    display: inline-flex !important;
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    color: var(--text-base) !important;
    background-color: var(--bg-color) !important;
    border: 1px solid var(--pastel-border) !important;
    border-radius: 50px !important; /* カプセル型 */
    text-decoration: none !important;
    /* スプリング感のある浮遊アニメーション */
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
}

/* チップUI（ホバー時：ブランドカラーで浮き上がる） */
.bento-card.card-2-tags .chip-item:hover {
    background-color: #004d40 !important; /* 聖域：ブランドカラー */
    color: #ffffff !important;
    border-color: #004d40 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 12px rgba(0, 77, 64, 0.2) !important;
}

/* ============================================================
   🚀 ADDITIVE PATCH: Bento Card 5 (Trending Ranking)
   ============================================================ */

/* カード全体のコンテナ */
.bento-card.card-5-ranking {
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}

/* タイトル（Trending Topicsと共通の意匠） */
.bento-card.card-5-ranking .bento-title {
    font-size: 0.95rem !important;
    font-weight: bold !important;
    color: var(--accent-green) !important;
    border-left: 4px solid var(--accent-green) !important;
    padding-left: 10px !important;
    margin: 0 0 15px 0 !important;
}

/* ランキングリストコンテナ：CSSカウンタの初期化 */
.bento-card.card-5-ranking .ranking-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    counter-reset: rank-counter !important; /* ここで1位からカウント開始 */
}

/* 個別のランキングアイテム（カード内のミニBento） */
.bento-card.card-5-ranking .ranking-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px !important;
    border-radius: 8px !important;
    background: var(--bg-color) !important;
    border: 1px solid var(--pastel-border) !important;
    text-decoration: none !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

/* ホバー時の微細な光彩と浮遊エフェクト */
.bento-card.card-5-ranking .ranking-item:hover {
    background: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(0, 77, 64, 0.08) !important;
    border-color: #004d40 !important;
}

/* 👑 順位バッジ（HTMLに書かずCSSで自動生成） */
.bento-card.card-5-ranking .ranking-item::before {
    counter-increment: rank-counter !important;
    content: counter(rank-counter) !important;
    position: absolute !important;
    top: -1px !important;
    left: -1px !important;
    width: 26px !important;
    height: 26px !important;
    background: #999999 !important; /* 4位以下は控えめなグレー */
    color: #ffffff !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-bottom-right-radius: 8px !important;
    z-index: 2 !important;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1) !important;
}

/* 上位3位のバッジを #004d40 のグラデーションで強調 */
.bento-card.card-5-ranking .ranking-item:nth-child(1)::before {
    background: linear-gradient(135deg, #004d40 0%, #00796b 100%) !important;
    width: 30px !important;
    height: 30px !important;
    font-size: 0.9rem !important;
}
.bento-card.card-5-ranking .ranking-item:nth-child(2)::before {
    background: linear-gradient(135deg, #00695c 0%, #00897b 100%) !important;
    width: 28px !important;
    height: 28px !important;
}
.bento-card.card-5-ranking .ranking-item:nth-child(3)::before {
    background: linear-gradient(135deg, #00897b 0%, #26a69a 100%) !important;
}

/* サムネイル画像（正方形でアイキャッチを切り抜き） */
.bento-card.card-5-ranking .ranking-thumb {
    width: 60px !important;
    height: 60px !important;
    flex-shrink: 0 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

.bento-card.card-5-ranking .ranking-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.4s ease !important;
}

/* ホバー時に画像が少しズームするリッチネス */
.bento-card.card-5-ranking .ranking-item:hover .ranking-thumb img {
    transform: scale(1.1) !important;
}

/* タイトルと日付部分 */
.bento-card.card-5-ranking .ranking-content {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.bento-card.card-5-ranking .ranking-title {
    font-size: 0.85rem !important; /* 指示通りの高密度フォントサイズ */
    font-weight: 700 !important;
    color: var(--text-base) !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    transition: color 0.2s ease !important;
}

.bento-card.card-5-ranking .ranking-item:hover .ranking-title {
    color: #004d40 !important;
}

.bento-card.card-5-ranking .ranking-meta {
    font-size: 0.7rem !important;
    color: #888888 !important;
}

/* ============================================================
   🚀 ADDITIVE PATCH: Bento Card 6 (Newsletter Signup)
   ============================================================ */

/* ニュースレター専用Bento Cardのベース */
.bento-card.card-6-newsletter {
    background: linear-gradient(145deg, #ffffff 0%, #f4fbf9 100%) !important; /* ほんのり微かなミントグラデーション */
    border-radius: 12px !important;
    padding: 25px 20px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 4px 15px rgba(0, 77, 64, 0.06) !important;
    border: 1px solid var(--pastel-border) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 12px !important;
    position: relative !important;
    overflow: hidden !important;
}

/* 上部のブランドカラー・アクセントライン */
.bento-card.card-6-newsletter::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 4px !important;
    background: #004d40 !important;
}

/* タイトルとコピー */
.bento-card.card-6-newsletter .newsletter-title {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #004d40 !important;
    margin: 0 !important;
    letter-spacing: 0.05em !important;
}

.bento-card.card-6-newsletter .newsletter-copy {
    font-size: 0.85rem !important;
    line-height: 1.6 !important;
    color: var(--text-base) !important;
    margin: 0 0 5px 0 !important;
}

/* フォーム構造（縦積み・フル幅） */
.bento-card.card-6-newsletter .newsletter-form-wrapper,
.bento-card.card-6-newsletter .newsletter-form,
.bento-card.card-6-newsletter .newsletter-input-group {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

/* 入力フィールド */
.bento-card.card-6-newsletter .newsletter-input {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 15px !important;
    border: 1px solid #cccccc !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    background: #ffffff !important;
}

/* 入力時のフォーカス効果（深緑のオーラ） */
.bento-card.card-6-newsletter .newsletter-input:focus {
    border-color: #004d40 !important;
    box-shadow: 0 0 0 3px rgba(0, 77, 64, 0.15) !important;
}

/* 送信ボタン（コンバージョンボタン） */
.bento-card.card-6-newsletter .newsletter-submit {
    width: 100% !important;
    padding: 14px !important;
    background-color: #004d40 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
}

/* ホバーでさらに浮き上がるエフェクト */
.bento-card.card-6-newsletter .newsletter-submit:hover {
    background-color: var(--accent-green) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(0, 77, 64, 0.25) !important;
}

/* マイクロコピー（安心感を与える注記） */
.bento-card.card-6-newsletter .newsletter-note {
    font-size: 0.65rem !important;
    color: #888888 !important;
    margin: 5px 0 0 0 !important;
}

/* ============================================================
   📱 RESPONSIVE PATCH: Header Search Bar Fix
   ============================================================ */

/* 検索バーのフォームコンテナを1行に強制 */
.search_bar__form.search_bar__form-is-circle {
    display: flex !important;
    flex-wrap: nowrap !important; /* 改行を絶対に許さない */
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    background: #ffffff !important;
    border: 1px solid #dddddd !important;
    border-radius: 50px !important; /* 完全なカプセル型を維持 */
    overflow: hidden !important;
    padding: 2px 5px 2px 15px !important; /* 左に余白、右にボタン用スペース */
    box-sizing: border-box !important;
}

/* 入力欄：余ったスペースをすべて埋める */
.search_bar__input {
    flex: 1 !important; /* これでボタンを押し出さない */
    width: 0 !important; /* Flexbox内での計算を正しくさせる魔法 */
    min-width: 0 !important;
    border: none !important;
    background: transparent !important;
    height: 40px !important;
    font-size: 16px !important; /* iOSの自動ズーム防止サイズ */
    outline: none !important;
    box-shadow: none !important;
}

/* 検索ボタン：サイズを固定して右端に配置 */
.search_bar__submit.icon-search1 {
    flex-shrink: 0 !important; /* ボタンが潰れるのを防ぐ */
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    background-color: var(--brand-color, #004d40) !important; /* ブランドカラーを適用 */
    color: #ffffff !important;
    border-radius: 50% !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    margin-left: 5px !important;
    padding: 0 !important;
}

/* モバイル表示時のコンテナ自体の余白調整 */
@media screen and (max-width: 767px) {
    .search_bar {
        padding: 10px 15px !important;
        width: 100% !important;
    }
}


/* ============================================================
   🎯 TARGETED NAV: Ultra-Cool Sidebar Menu Tiles (High Specificity)
   ============================================================ */

/* 1. ウィジェットの元々の枠線や背景を消して、リストそのものを際立たせる */
body aside.left-sidebar div#nav_menu-2 div.widget_list.menu-sidemenu-container {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* 2. リスト全体のベース（余白を広げてタイル感を強調） */
body aside.left-sidebar div#nav_menu-2 ul#menu-sidemenu.menu {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 15px; 
}

/* 3. 各メニュー項目の初期化 */
body aside.left-sidebar div#nav_menu-2 ul#menu-sidemenu.menu li.global_navi__item {
    margin: 0;
    padding: 0;
    border: none;
}

/* 4. メニューリンク本体（主役のタイル） */
body aside.left-sidebar div#nav_menu-2 ul#menu-sidemenu.menu li.global_navi__item a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid rgba(0, 77, 64, 0.1);
    border-radius: 18px; 
    color: #1e293b;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    letter-spacing: 0.02em;
}

/* 5. 🔥 ホバー時の「アグレッシブ」な変貌（ブランドカラー覚醒） */
body aside.left-sidebar div#nav_menu-2 ul#menu-sidemenu.menu li.global_navi__item a:hover {
    background: linear-gradient(135deg, #004d40 0%, #00796b 100%);
    border-color: #004d40;
    color: #ffffff;
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0, 77, 64, 0.25);
}

/* 6. 左側のアイコンボックス（Notion風） */
body aside.left-sidebar div#nav_menu-2 ul#menu-sidemenu.menu li.global_navi__item a::before {
    content: "📁"; /* デフォルト */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 1.3rem;
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 12px;
    transition: all 0.4s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* ホバー時にアイコン背景も反転して傾く */
body aside.left-sidebar div#nav_menu-2 ul#menu-sidemenu.menu li.global_navi__item a:hover::before {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(-10deg) scale(1.1);
}

/* 各メニュー項目専用の絵文字設定 */
body aside.left-sidebar div#nav_menu-2 ul#menu-sidemenu.menu li.global_navi__item a[href*="google"]::before { content: "✨"; }
body aside.left-sidebar div#nav_menu-2 ul#menu-sidemenu.menu li.global_navi__item a[href*="marp"]::before { content: "📊"; }
body aside.left-sidebar div#nav_menu-2 ul#menu-sidemenu.menu li.global_navi__item a[href*="felo"]::before { content: "🔍"; }
body aside.left-sidebar div#nav_menu-2 ul#menu-sidemenu.menu li.global_navi__item a[href*="apple"]::before { content: "🍎"; }
body aside.left-sidebar div#nav_menu-2 ul#menu-sidemenu.menu li.global_navi__item a[href*="trend"]::before { content: "📈"; }

/* 7. 右端にひっそり佇むアローアイコン（SaaS風） */
body aside.left-sidebar div#nav_menu-2 ul#menu-sidemenu.menu li.global_navi__item a::after {
    content: "";
    position: absolute;
    right: 20px;
    width: 8px;
    height: 8px;
    border-top: 2px solid #cbd5e1;
    border-right: 2px solid #cbd5e1;
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

/* ホバー時に白くなって右へスライド */
body aside.left-sidebar div#nav_menu-2 ul#menu-sidemenu.menu li.global_navi__item a:hover::after {
    border-color: #ffffff;
    right: 15px;
}

/* ============================================================
   🎯 CROSS-PLATFORM FIX: Perfect Circle Button
   ============================================================ */

/* Card 1 と ヘッダー検索ボタンの両方に適用 */
.card-1-ai-search #aiSearchSubmit,
.search_bar__submit.icon-search1 {
    /* 1. OSの標準スタイルを完全にリセット */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;

    /* 2. 正方形を保証（幅と高さが1:1であることを強制） */
    aspect-ratio: 1 / 1 !important;
    
    /* 3. 余計な余白と枠線を消去 */
    padding: 0 !important;
    border: none !important;
    
    /* 4. 改めて完全な円形を指定 */
    border-radius: 50% !important;

    /* 5. 内部のアイコンを完全に中央へ（Flexbox） */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* SVGアイコンがボタンからはみ出さないようにサイズを制限 */
.card-1-ai-search #aiSearchSubmit svg,
.search_bar__submit.icon-search1 svg {
    width: 55% !important; /* ボタンサイズに対して適切な大きさ */
    height: 55% !important;
    display: block !important;
}

/* ============================================================
   💎 Next-Gen UI: Interactive Recipe Card
   ============================================================ */

/* 全体のラッパー：詳細度を高めるための基点 */
body .ai-recipe-vibe-wrapper {
    display: flex;
    flex-direction: column;
    margin: 40px 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* グラスモーフィズム・カード本体 */
body .ai-recipe-vibe-wrapper .vibe-glass-card {
    background: rgba(17, 17, 19, 0.85) !important; /* ダークな透過背景 */
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    padding: 32px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    color: #e2e8f0 !important;
}

/* ヘッダー周り */
body .ai-recipe-vibe-wrapper .vibe-card-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding-bottom: 16px !important;
}

body .ai-recipe-vibe-wrapper .vibe-title {
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    background: linear-gradient(to right, #ffffff, #94a3b8) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* エクスポートボタン群 */
body .ai-recipe-vibe-wrapper .vibe-export-actions {
    display: flex !important;
    gap: 8px !important;
}

body .ai-recipe-vibe-wrapper .vibe-btn-export {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

body .ai-recipe-vibe-wrapper .vibe-btn-export:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* 変数入力エリア */
body .ai-recipe-vibe-wrapper .vibe-variables-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

body .ai-recipe-vibe-wrapper .vibe-input-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

body .ai-recipe-vibe-wrapper .vibe-input-label {
    font-size: 0.85rem !important;
    color: #94a3b8 !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

body .ai-recipe-vibe-wrapper .vibe-text-input {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    color: #ffffff !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
}

body .ai-recipe-vibe-wrapper .vibe-text-input:focus {
    outline: none !important;
    border-color: #ec4899 !important; /* Pink-500 from React proposal */
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.2) !important;
    background: rgba(0, 0, 0, 0.5) !important;
}

/* プレビューエリア */
body .ai-recipe-vibe-wrapper .vibe-preview-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

body .ai-recipe-vibe-wrapper .vibe-preview-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

body .ai-recipe-vibe-wrapper .vibe-preview-label {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #e2e8f0 !important;
}

body .ai-recipe-vibe-wrapper .vibe-preview-console {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    position: relative !important;
}

body .ai-recipe-vibe-wrapper .vibe-output-text {
    margin: 0 !important;
    color: #cbd5e1 !important;
    font-family: 'Fira Code', Consolas, monospace !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
    white-space: pre-wrap !important;
    word-break: break-all !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* 動的ハイライト（入力された変数の部分） */
body .ai-recipe-vibe-wrapper .vibe-highlight {
    background: rgba(236, 72, 153, 0.15) !important; /* Pink tint */
    color: #f472b6 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-weight: bold !important;
}

/* コピーボタン */
body .ai-recipe-vibe-wrapper .vibe-btn-copy {
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    color: #ffffff !important;
    padding: 6px 16px !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

body .ai-recipe-vibe-wrapper .vibe-btn-copy:hover {
    background: #ec4899 !important;
}

body .ai-recipe-vibe-wrapper .vibe-btn-copy.is-success {
    background: #10b981 !important; /* Emerald green for success */
}
/* ============================================================
   💎 Next-Gen UI: Interactive Recipe Card (Forced Style)
   ============================================================ */

.ai-recipe-vibe-wrapper {
    display: flex;
    flex-direction: column;
    margin: 40px 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.ai-recipe-vibe-wrapper .vibe-glass-card {
    background: rgba(17, 17, 19, 0.85) !important; 
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    padding: 32px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    color: #e2e8f0 !important;
}

.ai-recipe-vibe-wrapper .vibe-card-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding-bottom: 16px !important;
}

.ai-recipe-vibe-wrapper .vibe-title {
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    background: linear-gradient(to right, #ffffff, #94a3b8) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.ai-recipe-vibe-wrapper .vibe-export-actions {
    display: flex !important;
    gap: 8px !important;
}

.ai-recipe-vibe-wrapper .vibe-btn-export {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.ai-recipe-vibe-wrapper .vibe-btn-export:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.ai-recipe-vibe-wrapper .vibe-variables-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.ai-recipe-vibe-wrapper .vibe-input-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.ai-recipe-vibe-wrapper .vibe-input-label {
    font-size: 0.85rem !important;
    color: #94a3b8 !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin: 0 !important;
}

.ai-recipe-vibe-wrapper .vibe-text-input {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    color: #ffffff !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.ai-recipe-vibe-wrapper .vibe-text-input:focus {
    outline: none !important;
    border-color: #ec4899 !important;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.2) !important;
    background: rgba(0, 0, 0, 0.5) !important;
}

.ai-recipe-vibe-wrapper .vibe-preview-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.ai-recipe-vibe-wrapper .vibe-preview-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.ai-recipe-vibe-wrapper .vibe-preview-label {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #e2e8f0 !important;
}

.ai-recipe-vibe-wrapper .vibe-preview-console {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    position: relative !important;
}

.ai-recipe-vibe-wrapper .vibe-output-text {
    margin: 0 !important;
    color: #cbd5e1 !important;
    font-family: 'Fira Code', Consolas, monospace !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
    white-space: pre-wrap !important;
    word-break: break-all !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.ai-recipe-vibe-wrapper .vibe-highlight {
    background: rgba(236, 72, 153, 0.15) !important;
    color: #f472b6 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-weight: bold !important;
}

.ai-recipe-vibe-wrapper .vibe-btn-copy {
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    color: #ffffff !important;
    padding: 6px 16px !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.ai-recipe-vibe-wrapper .vibe-btn-copy:hover {
    background: #ec4899 !important;
}

.ai-recipe-vibe-wrapper .vibe-btn-copy.is-success {
    background: #10b981 !important;
}

/* ============================================================
   💎 Next-Gen UI: AI Recipe Bento Grid
   ============================================================ */

.ai-recipe-bento-grid {
    display: grid !important;
    /* 画面幅に合わせて自動で列数を調整する魔法のGrid */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 24px !important;
    margin: 40px 0 !important;
}

.recipe-bento-item {
    background: #ffffff !important;
    border-radius: 20px !important;
    border: 1px solid #f0f4f8 !important;
    overflow: hidden !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
    display: flex !important;
    flex-direction: column !important;
}

.recipe-bento-item:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 15px 35px rgba(0, 77, 64, 0.1) !important;
    border-color: #00d084 !important;
}

.recipe-bento-link {
    text-decoration: none !important;
    color: inherit !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    padding: 24px !important;
}

.recipe-bento-header {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
    flex-wrap: wrap !important;
}

.recipe-badge {
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    padding: 6px 12px !important;
    border-radius: 12px !important;
    letter-spacing: 0.02em !important;
}

.badge-model {
    background: #f8fafc !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

.badge-difficulty {
    background: rgba(0, 208, 132, 0.1) !important;
    color: #004d40 !important;
}

.recipe-bento-body {
    flex-grow: 1 !important;
}

.recipe-title {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    margin: 0 0 12px 0 !important;
    line-height: 1.5 !important;
}

.recipe-excerpt {
    font-size: 0.85rem !important;
    color: #64748b !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

.recipe-bento-footer {
    margin-top: 24px !important;
    padding-top: 16px !important;
    border-top: 1px solid #f1f5f9 !important;
    display: flex !important;
    justify-content: flex-end !important;
}

.recipe-action-text {
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    color: #004d40 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: color 0.3s ease !important;
}

.recipe-bento-item:hover .recipe-action-text {
    color: #00d084 !important;
}

.recipe-not-found {
    text-align: center !important;
    padding: 40px !important;
    background: #f8fafc !important;
    border-radius: 16px !important;
    color: #64748b !important;
}

/* ============================================================
   🚀 ADDITIVE PATCH: AI Portfolio Styles (Vibe Coding UI/UX)
   ============================================================ */
.ai-portfolio-bento-grid {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.portfolio-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.portfolio-icon {
    font-size: 1.5rem;
}

.portfolio-main-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.portfolio-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.portfolio-bento-card {
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.portfolio-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.portfolio-bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -3px rgba(0, 77, 64, 0.08), 0 4px 6px -2px rgba(0, 77, 64, 0.04);
    border-color: #cbd5e1;
}

.portfolio-category-badge {
    align-self: flex-start;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.portfolio-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.portfolio-desc {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0 0 1.25rem 0;
    line-height: 1.6;
    flex-grow: 1;
}

.portfolio-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px dashed #e2e8f0;
}

.portfolio-action-text {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0ea5e9;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.portfolio-bento-card:hover .portfolio-action-text {
    color: #0284c7;
    transform: translateX(4px);
}

/* ============================================================
   🚀 ADDITIVE PATCH: AI News Curation Styles (Bento Grid)
   ============================================================ */
/* 全体のラッパー。要素間の余白を制御 */
.ai-news-curation-wrapper {
    display: flex;
    flex-direction: column;
    gap: 48px;
    margin: 2rem 0;
}

.ai-news-curation-wrapper .curation-tag-section {
    display: block;
    animation: fadeInVibe 0.8s ease-out forwards;
}

@keyframes fadeInVibe {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* トレンドタグの見出しデザイン */
.ai-news-curation-wrapper .curation-tag-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #004d40; /* ブランドカラー */
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-news-curation-wrapper .curation-tag-title::before {
    content: "🔥"; /* CSS疑似要素でアイコンを付与 */
    font-size: 1.3rem;
    display: inline-block;
}

/* CSS Gridを利用したレスポンシブなBentoレイアウト */
.ai-news-curation-wrapper .curation-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ニュースカード本体のデザイン */
.ai-news-curation-wrapper .curation-post-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    border: 1px solid #f1f5f9;
    height: 100%;
}

/* ホバー時の浮遊エフェクト */
.ai-news-curation-wrapper .curation-post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 77, 64, 0.08);
    border-color: #e0f2f1;
}

.ai-news-curation-wrapper .curation-post-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* サムネイル領域 */
.ai-news-curation-wrapper .curation-post-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f8fafc;
    overflow: hidden;
}

.ai-news-curation-wrapper .curation-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.ai-news-curation-wrapper .curation-post-card:hover .curation-post-thumb img {
    transform: scale(1.08); /* ホバー時に画像をズーム */
}

.ai-news-curation-wrapper .curation-no-thumb {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0f2f1, #b2dfdb);
}

/* カテゴリバッジ */
.ai-news-curation-wrapper .curation-cat-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 77, 64, 0.9);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 記事コンテンツ領域 */
.ai-news-curation-wrapper .curation-post-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ai-news-curation-wrapper .curation-post-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 2行で三点リーダー表示 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.ai-news-curation-wrapper .curation-post-card:hover .curation-post-title {
    color: #004d40;
}

.ai-news-curation-wrapper .curation-post-meta {
    margin-top: auto;
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.ai-news-curation-wrapper .curation-post-date::before {
    content: "🕒 ";
    opacity: 0.7;
}

/* ============================================================
   📱 MOBILE PERFECTION PATCH: UI/UX Optimization
   ============================================================ */
@media screen and (max-width: 768px) {
    
    /* --------------------------------------------------------
       1. 検索バーとインフォバーの完璧なアラインメント
    -------------------------------------------------------- */
    /* コンテナの最適化：縦並びにし、美しい余白(gap)を設定 */
    body #page .l-info_search,
    body #custom-main-layout .l-info_search {
        flex-direction: column !important;
        gap: 16px !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }

    /* 各バーの高さをタップしやすい48pxに同期し、カプセル型を強制 */
    body #page .l-info_search .info_bar,
    body #page .l-info_search .search_bar,
    body #custom-main-layout .l-info_search .info_bar,
    body #custom-main-layout .l-info_search .search_bar {
        width: 100% !important;
        height: 48px !important; /* 最低44pxのタップ領域基準をクリア */
        border-radius: 9999px !important;
        margin: 0 !important;
    }

    /* 検索フォーム内部の改行を絶対に許さない（flex-wrap: nowrap） */
    body #page .l-info_search .search_bar__form,
    body #custom-main-layout .l-info_search .search_bar__form,
    body header .search_bar__form {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        height: 100% !important;
        width: 100% !important;
        border-radius: 9999px !important;
        box-sizing: border-box !important;
    }

    /* ⚠️要注意: 入力フィールドのiOS自動ズームを防止 */
    body #page .search_bar__input,
    body #custom-main-layout .search_bar__input,
    body header .search_bar__input,
    body #page .l-info_search input[type="search"],
    body #page .l-info_search input[type="text"] {
        font-size: 16px !important; /* iOS Safariのフォーカス時ズームを防ぐ魔法の数字 */
        height: 100% !important;
        flex: 1 !important; /* 余白をすべて埋める */
        min-width: 0 !important; /* Flexboxの押し出しバグを回避 */
        border-radius: 9999px 0 0 9999px !important;
        padding-left: 20px !important;
        border: none !important;
    }

    /* 検索ボタンの完全同期（高さを親に合わせる） */
    body #page .search_bar__submit,
    body #custom-main-layout .search_bar__submit,
    body header .search_bar__submit,
    body #page .l-info_search button,
    body #page .l-info_search input[type="submit"] {
        height: 100% !important;
        flex-shrink: 0 !important; /* テキスト入力に押し潰されないようにする */
        border-radius: 0 9999px 9999px 0 !important;
    }

    /* ヘッダー特有の「丸型独立ボタン」パターンの上書き */
    body header .search_bar__form.search_bar__form-is-circle {
        padding: 4px !important; /* 内側に余白を持たせてボタンを浮かせる */
    }
    body header .search_bar__form.search_bar__form-is-circle .search_bar__input {
        height: 40px !important;
        border-radius: 9999px !important;
    }
    body header .search_bar__form.search_bar__form-is-circle .search_bar__submit.icon-search1 {
        height: 40px !important;
        width: 40px !important;
        border-radius: 50% !important; /* ここだけ完全な円形 */
        margin-left: 4px !important;
    }

    /* --------------------------------------------------------
       2. Bento Gridの記事一覧（.archive）のモバイル最適化
    -------------------------------------------------------- */
    body #page #content #primary .archive,
    body #custom-main-layout .main-content .archive {
        display: grid !important;
        grid-template-columns: 1fr !important; /* モバイルでは1カラムに強制 */
        gap: 20px !important; /* スマホ向けに最適化された余白 */
        padding: 0 16px !important; /* 画面端の窮屈さを解消 */
        box-sizing: border-box !important;
    }

    /* Bento特有の角丸と滑らかなシャドウの再定義 */
    body #page #content #primary .archive > article,
    body #page #content #primary .archive > .archive__item,
    body #custom-main-layout .main-content .archive__item {
        border-radius: 16px !important; /* モバイルでは少し控えめな角丸が美しい */
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
        margin: 0 !important;
        width: 100% !important;
    }

    /* --------------------------------------------------------
       3. スマホ特有のUI干渉回避（Z-indexとセーフエリア）
    -------------------------------------------------------- */
    /* メインコンテナ末尾にフロートメニュー分の余白を確保 */
    body #page #primary-layout,
    body #custom-main-layout {
        padding-bottom: 90px !important; /* 下部固定メニューとの被りを防ぐ聖域 */
    }
}

/* ============================================================
   🔥 URGENT FIX: Search Bar Layout Collapse Rescue Patch
   ============================================================ */
/* 
   Reason: The parent theme's `.l-info_search .search_bar button`
   has a `height: 100% !important`, which overrides the button's
   own styling, causing it to stretch vertically.
   Strategy: Use a selector with extremely high specificity to
   override the problematic style and enforce fixed dimensions.
*/

/* フォームの高さを46pxに絶対固定し、意図しないリサイズを防ぐ */
body .layout.l-info_search .search_bar .search_bar__form {
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
}

/* ボタンの寸法を34x34pxの完全な円形に強制する */
body .layout.l-info_search .search_bar .search_bar__submit.icon-search1 {
    width: 34px !important;
    min-width: 34px !important; /* 幅の最小値も固定 */
    max-width: 34px !important;  /* 幅の最大値も固定 */
    height: 34px !important;
    min-height: 34px !important;/* 高さの最小値も固定 */
    max-height: 34px !important; /* 高さの最大値も固定 */
    aspect-ratio: 1 / 1 !important; /* 常に1:1の比率を保証 */
    border-radius: 50% !important;  /* これで完全な円になる */
}

/* ============================================================
   🚀 MOBILE UI UPDATE: Glassmorphism Bottom Action Bar
============================================================ */

@media screen and (max-width: 768px) {
    /* PHPから出力されるスペーサーのスタイル定義（インラインスタイルの代替） */
    html body .mobile-bottom-spacer {
        height: 100px !important;
        width: 100% !important;
        display: block !important;
        pointer-events: none !important;
    }

    /* 1. ニュースバーのコンパクト化 */
    html body .l-info_search {
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }
    
    html body .l-info_search .info_bar {
        margin: 0 !important;
        padding: 8px 16px !important;
        font-size: 0.8rem !important;
        background: #f8fafc !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }

    /* 2. 検索バーの下部固定とグラスモーフィズム */
    html body .l-info_search .search_bar {
        position: fixed !important;
        bottom: 20px !important;
        left: 16px !important;
        right: 16px !important;
        z-index: 9999 !important;
        width: auto !important;
        margin: 0 !important;
        
        background-color: rgba(255, 255, 255, 0.85) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        
        border-radius: 50px !important;
        box-shadow: 0 10px 30px rgba(0, 77, 64, 0.15) !important;
        border: 1px solid rgba(255, 255, 255, 0.6) !important;
        
        padding: 6px 6px 6px 20px !important;
        display: flex !important;
        align-items: center !important;
    }

    /* 3. 入力欄の背景透明化とSafariズーム対策 */
    html body .l-info_search .search_bar__input {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 8px 0 !important;
        font-size: 16px !important; /* iOSズーム防止 */
        color: #1e293b !important;
        flex: 1 !important;
        outline: none !important;
    }

    /* 4. 検索ボタンのブランドカラー（#004d40）適用 */
    html body .l-info_search .search_bar__submit {
        background-color: #004d40 !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: 50% !important;
        width: 42px !important;
        height: 42px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        margin-left: 10px !important;
        box-shadow: 0 4px 12px rgba(0, 77, 64, 0.3) !important;
    }
}

/* ============================================================
   🚀 HIGH-DENSITY UI PATCH: Sticky Sidebar & Bento Sync
   ============================================================ */

/* 
   📐 設計思想 (Design Philosophy):
   1. 既存システムへの制圧: WP既存テーマの強力なレイアウト指定を上書きするため、
      `html body` を起点とする高詳細度セレクタと `!important` を戦略的に使用。
   2. 責務の分離: JavaScriptを一切使わず、CSSのネイティブなレンダリングエンジン
      (Flexbox & Sticky) だけで完結させ、パフォーマンスを最大化。
*/

@media (min-width: 1024px) {
    /* 
       Step 1: 親コンテナの高さを同期 (Stretch)
       既存の `align-items: flex-start` を上書きし、サイドバーをメインコンテンツと同じ高さまで引き伸ばす。
    */
    html body #primary-layout > .main-flex-wrapper,
    html body #primary-layout > #content.container,
    html body #custom-main-layout .custom-flex-container.main-layout-inner {
        align-items: stretch !important;
    }

    /* 
       Step 2 & 4 & 5: サイドバーのFlex化と視覚的ヒントの追加
       高さを目一杯使ったFlexコンテナ化。さらに、サイドバー領域が「下まで続いている」ことを
       無意識に伝えるため、非常に薄い背景色と境界線を追加します。
    */
    html body .left-sidebar,
    html body #secondary,
    html body aside.right-sidebar {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important; /* Stretchに追従させる */
        
        /* 視覚的ヒント（領域の明示） */
        background-color: rgba(246, 246, 246, 0.4) !important; /* var(--bg-color)の微かな透過 */
        border-radius: 20px !important;
    }

    html body .left-sidebar {
        border-right: 1px dashed var(--pastel-border) !important;
        padding-right: 15px !important;
    }

    html body #secondary,
    html body aside.right-sidebar {
        border-left: 1px dashed var(--pastel-border) !important;
        padding-left: 15px !important;
    }

    /* 
       Step 4: 各ウィジェットのBento UI化（高密度・高詳細度）
       既存のウィジェットデザインをBento Gridに調和するよう洗練させます。
    */
    html body .left-sidebar .widget,
    html body #secondary .widget,
    html body aside.right-sidebar .widget {
        background: #ffffff !important;
        border: 1px solid var(--pastel-border) !important;
        border-radius: 16px !important;
        padding: 24px !important;
        margin-bottom: 24px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
        transition: box-shadow 0.3s ease, transform 0.3s ease !important;
    }

    html body .left-sidebar .widget:hover,
    html body #secondary .widget:hover {
        box-shadow: 0 8px 25px rgba(0, 77, 64, 0.08) !important; /* アクセントカラーの影 */
        transform: translateY(-2px) !important;
    }

    /* 
       Step 3: 最後のウィジェットにSticky（追従）を適用
       サイドバー内で最後に配置されたウィジェットのみを、スクロールに追従させます。
       ⚠️要注意: 親コンテナに `overflow: hidden` があるとStickyは効きません。
       今回は `body` 以外にoverflowが掛からない設計にしています。
    */
    html body .left-sidebar .widget:last-child,
    html body #secondary .widget:last-child,
    html body aside.right-sidebar .widget:last-child {
        position: -webkit-sticky !important; /* Safari対応 */
        position: sticky !important;
        top: 24px !important; /* 画面上部からの停止位置 */
        margin-bottom: 0 !important; /* 底の余白をリセット */
        z-index: 10 !important; /* メインコンテンツに埋もれないようにする */
        
        /* 追従要素は少し目立たせる（ブランドカラーの微かなオーラ） */
        border-color: rgba(0, 77, 64, 0.2) !important;
        box-shadow: 0 10px 30px rgba(0, 77, 64, 0.06) !important;
    }
}

/* ============================================================
   🚀 MOBILE UI UPGRADE: Horizontal Scroll Pill Navigation
   ============================================================ */

/* モバイル環境（768px以下）のみに適用 */
@media screen and (max-width: 768px) {
    
    /* 
       1. スクロールレールの構築と見切れの演出
       html body を起点に詳細度を上げ、既存テーマのリストスタイルを制圧します。
    */
    html body .global_navi__inner ul,
    html body .global_navi__list {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important; /* iOSでの滑らかなスクロールを有効化 */
        gap: 12px !important;
        /* 左右にパディングを設けることで、画面端で要素が「見切れる」美しい演出を作ります */
        padding: 12px 16px !important; 
        margin: 0 !important;
        /* Firefox向けのスクロールバー非表示設定 */
        scrollbar-width: none !important;
    }

    /* Webkit系（Chrome/Safari/Edge）のスクロールバーを完全に非表示にする */
    html body .global_navi__inner ul::-webkit-scrollbar,
    html body .global_navi__list::-webkit-scrollbar {
        display: none !important;
    }

    /* 
       2. リストアイテムの初期化
       Flexアイテムが潰れないように flex-shrink: 0 を設定します。
    */
    html body .global_navi__item {
        margin: 0 !important;
        padding: 0 !important;
        flex-shrink: 0 !important; 
        list-style: none !important;
    }

    /* 
       3. ピル型（カプセル型）ボタンのデザイン
       テキストリンクを独立したモダンなボタンへと昇華させます。
    */
    html body .global_navi__item a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px 20px !important;
        background-color: #f8fafc !important; /* 通常時は控えめなグレー */
        color: #333333 !important;
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        border: 1px solid var(--pastel-border, #e0f2f1) !important;
        border-radius: 50px !important; /* これがピル型の魔法です */
        white-space: nowrap !important; /* テキストの改行を絶対に許さない */
        text-decoration: none !important;
        /* タップ時の反応をリッチにするトランジション */
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    }

    /* 
       4. インタラクション（タップ・ホバー・アクティブ状態）
       ユーザーのアクションに対して、ブランドカラーの深緑で鮮やかに応えます。
    */
    html body .global_navi__item a:hover,
    html body .global_navi__item a:active,
    html body .global_navi__item.current-menu-item a {
        background-color: #004d40 !important; /* ブランドカラーの深緑 */
        color: #ffffff !important; /* 文字を白に反転 */
        border-color: #004d40 !important;
        transform: translateY(-2px) !important; /* 少しだけ浮き上がる感覚 */
        box-shadow: 0 4px 12px rgba(0, 77, 64, 0.2) !important;
    }
}
/* ============================================================
   EDITORIAL REFRESH — 製造業専門誌スタイル
   製造業ペルソナ（40-55歳管理職）向け：信頼感・可読性優先
   ============================================================ */

/* ── 記事一覧フィード ────────────────────────────── */
.bento-posts-feed {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 0 0 32px;
}
@media (max-width: 768px) {
    .bento-posts-feed {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* 先頭カードは全幅（リード記事扱い） */
.bento-posts-feed .bento-post-card:first-child {
    grid-column: 1 / -1;
}
.bento-posts-feed .bento-post-card:first-child .bento-post-card__thumb {
    aspect-ratio: 21 / 9;
}
.bento-posts-feed .bento-post-card:first-child .bento-post-card__title {
    font-size: 1.35rem;
    -webkit-line-clamp: 2;
}

/* ── 記事カード ──────────────────────────────────── */
.bento-post-card {
    background: var(--surface-white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border: 1px solid #e8ece9;
}
.bento-post-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.bento-post-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

/* サムネイル */
.bento-post-card__thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e8ece9;
}
.bento-post-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
    display: block;
}
.bento-post-card:hover .bento-post-card__thumb img {
    transform: scale(1.04);
}

/* カテゴリバッジ */
.bento-post-card__cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--brand-green);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
}

/* 本文エリア */
.bento-post-card__body {
    padding: 18px 20px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* タイトル */
.bento-post-card__title {
    font-size: 1.0rem;
    font-weight: 700;
    color: #111;
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 概要文 */
.bento-post-card__excerpt {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* メタ情報 */
.bento-post-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #eef0ed;
}
.bento-post-card__date {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.comment-count-badge {
    font-size: 0.72rem;
    color: var(--brand-green);
    background: var(--brand-light);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* ── ページネーション ─────────────────────────────── */
.bento-pagination {
    margin: 24px 0 8px;
    text-align: center;
}
.bento-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.bento-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-green);
    background: var(--surface-white);
    border: 1px solid #d0e4dc;
    text-decoration: none;
    transition: all 0.2s;
}
.bento-pagination .page-numbers:hover,
.bento-pagination .page-numbers.current {
    background: var(--brand-green);
    color: #fff;
    border-color: var(--brand-green);
}

/* ── 記事単体ページ ───────────────────────────────── */
.entry-wrapper {
    background: var(--surface-white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid #e8ece9;
    overflow: hidden;
}

/* ヘッダー */
.entry-header {
    padding: 32px 36px 24px;
    border-bottom: 1px solid #eef0ed;
}
@media (max-width: 768px) {
    .entry-header { padding: 24px 20px 20px; }
}

/* カテゴリバッジ */
.entry-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.entry-cat-badge {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--brand-green);
    background: var(--brand-light);
    border: 1px solid #b2dfdb;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}
.entry-cat-badge:hover {
    background: var(--brand-green);
    color: #fff;
}

/* 記事タイトル */
.entry-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: #0d1f1b;
    line-height: 1.45;
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}
@media (max-width: 768px) {
    .entry-title { font-size: 1.3rem; }
}

/* 公開日・更新日 */
.entry-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.entry-meta time { font-weight: 600; }
.entry-modified { opacity: 0.8; }

/* アイキャッチ */
.entry-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: #e8ece9;
}
.entry-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 記事本文 */
.entry-content {
    padding: 32px 36px;
    font-size: 1.0rem;
    line-height: 1.9;
    color: #1a1a1a;
}
@media (max-width: 768px) {
    .entry-content { padding: 24px 20px; }
}

/* 本文内見出し */
.entry-content h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--brand-green);
    border-left: 4px solid var(--brand-green);
    padding-left: 12px;
    margin: 36px 0 14px;
    line-height: 1.5;
}
.entry-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    border-bottom: 1px solid #d0e4dc;
    padding-bottom: 6px;
    margin: 28px 0 12px;
}
.entry-content p { margin-bottom: 1.4em; }
.entry-content ul, .entry-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.4em;
}
.entry-content li { margin-bottom: 0.5em; }

/* GAS生成コンテンツ */
.chiebukuro-opening-box {
    background: #fffde7;
    border-left: 4px solid #f9a825;
    border-radius: 0 8px 8px 0;
    padding: 18px 22px;
    margin: 0 0 24px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #4a3a00;
}
.opal-news-container { display: flex; flex-direction: column; gap: 24px; }
.summary-box {
    background: #f0faf5;
    border: 1px solid #b2dfdb;
    border-radius: 8px;
    padding: 20px 24px;
}
.summary-box h3,
.deep-dive-box h3,
.action-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brand-green);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d0e4dc;
}
.deep-dive-box {
    background: var(--surface-white);
    border: 1px solid #e8ece9;
    border-radius: 8px;
    padding: 20px 24px;
}
.action-card {
    background: var(--brand-green);
    border-radius: 8px;
    padding: 20px 24px;
    color: #fff;
}
.action-card h3 { color: #a5d6a7; border-color: rgba(255,255,255,0.2); }
.action-card p  { color: #e8f5e9; margin: 0; line-height: 1.8; }
.comment-invitation-box {
    background: #fafafa;
    border: 1px dashed #b2dfdb;
    border-radius: 8px;
    padding: 18px 22px;
    text-align: center;
}
.comment-invitation-box h4 {
    color: var(--brand-green);
    margin: 0 0 8px;
    font-size: 1rem;
}

/* FAQ セクション */
.faq-section {
    background: #f8f7f4;
    border-radius: 8px;
    padding: 20px 24px;
    border: 1px solid #e8ece9;
}
.faq-section h2 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--brand-green);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d0e4dc;
}
.faq-item { margin-bottom: 16px; }
.faq-item:last-child { margin-bottom: 0; }
.faq-q {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
    padding-left: 24px;
    position: relative;
}
.faq-q::before {
    content: "Q";
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
    background: var(--brand-green);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.faq-a {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin: 0;
    padding-left: 24px;
}

/* 編集用カンペ（下書き確認用・公開後は非表示推奨） */
.editor-dashboard-box {
    background: #fafafa;
    border: 1px dashed #ccc;
    border-radius: 6px;
    padding: 14px 18px;
    font-size: 0.82rem;
    color: #666;
}
.editor-dashboard-box h3 {
    font-size: 0.8rem;
    color: #999;
    margin: 0 0 8px;
}
.bento-alert { border-color: #ffcc80; background: #fff8f0; }

/* タグ・フッター */
.entry-footer {
    padding: 20px 36px 28px;
    border-top: 1px solid #eef0ed;
}
@media (max-width: 768px) {
    .entry-footer { padding: 16px 20px 20px; }
}

/* 前後記事ナビ */
.bento-post-nav {
    padding: 16px 36px;
    background: var(--surface-warm);
    border-top: 1px solid #eef0ed;
    display: flex;
    gap: 12px;
}
.bento-post-nav .nav-previous,
.bento-post-nav .nav-next {
    flex: 1;
}
.bento-post-nav a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--brand-green);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.5;
}
.bento-post-nav .nav-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-transform: uppercase;
}
.bento-post-nav .nav-title {
    font-weight: 600;
    color: #1a1a1a;
}

/* 検索結果・アーカイブヘッダー */
.search-result-header,
.archive-page-header {
    background: var(--surface-white);
    border-radius: var(--radius-card);
    border: 1px solid #e8ece9;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.search-result-header h1,
.archive-page-header h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-green);
    margin: 0;
}

/* 検索結果なし */
.no-results-bento {
    background: var(--surface-white);
    border-radius: var(--radius-card);
    border: 1px solid #e8ece9;
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
}

/* ============================================================
   CF7 ニュースレターフォーム スタイル統合
   ============================================================ */
.card-6-newsletter .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.card-6-newsletter .wpcf7-form p {
    margin: 0;
}
.card-6-newsletter .newsletter-cf7-input {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 15px !important;
    border: 1px solid #cccccc !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    outline: none !important;
    background: #ffffff !important;
    transition: border-color 0.3s, box-shadow 0.3s !important;
}
.card-6-newsletter .newsletter-cf7-input:focus {
    border-color: #004d40 !important;
    box-shadow: 0 0 0 3px rgba(0,77,64,0.15) !important;
}
.card-6-newsletter .newsletter-cf7-btn {
    width: 100% !important;
    padding: 14px !important;
    background-color: #004d40 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s !important;
}
.card-6-newsletter .newsletter-cf7-btn:hover {
    background-color: #00695c !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(0,77,64,0.25) !important;
}
.card-6-newsletter .wpcf7-response-output {
    font-size: 0.8rem !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    margin: 4px 0 0 !important;
}
.card-6-newsletter .wpcf7-not-valid-tip {
    font-size: 0.75rem !important;
    color: #c0392b !important;
}
