:root {
    --bg-color: #fcfaf7;
    /* もっと薄い生成り色 */
    --text-color: #2a2a2a;
    /* より柔らかな墨色 */
    --accent-color-1: #e4a1c1;
    /* 桜色 */
    --accent-color-2: #7d9d85;
    /* 常磐色 */
    --accent-color-3: #f7e7ce;
    /* 練色 */
    --font-family: 'Shippori Mincho', serif;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    color-scheme: light;
    /* 明示的にライトに固定 */
}

body {
    background-color: var(--bg-color);
    /* ノイズテクスチャを加えて和紙のような質感を表現 */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.8;
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
}

/* Global content links (avoid default blue/purple) */
a {
    color: var(--accent-color-2);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
    text-decoration-color: rgba(125, 157, 133, 0.45);
}

a:hover {
    color: var(--accent-color-1);
    text-decoration-color: rgba(228, 161, 193, 0.7);
}

a:visited {
    color: var(--accent-color-2);
}

/* Do not affect header nav and button-like elements already styled */
.site-nav a,
.btn,
.brand,
.chip,
.seg-btn {
    text-decoration: none;
}

/* システムカーソルはfine pointerのみ非表示 */
@media (pointer: fine) {
    body {
        cursor: none;
    }
}

@media (pointer: coarse) {
    .cursor {
        display: none;
    }
}

/* スキップリンク */
.skip-link {
    position: absolute;
    left: 8px;
    top: -40px;
    z-index: 10000;
    background: #fff;
    color: #000;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.skip-link:focus {
    top: 8px;
}

/* キーボードフォーカス可視化 */
:focus-visible {
    outline: 2px solid var(--accent-color-1);
    outline-offset: 3px;
}

/* カスタムカーソル (モダン & 見やすく) */
.cursor {
    width: 36px;
    height: 36px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, rgba(228, 161, 193, 0.7), rgba(125, 157, 133, 0.7)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        height 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 0.2s ease;
    z-index: 9999;
    box-shadow: 0 0 12px rgba(228, 161, 193, 0.3),
        inset 0 0 8px rgba(255, 255, 255, 0.3);
}

.cursor::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: rgba(228, 161, 193, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(228, 161, 193, 0.6),
        0 0 16px rgba(125, 157, 133, 0.4);
    backdrop-filter: blur(2px);
}


/* ヒーローセクション */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 5vh 5vw;
    background: linear-gradient(135deg,
            rgba(247, 231, 206, 0.15) 0%,
            rgba(228, 161, 193, 0.05) 30%,
            rgba(125, 157, 133, 0.04) 70%,
            rgba(247, 231, 206, 0.15) 100%);
}

/* ブランドナビゲーション */
.brand-navigation {
    display: flex;
    gap: 20px;
    margin-bottom: 3rem;
    justify-content: center;
    flex-wrap: wrap;
}

.brand-tab {
    padding: 1.5rem 2rem;
    border: 2px solid var(--accent-color-1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: rgba(255, 255, 255, 0.7);
    min-width: 200px;
}

.brand-tab.active {
    background: var(--accent-color-1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(228, 161, 193, 0.3);
}

.brand-tab h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.brand-tab p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ミニブランド用スタイル */
.brand-intro {
    background: rgba(125, 157, 133, 0.1);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-color-2);
}

.work-section.mini {
    border-left: 4px solid var(--accent-color-2);
    padding-left: 1rem;
}

.work-features {
    background: rgba(247, 231, 206, 0.3);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.work-features h5 {
    margin-bottom: 0.5rem;
    color: var(--accent-color-2);
}

.work-features ul {
    list-style-type: none;
    padding-left: 0;
}

.work-features li {
    padding: 0.2rem 0;
    position: relative;
    padding-left: 1rem;
}

.work-features li:before {
    content: "◦";
    color: var(--accent-color-2);
    position: absolute;
    left: 0;
}

.store-info {
    background: linear-gradient(135deg, rgba(228, 161, 193, 0.1), rgba(125, 157, 133, 0.1));
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    text-align: center;
    border: 2px solid rgba(228, 161, 193, 0.2);
}

.store-info h3 {
    color: var(--accent-color-2);
    margin-bottom: 1rem;
}

.placeholder-image {
    background: rgba(125, 157, 133, 0.1);
    padding: 3rem 2rem;
    border-radius: 8px;
    text-align: center;
    color: var(--accent-color-2);
    font-style: italic;
    border: 2px dashed rgba(125, 157, 133, 0.3);
}

/* プロジェクト詳細 */
.project-details {
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--accent-color-2);
}

.project-details p {
    margin-bottom: 0.5rem;
}

.hero-content {
    max-width: 800px;
    animation: heroFadeIn 2s ease-out;
    background:
        /* 花柄パターン（より淡く調整） */
        radial-gradient(circle at 15% 20%, rgba(228, 161, 193, 0.15) 0%, transparent 25%),
        radial-gradient(ellipse 12px 18px at 25% 35%, rgba(125, 157, 133, 0.12) 0%, transparent 60%),
        radial-gradient(circle at 45% 15%, rgba(247, 231, 206, 0.18) 0%, transparent 22%),
        radial-gradient(ellipse 10px 15px at 65% 25%, rgba(228, 161, 193, 0.1) 0%, transparent 70%),
        radial-gradient(circle at 80% 30%, rgba(125, 157, 133, 0.15) 0%, transparent 28%),
        radial-gradient(ellipse 15px 10px at 20% 60%, rgba(247, 231, 206, 0.15) 0%, transparent 55%),
        radial-gradient(circle at 70% 65%, rgba(228, 161, 193, 0.12) 0%, transparent 24%),
        radial-gradient(ellipse 12px 16px at 85% 75%, rgba(125, 157, 133, 0.1) 0%, transparent 65%),
        radial-gradient(circle at 35% 80%, rgba(247, 231, 206, 0.15) 0%, transparent 26%),
        radial-gradient(ellipse 14px 11px at 55% 85%, rgba(228, 161, 193, 0.08) 0%, transparent 60%),
        /* 微細な点々パターン */
        radial-gradient(circle at 10% 40%, rgba(228, 161, 193, 0.08) 0%, transparent 6px),
        radial-gradient(circle at 90% 20%, rgba(125, 157, 133, 0.06) 0%, transparent 4px),
        radial-gradient(circle at 75% 50%, rgba(247, 231, 206, 0.1) 0%, transparent 5px),
        radial-gradient(circle at 30% 90%, rgba(228, 161, 193, 0.05) 0%, transparent 6px),
        /* ベースグラデーション */
        linear-gradient(135deg,
            rgba(247, 231, 206, 0.25) 0%,
            rgba(228, 161, 193, 0.05) 25%,
            rgba(250, 248, 243, 0.3) 50%,
            rgba(125, 157, 133, 0.04) 75%,
            rgba(247, 231, 206, 0.25) 100%);
    padding: 4vh 4vw;
    border-radius: 20px;
    box-shadow:
        0 15px 50px rgba(228, 161, 193, 0.2),
        0 8px 20px rgba(125, 157, 133, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(228, 161, 193, 0.25);
}

.main-title {
    font-size: 4rem;
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: 0.2em;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--accent-color-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(228, 161, 193, 0.1);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 3rem;
    font-weight: 400;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 2;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

.hero-description p {
    margin-bottom: 1.5rem;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ナビゲーション */
#nav-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    z-index: 500;
    cursor: none;
    opacity: 1;
    transition: opacity 1s;
}

.bud {
    width: 10px;
    height: 10px;
    background-color: var(--text-color);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

#nav-trigger:hover .bud {
    transform: translate(-50%, -50%) scale(1.5);
    box-shadow: 0 0 15px var(--accent-color-1);
}

#navigation {
    position: fixed;
    bottom: 50px;
    right: 50px;
    z-index: 499;
    opacity: 0;
    pointer-events: none;
    transform: translate(20px, 20px);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

#navigation.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, 0);
}

#navigation ul {
    list-style: none;
    text-align: right;
}

#navigation ul li {
    margin: 15px 0;
}

