html,
body {
    overflow-x: hidden;
    height: auto !important;
    min-height: 100vh !important;
}

#star-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    /* ← OK！イベントブロック防止 */
}

.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    /* これなら裏にいくのでOK */
}

.header {
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 32px 48px 16px 48px;
    box-sizing: border-box;
}

.site-title {
    font-family: 'Crimson Text', serif;
    font-size: 2.2em;
    text-align: center;
    margin: 0 0 16px 0;
    flex: none;
    font-style: italic;
    font-weight: 300;
}

.header-nav {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 48px;
    position: absolute;
    top: 32px;
    right: 48px;
    height: 64px;
}

.menu-group,
.contact-link {
    height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    margin-bottom: 2px;
}

.bar {
    display: block;
    background: #333;
    border-radius: 2px;
    margin: 0;
    padding: 0;
}

.bar1 {
    width: 40px;
    height: 2px;
}

.bar2 {
    width: 30px;
    height: 1.3px;
}

.bar3 {
    width: 25px;
    height: 0.5px;
}

.menu-label {
    font-size: 1em;
    color: #444;
    font-family: 'Crimson Text', serif;
    letter-spacing: 0.05em;
    margin-top: 12px;
    font-style: italic;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 1em;
    font-family: 'Noto Sans JP', sans-serif;
    gap: 2px;
}

.mail-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-text {
    font-size: 0.95em;
    margin-top: 2px;
}

.main-view {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    min-height: 10vh;
    /* height: 50vh から変更 */
    width: 100vw;
    margin-top: 120px;
}

.catchcopy {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.catch-jp {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 2em;
    color: #333;
    letter-spacing: 0.05em;
    line-height: 1.5;
    display: block;
    width: 100%;
    text-align: center;
    padding-left: 40%;
    /* ← 左に余白をつけて、見た目を右寄せに */
}


.circle-area {
    flex: 1;
    display: flex;
    align-items: flex-start;
    position: relative;
    height: 420px;
    min-width: 420px;
    justify-content: flex-start;
}

.circle {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    font-family: 'Crimson Text', serif;
    font-size: 1.5em;
    transition: background 0.3s, color 0.3s;
    box-shadow: 0 2px 16px rgba(248, 163, 163, 0.12);
}

.works {
    width: 380px;
    height: 380px;
    background: #f8bcbc;
    color: #333;
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    margin-left: 0;
    font-size: 48px;
}

.works:hover {
    background: #f8a3a3;
    color: #fff;
}

.contact {
    width: 180px;
    height: 180px;
    background: #fff;
    color: #333;
    position: absolute;
    left: 250px;
    top: 220px;
    border: 2px solid #f8bcbc;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    font-size: 32px;
}

.contact:hover {
    background: #f8a3a3;
    color: #fff;
    border-color: #f8a3a3;
}

.about-section {
    width: 100vw;
    margin-top: 10px;
    background: transparent !important;
    /* 強制的に透明にする */
}

.about-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    max-width: 900px;
    margin: 80px auto 0;
    /* ← 上:80px、左右:auto、下:0 */
    text-align: center;
}

.about-image {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    overflow: hidden;
    background: transparent;
    /* 透明に変更 */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 150px;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.about-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 280px;
}

.about-desc {
    margin-left: 0;
}

.about-desc p,
.about-skills,
.about-skill-title,
.about-skill-tags {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 300;
}

