/* ========================================
   Liquid Glass デザイントークン
======================================== */
:root[data-theme="light"] {
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-bg-strong: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-highlight: rgba(255, 255, 255, 0.8);
    --glass-shadow: rgba(0, 0, 0, 0.1);
    --glass-text: #1a1a1a;
    --glass-blur: 20px;
    --glass-radius: 16px;
    --glass-ease: cubic-bezier(.22,.61,.36,1);

    /* デザイン思考による配色設計 */
    /* ベース: 水色（#0288D1）→ アクセント: 黄色（#FFC107）→ 調和色: ターコイズ/ミント */
    --primary-blue: #0288D1;
    --primary-yellow: #FFC107;
    --bg-gradient-1: #E3F2FD;      /* 淡い水色 - 空気感 */
    --bg-gradient-2: #81D4FA;      /* ライトブルー - 爽やかさ */
    --bg-gradient-3: #4DD0E1;      /* シアンブルー - 活力 */
    --text-secondary: #424242;
    --heading-color: #0277BD;
}

:root[data-theme="dark"] {
    --glass-bg: rgba(0, 0, 0, 0.30);
    --glass-border: rgba(255, 255, 255, 0.14);
    --glass-highlight: rgba(255, 255, 255, 0.18);
    --glass-shadow: rgba(0, 0, 0, 0.35);
    --glass-text: #f5f7fa;
    --glass-blur: 18px;
    --glass-radius: 14px;
    --glass-ease: cubic-bezier(.22,.61,.36,1);

    /* ダークモード用カラー */
    --primary-blue: #64b5f6;
    --primary-yellow: #ffd60a;
    --bg-gradient: linear-gradient(135deg, #1a2332 0%, #0f1419 100%);
}

/* アクセシビリティ対応：透明度軽減 */
@media (prefers-reduced-transparency: reduce) {
    :root[data-theme="light"] {
        --glass-bg: rgba(240, 240, 240, 0.95);
        --glass-blur: 0px;
    }
    :root[data-theme="dark"] {
        --glass-bg: rgba(30, 30, 30, 0.95);
        --glass-blur: 0px;
    }
}

/* アニメーション軽減 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   基本スタイル
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* タッチデバイス対応 */
a, button, .nav-link, .project-link, .hamburger, .theme-toggle {
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(2, 136, 209, 0.2);
}

/* リンクのタッチ有効化 */
a {
    position: relative;
    z-index: 1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Hiragino Sans', 'Noto Sans CJK JP', sans-serif;
    line-height: 1.7;
    color: var(--glass-text);
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background 0.3s var(--glass-ease), color 0.3s var(--glass-ease);
}

/* 流動的な背景アニメーション */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: liquidFlow 20s ease-in-out infinite;
    pointer-events: none !important;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    bottom: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: liquidFlow 25s ease-in-out infinite reverse;
    pointer-events: none !important;
    z-index: -1;
}

@keyframes liquidFlow {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(5%, 5%) rotate(5deg);
    }
    50% {
        transform: translate(0, 10%) rotate(10deg);
    }
    75% {
        transform: translate(-5%, 5%) rotate(5deg);
    }
}

.container {
    position: relative;
    z-index: 1;
}