#navigation ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s, letter-spacing 0.3s;
}

#navigation ul li a:hover {
    color: var(--accent-color-1);
    letter-spacing: 0.1em;
}


/* メインコンテンツ */
#main-content {
    opacity: 1;
    padding: 0 5vw;
}


/* 各セクション共通 */
.creation-section,
.about-section,
.hero-section,
footer {
    padding: 10vh 5vw;
    position: relative;
    overflow: hidden;
    /* For background patterns */
}

/* --- 背景紋様の定義 --- */

/* Generic ::before styles for patterns */
.hero-section::before,
#fashion::before,
#interior::before,
#ezo::before,
#journal::before,
#ohana-robot::before,
#about::before,
#hanaran::before,
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.8;
}


/* Hero: 氷 (こおり) - Subtle Stripes */
/* 作品セクション: 春 - 桜とつぼみの季節 */
.hero-section::before,
#works::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.5;
    background:
        /* 春の花びらパターン */
        radial-gradient(circle at 20% 30%, rgba(255, 182, 193, 0.2) 0%, rgba(255, 182, 193, 0.1) 30%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(152, 251, 152, 0.15) 0%, rgba(152, 251, 152, 0.08) 25%, transparent 55%),
        radial-gradient(circle at 70% 80%, rgba(255, 239, 213, 0.18) 0%, rgba(255, 239, 213, 0.1) 35%, transparent 65%);
}

/* Fashion: 撫子 (なでしこ) - Hemp Leaf Pattern */
#fashion::before {
    background-color: #e5a6c5;
    /* 紅梅色 */
    background-image:
        linear-gradient(30deg, #9e3d3f 12%, transparent 12.5%, transparent 87%, #9e3d3f 87.5%, #9e3d3f),
        linear-gradient(150deg, #9e3d3f 12%, transparent 12.5%, transparent 87%, #9e3d3f 87.5%, #9e3d3f),
        linear-gradient(30deg, #9e3d3f 12%, transparent 12.5%, transparent 87%, #9e3d3f 87.5%, #9e3d3f),
        linear-gradient(150deg, #9e3d3f 12%, transparent 12.5%, transparent 87%, #9e3d3f 87.5%, #9e3d3f),
        linear-gradient(60deg, #9e3d3f 25%, transparent 25.5%, transparent 75%, #9e3d3f 75%, #9e3d3f),
        linear-gradient(120deg, #9e3d3f 25%, transparent 25.5%, transparent 75%, #9e3d3f 75%, #9e3d3f);
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
}

/* Interior: 菖蒲 (しょうぶ) - Polka Dots */
#interior::before {
    background-color: #f2f2f2;
    /* 白 */
    background-image: radial-gradient(#aacf53 20%, transparent 20%);
    /* 萌黄 */
    background-size: 30px 30px;
}

/* Ezo: 橘 (たちばな) - Checkered Pattern */
#ezo::before {
    background-color: #917347;
    /* 朽葉色 */
    background-image:
        linear-gradient(45deg, #fef263 25%, transparent 25%, transparent 75%, #fef263 75%, #fef263),
        linear-gradient(45deg, #fef263 25%, transparent 25%, transparent 75%, #fef263 75%, #fef263);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
}

/* 思考の記録: 夏 - 緑深い季節 */
#journal::before {
    background-color: rgba(34, 139, 34, 0.15);
    /* 夏の深緑 */
    background-image: repeating-linear-gradient(45deg, rgba(0, 128, 0, 0.12), rgba(0, 128, 0, 0.12) 10px, transparent 10px, transparent 20px);
    /* 濃緑ストライプ */
}

/* プロジェクト: 秋 - 紅葉の季節 */
#ohana-robot::before {
    background-color: rgba(205, 133, 63, 0.18);
    /* 秋の茶色 */
    background-image: linear-gradient(rgba(255, 140, 0, 0.15) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 69, 0, 0.12) 1px, transparent 1px);
    /* オレンジと赤のグリッド */
    background-size: 20px 20px;
}

/* About: 百合 (ゆり) - Elegant Thin Stripes */
#about::before {
    background-color: #f2f2f2;
    /* 白 */
    background-image: repeating-linear-gradient(120deg, #9d896c, #9d896c 1px, transparent 1px, transparent 40px);
    /* 檜皮色 */
}

/* Hanaran: 常夏 (とこなつ) - Soft Dots */
#hanaran::before {
    background-color: #c8385a;
    /* 濃紅 */
    background-image: radial-gradient(circle, #a22042 25%, transparent 25%);
    /* 濃紅 (裏) */
    background-size: 50px 50px;
}


/* フッター: 冬 - 雪と静寂の季節 */
footer::before {
    background: linear-gradient(to bottom, rgba(176, 196, 222, 0.2), rgba(119, 136, 153, 0.15));
    /* 冬の青灰色 */
}

/* コンテンツエリアのパネル */
.content-panel {
    background: rgba(255, 255, 255, 0.64);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    backdrop-filter: blur(6px) saturate(120%);
    padding: 5vh 5vw;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 小見出し（ハイライト／一覧） */
.section-subhead {
    margin: 16px 0 8px;
    font-size: 1rem;
    letter-spacing: .12em;
    color: #666;
}

.creation-section,
.about-section {
    padding: 10vh 0;
    border-top: none;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1.5s, transform 1.5s;
}

.creation-section.visible,
.about-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 動画プレビューのスタイル */
.work-video-preview {
    margin: 20px auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    max-width: 60%;
}

.work-media-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.work-main-image,
.work-video-preview {
    flex: 1;
    min-width: 0;
}

.work-main-image img,
.work-video-preview video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}


.section-title-wrapper {
    text-align: center;
    margin-bottom: 8vh;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1rem;
    color: #888;
}

/* グリッドレイアウト */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
    background: #fff;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    z-index: 2;
}

.grid-item.wide {
    grid-column: span 2;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    transition: transform 0.6s ease;
}

.grid-item:hover img {
    transform: scale(1.05);
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3), transparent);
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    border-radius: 0 0 8px 8px;
}