.about-desc p {
    font-size: 1.2em;
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.about-skills {
    font-size: 1.1em;
    color: #333;
}

.about-skill-title {
    font-size: 1em;
    font-weight: bold;
    font-family: 'Noto Sans JP', sans-serif;
}

.about-skill-tags {
    font-size: 0.95em;
    color: #444;
}

.works-section {
    width: 100vw;
    margin-top: 40px;
    margin-bottom: 40px;
    text-align: center;
}

.works-title {
    font-family: 'Crimson Text', serif;
    font-size: 2em;
    margin-bottom: 32px;
    font-style: italic;
    font-weight: 300;
    margin: 0 0 60px 0;
}

.works-list {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* 必要なら調整 */
    gap: 32px;
    margin-bottom: 24px;
}

.work-thumb {
    width: 300px;
    height: 180px;
    background: #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    color: #444;
}

.work-slide {
    font-size: 2em;
    font-family: 'Noto Sans JP', sans-serif;
}

/* works-linkを中央寄せにする修正 */

.works-link a {
    color: #e57373;
    /* メインカラー：ピンク */
    text-decoration: none;
    transition: color 0.2s;
}

.works-link a:hover {
    text-decoration: underline;
    color: #e57373;
}

.work-card {
    width: 300px;
    text-align: center;
}

.work-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/*.work-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}*/

.do-section {
    width: 100vw;
    margin: 32px 0 80px 0;
    text-align: center;
}

.do-title {
    font-family: 'Crimson Text', serif;
    font-size: 2em;
    font-style: italic;
    font-weight: 300;
    margin: 0 0 40px 0;
}

.do-desc p {
    font-size: 1.1em;
    font-weight: 300;
    line-height: 1.7;
    margin: 0 auto 24px auto;
    max-width: 400px;
    color: #333;
}

.contact-section {
    width: 100vw;
    margin: 32px 0 32px 0;
    text-align: center;
}

.contact-title {
    font-family: 'Crimson Text', serif;
    font-size: 2em;
    font-style: italic;
    font-weight: 300;
    margin-bottom: 16px;
    margin: 0 0 60px 0;
}

.contact-desc {
    font-size: 1em;
    font-weight: 300;
    margin-bottom: 16px;
    color: #333;
}

.contact-icons {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 8px;
}

.sns-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: none;
    transition: background 0.2s;
}

.sns-icon:hover {
    background: #f8e3e3;
}

.sns-icon svg {
    transition: stroke 0.2s;
}

.sns-icon:hover svg {
    stroke: #fff;
}

.sns-icon.x-icon svg path {
    transition: fill 0.2s;
}

.sns-icon.x-icon:hover svg path {
    fill: #fff;
}

.x-icon svg,
.instagram-icon svg {
    display: block;
}

.carousel {
    position: relative;
    width: 90%;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    backface-visibility: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.carousel-item {
    flex-shrink: 0;
    transform: translateZ(0);
    will-change: transform;
}

.carousel-item:first-child {
    margin-left: 0 !important;
}

.carousel-item {
    min-width: 100%;
    box-sizing: border-box;
    text-align: center;
    transition: box-shadow 0.3s, transform 0.3s;
    box-shadow: 0 2px 8px rgba(248, 163, 163, 0.10);
    position: relative;
    background: #ccc;
    border-radius: 8px;
}

.carousel-item:hover {
    box-shadow: 0 8px 32px rgba(248, 163, 163, 0.25);
    transform: scale(1.05) translateY(-8px);
    z-index: 2;
}

.carousel-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.carousel-btn {
    background: #fff;
    border: 1px solid #f8a3a3;
    color: #f8a3a3;
    font-size: 2em;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    margin: 0 12px;
    transition: background 0.2s;
}

.carousel-btn:hover {
    background: #f8e3e3;
}

/* Worksカード型レイアウト */
.work-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(248, 163, 163, 0.10);
    transition: box-shadow 0.3s, transform 0.3s;
    background: #fff;
}

.work-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(100%);
    transition: transform 0.3s, opacity 0.3s;
    padding: 16px;
    opacity: 0;
    color: #333;
}

/*.work-card:hover .work-info {
    transform: translateY(0);
    opacity: 1;
}*/

.work-detail {
    font-size: 0.95em;
    color: #888;
}

#star-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
}

.menu-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px 0;
    min-width: 140px;
    display: none;
    z-index: 1001;
}

.menu-content a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 1em;
    font-family: 'Crimson Text', serif;
    transition: background 0.2s;
}

.menu-content a:hover {
    background: rgba(248, 163, 163, 0.1);
}

.menu-group {
    position: relative;
}

.menu-group.active .menu-content {
    display: block;
}

.works-carousel {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 24px auto;
    overflow: hidden;
}

.works-track {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    gap: 20px;
    padding: 0 10px;
}