/* パンくずリスト */
.breadcrumb {
    padding: 16px 24px;
    margin: 0 24px;
    background: white;
    border-radius: 8px;
    margin-top: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.breadcrumb-list {
    list-style: none;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9em;
}

.breadcrumb-list li {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
}

.breadcrumb-list a {
    color: var(--primary-blue);
    text-decoration: none;
    -webkit-transition: color 0.2s ease;
    transition: color 0.2s ease;
}

.breadcrumb-list a:hover {
    color: var(--primary-yellow);
}

.breadcrumb-list .current {
    color: #6c757d;
}

.breadcrumb-list .separator {
    margin: 0 4px;
    color: #999;
    display: inline-block;
}

/* ハンバーガーメニュー - UX改善版 */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1005;
    transition: transform 0.3s ease;
    position: relative;
    /* タップ領域を最適化 - 最小44x44px */
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.hamburger:hover {
    transform: scale(1.1);
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: #0288D1;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
    background: #ffd60a;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(9px, -9px);
    background: #ffd60a;
}

/* デスクトップではモバイルヘッダーを非表示 */
.mobile-menu-header {
    display: none;
}

.mobile-menu-header .site-title {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-menu-header .site-title::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 28px;
    background-image: url('images/ひよこ02.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* テーマ切り替えボタン */
.theme-toggle {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 8px 12px;
    color: var(--glass-text);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s var(--glass-ease);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.theme-toggle:hover {
    background: var(--glass-highlight);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* オーバーレイ - Liquid Glass デザイン（モバイルでのチカチカを抑制するためアニメーション無効化） */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease,
                visibility 0.6s ease,
                backdrop-filter 0.4s ease;
    z-index: -1;
    pointer-events: none;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    z-index: 998;
    pointer-events: auto;
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
}

header {
    text-align: center;
    padding: 60px 20px 50px;
    background: linear-gradient(135deg, #0288D1 0%, #03a9f4 100%);
    margin: 0 24px;
    border-radius: 0 0 var(--glass-radius) var(--glass-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

/* Liquid効果 - 流動的 */
header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 70%
    );
    opacity: 0;
    animation: headerFlow 8s ease-in-out infinite;
    pointer-events: none !important;
    z-index: 0;
}

@keyframes headerFlow {
    0%, 100% {
        opacity: 0;
        transform: translate(0, 0);
    }
    50% {
        opacity: 0.5;
        transform: translate(5%, 5%);
    }
}

header h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 12px;
    color: white;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

header p {
    font-size: 1.15em;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
}

/* デスクトップ版ナビゲーション */
@media (min-width: 769px) {
    .navbar {
        background: white;
        padding: 0;
        margin: 0 24px;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        display: flex;
        justify-content: center;
        gap: 8px;
        position: sticky;
        top: 20px;
        z-index: 100;
        overflow: hidden;
    }

    .nav-link {
        flex: 1;
        text-align: center;
        padding: 20px 24px;
        color: var(--primary-blue);
        text-decoration: none;
        font-weight: 600;
        font-size: 0.95em;
        transition: all 0.3s ease;
        border-bottom: 3px solid transparent;
        position: relative;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-link:hover {
        background: var(--glass-highlight);
        border-bottom-color: var(--primary-yellow);
        color: var(--heading-color);
        transform: translateY(-2px);
    }

    /* フォーカス状態（キーボードナビゲーション対応） */
    .nav-link:focus {
        outline: 3px solid var(--primary-yellow);
        outline-offset: -3px;
        background: var(--glass-highlight);
    }

    /* ドロップダウンメニュー */
    .nav-dropdown {
        position: relative !important;
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: row !important;
    }

    .nav-dropdown > .nav-link {
        width: 100% !important;
        display: flex !important;
    }

    .dropdown-content {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        background: white !important;
        min-width: 200px !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
        border-radius: 8px !important;
        z-index: 1000 !important;
        margin-top: 8px !important;
        overflow: hidden !important;
        padding: 0 !important;
    }

    .dropdown-content a {
        display: block !important;
        padding: 16px 20px !important;
        color: var(--primary-blue) !important;
        text-decoration: none !important;
        font-weight: 600 !important;
        font-size: 0.95em !important;
        transition: all 0.3s ease !important;
        border-bottom: 1px solid rgba(2, 136, 209, 0.1) !important;
        border-left: none !important;
        text-align: center !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .dropdown-content a:last-child {
        border-bottom: none !important;
    }

    .dropdown-content a:hover {
        background: var(--glass-highlight) !important;
        color: var(--heading-color) !important;
        padding-left: 24px !important;
    }

    .nav-dropdown.active .dropdown-content {
        display: block !important;
        animation: dropdownFadeIn 0.3s ease !important;
    }

    @keyframes dropdownFadeIn {
        from {
            opacity: 0;
            transform: translateX(-50%) translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
    }
}

/* Liquid Glassセクション */
section {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    margin: 32px 24px;
    padding: 50px 40px;
    border-radius: var(--glass-radius);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 8px 32px var(--glass-shadow),
        inset 0 1px 0 var(--glass-highlight),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    scroll-margin-top: 100px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--glass-ease);
}

/* Liquid効果（光沢） - 流動的アニメーション */
section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.6s var(--glass-ease), transform 0.8s var(--glass-ease);
    pointer-events: none !important;
    z-index: 0;
}

section:hover::before {
    opacity: 1;
    transform: translate(10%, 10%) scale(1.1);
}

section:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 40px var(--glass-shadow),
        inset 0 1px 0 var(--glass-highlight);
}

/* backdrop-filter 非対応ブラウザのフォールバック */
@supports not (backdrop-filter: blur(10px)) {
    section {
        background: rgba(255, 255, 255, 0.95);
    }
    :root[data-theme="dark"] section {
        background: rgba(30, 30, 30, 0.95);
    }
}

section h2 {
    font-size: 2em;
    margin-bottom: 36px;
    color: var(--heading-color);
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    padding-left: 16px;
    z-index: 1;
}

section > * {
    position: relative;
    z-index: 1;
}

section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 32px;
    background: linear-gradient(135deg, #ffd60a 0%, #ffc107 100%);
    border-radius: 3px;
}

.intro-content {
    line-height: 1.8;
    max-width: 700px;
}

.intro-content p {
    margin-bottom: 16px;
    color: var(--glass-text);
}

.support-btn {
    margin-top: 40px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
    margin-bottom: 40px;
}

/* Webアプリ一覧を一列表示にする調整 */
.project-grid--single {
    grid-template-columns: minmax(0, 1fr);
}

.project-card {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--glass-radius);
    padding: 32px;
    transition: all 0.4s var(--glass-ease);
    box-shadow:
        0 4px 16px var(--glass-shadow),
        inset 0 1px 0 var(--glass-highlight),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* プロジェクトカードのサムネイル表示 */
.project-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--glass-border);
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Liquid効果 - 流動的アニメーション */
.project-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.25) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.5s var(--glass-ease), transform 0.7s var(--glass-ease);
    pointer-events: none !important;
    z-index: 0;
}

.project-card:hover::before {
    opacity: 1;
    transform: translate(10%, 10%) scale(1.1);
}

.project-card:hover {
    border-color: var(--primary-blue);
    box-shadow:
        0 12px 32px var(--glass-shadow),
        inset 0 1px 0 var(--glass-highlight);
    transform: translateY(-4px) scale(1.01);
}

@supports not (backdrop-filter: blur(10px)) {
    .project-card {
        background: rgba(255, 255, 255, 0.95);
    }
    :root[data-theme="dark"] .project-card {
        background: rgba(30, 30, 30, 0.95);
    }
}

.project-card h3 {
    color: var(--glass-text);
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: 600;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95em;
    margin-bottom: 16px;
    line-height: 1.6;
}

.project-category {
    color: #0277BD;
    font-size: 1.2em;
    margin-top: 48px;
    margin-bottom: 20px;
    font-weight: 700;
    padding: 12px 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f9ff 100%);
    border-radius: 8px;
    border-left: 4px solid #0288D1;
}

.project-category:first-of-type {
    margin-top: 0;
}

.project-link {
    display: inline-block;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: color 0.2s ease;
    padding: 8px 12px;
    margin: -8px -12px;
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.project-link:hover {
    color: var(--primary-yellow);
}

.project-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #fff9e6 0%, #fffbea 100%);
    color: #856404;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    border: 2px solid #ffd60a;
    box-shadow: 0 2px 6px rgba(255, 214, 10, 0.2);
}

.music-list {
    list-style: none;
    margin-top: 24px;
}

.music-item {
    padding: 28px;
    margin: 20px 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #e3f2fd 100%);
    border-radius: 12px;
    border-left: 5px solid #0288D1;
    box-shadow: 0 2px 10px rgba(2, 136, 209, 0.1);
    transition: all 0.3s ease;
}

.music-item:hover {
    box-shadow: 0 4px 16px rgba(2, 136, 209, 0.15);
    transform: translateX(4px);
}

.music-item h3 {
    color: #0277BD;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 1.2em;
}

.music-item-featured {
    background: linear-gradient(135deg, #fff9e6 0%, #fffbea 100%);
    border-left: 5px solid #ffd60a;
    box-shadow: 0 4px 16px rgba(255, 214, 10, 0.2);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-top: 20px;
    border-radius: 12px;
    border: 3px solid #ffd60a;
    box-shadow: 0 6px 20px rgba(255, 214, 10, 0.25);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.music-item p {
    color: #6c757d;
    font-size: 0.95em;
}

.music-link {
    display: inline-block;
    margin-top: 10px;
    color: #0288D1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: color 0.2s ease;
}

.music-link:hover {
    color: #ffd60a;
}

/* プライバシーポリシーページはデフォルトの section スタイルを使用 */

footer {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    padding: 60px 40px;
    text-align: center;
    margin: 32px 24px 24px;
    border-radius: var(--glass-radius);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 8px 32px var(--glass-shadow),
        inset 0 1px 0 var(--glass-highlight),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    scroll-margin-top: 100px;
    position: relative;
    overflow: hidden;
}

/* Liquid効果 - 流動的 */
footer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.6s var(--glass-ease), transform 0.8s var(--glass-ease);
    pointer-events: none !important;
    z-index: 0;
}

footer:hover::before {
    opacity: 1;
    transform: translate(10%, 10%) scale(1.1);
}

@supports not (backdrop-filter: blur(10px)) {
    footer {
        background: rgba(255, 255, 255, 0.95);
    }
    :root[data-theme="dark"] footer {
        background: rgba(30, 30, 30, 0.95);
    }
}

footer h3 {
    color: #0288D1;
    margin-bottom: 24px;
    font-size: 1.5em;
    font-weight: 700;
}

.footer-content {
    margin: 20px 0 30px;
}

.footer-content p {
    margin: 8px 0;
    color: #6c757d;
    font-size: 0.95em;
}

.contact-email {
    margin-top: 16px !important;
    font-size: 1em !important;
    font-weight: 600;
}

.contact-email a {
    color: #0288D1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-email a:hover {
    color: #ffd60a;
}

.footer-section {
    margin: 30px 0;
}

.footer-section h4 {
    color: #0277BD;
    font-size: 1.1em;
    margin-bottom: 12px;
    font-weight: 600;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: #0288D1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffd60a;
}

/* モバイルに限定したフッター広告エリア */
.footer-ad-wrapper {
    display: none;
    margin-top: 24px;
}

.footer-ad-wrapper .adsbygoogle {
    display: block !important;
    margin: 0 auto;
}

@media (max-width: 768px) {
    /* パンくずリストのスマホ表示 */
    .breadcrumb {
        padding: 12px 16px;
        margin: 0 16px;
        margin-top: 12px;
    }

    .breadcrumb-list {
        font-size: 0.8em;
    }

    /* ハンバーガーメニューの表示 - UX改善版 */
    .mobile-menu-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 16px 24px;
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        position: fixed;
        top: 16px;
        left: 16px;
        right: 16px;
        z-index: 1004;
    }

    .hamburger {
        display: flex;
        position: relative;
        z-index: 1005;
    }

    /* モバイル用ドロップダウンメニュー - 通常のリンクとして表示 */
    .navbar .nav-dropdown {
        flex: none !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .navbar .nav-dropdown > .nav-link {
        display: none !important; /* "詳細 ▼" リンクを非表示 */
    }

    .navbar .dropdown-content {
        display: flex !important;
        flex-direction: column !important;
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        transform: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .navbar .dropdown-content a {
        flex: none !important;
        width: 100% !important;
        padding: 24px 32px !important;
        margin: 4px 0 !important;
        font-size: 1.1em !important;
        font-weight: 600 !important;
        border-bottom: none !important;
        border-left: 4px solid transparent !important;
        transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 16px !important;
        position: relative !important;
        overflow: hidden !important;
        z-index: 10 !important;
        color: var(--primary-blue) !important;
        text-decoration: none !important;
        text-align: left !important;
    }

    .navbar {
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        bottom: auto !important;
        left: auto !important;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: linear-gradient(165deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.85) 50%,
            rgba(227, 242, 253, 0.9) 100%);
        backdrop-filter: blur(40px) saturate(200%);
        -webkit-backdrop-filter: blur(40px) saturate(200%);
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
        justify-content: flex-start !important;
        transition: right 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                    box-shadow 0.6s ease,
                    background 0.6s ease;
        z-index: 1003;
        box-shadow:
            -12px 0 48px rgba(2, 136, 209, 0.15),
            -4px 0 16px rgba(2, 136, 209, 0.08),
            inset 1px 0 0 rgba(255, 255, 255, 0.8),
            inset -1px 0 60px rgba(255, 255, 255, 0.3);
        border-radius: 32px 0 0 32px !important;
        border-left: 2px solid rgba(255, 255, 255, 0.8);
        border-bottom: none !important;
        overflow-y: auto;
        overflow-x: hidden;
        padding-top: 100px !important;
        padding-bottom: 60px !important;
    }

    /* Liquid Glass 流動エフェクト */
    .navbar::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(
            circle at 30% 40%,
            rgba(2, 136, 209, 0.15) 0%,
            rgba(129, 212, 250, 0.1) 30%,
            transparent 70%
        );
        animation: liquidMenuFlow 8s ease-in-out infinite;
        pointer-events: none !important;
        opacity: 0;
        transition: opacity 0.8s ease;
        z-index: 0;
    }

    .navbar.active::before {
        opacity: 1;
    }

    @keyframes liquidMenuFlow {
        0%, 100% {
            transform: translate(0, 0) rotate(0deg) scale(1);
        }
        25% {
            transform: translate(-5%, 5%) rotate(5deg) scale(1.05);
        }
        50% {
            transform: translate(-10%, 10%) rotate(10deg) scale(1.1);
        }
        75% {
            transform: translate(-5%, 5%) rotate(5deg) scale(1.05);
        }
    }

    /* ダークモード対応 */
    :root[data-theme="dark"] .navbar {
        background: linear-gradient(165deg,
            rgba(30, 30, 35, 0.95) 0%,
            rgba(20, 25, 30, 0.9) 50%,
            rgba(15, 20, 30, 0.92) 100%);
        box-shadow:
            -12px 0 48px rgba(0, 0, 0, 0.5),
            -4px 0 16px rgba(0, 0, 0, 0.3),
            inset 1px 0 0 rgba(255, 255, 255, 0.1),
            inset -1px 0 60px rgba(100, 181, 246, 0.1);
        border-left: 2px solid rgba(100, 181, 246, 0.3);
    }

    :root[data-theme="dark"] .navbar::before {
        background: radial-gradient(
            circle at 30% 40%,
            rgba(100, 181, 246, 0.2) 0%,
            rgba(77, 208, 225, 0.1) 30%,
            transparent 70%
        );
    }

    :root[data-theme="dark"] .navbar::after {
        background: linear-gradient(135deg, #64b5f6 0%, #4dd0e1 50%, #80deea 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    :root[data-theme="dark"] .nav-link::after {
        background: radial-gradient(
            circle,
            rgba(100, 181, 246, 0.15) 0%,
            rgba(77, 208, 225, 0.1) 50%,
            transparent 100%
        );
    }

    :root[data-theme="dark"] .nav-link:hover {
        background: linear-gradient(90deg,
            rgba(26, 35, 50, 0.6) 0%,
            rgba(26, 35, 50, 0.3) 50%,
            transparent 100%);
        color: #64b5f6;
    }

    @supports not (backdrop-filter: blur(10px)) {
        .navbar {
            background: rgba(255, 255, 255, 0.98);
        }
        :root[data-theme="dark"] .navbar {
            background: rgba(20, 20, 20, 0.98);
        }
    }

    .navbar.active {
        right: 0 !important;
    }

    .navbar::after {
        content: 'メニュー';
        position: absolute;
        top: 32px;
        left: 32px;
        font-size: 1.8em;
        font-weight: 800;
        background: linear-gradient(135deg, #0288D1 0%, #03a9f4 50%, #4dd0e1 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        letter-spacing: 0.5px;
        z-index: 5;
        text-shadow: 0 2px 20px rgba(2, 136, 209, 0.3);
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        pointer-events: none !important;
    }

    .navbar.active::after {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.2s;
    }

    .nav-link {
        flex: none !important;
        width: 100% !important;
        padding: 24px 32px !important;
        margin: 4px 0 !important;
        font-size: 1.1em !important;
        font-weight: 600 !important;
        border-bottom: none !important;
        border-left: 4px solid transparent !important;
        transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 16px !important;
        position: relative !important;
        overflow: hidden !important;
        z-index: 10 !important;
        color: var(--primary-blue) !important;
        text-decoration: none !important;
        text-align: left !important;
        /* タップ領域を最適化 - 最小44x44px推奨 */
        min-height: 56px !important;
        /* アクティブフィードバック */
        -webkit-tap-highlight-color: rgba(2, 136, 209, 0.2) !important;
    }

    /* メニューが閉じている時はリンクを非表示 */
    .navbar:not(.active) .nav-link {
        opacity: 0 !important;
        transform: translateX(-30px) !important;
        pointer-events: none;
    }

    /* メニュー開閉時のリンクアニメーション */
    .navbar.active .nav-link {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
        animation: slideInLiquid 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .navbar.active .nav-link:nth-child(1) {
        animation-delay: 0.1s;
    }

    .navbar.active .nav-link:nth-child(2) {
        animation-delay: 0.2s;
    }

    .navbar.active .nav-link:nth-child(3) {
        animation-delay: 0.3s;
    }

    .navbar.active .nav-link:nth-child(4) {
        animation-delay: 0.4s;
    }

    @keyframes slideInLiquid {
        0% {
            opacity: 0;
            transform: translateX(-30px);
        }
        60% {
            transform: translateX(5px);
        }
        100% {
            opacity: 1;
            transform: translateX(0);
        }
    }

    /* Liquid Glass ripple 効果 */
    .nav-link::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        width: 0;
        height: 0;
        background: radial-gradient(
            circle,
            rgba(2, 136, 209, 0.15) 0%,
            rgba(129, 212, 250, 0.1) 50%,
            transparent 100%
        );
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                    height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
        z-index: -1;
    }

    .nav-link:hover {
        background: linear-gradient(90deg,
            rgba(227, 242, 253, 0.6) 0%,
            rgba(227, 242, 253, 0.3) 50%,
            transparent 100%);
        border-left-color: #ffd60a;
        padding-left: 40px;
        color: #0277BD;
        transform: translateX(4px);
    }

    .nav-link:hover::after {
        width: 500px;
        height: 500px;
    }

    .nav-link::before {
        font-size: 1.5em;
        transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                    filter 0.3s ease;
        filter: drop-shadow(0 2px 4px rgba(2, 136, 209, 0.2));
    }

    .nav-link:hover::before {
        transform: scale(1.3) rotate(10deg);
        filter: drop-shadow(0 4px 8px rgba(2, 136, 209, 0.4));
    }

    .nav-link:active {
        transform: translateX(2px) scale(0.98);
    }

    /* モバイルのハンバーガーメニューでの絵文字アイコンは非表示にする */
    /* 以前は nth-child で絵文字を付与していたが、可読性と統一感のため削除 */
    /* .nav-link::before のスタイルは保持しつつ、content は設定しない */

    .has-mobile-menu .container {
        padding-top: 80px;
    }

    header {
        padding: 50px 20px 40px;
        margin: 0 16px;
    }

    header h1 {
        font-size: 2em;
    }

    section {
        margin: 20px 16px;
        padding: 36px 24px;
    }

    section h2 {
        font-size: 1.7em;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    /* モバイルのフッター余白を圧縮して下部の空白を軽減 */
    footer {
        margin: 20px 16px 12px;
        padding: 32px 20px 24px;
    }

    /* フッターのレスポンシブ対応 */
    footer > div {
        -webkit-box-orient: vertical !important;
        -webkit-box-direction: normal !important;
        -webkit-flex-direction: column !important;
        -ms-flex-direction: column !important;
        flex-direction: column !important;
        -webkit-box-align: center !important;
        -webkit-align-items: center !important;
        -ms-flex-align: center !important;
        align-items: center !important;
        gap: 24px !important;
    }

    footer > div > div:first-child {
        text-align: center !important;
        width: 100%;
    }

    footer > div > div:first-child p {
        font-size: 0.85em !important;
        text-align: center !important;
    }

    footer > div > div:last-child {
        -webkit-box-orient: vertical !important;
        -webkit-box-direction: normal !important;
        -webkit-flex-direction: column !important;
        -ms-flex-direction: column !important;
        flex-direction: column !important;
        -webkit-box-align: center !important;
        -webkit-align-items: center !important;
        -ms-flex-align: center !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100%;
        text-align: center;
    }

    footer > div > div:last-child a {
        font-size: 0.85em !important;
    }

    .footer-ad-wrapper {
        display: block;
        width: 100%;
    }

    /* 広告未表示時に余白が膨らまないようにする */
    .footer-ad-wrapper .adsbygoogle {
        min-height: 0;
    }

}