.grid-item:hover .item-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* 音楽セクション */
.music-player {
    display: flex;
    max-width: 800px;
    margin: 0 auto;
    background-color: #222;
    padding: 30px;
}

.music-player img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    margin-right: 30px;
}

.music-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.music-info p {
    margin-bottom: 20px;
}

.music-info audio {
    width: 100%;
}

audio::-webkit-media-controls-panel {
    background-color: #333;
}

audio::-webkit-media-controls-enclosure {
    border-radius: 0;
}


/* Aboutセクション */
.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    gap: 40px;
}

.profiles-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.about-content img {
    width: 40%;
    height: auto;
}

.about-text {
    font-size: 1.1rem;
    line-height: 2;
}

/* フッター (Contact) */
footer {
    text-align: center;
    padding: 10vh 0;
    border-top: 1px solid #333;
}

footer a {
    color: var(--accent-color-2);
    text-decoration: none;
    font-size: 1.2rem;
    display: block;
    margin: 1rem 0;
}

.copyright {
    margin-top: 5vh;
    font-size: 0.8rem;
    color: #666;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .grid-item.wide {
        grid-column: span 1;
    }

    .music-player {
        flex-direction: column;
    }

    .music-player img {
        width: 100%;
        height: auto;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .about-content img {
        width: 80%;
    }

    .vertical-text {
        font-size: 2rem;
    }
}

/* おはな研究所ミニ（トップのカード）サムネイルを正方形＆上寄せでクロップ */
#line-ohana-mini .work-image-container {
    aspect-ratio: 1 / 1;
    /* 正方形 */
}

#line-ohana-mini .work-image-container img {
    width: 100%;
    height: 100%;
    /* コンテナにフィット */
    object-fit: cover;
    /* はみ出しつつカバー */
    object-position: 50% 40%;
    /* 縦位置を少し上寄せ（中央=50%） */
}

/* おはな研究所ミニのサムネ用バッジ（左下・共通） */
#line-ohana-mini .thumb-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .95rem;
    backdrop-filter: blur(2px);
    z-index: 3;
    pointer-events: none;
}

/* style.cssへの追記 */

/* Grid ItemのRead Moreリンク */
.read-more {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.8rem;
    transition: background-color 0.3s, color 0.3s;
}

.read-more:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}


/* Journal Section */
.journal-list {
    max-width: 800px;
    margin: 0 auto;
}

.journal-item {
    display: block;
    padding: 30px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: var(--text-color);
    transition: background-color 0.4s, border-color 0.4s;
}

.journal-item:first-child {
    border-top: 1px solid #eee;
}


.journal-item h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: #ccc;
}

.journal-item p {
    line-height: 1.8;
    margin-bottom: 15px;
}

.journal-date {
    font-size: 0.9rem;
    color: #666;
}

/* イントロの微調整 */
#intro {
    transition: opacity 1.5s ease-in-out;
}

.intro-logo {
    animation: fadeInOut 6s infinite;
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }
}

/* 浮遊する花びらのアニメーション */
.floating-petals {
    display: none;
    /* disable falling petals */
}

.petal {
    position: absolute;
    width: 6px;
    height: 6px;
    background: linear-gradient(45deg, rgba(228, 161, 193, 0.8), rgba(247, 231, 206, 0.6));
    border-radius: 50% 20% 50% 20%;
    animation: float 12s infinite ease-in-out;
    opacity: 0.4;
    box-shadow: 0 0 4px rgba(228, 161, 193, 0.3);
}

.petal:nth-child(2n) {
    background: linear-gradient(45deg, rgba(125, 157, 133, 0.6), rgba(228, 161, 193, 0.4));
    animation-duration: 15s;
    border-radius: 60% 40% 60% 40%;
    width: 4px;
    height: 4px;
}

.petal:nth-child(3n) {
    background: linear-gradient(45deg, rgba(247, 231, 206, 0.7), rgba(228, 161, 193, 0.5));
    animation-duration: 18s;
    border-radius: 70% 30% 70% 30%;
    width: 5px;
    height: 5px;
}

@keyframes float {
    0% {
        transform: translateY(-100px) translateX(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(100vh) translateX(30px) rotate(180deg);
        opacity: 0;
    }
}

/* 回転する小花エフェクト */
.section-title-wrapper {
    position: relative;
}

.rotating-flower {
    position: absolute;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #ff9eb5, #ffc0cb);
    border-radius: 50%;
    animation: rotateAroundTitle 20s linear infinite;
}

.rotating-flower::before,
.rotating-flower::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #ffeaa7, #fdcb6e);
    border-radius: 50%;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
}

.rotating-flower::after {
    top: auto;
    bottom: -3px;
    background: radial-gradient(circle, #a8e6cf, #88d8c0);
}

@keyframes rotateAroundTitle {
    0% {
        transform: rotate(0deg) translateX(80px) rotate(0deg);
    }

    100% {
        transform: rotate(360deg) translateX(80px) rotate(-360deg);
    }
}

/* 光の粒子エフェクト */
.light-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent);
    border-radius: 50%;
    animation: sparkle 4s infinite ease-in-out;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 揺れる要素 */
.swaying-element {
    animation: sway 6s infinite ease-in-out;
    transform-origin: bottom center;
}

@keyframes sway {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(1deg);
    }

    75% {
        transform: rotate(-1deg);
    }
}

/* グリッドアイテムのホバー時花開きエフェクト */
.grid-item {
    position: relative;
    overflow: hidden;
    transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
}

.grid-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 192, 203, 0.3), rgba(255, 182, 193, 0.2), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease-out;
    pointer-events: none;
    z-index: 2;
}

.grid-item:hover::before {
    width: 150px;
    height: 150px;
    opacity: 0.7;
}

/* セクションタイトルの装飾強化 */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color-1), transparent, var(--accent-color-1));
    transform: translateX(-50%);
    animation: glow 3s infinite ease-in-out;
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px var(--accent-color-1);
    }

    50% {
        box-shadow: 0 0 15px var(--accent-color-1), 0 0 25px var(--accent-color-1);
    }
}

/* テーマセクションのスタイル */
.theme-section {
    margin: 6vh 0;
    padding: 4vh 0;
    border-top: 1px solid rgba(136, 201, 179, 0.3);
}

.theme-section:first-child {
    border-top: none;
}

.theme-title {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 3vh;
    text-align: center;
    color: var(--accent-color-2);
    position: relative;
}

.theme-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 30px;
    height: 1px;
    background: var(--accent-color-1);
    transform: translateX(-50%);
}

/* ジャーナルグリッドレイアウト */
.journal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.journal-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(136, 201, 179, 0.2);
}