.work-card {
    flex: 0 0 220px;
    /* 固定幅で横スクロール */
    height: 200px;
    background: #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(248, 163, 163, 0.10);
    transition: box-shadow 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.works-prev,
.works-next {
    background: #fff;
    border: 1px solid #f8a3a3;
    color: #f8a3a3;
    font-size: 2em;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    margin: 0 8px;
    transition: background 0.2s;
    z-index: 10;
}

.works-prev:hover,
.works-next:hover {
    background: #f8e3e3;
}

.work-info {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.77, 0, 0.175, 1), transform 0.7s cubic-bezier(0.77, 0, 0.175, 1);
}

.work-info.visible {
    opacity: 1;
    transform: none;
}

.about-section,
.works-section,
.do-section,
.contact-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 10px;
    box-sizing: border-box;
}

.about-section {
    background: rgba(255, 255, 255, 0.9);
}

.main-view {
    width: 100%;
    padding: 80px 0 20px;
    /* 上下余白だけ調整 */
    position: relative;
    /* fixedじゃなくrelativeに */
}

/* Webkit系ブラウザ（Chrome, Safari等）*/
::-webkit-scrollbar {
    display: none;
}

/* Firefox */
html {
    scrollbar-width: none;
}

/* 全ブラウザ対応 */
body {
    overflow: hidden;
    /* 完全に非表示 */
    /* または */
    overflow-x: hidden;
    /* 横スクロールバーのみ非表示 */
    overflow-y: hidden;
    /* 縦スクロールバーのみ非表示 */
}

/* サイトタイトルのリンク色を変更 */
.site-title a {
    color: #333333 !important;
    /* 希望の色に変更 */
    text-decoration: none !important;
    /* 下線を削除 */
}

/* ホバー時の色も変更 */
.site-title a:hover {
    color: #666666 !important;
}

/* 訪問済みリンクの色も統一 */
.site-title a:visited {
    color: #333333 !important;
}