.journal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(136, 201, 179, 0.2);
}

.journal-card.philosophy {
    background: linear-gradient(135deg, rgba(136, 201, 179, 0.1), rgba(90, 105, 96, 0.1));
    border: 1px solid rgba(136, 201, 179, 0.3);
}

.journal-card h3 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--text-color);
}

.journal-card p {
    line-height: 1.7;
    margin-bottom: 15px;
    color: #555;
}

.journal-date {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
}

/* プロジェクトコンテンツ */
.project-content {
    display: flex;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    gap: 40px;
}

.project-content img {
    width: 40%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.project-text h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--text-color);
}

.project-text p {
    line-height: 1.8;
    margin-bottom: 20px;
    color: #555;
}

/* 最近の活動セクション */
.recent-activity {
    margin: 4vh 0;
    padding: 3vh 0;
    border-top: 1px solid rgba(136, 201, 179, 0.3);
    border-bottom: 1px solid rgba(136, 201, 179, 0.3);
}

.recent-activity h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 2vh;
    text-align: center;
    color: var(--accent-color-2);
}

.activity-links {
    max-width: 600px;
    margin: 0 auto;
}

.activity-link {
    display: block;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(136, 201, 179, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.activity-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(136, 201, 179, 0.2);
}

.activity-content h4 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.activity-content p {
    line-height: 1.6;
    margin-bottom: 10px;
    color: #555;
    font-size: 0.9rem;
}

.activity-date {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

/* 作品セクションの新しいスタイル */
.work-section {
    margin: 6vh 0;
    padding: 4vh 0;
    border-top: 1px solid rgba(136, 201, 179, 0.1);
}

.work-section:first-child {
    border-top: none;
}

.work-title {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 3vh;
    text-align: center;
    color: var(--accent-color-2);
    position: relative;
}

/* 制作記録（各作品ページ内のミニJournal） */
.work-journal {
    max-width: 760px;
    margin: 48px auto 0;
}

.work-journal header {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 16px;
    margin-bottom: 16px;
}

.work-journal h2 {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.work-journal time {
    color: #888;
    font-size: .95rem;
}

.work-journal .article-content {
    line-height: 1.9;
    font-size: 1.05rem;
}

.work-journal .article-content p {
    margin: 1rem 0;
}

.work-journal figure {
    margin: 20px auto;
    text-align: center;
}

.work-journal img,
.work-journal video {
    display: block;
    width: 100%;
    height: auto;
    max-width: 720px;
    margin: 0 auto;
    border-radius: 8px;
}

.work-journal figcaption {
    color: #888;
    font-size: .9rem;
    margin-top: 8px;
}

.work-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color-1), transparent);
    transform: translateX(-50%);
}

.work-content {
    display: flex;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    gap: 50px;
}

.work-content.reverse {
    flex-direction: row-reverse;
}

.work-image-container {
    flex: 0 0 40%;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(136, 201, 179, 0.2);
    transition: transform 0.3s ease;
}

.work-image-container:hover {
    transform: scale(1.02);
}

.work-image-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    transition: filter 0.3s ease;
}

.work-description {
    flex: 1;
    padding: 20px 0;
}

.work-description p {
    line-height: 1.8;
    margin-bottom: 20px;
    color: #555;
    font-size: 1rem;
}

.work-link {
    color: var(--accent-color-2);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.work-link:hover {
    border-bottom-color: var(--accent-color-2);
}

/* ギャラリースタイル */
.work-gallery {
    max-width: 800px;
    margin: 0 auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

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

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(136, 201, 179, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover img {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(136, 201, 179, 0.3);
}

.gallery-caption {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--accent-color-2);
    font-weight: 500;
}

/* Showreel / Hero Section */
.showreel {
    position: relative;
    width: 100%;
    height: 100vh;
    /* Full viewport height */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.reel .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.reel .slide.active {
    opacity: 1;
}

.reel video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85);
    /* 少し暗くして文字を読みやすく */
}

.reel-overlay {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    /* 文字背景に薄い黒 */
    backdrop-filter: blur(3px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.title-stack h1 {
    font-size: 4rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3em;
    line-height: 1.2;
}

.title-stack p {
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.reel-actions .btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.reel-actions .btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .project-content {
        flex-direction: column;
    }

    .project-content img {
        width: 80%;
    }

    .work-content {
        flex-direction: column;
        gap: 30px;
    }

    .work-content.reverse {
        flex-direction: column;
    }

    .work-image-container {
        flex: none;
        width: 100%;
    }


    .work-section {
        margin: 4vh 0;
        padding: 2vh 0;
    }

    .journal-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* 'お花の池・小鳥の森'の新しいレイアウト用スタイル */
.work-top-content {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.work-top-content .work-media-container {
    flex: 1 1 65%;
    /* 動画の幅を広げる */
    max-width: 65%;
}

.work-details-sidebar {
    flex: 1 1 35%;
    max-width: 35%;
}

.work-main-description {
    max-width: 1200px;
    margin: 30px auto 0;
    /* 上部にマージンを追加 */
    padding: 0 20px;
    /* 少しパディングを追加 */
}

/* 既存のwork-video-previewのmax-widthを上書き */
.work-top-content .work-video-preview {
    max-width: 100%;
}

/* 詳細ギャラリーのマージン調整 */
.work-gallery-extended {
    margin-top: 40px;
}

@media (max-width: 768px) {
    .work-top-content {
        flex-direction: column;
        gap: 30px;
    }

    .work-top-content .work-media-container,
    .work-top-content .work-details-sidebar {
        max-width: 100%;
    }
}

/* 植物園のししおどし：動画を小さめに */
#shishi-odoshi .work-media-container {
    flex: 0 0 auto;
    /* 既定の65%幅を解除 */
    max-width: 560px;
    /* 表示サイズを抑制 */
}

#shishi-odoshi .work-video-preview {
    max-width: 100%;
}

#shishi-odoshi .work-details-sidebar {
    flex: 1 1 auto;
    /* サイドを自然な幅配分に */
}

/* --- メディアギャラリー（座布団用） --- */
.media-gallery {
    width: 100%;
}

.media-gallery .main-media {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(136, 201, 179, 0.2);
    margin-bottom: 14px;
    aspect-ratio: 3 / 4;
    /* 縦写真に最適化（必要なら調整可） */
    background: #f6f6f6;
}

.media-gallery .main-media img.gallery-main,
.media-gallery .main-media .gallery-main-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-gallery .main-media img.gallery-main {
    transition: opacity 200ms ease;
}

/* おはな座布団釧路 専用のサイズ・比率調整 */
#ohana-zabuton-kushiro .work-media-container {
    flex: 0 0 auto;
    /* 共有レイアウトの65%指定を無効化 */
    max-width: 420px;
    /* 全体を小さくコンパクトに */
    margin: 0 auto;
    /* 左右中央寄せ */
}

#ohana-zabuton-kushiro .media-gallery .main-media {
    aspect-ratio: 1 / 1;
    /* 正方形に近い比率（正方形） */
}

#ohana-zabuton-kushiro .media-gallery .gallery-thumb img,
#ohana-zabuton-kushiro .media-gallery .gallery-thumb .placeholder-image {
    height: 64px;
    /* サムネも少し小さめに */
}

.media-gallery .thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.media-gallery .gallery-thumb {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.media-gallery .gallery-thumb img,
.media-gallery .gallery-thumb .placeholder-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(136, 201, 179, 0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease, outline-color 0.25s ease;
}

.media-gallery .gallery-thumb:hover .placeholder-image,
.media-gallery .gallery-thumb:hover img {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(136, 201, 179, 0.25);
}

.media-gallery .gallery-thumb.active .placeholder-image,
.media-gallery .gallery-thumb.active img {
    outline: 2px solid var(--accent-color-2);
}

@media (max-width: 768px) {
    .media-gallery .thumbs {
        grid-template-columns: repeat(5, 72px);
        overflow-x: auto;
    }
}

/* ===== Global Header ===== */
#site-header {
    position: sticky;
    top: 0;
    z-index: 600;
    backdrop-filter: saturate(120%) blur(8px);
    background: rgba(252, 250, 247, 0.7);
    border-bottom: 1px solid rgba(228, 161, 193, 0.2);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 5vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* removed header-controls */
.brand {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    letter-spacing: 0.08em;
}

.site-nav a {
    text-decoration: none;
    color: var(--text-color);
    margin-left: 16px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.site-nav a:hover {
    color: var(--accent-color-1);
}

.lang-link {
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    padding-left: 16px;
    margin-left: 12px;
}

/* Header on hero: stronger contrast for readability */
.on-hero .brand,
.on-hero .site-nav a,
.on-hero .header-controls .btn.small {
    color: #fff;
}

.on-hero .site-nav a:hover {
    color: #fff;
}

.on-hero {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.22));
    border-bottom: 0;
    /* ヒーローとヘッダーの隙間/線を消す */
}

.on-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(1200px 200px at 50% 0, rgba(0, 0, 0, 0.55), transparent 70%);
}

.on-hero .brand,
.on-hero .site-nav a {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 1px rgba(0, 0, 0, 0.7);
}

.on-hero .site-nav a {
    padding: 0;
    /* ヒーロー上では囲いを外す */
    border-radius: 0;
    background: none;
    border: 0;
}

.on-hero .site-nav a:hover {
    background: none;
}

/* --- Header/nav: mobile micro adjustments --- */
@media (max-width: 768px) {
    .site-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 12px;
        /* 行間と列間の最小余白 */
        justify-content: flex-end;
    }

    .site-nav a {
        margin-left: 0;
        /* 先頭要素の余白ズレを解消 */
        line-height: 1.4;
        /* タップしやすい行高に */
    }

    .lang-link {
        /* 行折返し時に境界線が見切れるのを防止 */
        border-left: 0;
        padding-left: 0;
        margin-left: 0;
    }
}

@media (max-width: 520px) {
    .site-nav a {
        font-size: 0.9rem;
    }
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid rgba(228, 161, 193, 0.5);
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.6);
    transition: all .25s ease;
}

.btn.small {
    padding: 6px 10px;
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(228, 161, 193, 0.2);
}

.btn.primary {
    background: var(--accent-color-1);
    color: #fff;
    border-color: transparent;
}

.hero-ctas {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 1.5rem 0 0.5rem;
}

.hero-note {
    font-size: .95rem;
    color: #666;
}

/* ===== Works Grid (overview) ===== */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 24px 0 8px;
}

.work-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.7);
    transition: transform .25s ease, box-shadow .25s ease;
}

.work-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.work-card .thumb {
    height: 120px;
    background: linear-gradient(135deg, rgba(228, 161, 193, .2), rgba(125, 157, 133, .15));
}

.work-card .thumb.thumb-video {
    background: linear-gradient(135deg, rgba(125, 157, 133, .2), rgba(247, 231, 206, .15));
}

.work-card .meta {
    padding: 12px;
}

.work-card .meta h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.work-card .meta p {
    font-size: .9rem;
    color: #666;
}

/* ===== Collaboration ===== */
.collab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 12px;
}

.collab-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 16px;
}

.collab-card h3 {
    margin-bottom: 6px;
}

.collab-card p {
    color: #555;
    margin-bottom: 8px;
}

.collab-card ul {
    list-style: none;
    padding: 0;
}

.collab-card li {
    position: relative;
    padding-left: 1em;
    margin: 6px 0;
}

.collab-card li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color-2);
}

.collab-cta {
    margin-top: 16px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.collab-cta .note {
    color: #666;
    font-size: .95rem;
}

/* ===== Parallax Forest ===== */
#forest {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.forest-layer {
    position: absolute;
    inset: 0;
    will-change: transform;
    opacity: 0.5;
}

.layer-canopy {
    background: radial-gradient(circle at 20% 30%, rgba(125, 157, 133, .12), transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(228, 161, 193, .1), transparent 45%),
        radial-gradient(circle at 60% 80%, rgba(247, 231, 206, .12), transparent 50%);
}

.layer-mid {
    background: repeating-linear-gradient(120deg, rgba(125, 157, 133, .08), rgba(125, 157, 133, .08) 2px, transparent 2px, transparent 18px);
}

.layer-ground {
    background: radial-gradient(ellipse at 50% 110%, rgba(125, 157, 133, .12), transparent 40%),
        radial-gradient(ellipse at 10% 120%, rgba(228, 161, 193, .1), transparent 35%),
        radial-gradient(ellipse at 90% 120%, rgba(247, 231, 206, .1), transparent 35%);
}

/* Ensure content sits above forest */
#bg-visuals {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

#main-content,
#navigation,
#nav-trigger,
#site-header {
    position: relative;
    z-index: 2;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .cursor {
        display: none;
    }

    .floating-petals,
    .light-particles,
    .rotating-flower,
    #bg-visuals .clouds {
        display: none;
    }

    .swaying-element {
        animation: none !important;
    }
}

/* specimen drawer removed */

/* ===== Field Notes Overlay ===== */
#notes-overlay {
    position: fixed;
    inset: 0;
    z-index: 700;
    background: rgba(0, 0, 0, 0.25);
    display: none;
    align-items: center;
    justify-content: center;
}

#notes-overlay.active {
    display: flex;
}

.notes-panel {
    width: min(640px, 92vw);
    max-height: 80vh;
    overflow: auto;
    background: linear-gradient(180deg, #fff, #fdfaf6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    padding: 16px 16px 20px;
    position: relative;
}

.notes-panel::before {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 12px;
    border: 1px dashed rgba(125, 157, 133, 0.35);
    pointer-events: none;
}

.notes-panel h3 {
    margin: 4px 0 10px;
}

.notes-panel .close {
    position: absolute;
    top: 10px;
    right: 10px;
}

.notes-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #333;
}