.work-card a {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/*.work-card img {
    width: 100%;
    height: auto;
    display: block;
}*/

/* Single Design Page スタイル */
.single-design-main {
    padding: 50px 0;
}

.single-design-content {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 80px;
    /* ここで上に余白を追加 */
    text-align: center;
}

.single-design-title {
    font-family: 'Crimson Text', serif;
    font-size: 2rem;
    color: #333;
    font-weight: 300;
}

.single-design-detail {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    line-height: 1.6;
}

.single-design-image-container {
    margin-bottom: 40px;
}

.single-design-image-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.single-design-image-link:hover {
    transform: scale(1.02);
}

.single-design-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.single-design-navigation {
    margin-top: 40px;
}

.back-to-list-btn {
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 12px 24px;
    background-color: #f8a3a3;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.back-to-list-btn:hover {
    background-color: #e57373;
    color: white;
}

/* Archive Design Page スタイル */
.archive-design-main {
    padding: 140px 0;
    font-family: 'Crimson Text', serif;
}

.archive-design-title {
    text-align: center;
    font-size: 2rem;
    font-family: 'Crimson Text', serif;
    font-style: italic;
    margin-bottom: 50px;
    color: #333;
    font-weight: 300;
}

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

.design-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.design-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.design-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.design-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.archive-design-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.design-card:hover .archive-design-image {
    transform: scale(1.05);
}

.design-card-content {
    padding: 20px;
}

.design-card-title {
    font-family: 'Crimson Text', serif;
    font-size: 1.25rem;
    margin: 0;
    color: #333;
    line-height: 1.4;
    text-align: center;
}

.no-designs-message {
    text-align: center;
    padding: 60px 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    color: #6c757d;
}

.no-designs-message h3 {
    margin-bottom: 1rem;
    color: #333;
}

.works-section {
    width: 100%;
    padding: 40px 20px;
}

.works-title {
    text-align: center;
    font-size: 2em;
    margin-bottom: 40px;
}

.grid-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.works-container {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 40px;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.work-card {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

/*.work-card img {
    width: 100%;
    height: auto;
    display: block;
}*/

.work-info,
.work-card-content {
    padding: 15px;
    text-align: center;
}

.work-card-title {
    font-size: 1em;
    margin: 0;
}

/* セクション全体の余白と見出し */
.works-section {
    width: 100%;
    padding: 80px 20px;
}

.works-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 60px;
}

/* カルーセル全体ラッパー */
.works-carousel-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    /* ここがポイント */
    -webkit-overflow-scrolling: touch;
    height: auto;
    min-height: 150px;
    /* 必要に応じて調整 */
}

/* 横並びにする */
.works-grid {
    display: flex;
    gap: 16px;
    transition: transform 0.3s linear;
    will-change: transform;
}

/* 各カードのスタイル */
.work-card {
    min-width: 250px;
    height: 200px;
    flex-shrink: 0;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    /* カードごとにスナップ */
    background: #fff;
}

/* 画像 */
.work-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 説明部分 */
.work-info {
    padding: 10px;
    text-align: center;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
}

/* 404ページのスタイル */

.error-404 {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    background: transparent;
}

.error-404-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.error-404-title {
    font-family: 'Crimson Text', serif;
    font-size: 3rem;
    font-style: italic;
    font-weight: 300;
    color: #333;
    margin-bottom: 20px;
}

.error-404-message {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.error-404-home-link {
    display: inline-block;
    padding: 12px 24px;
    background: #f8a3a3;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.1rem;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 20px;
}

.error-404-home-link:hover {
    background: #e57373;
    transform: translateY(-2px);
    color: #fff;
}

/* PCではspを非表示 */
.catch-jp.sp {
    display: none;
}

/* 既存のBRタグを非表示にする場合 */
.error-404 br {
    display: none;
}

.carousel-item,
.works-card,
.work-card {
    will-change: transform;
}

.carousel-item {
    margin-right: 24px;
    /* あるとしてもOK */
}

.carousel-item:first-child {
    margin-left: 0;
    /* これで見切れ対策 */
}

.work-card:first-child {
    margin-left: 0 !important;
}

.work-card {
    position: relative;
    overflow: hidden;
}

.work-card-image {
    position: relative;
    display: block;
    width: 100%;
    height: 200px;
    /* 必要に応じて調整 */
    overflow: hidden;
}

.work-card-image a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.work-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    /* ← 安定する！ */
    object-fit: cover;
    /* 高さ制限ないと効果は出ないが問題なし */
}

.carousel-wrapper {
    overflow: hidden;
}

.about-title {
    font-family: 'Crimson Text', serif;
    font-size: 2em;
    margin: 0px 0 60px 0;
    /* ← 上:0, 下:60px に変更 */
    text-align: center;
    font-style: italic;
    font-weight: 300;
}


.footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    color: #555;
}

/* ドットのラッパー */
.dots-wave {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.dot-wave {
    width: 12px;
    height: 12px;
    background-color: #fff;
    border: 2px solid #f8a3a3;
    /* ← ピンクの枠線を追加！ */
    border-radius: 50%;
    opacity: 0.6;
    transform: scale(0.6);
    transition: transform 0.3s ease, opacity 0.3s ease;
    margin-top: 20px;
}


/* active状態だけスケールアップ＆濃くなる */
.dot-wave.active {
    background-color: #e57373;
    opacity: 1;
    transform: scale(1.2);
}


/* ドットごとにアニメーション遅延をずらす */
.dot-wave[data-index="0"] {
    animation-delay: 0s;
}

.dot-wave[data-index="1"] {
    animation-delay: 0.15s;
}

.dot-wave[data-index="2"] {
    animation-delay: 0.3s;
}

.dot-wave[data-index="3"] {
    animation-delay: 0.45s;
}

.dot-wave[data-index="4"] {
    animation-delay: 0.6s;
}

/* 波のスケール変化アニメーション */
@keyframes waveScale {

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

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

.work-card .work-info p {
    display: none;
}

/* Design Portfolio 3列レイアウト */
.archive-design-main {
    padding: 120px 0;
}

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

.archive-design-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #333;
}

/* 3列グリッドレイアウト */
.design-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}


.design-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.design-card:hover {
    transform: translateY(-4px);
}