.notes-content blockquote {
    margin: 12px 0;
    padding: 10px 12px;
    border-left: 3px solid var(--accent-color-2);
    background: rgba(125, 157, 133, 0.06);
}

/* play mode removed */

/* Seed trail elements */
/* seed trail removed */

/* Theme variants via body class */
/* theme variants removed */

/* ===== Showreel (full-bleed hero) ===== */
.showreel {
    position: relative;
    height: 100svh;
    min-height: 560px;
    overflow: hidden;
}

.showreel .reel {
    position: absolute;
    inset: 0;
}

.showreel .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .8s ease;
}

.showreel .slide.active {
    opacity: 1;
}

.showreel video,
.showreel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.reel-overlay {
    position: relative;
    z-index: 2;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto auto auto;
    align-items: end;
    padding: 4vh 5vw;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.0) 55%, rgba(0, 0, 0, 0.45) 100%);
}

.reel-overlay.ripple-active {
    --rx: 50%;
    --ry: 50%;
}

.reel-overlay.ripple-active::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    left: calc(var(--rx) - 210px);
    top: calc(var(--ry) - 210px);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 60%);
    border-radius: 50%;
    pointer-events: none;
    transition: left .15s ease, top .15s ease;
}

/* (removed) hero overlay sky: using global background instead */
.logo-mark {
    position: absolute;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    opacity: 0.9;
}

.logo-mark .core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.logo-mark .petal {
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: 60% 40% 60% 40%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.5));
    filter: blur(0.2px);
}

.logo-mark .petal.a {
    top: 0;
    left: 50%;
    transform: translateX(-50%) rotate(12deg);
}

.logo-mark .petal.b {
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(102deg);
}

.logo-mark .petal.c {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) rotate(192deg);
}

.logo-mark .petal.d {
    left: 0;
    top: 50%;
    transform: translateY(-50%) rotate(282deg);
}

.title-stack {
    color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.title-stack h1 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    letter-spacing: .12em;
    font-weight: 500;
}

.title-stack p {
    margin-top: .5rem;
    font-size: clamp(1rem, 2vw, 1.2rem);
    opacity: .9;
}

.reel-actions {
    margin-top: 1rem;
    display: flex;
    gap: 12px;
}

.reel-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.reel-actions .btn.primary {
    background: rgba(255, 255, 255, 0.85);
    color: #2a2a2a;
}

.reel-spots {
    margin-top: 1.2rem;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.reel-spots .spot {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: .95rem;
    cursor: pointer;
}

.scroll-cue {
    margin-top: 1rem;
    color: #fff;
    opacity: .75;
    font-size: .85rem;
    letter-spacing: .3em;
    text-transform: uppercase;
}

/* Nav link underline flourish */
.site-nav a {
    position: relative;
}

.site-nav a::after {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: -3px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color-1), transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s ease;
}

.site-nav a:hover::after {
    transform: scaleX(1);
}

/* ===== Background Visuals ===== */
#bg-visuals .mountains {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 32vh;
    opacity: .7;
    will-change: transform;
}

#bg-visuals .mountains path {
    vector-effect: non-scaling-stroke;
}

#bg-visuals .mountains .m-back {
    fill: rgba(164, 188, 206, 0.18);
}

/* 薄藍 */
#bg-visuals .mountains .m-mid {
    fill: rgba(125, 157, 133, 0.22);
}

/* 常磐 */
#bg-visuals .mountains .m-fore {
    fill: rgba(228, 161, 193, 0.20);
}

/* 桜 */
#bg-visuals .mountains .ridge {
    fill: none;
    stroke: rgba(255, 255, 255, 0.14);
    stroke-width: 1;
}

#ohana-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Silk veils (薄い絹の襲ね色) */
.silk-veils {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.silk-veils .veil {
    position: absolute;
    inset: -10% -10%;
    opacity: 0.25;
    mix-blend-mode: screen;
    filter: blur(8px);
    animation: driftVeil 60s linear infinite;
}

.silk-veils .veil.a {
    background: linear-gradient(120deg, rgba(228, 161, 193, 0.25), rgba(247, 231, 206, 0.2) 40%, transparent 70%);
    animation-duration: 72s;
}

.silk-veils .veil.b {
    background: linear-gradient(200deg, rgba(125, 157, 133, 0.22), rgba(164, 188, 206, 0.18) 45%, transparent 75%);
    animation-duration: 64s;
    animation-direction: reverse;
}

.silk-veils .veil.c {
    background: radial-gradient(60% 80% at 70% 30%, rgba(255, 255, 255, 0.22), transparent 60%), linear-gradient(45deg, rgba(255, 255, 255, 0.12), transparent 60%);
    opacity: 0.18;
    animation-duration: 80s;
}

@keyframes driftVeil {
    0% {
        transform: translate3d(-2%, -1%, 0) rotate(0.6deg);
    }

    50% {
        transform: translate3d(2%, 1%, 0) rotate(-0.6deg);
    }

    100% {
        transform: translate3d(-2%, -1%, 0) rotate(0.6deg);
    }
}

/* Sun and Clouds to enrich mountains */
#bg-visuals .sun {
    position: absolute;
    top: 6vh;
    left: 8vw;
    width: 22vmin;
    height: 22vmin;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 243, 214, 0.85) 0%, rgba(255, 243, 214, 0.55) 36%, rgba(255, 243, 214, 0.0) 70%);
    box-shadow: 0 0 120px rgba(255, 243, 214, 0.45);
    filter: saturate(1.1);
}

#bg-visuals .clouds {
    display: none;
}

#bg-visuals .clouds .cloud {
    position: absolute;
    width: 220px;
    height: 90px;
    opacity: 0.55;
    filter: blur(0.6px);
    background:
        radial-gradient(50px 40px at 30% 60%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.5) 60%, transparent 70%),
        radial-gradient(60px 50px at 55% 50%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.5) 60%, transparent 72%),
        radial-gradient(44px 36px at 75% 58%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.5) 60%, transparent 72%);
    border-radius: 50px;
    animation: driftCloud 64s linear infinite;
}

#bg-visuals .clouds .c1 {
    top: 10vh;
    left: -15vw;
    animation-duration: 70s;
}

#bg-visuals .clouds .c2 {
    top: 16vh;
    left: 20vw;
    animation-duration: 62s;
    animation-direction: reverse;
}

#bg-visuals .clouds .c3 {
    top: 8vh;
    left: 60vw;
    animation-duration: 58s;
}

#bg-visuals .clouds .c4 {
    top: 18vh;
    left: 85vw;
    width: 180px;
    height: 72px;
    opacity: 0.5;
    animation-duration: 66s;
    animation-direction: reverse;
}

@keyframes driftCloud {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(120vw);
    }
}

@media (prefers-reduced-motion: reduce) {
    /* background animation reduced */
}


/* ===== Works Stack (scrollytelling) ===== */
.works-stack {
    position: relative;
    margin: 0 -5vw 0;
}

.stack-item {
    height: 125vh;
    position: relative;
}

.stack-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.stack-sticky::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.0) 60%);
    pointer-events: none;
}

.stack-bg {
    position: absolute;
    inset: 0;
}

.stack-bg video,
.stack-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(105%) contrast(98%);
    transform: scale(1.05);
    transition: transform 1.2s ease, filter 1.2s ease;
}

.stack-item.is-active .stack-bg video {
    transform: scale(1);
    filter: saturate(110%) contrast(102%);
}

.stack-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 6vh 5vw;
    color: #fff;
    text-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
}

.stack-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: .9rem;
    margin-bottom: 10px;
}

.stack-overlay h3 {
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    letter-spacing: .06em;
    margin-bottom: .2rem;
}

.stack-overlay p {
    opacity: .9;
    margin-bottom: .6rem;
}

.stack-actions .btn {
    background: rgba(255, 255, 255, 0.9);
    color: #1f1f1f;
}

@media (max-width: 768px) {
    .stack-item {
        height: 110vh;
    }
}

/* Compact case sections below: reduce visual weight */
.work-section.enhanced.compact .work-top-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 14px;
}

.work-section.enhanced.compact .work-gallery-extended {
    display: none;
}

.work-section.enhanced.compact .work-main-description p {
    opacity: .85;
}

.work-section.enhanced.compact .work-technical-details h5 {
    opacity: .9;
}

.work-section.enhanced.compact .work-media-container .work-video-preview video {
    border-radius: 12px;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.15);
}

/* Hide case sections from the main flow; we use them in modal */
.case-hidden {
    display: none;
}

/* ===== Duo section ===== */
.duo-section {
    margin-top: 6vh;
}

.duo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.duo-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    padding: 12px;
    align-items: center;
}

.duo-photo img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.duo-text h3 {
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.duo-text p {
    font-size: .95rem;
    color: #444;
}

.duo-note {
    margin-top: 8px;
    color: #666;
    font-size: .95rem;
}

/* ===== Atlas (collage grid) ===== */
.atlas-section {
    margin-top: 5vh;
}

.atlas-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.chip.active {
    background: var(--accent-color-1);
    color: #fff;
    border-color: transparent;
}

/* quick toggles removed: keep styles minimal */
.atlas-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 16vw;
    gap: 10px;
}

.atlas-grid {
    position: relative;
}

.atlas-item {
    position: relative;
    grid-column: span 4;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    display: block;
    text-decoration: none;
}

.atlas-item video,
.atlas-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.atlas-item .label {
    position: absolute;
    left: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .9rem;
    backdrop-filter: blur(2px);
}

.atlas-item .meta {
    position: absolute;
    left: 10px;
    top: 10px;
    background: rgba(0, 0, 0, 0.32);
    color: #fff;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: .8rem;
    letter-spacing: .02em;
    backdrop-filter: blur(2px);
}

.atlas-item.span-2 {
    grid-column: span 8;
    grid-row: span 2;
}

.atlas-item.ph {
    background: repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.06) 6px, transparent 6px, transparent 12px);
}

/* Atlas: subtle "more" hint below the grid */
.atlas-more-hint {
    display: flex;
    justify-content: center;
    margin: 10px 0 2px;
}

.atlas-more-hint .more-wear-btn {
    appearance: none;
    border: 0;
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    cursor: pointer;
    color: rgba(0, 0, 0, 0.6);
    font-size: .95rem;
    letter-spacing: .02em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 12px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.atlas-more-hint .more-wear-btn:hover {
    color: rgba(0, 0, 0, 0.75);
    background: rgba(255, 255, 255, 0.92);
}

.atlas-more-hint .more-wear-btn:focus {
    outline: 2px solid rgba(0, 0, 0, 0.18);
    outline-offset: 2px;
}

.atlas-more-hint .arrow {
    display: inline-block;
    transform: translateY(-1px);
    opacity: .8;
}

/* Atlas: grid of suppressed wear items (same look as atlas) */
.atlas-more-list {
    margin-top: 8px;
}

.atlas-more-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 16vw;
    gap: 10px;
}

.atlas-more-actions {
    display: flex;
    justify-content: center;
    margin: 10px 0 2px;
}

.atlas-more-actions .more-wear-close-btn {
    appearance: none;
    border: 0;
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    cursor: pointer;
    color: rgba(0, 0, 0, 0.6);
    font-size: .95rem;
    letter-spacing: .02em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 12px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
    transition: opacity .4s ease .1s;
}

.atlas-more-actions .more-wear-close-btn:hover {
    color: rgba(0, 0, 0, 0.75);
    background: rgba(255, 255, 255, 0.92);
}

.atlas-more-actions .more-wear-close-btn:focus {
    outline: 2px solid rgba(0, 0, 0, 0.18);
    outline-offset: 2px;
}

.atlas-more-actions .arrow {
    display: inline-block;
    transform: translateY(-1px);
    opacity: .8;
}

/* Appear animation for more grid items */
.atlas-more-list.is-open .atlas-more-grid .atlas-item {
    opacity: 0;
    transform: translateY(12px);
    animation: atlasFadeUp .9s ease forwards;
}

@keyframes atlasFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes atlasFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(12px);
    }
}

/* Staggered delays for a refined feel */
.atlas-more-list.is-open .atlas-more-grid .atlas-item:nth-child(1) {
    animation-delay: .02s;
}

.atlas-more-list.is-open .atlas-more-grid .atlas-item:nth-child(2) {
    animation-delay: .05s;
}

.atlas-more-list.is-open .atlas-more-grid .atlas-item:nth-child(3) {
    animation-delay: .08s;
}

.atlas-more-list.is-open .atlas-more-grid .atlas-item:nth-child(4) {
    animation-delay: .11s;
}

.atlas-more-list.is-open .atlas-more-grid .atlas-item:nth-child(5) {
    animation-delay: .14s;
}

.atlas-more-list.is-open .atlas-more-grid .atlas-item:nth-child(6) {
    animation-delay: .17s;
}

.atlas-more-list.is-open .atlas-more-grid .atlas-item:nth-child(7) {
    animation-delay: .20s;
}

.atlas-more-list.is-open .atlas-more-grid .atlas-item:nth-child(8) {
    animation-delay: .23s;
}

.atlas-more-list.is-open .atlas-more-grid .atlas-item:nth-child(9) {
    animation-delay: .26s;
}

.atlas-more-list.is-open .atlas-more-grid .atlas-item:nth-child(10) {
    animation-delay: .29s;
}

.atlas-more-list.is-open .atlas-more-grid .atlas-item:nth-child(11) {
    animation-delay: .32s;
}

.atlas-more-list.is-open .atlas-more-grid .atlas-item:nth-child(12) {
    animation-delay: .35s;
}