.design-image-wrapper {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

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

.design-card-content {
    padding: 12px;
}

.do-section {
    padding-top: 40px;
    /* 上だけ上書き */
}

/* ========================================
   デスクトップ・タブレット対応
   ======================================== */

/* デザイングリッドのレスポンシブ対応 */
@media (max-width: 1024px) {
    .design-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .design-grid {
        grid-template-columns: 1fr;
    }
}

/* ワークスグリッドのレスポンシブ対応 */
@media (max-width: 992px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .works-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   モバイル対応 (768px以下)
   ======================================== */

@media (max-width: 768px) {

    /* キャッチコピーの表示切り替え */
    .catch-jp {
        display: none;
    }

    .catch-jp.sp {
        display: inline-block;
        font-size: 1em;
        line-height: 1.4;
        padding-right: 10%;
        margin-top: 60px;
        /* ← 上に60pxの余白を追加 */
    }

    /* ワークスタイトルの調整 */
    .works-title {
        margin-bottom: 20px;
    }

    /* ワークスカルーセルの調整 */
    .works-carousel {
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 15px !important;
        box-sizing: border-box !important;
    }

    .works-track {
        gap: 15px;
        padding: 0 15px;
    }

    .work-card {
        flex: 0 0 160px;
        height: 140px;
    }

    /* カルーセルコンテナの中央揃え */
    .works-carousel-container,
    .carousel-container {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin: 0 auto !important;
        text-align: center !important;
    }

    .works-prev,
    .works-next {
        font-size: 1.5em;
        width: 32px;
        height: 32px;
        margin: 0 10px !important;
    }

    /* ワークスセクションの調整 */
    .works-section {
        /*margin-top: -40px !important;*/
        padding-top: 0 !important;
        text-align: center !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .works-title,
    .works-section h2,
    .works-section h1 {
        margin-top: 0 !important;
        padding-top: 0 !important;
        text-align: center !important;
    }

    .work-info {
        font-size: 0.9em;
        margin-top: 8px;
        padding: 5px;
        text-align: center;
    }

    /* 全セクションの統一パディング */
    .about-section,
    .works-section,
    .do-section,
    .contact-section {
        padding: 30px 15px !important;
        width: 100%;
        min-width: 0;
        margin-top: 0;
        margin-bottom: 0;
    }

    /* Aboutセクションのみ上余白を追加 */
    .about-section {
        padding-top: 50px !important;
    }

    /* セクション間の余白調整 */
    .do-section,
    .contact-section {
        margin-top: -10px;
    }

    /* タイトルの余白統一 */
    .do-title,
    .works-title,
    .about-title,
    .contact-title {
        margin-top: 0;
        padding-top: 0;
    }

    /* Do sectionの説明文調整 */
    .do-desc p {
        margin: 0 auto 20px auto;
        max-width: 85%;
        padding: 0 15px;
        font-size: 1em;
        line-height: 1.6;
    }

    /* Contact sectionの調整 */
    .contact-desc {
        margin-bottom: 20px;
        font-size: 1em;
        padding: 0 15px;
    }

    .contact-icons {
        margin-top: 15px;
        gap: 24px;
    }

    .sns-icon {
        width: 48px;
        height: 48px;
    }

    /* 404エラーページの調整 */
    .error-404-title {
        font-size: 2.5rem;
    }

    .error-404-message {
        font-size: 1.1rem;
    }

    .error-404-content {
        padding: 30px 15px;
        margin: 0 15px;
    }
}

/* ========================================
   モバイル対応 (900px以下)
   ======================================== */

@media (max-width: 900px) {

    /* 基本レイアウト */
    body {
        min-width: 0;
        padding: 0;
    }

    /* ヘッダー */
    .header {
        padding: 24px 0 0 0;
        width: 100vw;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .site-title {
        margin: 18px 0;
        text-align: center;
        width: 100vw;
    }

    .header-nav {
        position: static;
        width: 100vw;
        justify-content: center;
        align-items: flex-start;
        padding: 0;
        margin-top: 0;
        gap: 40px;
        display: flex;
        flex-direction: row;
    }

    .menu-group,
    .contact-link {
        margin: 0 8px;
    }

    /* メインビュー */
    .main-view {
        display: flex;
        /* ← これが必要！ */
        flex-direction: column;
        align-items: center;
        width: 100%;
        min-width: 0;
        margin-top: 160px;
        padding: 0 0 30px;
    }


    /* キャッチコピー */
    .catchcopy {
        font-size: 1.2em;
        display: block;
        margin-right: 30%;
        text-align: center;
    }

    .catch-jp {
        margin-bottom: 30px;
        text-align: center;
        transform: translateX(-40px);
    }

    /* サークルエリア */
    .circle-area {
        position: relative;
        width: 100vw;
        max-width: 320px;
        height: 200px;
        margin: 0 auto 100px auto;
        display: block;
    }

    .works {
        width: 180px;
        height: 180px;
        font-size: 28px;
        position: absolute;
        left: 45%;
        top: 0;
        transform: translateX(-55%);
        z-index: 1;
        margin: 0;
    }

    .contact {
        width: 90px;
        height: 90px;
        font-size: 16px;
        position: absolute;
        left: 45%;
        top: 110px;
        transform: translateX(40%);
        z-index: 2;
        border-width: 1.5px;
        background: #fff;
        margin: 0;
    }

    /* Aboutセクション */
    .about-section {
        transform: none !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        margin: 20px 0 !important;
        padding: 0px 15px !important;
        box-sizing: border-box !important;
    }

    .about-container {
        flex-direction: column;
        align-items: center;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        margin: 0 auto !important;
        padding: 20px 0 !important;
        box-sizing: border-box !important;
        min-height: auto !important;
    }

    .about-title {
        font-size: 2em;
        margin-top: 100px !important;
        /* ← ここを増やす！ */
        margin-bottom: 40px !important;
        text-align: center;
        width: 100% !important;
    }


    .about-image {
        margin: 10px auto 20px auto !important;
        display: block;
        width: 160px;
        height: 160px;
    }

    .about-text {
        min-width: 0;
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .about-desc p {
        font-size: 1em !important;
        line-height: 1.8 !important;
        margin: 15px auto !important;
        padding: 0 15px !important;
        word-break: keep-all !important;
        overflow-wrap: anywhere !important;
        white-space: normal !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }


    .about-skills {
        margin: 20px auto 10px auto !important;
        font-size: 1em;
    }

    .about-skill-title {
        font-size: 1em;
        margin: 5px 0 !important;
    }

    .about-skill-tags {
        font-size: 0.95em;
        color: #444;
        margin: 0 auto 10px auto !important;
    }

    /* ワークスセクション */
    .works-section {
        margin: -20px 0;
        width: 100%;
        /* ← これに変更 */
        min-width: 0;
        text-align: center !important;
        padding: 0;
    }


    .works-title {
        font-size: 2em;
        text-align: center !important;
    }

    .works-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: 100vw;
    }

    .work-card {
        width: 90vw;
        max-width: 260px;
        min-width: 0;
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(248, 163, 163, 0.10);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 0 auto;
        padding: 0;
        transition: box-shadow 0.3s, transform 0.3s;
    }

    .work-info {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.7s cubic-bezier(0.77, 0, 0.175, 1),
            transform 0.7s cubic-bezier(0.77, 0, 0.175, 1);
    }

    .work-info.visible {
        opacity: 1;
        transform: none;
    }

    .work-info p {
        margin: 0;
        padding: 0;
    }

    .work-info p:first-child {
        font-size: 1.1em;
        font-weight: bold;
        margin-bottom: 8px;
        color: #333;
    }

    .work-detail {
        font-size: 1em;
        color: #333;
    }

    .work-thumb {
        width: 90vw;
        max-width: 320px;
    }

    .works-link {
        text-align: center !important;
        margin: 0 auto 16px auto;
        display: block;
    }

    /* Do・Contactセクション */
    .do-section,
    .contact-section {
        padding: 40px 20px;
        width: 100vw;
        min-width: 0;
    }

    .design-list {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        width: 100vw;
        padding: 0 20px;
        box-sizing: border-box;
    }

    .design-item {
        width: calc(100% - 40px);
        max-width: 300px;
    }

    .coding-title {
        font-size: 0.9em;
        margin-bottom: 15px;
    }

    /* 背景画像・キャンバス */
    .bg-image,
    #star-canvas {
        left: 0;
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
    }

    .archive-design-title {
        margin-top: 80px;
        /* 好きな値に調整してね */
    }

    .single-design-content {
        margin-top: 140px;
    }
}