@media (prefers-reduced-motion: reduce) {
    .atlas-more-list.is-open .atlas-more-grid .atlas-item {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Morph animation helper */
body.is-animating-more .atlas-more-actions .more-wear-close-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* While closing morph runs, hide real controls to avoid duplicates */
body.is-animating-close #atlas-more-hint {
    visibility: hidden;
}

body.is-animating-close .atlas-more-actions .more-wear-close-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.floating-more-btn {
    position: fixed;
    z-index: 900;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 12px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.9);
    color: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    transition: transform .9s ease, opacity .9s ease;
}

.floating-more-btn .arrow {
    transform: translateY(-1px);
    opacity: .85;
}

/* remove duplicate old hint styles */

@media (max-width: 920px) {
    .atlas-grid {
        grid-auto-rows: 28vw;
    }

    .atlas-item {
        grid-column: span 6;
    }

    .atlas-item.span-2 {
        grid-column: span 12;
    }

    .atlas-more-grid {
        grid-auto-rows: 28vw;
    }
}

@media (max-width: 520px) {
    .atlas-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-auto-rows: 32vw;
    }

    .atlas-item {
        grid-column: span 6;
    }

    .atlas-item.span-2 {
        grid-column: span 6;
        grid-row: span 1;
    }

    .atlas-more-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-auto-rows: 32vw;
    }
}

/* ===== Case Study Modal ===== */
#case-overlay {
    position: fixed;
    inset: 0;
    z-index: 720;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
}

#case-overlay.active {
    display: flex;
    animation: overlayIn .22s ease;
}

.case-panel {
    width: min(1200px, 96vw);
    max-height: 92vh;
    overflow: auto;
    background: linear-gradient(180deg, #fff, #fefbf7);
    position: relative;
    border: 0;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
    padding: 8px 0 12px;
}

/* 有機的な輪郭（長方形でない雰囲気） */
.case-panel {
    border-radius: 44px 30px 48px 34px / 38px 44px 34px 30px;
}

.case-panel .close {
    position: sticky;
    top: 8px;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
}

.case-panel .close:hover {
    background: rgba(0, 0, 0, 0.12);
}

.case-content {
    padding: 10px 18px 24px;
}

@keyframes overlayIn {
    0% {
        opacity: 0
    }

    100% {
        opacity: 1
    }
}

/* Modal-friendly layout for case clones */
.case-panel .is-modal .work-top-content {
    display: block;
}

.case-panel .is-modal .work-media-container {
    max-width: 100%;
}

.case-panel .is-modal .work-video-preview {
    max-width: 100%;
    margin: 0 0 16px;
    border-radius: 16px;
    overflow: hidden;
}

.case-panel .is-modal .work-video-preview video {
    display: block;
    margin: 0 auto;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
}

.case-panel .is-modal video {
    display: block;
    margin: 0 auto;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
}

.case-panel .is-modal .work-details-sidebar {
    max-width: 100%;
}

.case-panel .is-modal .work-title {
    text-align: left;
    color: var(--text-color);
    margin-top: 8px;
    font-size: 1.9rem;
    letter-spacing: .04em;
}

.case-panel .is-modal .work-main-description {
    margin-top: 10px;
}

/* Case meta pills and tidy info blocks */
.case-panel .is-modal .case-meta {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    background: rgba(0, 0, 0, 0.06);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: .92rem;
    margin: 6px 0 10px;
}

.case-panel .is-modal .work-technical-details,
.case-panel .is-modal .work-details {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 10px 12px;
    margin: 10px 0;
}

.case-panel .is-modal .work-technical-details h5 {
    margin-bottom: 6px;
    color: #546;
    font-weight: 500;
}

.case-panel .is-modal .work-technical-details ul {
    margin-left: 14px;
    line-height: 1.7;
}

.case-panel .is-modal .work-details p {
    margin: 2px 0;
    color: #444;
}

/* Portrait images (gallery) should also be constrained */
.case-panel .is-modal .work-image-gallery img {
    display: block;
    margin: 0 auto;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
}

/* Refine body text in modal for a designerly feel */
.case-panel .is-modal .work-main-description p {
    font-size: 1.06rem;
    line-height: 1.9;
    color: #333;
}

.case-panel .is-modal .work-title+.case-meta {
    margin-left: 2px;
}

@media (max-width: 640px) {

    .case-panel .is-modal .work-video-preview video,
    .case-panel .is-modal video,
    .case-panel .is-modal .work-image-gallery img {
        max-height: 60vh;
    }
}

/* Force-fit helper for portrait media to match others */
.case-panel .is-modal .media-fit {
    display: block;
    margin: 0 auto;
    width: auto !important;
    height: auto !important;
    max-width: min(100%, 860px);
    max-height: 72vh;
    object-fit: contain !important;
}

@media (max-width: 640px) {
    .case-panel .is-modal .media-fit {
        max-height: 60vh;
    }
}

/* Prevent body scroll when modal open */
body.no-scroll {
    overflow: hidden;
}

/* モーダルの出現を“ふわっと” */
#case-overlay.active .case-panel {
    animation: modalIn .28s cubic-bezier(0.2, 0.9, 0.2, 1);
    transform-origin: 50% 10%;
}

@keyframes modalIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
        filter: blur(5px);
    }

    100% {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

/* ===== Modal gallery sizing (unify with Zabuton style) ===== */
.case-panel .is-modal .media-gallery .main-media {
    width: 100%;
    max-width: 520px;
    aspect-ratio: 4 / 5;
    /* Harmonized portrait-friendly frame */
    margin: 0 auto 12px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.02);
}

.case-panel .is-modal .media-gallery .gallery-main,
.case-panel .is-modal .media-gallery .gallery-main-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.case-panel .is-modal .media-gallery .thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.case-panel .is-modal .media-gallery .gallery-thumb img,
.case-panel .is-modal .media-gallery .gallery-thumb .placeholder-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(136, 201, 179, 0.15);
}

@media (max-width: 640px) {
    .case-panel .is-modal .media-gallery .main-media {
        max-width: 100%;
    }
}

.cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 9px;
    background: #8E354A;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
}

.cart-panel {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 360px;
    max-width: calc(100% - 32px);
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    overflow: hidden;
    display: none;
    z-index: 1000;
}

.cart-panel.active {
    display: block;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-items {
    max-height: 40vh;
    overflow: auto;
}

.cart-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #f6f2ef;
}

.cart-item img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

.cart-item h4 {
    margin: 0 0 6px;
    font-size: 0.98rem;
}

.cart-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-qty button {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
}

.cart-footer {
    padding: 12px 14px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
}

.cart-actions {
    display: flex;
    gap: 8px;
}

.cart-actions .btn {
    flex: 1
}

.cart-toggle {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 990;
}

.icon-basket {
    width: 16px;
    height: 16px;
    vertical-align: -2px;
    margin-right: 6px;
    opacity: .9
}