/*
Theme Name: CyberStar Corporate
Theme URI: https://cyber-star.co.jp/
Description: モダンでスタイリッシュなコーポレートサイト用WordPressテーマ。ANYCOLORスタイルのデザインを採用。
Version: 1.0.0
Author: CyberStar
Author URI: https://cyber-star.co.jp/
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cyberstar
*/

/*
 * 実機・シミュレーター表示の一致について
 * - header.php: viewport-fit=cover でセーフエリアを有効化
 * - :root: --sat, --sar, --sab, --sal (env(safe-area-inset-*)) を全面使用
 * - SPメディアクエリ内で padding/margin に var(--sat) 等を適用し、ノッチ・ホームインジケータを考慮
 * - 高さは 100dvh / 100svh / -webkit-fill-available で実機のビューポート差を吸収
 */

/* ===================================
   リセットCSS & ベーススタイル
=================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* タップ時のハイライトを無効化（実機対応） */
}

/* 実機とシミュレーションの差異を防ぐための調整 */
html {
    -webkit-text-size-adjust: 100%; /* iOS Safariのフォントサイズ自動調整を無効化 */
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #ff6b6b;
    --text-color: #333333;
    --light-gray: #f5f5f5;
    --border-color: #e0e0e0;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* アメコミ風スタイル */
    --comic-border: 4px solid #000;
    --comic-shadow: 8px 8px 0 rgba(0, 0, 0, 0.2);
    --comic-shadow-hover: 12px 12px 0 rgba(0, 0, 0, 0.3);
    /* 実機・シミュレーター共通：セーフエリア（viewport-fit=cover 時） */
    --sat: env(safe-area-inset-top, 0px);
    --sar: env(safe-area-inset-right, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
    --sal: env(safe-area-inset-left, 0px);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%; /* iOS Safariのフォントサイズ自動調整を無効化 */
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Kaku Gothic ProN", "メイリオ", Meiryo, sans-serif;
    color: var(--text-color);
    line-height: 1.8;
    background-color: #fff;
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.1) 2px, transparent 2px);
    background-size: 30px 30px;
    background-position: 0 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased; /* フォントのアンチエイリアス（実機対応） */
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility; /* テキストレンダリング最適化 */
    min-height: 100%;
    /* 実機iOSでシミュレーターと同じ高さ解釈にする */
    min-height: -webkit-fill-available;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   ヘッダー
=================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.main-navigation {
    display: block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
}

.main-navigation ul,
.main-navigation ul.primary-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-direction: row;
    visibility: visible;
    opacity: 1;
}

.main-navigation ul li,
.main-navigation ul.primary-menu li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: list-item !important;
}

.main-navigation ul li a,
.main-navigation ul.primary-menu li a {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.main-navigation a {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
    padding: 5px 0;
    color: var(--primary-color);
    cursor: pointer;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.main-navigation a:hover::after {
    width: 100%;
}

/* アンカーリンクのスタイル */
.main-navigation a.anchor-link {
    color: var(--primary-color);
}

/* ハンバーガーメニュー */
.menu-toggle {
    display: none; /* PCでは非表示、SPで表示 */
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    outline: none;
}
.menu-toggle:hover,
.menu-toggle:focus,
.menu-toggle:focus-visible {
    outline: none;
    border: none;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===================================
   ヒーローセクション（アメコミ風）
=================================== */
.hero-section {
    height: 100vh; /* 高さを100vhに固定 */
    height: 100dvh; /* 動的ビューポート高さ（実機対応） */
    max-height: 100vh;
    max-height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: transparent;
    position: relative;
    overflow: hidden; /* はみ出した部分を非表示 */
    padding: 0; /* paddingを削除して高さを正確に */
    box-sizing: border-box;
    z-index: 1;
    margin-bottom: 0;
    /* 重なりを防ぐためにtransformをリセット */
    transform: none !important;
}

.hero-section.comic-hero {
    background: transparent;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    padding: 80px 40px; /* paddingを調整して高さを確保 */
    box-sizing: border-box;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-text-wrapper {
    display: inline-block;
    padding: 60px 80px;
    background: white;
    text-align: center;
    max-width: 1000px;
    position: relative;
}

.hero-text-wrapper.comic-card {
    animation: comicPopIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.hero-title {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 30px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #000;
    position: relative;
}

.hero-title.comic-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 8px;
    background: var(--accent-color);
    transform: translateX(-50%) skewX(-20deg);
}

.hero-subtitle {
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 600;
    line-height: 1.8;
    color: #333;
    margin-top: 40px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ヒーロー画像表示用（アメコミ風アニメーション - 初回表示時のみ） */
.hero-image-wrapper {
    display: inline-block;
    max-width: 100%;
    max-height: calc(100vh - 200px); /* ヘッダーとpaddingを考慮 */
    padding: 20px;
    background: white;
    position: relative;
    transform-style: preserve-3d;
    border: var(--comic-border);
    box-shadow: var(--comic-shadow);
    /* ホバー時のトランジションを無効化（アニメーションは有効） */
    transition: none;
    overflow: hidden; /* はみ出した部分を非表示 */
}

/* アニメーション用のクラス */
.hero-image-wrapper.comic-hero-pop {
    /* 初期状態：アニメーション開始前 */
    opacity: 0;
    /* アニメーション実行 */
    animation: comicHeroFlyIn 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-fill-mode: forwards;
}

/* アニメーション完了後の状態を保持 */
.hero-image-wrapper.comic-hero-pop.animation-complete,
.hero-image-wrapper.comic-hero-pop:hover {
    opacity: 1 !important;
    transform: perspective(1000px) rotateX(0deg) translateZ(0) scale(1) !important;
    box-shadow: var(--comic-shadow) !important;
}

/* ホバー時：アニメーションを停止し、表示は維持 */
.hero-image-wrapper.comic-hero-pop:hover {
    /* アニメーションを停止（実行中の場合のみ） */
    animation-play-state: paused;
    /* トランジションを無効化 */
    transition: none !important;
}

.hero-image {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 160px); /* ヘッダーとpaddingを考慮 */
    display: block;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
    position: relative;
    z-index: 1;
    transform: scale(1.15);
    transform-origin: center center;
}

/* ヒーロースライダー */
.hero-slider-wrapper {
    width: 100%;
    max-width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-slider {
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    display: block;
    text-align: center;
}

.hero-slide {
    display: none;
    width: 1000px;
    max-width: 85%;
    aspect-ratio: 16 / 9;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    padding: 20px;
    background: white;
    border: var(--comic-border);
    box-shadow: var(--comic-shadow);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.hero-slide.active {
    display: block;
    opacity: 1;
}

/* URLがない場合（.hero-slide-linkがない場合）の画像スタイル */
.hero-slide > .hero-image,
.hero-slide > img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
    transform: scale(1.0) !important;
    transform-origin: center center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* URLがある場合（.hero-slide-link内）の画像スタイル - より具体的なセレクタで上書き */
.hero-slide-link .hero-image,
.hero-slide-link img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
    transform: scale(1.0) !important;
    transform-origin: center center !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}


.hero-slide-link {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.hero-slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 10px 0;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    border: 2px solid #000;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.hero-dot:hover {
    background: #999;
    transform: scale(1.2);
}

.hero-dot.active {
    background: #000;
    transform: scale(1.3);
}

/* ===================================
   セクション共通スタイル
=================================== */
.section {
    padding: 120px 40px;
    scroll-margin-top: 100px; /* アンカーリンク用のマージン */
    position: relative;
    z-index: 2; /* ヒーローセクションより前面に */
    clear: both; /* フロートをクリア */
    background: transparent;
}

/* ABOUTセクションの位置を確実に下に配置 */
.about-section {
    margin-top: 0 !important;
    padding-top: 120px !important;
    padding-bottom: 40px !important; /* 会社概要とNEWSの間隔を80pxに（news-sectionの40pxと合わせて等間隔） */
    position: relative !important;
    z-index: 2 !important;
    /* 重なりを防ぐために確実に配置 */
    clear: both !important;
    display: block !important;
}

/* NEWSセクション：会社概要との間隔をレーベル⇔IP構築と等間隔に */
.news-section.section {
    padding-top: 40px !important;
}

/* ヒーローセクションの後に確実に配置 */
.hero-section + .section {
    margin-top: 0 !important;
    position: relative !important;
    top: 0 !important;
    transform: none !important;
    clear: both !important;
    display: block !important;
}

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

.section-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 80px;
    letter-spacing: 0.05em;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 20px auto 0;
}

/* ===================================
   ビジョンセクション
=================================== */
.vision-section {
    background: transparent;
}

.vision-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.vision-text {
    font-size: 18px;
    line-height: 2;
    margin-bottom: 30px;
}

/* ===================================
   ニュースセクション
=================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.news-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    border: var(--comic-border);
    box-shadow: var(--comic-shadow);
    position: relative;
}

.news-item:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: var(--comic-shadow-hover);
}

.news-item > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--light-gray);
}

.news-item img,
.news-item .placeholder-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: var(--light-gray);
}

.news-date {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
}

.news-content {
    padding: 30px;
}

.news-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* ===================================
   サービスセクション
=================================== */
.service-section {
    background: transparent;
}

.service-category {
    margin-bottom: 80px;
}

.service-category:last-child {
    margin-bottom: 0;
}

.service-category h3 {
    font-size: clamp(24px, 3vw, 32px);
    margin-bottom: 40px;
    text-align: center;
}

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

.service-card {
    text-align: center;
    padding: 40px 30px;
    background: white;
    border-radius: 12px;
    transition: var(--transition);
    border: var(--comic-border);
    box-shadow: var(--comic-shadow);
    position: relative;
}

.service-card:hover {
    transform: translateY(-10px) rotate(-1deg) scale(1.02);
    box-shadow: var(--comic-shadow-hover);
}

.service-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.service-icon img,
.service-icon .placeholder-image {
    width: 100%;
    max-width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 auto;
    display: block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.service-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.service-description {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
}

/* ===================================
   フッター
=================================== */
.site-footer {
    background: var(--primary-color);
    color: white;
    padding: 60px 40px 30px;
}

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

.footer-content {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-section {
    text-align: left;
}

.footer-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
    text-align: left;
}

.footer-section ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: flex-start;
}

.footer-section li {
    margin-bottom: 0;
}

.footer-section a:hover {
    opacity: 0.7;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    opacity: 0.8;
}

/* ===================================
   アニメーション
=================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* ===================================
   アメコミ風アニメーション
=================================== */
@keyframes comicPopIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(50px) rotate(-5deg);
    }
    50% {
        transform: scale(1.05) translateY(-10px) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotate(0deg);
    }
}

/* アメコミ風ヒーロー画像の派手なアニメーション */
@keyframes comicHeroPop {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(200px) rotate(-25deg);
        filter: blur(10px);
    }
    30% {
        opacity: 0.8;
        transform: scale(1.2) translateY(-30px) rotate(10deg);
        filter: blur(2px);
    }
    50% {
        transform: scale(0.95) translateY(10px) rotate(-5deg);
        filter: blur(0px);
    }
    70% {
        transform: scale(1.05) translateY(-5px) rotate(2deg);
    }
    85% {
        transform: scale(0.98) translateY(2px) rotate(-1deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotate(0deg);
        filter: blur(0px);
    }
}

/* ヒーロー画像の連続アニメーション（ホバー時） */
@keyframes comicHeroBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-15px) rotate(2deg) scale(1.02);
    }
    50% {
        transform: translateY(0) rotate(-1deg) scale(1);
    }
    75% {
        transform: translateY(-10px) rotate(1deg) scale(1.01);
    }
}

/* 画像が飛び出してくる効果 */
@keyframes comicHeroFlyIn {
    0% {
        opacity: 0;
        transform: perspective(1000px) rotateX(90deg) translateZ(-200px) scale(0.5);
    }
    40% {
        opacity: 1;
        transform: perspective(1000px) rotateX(-10deg) translateZ(50px) scale(1.1);
    }
    60% {
        transform: perspective(1000px) rotateX(5deg) translateZ(0) scale(0.95);
    }
    80% {
        transform: perspective(1000px) rotateX(-2deg) translateZ(0) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: perspective(1000px) rotateX(0deg) translateZ(0) scale(1);
    }
}

@keyframes comicSlideIn {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes comicBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes comicPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* アメコミ風カードスタイル */
.comic-card {
    border: var(--comic-border);
    box-shadow: var(--comic-shadow);
    background: white;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: visible;
}

.comic-card::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 4px solid transparent;
    border-radius: inherit;
    z-index: -1;
    transition: all 0.3s;
}

.comic-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--comic-shadow-hover);
}

.comic-card:hover::before {
    border-color: var(--accent-color);
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
}

/* ヒーロー画像にはcomic-cardのホバー効果を一切適用しない */
.hero-image-wrapper:hover {
    /* 変形を無効化 */
    transform: perspective(1000px) rotateX(0deg) translateZ(0) scale(1) !important;
    /* シャドウを維持 */
    box-shadow: var(--comic-shadow) !important;
    /* 表示を維持 */
    opacity: 1 !important;
}

/* ヒーロー画像の::beforeにはホバー効果を適用しない */
.hero-image-wrapper::before {
    display: none !important;
}

/* スクロールアニメーション用クラス */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* アメコミ風ボタン */
.comic-button {
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: #000;
    border: var(--comic-border);
    box-shadow: var(--comic-shadow);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.comic-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #000;
    transition: left 0.3s;
    z-index: -1;
}

.comic-button:hover {
    color: white;
    transform: translate(-4px, -4px);
    box-shadow: var(--comic-shadow-hover);
}

.comic-button:hover::before {
    left: 0;
}

/* アメコミ風タイトル */
.comic-title {
    position: relative;
    display: inline-block;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comic-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--accent-color);
    transform: skewX(-20deg);
    z-index: -1;
}

/* キャラクター飛び出し効果 */
.comic-pop {
    animation: comicPopIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* 段階的表示用 */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stagger-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   PCサイズ（481px以上）: 通常レイアウト
=================================== */
@media (min-width: 481px) {
    .menu-toggle {
        display: none !important;
    }
    
    .main-navigation {
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
        right: auto !important;
    }
    
    .main-navigation ul {
        flex-direction: row !important;
        gap: 40px;
        align-items: center;
    }
    
    .main-navigation a {
        font-size: 14px !important;
    }
    
    body.menu-open::before {
        display: none !important;
    }
}

/* ===================================
   SERVICEエリア：768px以下で画像＋テキストを必ず表示（480px未満は下のブロックで詳細指定）
=================================== */
@media (max-width: 768px) {
    .service-area-item {
        opacity: 1 !important;
        transform: none !important;
    }
    .service-area-main {
        flex-direction: column !important;
    }
    .service-area-content {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        flex: none !important;
        min-height: 1px !important;
        height: auto !important;
    }
    /* NEWS一覧・詳細：Pro Max等で画面上部が見切れないようヘッダーとすみ分け */
    .news-archive-section.section,
    .news-single-section.section {
        padding-top: calc(88px + var(--sat)) !important;
    }
    .news-archive-item {
        opacity: 1 !important;
        transform: none !important;
    }
    /* NEWS一覧：画像の下にテキストを表示（SP全般） */
    .news-archive-content {
        flex-direction: column !important;
    }
    .news-archive-text {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    /* プライバシーポリシー：画面上部見切れ防止・常に表示 */
    .privacy-policy-section.section {
        padding-top: calc(88px + var(--sat)) !important;
    }
    .privacy-content {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ===================================
   レスポンシブ（スマートフォン: iPhone 16 Pro Max以下）
   実機・シミュレーター一致：viewport-fit=cover + var(--sat/sar/sab/sal) を全面使用
=================================== */
@media (max-width: 480px) {
    body {
        padding-bottom: var(--sab);
        -webkit-overflow-scrolling: touch;
    }
    
    /* 実機タップ遅延を防ぐ（iOS 300ms除去） */
    button,
    .comic-button,
    .menu-toggle,
    a[href] {
        touch-action: manipulation;
    }
    
    /* セーフエリアを変数で適用 */
    .header-container {
        padding: max(20px, var(--sat)) max(20px, var(--sar)) 20px max(20px, var(--sal));
        max-width: 100%;
        box-sizing: border-box;
    }

    .menu-toggle {
        display: flex !important;
        z-index: 10001;
    }
    
    .site-logo {
        font-size: 24px;
    }
    
    .site-logo img {
        max-height: none;
        width: auto;
    }

    /* SPサイズでは通常のメニューを完全に非表示（実機・シミュレーター同一） */
    .main-navigation {
        display: none !important;
        position: fixed !important;
        inset: 0 !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        height: 100svh !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        min-height: 100svh !important;
        min-height: -webkit-fill-available !important;
        background: white !important;
        transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
        padding: var(--sat) 0 var(--sab) 0 !important;
        z-index: 9999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        opacity: 0;
        visibility: hidden;
        box-sizing: border-box;
    }
    
    /* ハンバーガーメニューが開いた時のみ表示・必ず全画面の高さを確保 */
    .main-navigation.active {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        opacity: 1;
        visibility: visible;
        inset: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        height: 100svh !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        min-height: 100svh !important;
        min-height: -webkit-fill-available !important;
    }
    
    /* メニューオープン時：左側のヘッダーロゴは非表示（1箇所だけにする） */
    body.menu-open .site-logo {
        visibility: hidden;
    }
    
    /* メニュー内のロゴ「CYBER STAR inc.」は1箇所のみ・ヘッダーと同じサイズで左寄せ */
    .main-navigation::before {
        content: 'CYBER STAR inc.';
        display: block !important;
        font-size: 24px;
        font-weight: 700;
        letter-spacing: 0.05em;
        padding: 20px max(20px, var(--sar)) 20px max(20px, var(--sal)) !important;
        padding-left: max(20px, var(--sal)) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        width: 100%;
        box-sizing: border-box;
        text-align: left !important;
        align-self: flex-start !important;
        margin-right: auto !important;
    }
    
    /* ABOUT～CREATOR JOIN は右寄せ */
    .main-navigation ul,
    .main-navigation ul.primary-menu {
        display: flex !important;
        flex-direction: column !important;
        gap: 25px;
        align-items: flex-end;
        margin: 0;
        padding: 40px max(40px, var(--sar)) max(30px, var(--sab)) max(40px, var(--sal));
        width: 100%;
        box-sizing: border-box;
    }
    
    .main-navigation ul li a {
        text-align: right;
    }
    
    /* メニューオープン時：背面スクロール禁止でメニューが全画面を覆う（フッターを見せない） */
    body.menu-open {
        background: #fff;
        overflow: hidden;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        height: 100svh;
    }
    body.menu-open::before {
        display: none !important;
    }
    
    /* ×ボタン：ヘッダー内のまま＝ハンバーガーと同じ位置。閉じる時は「×」文字を確実に表示 */
    body.menu-open .menu-toggle {
        margin-right: 10px;
        padding: 12px;
        box-sizing: content-box;
        position: relative;
    }
    
    /* メニュー開時は3本線を隠し、::after で「×」を表示（transform に依存しない） */
    body.menu-open .menu-toggle.active span {
        opacity: 0 !important;
        visibility: hidden !important;
        position: absolute !important;
    }
    body.menu-open .menu-toggle.active::after {
        content: '×';
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        font-weight: 300;
        line-height: 1;
        color: var(--primary-color);
    }
    
    body.menu-open .menu-toggle span {
        width: 14px;
        height: 1.5px;
    }
    
    /* メニュー開時：ヘッダーをナビより前面にしつつ透明化＝×だけ見える（子は親のスタッキングから抜けられないため） */
    body.menu-open .site-header {
        z-index: 10000;
        background: transparent;
        backdrop-filter: none;
        pointer-events: none;
    }
    body.menu-open .menu-toggle {
        pointer-events: auto;
    }
    /* ナビ本体はクリック可能に（ヘッダーが none のため子のナビも効かなくなるので明示） */
    body.menu-open .main-navigation {
        pointer-events: auto;
    }

    .main-navigation a {
        font-size: 16px;
    }

    .section {
        padding: 32px 12px;
        scroll-margin-top: 56px;
    }
    
    /* 会社概要⇔NEWS・レーベル⇔IP構築の間隔を等間隔に（SPは40px） */
    .about-section.section {
        padding-bottom: 20px !important;
    }
    .news-section.section {
        padding-top: 20px !important;
    }
    .service-category {
        margin-bottom: 40px !important;
    }
    
    .section-container {
        max-width: 100%;
        padding: 0;
        width: 100%;
    }

    .section-title {
        font-size: clamp(18px, 5vw, 26px);
        margin-bottom: 20px;
    }
    
    .comic-title {
        font-size: clamp(18px, 5vw, 26px);
    }

    .news-grid,
    .service-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* ミッションと会社概要のSP対応（縮小） */
    .mission-section,
    .company-info {
        margin-bottom: 20px !important;
        max-width: 100% !important;
    }
    
    .mission-section .comic-card,
    .company-info .comic-card {
        padding: 16px 12px !important;
    }
    
    .mission-section h3,
    .company-info h3 {
        font-size: clamp(16px, 3.8vw, 22px) !important;
        margin-bottom: 16px !important;
    }
    
    .mission-section h4 {
        font-size: clamp(14px, 3.6vw, 18px) !important;
        margin-bottom: 12px !important;
        line-height: 1.4 !important;
    }
    
    .mission-section p {
        font-size: 11px !important;
        line-height: 1.55 !important;
        margin-bottom: 12px !important;
    }
    
    .company-info .comic-card {
        padding: 16px 12px !important;
    }
    
    .company-info table {
        font-size: 10px !important;
        width: 100% !important;
    }
    
    .company-info th,
    .company-info td {
        padding: 6px 8px !important;
        font-size: 10px !important;
        line-height: 1.45 !important;
    }
    
    .company-info th {
        width: 30% !important;
        font-size: 9px !important;
    }
    
    .company-info td {
        font-size: 10px !important;
    }

    /* ヒーローセクション：ヘッダーとのすみ分けを十分に（画像見切れ防止） */
    .hero-section {
        min-height: auto;
        height: auto;
        max-height: none;
        /* ヘッダー高さより十分下から開始（固定ヘッダーと重ならない） */
        padding: calc(88px + var(--sat)) 15px 20px;
        align-items: flex-start;
        justify-content: flex-start;
        overflow: visible;
    }
    
    /* ヒーロー直後のABOUTとの間隔を狭く（pxで固定） */
    .hero-section + .section {
        padding-top: 20px !important;
    }

    .hero-content {
        padding: 0;
        max-width: 100%;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .hero-text-wrapper {
        padding: 25px 18px;
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(22px, 7vw, 36px);
        margin-bottom: 15px;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: clamp(12px, 3.5vw, 16px);
        margin-top: 20px;
        line-height: 1.6;
    }

    .hero-image-wrapper {
        padding: 15px;
        max-width: calc(100% - 20px);
        width: 100%;
        box-sizing: border-box;
    }

    .hero-image {
        width: 100%;
        height: auto;
        object-fit: cover;
        object-position: center;
        transform: scale(1.15);
        transform-origin: center center;
    }
    
    .hero-slider-wrapper {
        width: 100%;
        padding: 0 10px;
    }
    
    .hero-slide {
        width: 100%;
        max-width: 95%;
        padding: 15px;
        max-height: 280px;
    }
    
    .hero-slide-link {
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        padding: 0;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    /* URLがない場合（.hero-slide-linkがない場合）の画像スタイル */
    .hero-slide > .hero-image,
    .hero-slide > img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
        margin: 0 !important;
        transform: scale(1.0) !important;
        transform-origin: center center !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
    }
    
    /* URLがある場合（.hero-slide-link内）の画像スタイル - より具体的なセレクタで上書き */
    .hero-slide-link .hero-image,
    .hero-slide-link img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
        margin: 0 !important;
        transform: scale(1.0) !important;
        transform-origin: center center !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }
    
    .hero-slider-dots {
        margin-top: 15px;
        gap: 10px;
    }
    
    .hero-dot {
        width: 10px;
        height: 10px;
    }

    /* ヒーロー画像のアニメーションをSPで軽量化 */
    .hero-image-wrapper.comic-hero-pop {
        animation: comicHeroFlyInMobile 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    }

    /* SP用の走るアニメーション */
    .hero-image-wrapper.comic-hero-run {
        animation: comicHeroRunMobile 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    
    /* NEWSセクションのSP対応（縮小） */
    .news-item {
        margin-bottom: 16px;
    }
    
    .news-item > a {
        height: 160px;
    }
    
    .news-content {
        padding: 14px 12px;
    }
    
    .news-title {
        font-size: clamp(14px, 4vw, 18px);
        margin-bottom: 8px;
    }
    
    .news-date {
        font-size: 10px;
    }
    
    /* SERVICEセクションのSP対応（PCの縮小版：1カード＝画像＋テキスト＋ボタン） */
    .service-category {
        margin-bottom: 28px;
    }
    
    /* IP支援事業など：ABOUTのミッション・会社概要と同じフォントサイズ */
    .service-category h3 {
        font-size: clamp(16px, 3.8vw, 22px) !important;
        margin-bottom: 16px !important;
    }
    
    /* SPではスクロールアニメに頼らず常に表示（画像＋テキスト両方見せる） */
    .service-area-item {
        margin-bottom: 24px;
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* PCと同じく「画像＋テキスト」の1ブロック。SPでは縦並び */
    .service-area-main {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* 画像エリア：PCと同じ比率 770:250 で縮小表示 */
    .service-area-image {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 770 / 250;
        margin-left: 0 !important;
        padding: 12px;
        flex-shrink: 0;
        background: #fff;
    }
    
    .service-area-image img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        max-height: none !important;
        object-fit: contain !important;
    }
    
    /* テキストエリア：PCの右側ブロックと同じ内容を下に表示（区切り線で分離） */
    .service-area-content {
        width: 100% !important;
        flex: none !important;
        padding: 18px 15px !important;
        min-width: 0;
        background: #fff;
        border-top: 1px solid var(--border-color);
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .service-area-content h4 {
        font-size: clamp(16px, 3.8vw, 20px) !important;
        margin-bottom: 10px !important;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    
    .service-area-content p {
        font-size: 12px !important;
        line-height: 1.6 !important;
        margin-bottom: 12px !important;
        color: var(--text-color);
    }
    
    .service-area-content .comic-button,
    .service-area-content .service-accordion-toggle {
        align-self: flex-start;
        margin-top: 8px;
    }
    
    .comic-button {
        padding: 10px 25px;
        font-size: 13px;
    }
    
    .service-accordion-content {
        padding: 0 15px !important;
    }
    
    .service-accordion-content.active {
        padding: 20px 15px !important;
    }
    
    .comic-card {
        padding: 0 !important;
    }
    
    .service-area-grid-vertical .service-area-item {
        padding: 0;
    }
    
    /* フッターのSP対応（縦サイズをコンパクトに） */
    .site-footer {
        padding: 24px 20px max(20px, var(--sab));
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        margin-bottom: 20px;
    }
    
    .footer-section {
        width: 100%;
        text-align: center;
    }
    
    .footer-section ul {
        justify-content: center;
    }
    
    .footer-section h3 {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .footer-section a {
        font-size: 13px;
    }
    
    .footer-bottom {
        padding: 16px 20px max(16px, var(--sab));
        text-align: center;
    }
    
    .footer-bottom p {
        font-size: 11px;
        margin-bottom: 8px;
    }
    
    .footer-bottom p:last-child {
        margin-bottom: 0;
    }
    
    .footer-bottom .footer-group-info {
        margin-bottom: 8px !important;
    }
    
    /* プライバシーポリシー：Pro Max等で画面上部見切れ防止（NEWS・SERVICE同様） */
    .privacy-policy-section.section {
        padding-top: calc(88px + var(--sat)) !important;
    }
    
    /* 枠とコンテンツの余白をPCと同様に（.comic-cardのpadding:0を上書き） */
    .privacy-content.comic-card {
        padding: 28px 20px !important;
    }
    
    .privacy-content {
        padding: 28px 20px !important;
    }
    
    .privacy-toc {
        margin-bottom: 32px;
    }
    
    .privacy-toc h2 {
        font-size: clamp(18px, 4.5vw, 20px);
    }
    
    .privacy-toc ul {
        padding-left: 20px;
    }
    
    .privacy-toc li {
        margin-bottom: 10px;
    }
    
    .privacy-toc a {
        font-size: 14px;
    }
    
    .privacy-body {
        padding: 0;
    }
    
    .privacy-body h2 {
        font-size: clamp(20px, 5vw, 22px);
        margin-top: 32px;
        margin-bottom: 16px;
    }
    
    .privacy-body h3 {
        font-size: clamp(16px, 4vw, 18px);
        margin-top: 24px;
        margin-bottom: 12px;
    }
    
    .privacy-body p {
        font-size: 14px;
        line-height: 1.8;
    }
}

/* SP用の軽量アニメーション */
@keyframes comicHeroFlyInMobile {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* クリック時のアメコミ風走るアニメーション */
@keyframes comicHeroRun {
    0% {
        transform: translateX(0) scale(1) rotate(0deg);
    }
    /* 一旦溜める（後ろに引く） */
    15% {
        transform: translateX(-50px) scale(0.95) rotate(-5deg);
    }
    /* さらに溜める */
    25% {
        transform: translateX(-80px) scale(0.9) rotate(-8deg);
    }
    /* ビューンと走り出す */
    30% {
        transform: translateX(200px) scale(1.1) rotate(10deg);
    }
    /* さらに右へ */
    50% {
        transform: translateX(400px) scale(1.15) rotate(15deg);
    }
    /* 最大速度 */
    70% {
        transform: translateX(600px) scale(1.2) rotate(20deg);
    }
    /* 減速開始 */
    85% {
        transform: translateX(700px) scale(1.1) rotate(10deg);
    }
    /* 元の位置に戻る */
    100% {
        transform: translateX(0) scale(1) rotate(0deg);
    }
}

/* SP用の軽量な走るアニメーション */
@keyframes comicHeroRunMobile {
    0% {
        transform: translateX(0) scale(1) rotate(0deg);
    }
    /* 一旦溜める */
    15% {
        transform: translateX(-30px) scale(0.95) rotate(-5deg);
    }
    /* さらに溜める */
    25% {
        transform: translateX(-50px) scale(0.9) rotate(-8deg);
    }
    /* ビューンと走り出す */
    30% {
        transform: translateX(150px) scale(1.1) rotate(10deg);
    }
    /* さらに右へ */
    50% {
        transform: translateX(250px) scale(1.15) rotate(15deg);
    }
    /* 最大速度 */
    70% {
        transform: translateX(300px) scale(1.2) rotate(20deg);
    }
    /* 減速開始 */
    85% {
        transform: translateX(320px) scale(1.1) rotate(10deg);
    }
    /* 元の位置に戻る */
    100% {
        transform: translateX(0) scale(1) rotate(0deg);
    }
}

/* クリック時のアニメーションクラス */
.hero-image-wrapper.comic-hero-run {
    animation: comicHeroRun 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    cursor: pointer;
}

/* クリック可能であることを示す */
.hero-image-wrapper {
    cursor: pointer;
    user-select: none;
}

/* ===================================
   ニュースアーカイブページ
=================================== */
.news-year-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.news-year-tab {
    padding: 12px 25px;
    background: white;
    border: var(--comic-border);
    box-shadow: var(--comic-shadow);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
    color: var(--primary-color);
    outline: none;
}

.news-year-tab:hover {
    transform: translateY(-3px);
    box-shadow: var(--comic-shadow-hover);
}

.news-year-tab.active {
    background: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--comic-shadow-hover);
}

.news-year-tab.loading {
    cursor: wait;
    opacity: 0.7;
}

.news-archive-list-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.news-archive-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-archive-item {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-archive-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

.news-archive-card {
    display: flex;
    flex-direction: row;
    gap: 0;
    padding: 0;
    background: white;
    border: var(--comic-border);
    box-shadow: var(--comic-shadow);
    transition: var(--transition);
    align-items: stretch;
    overflow: hidden;
    min-height: 180px;
}

.news-archive-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--comic-shadow-hover);
}

.news-archive-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.news-archive-content {
    display: flex;
    width: 100%;
    align-items: stretch;
}

.news-archive-image {
    flex-shrink: 0;
    width: 280px;
    height: 180px;
    overflow: hidden;
    border-right: var(--comic-border);
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.news-archive-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    color: #999;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.news-archive-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 25px 40px;
    gap: 8px;
}

.news-archive-date {
    font-size: 12px;
    color: #999;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.news-archive-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    color: var(--primary-color);
    transition: var(--transition);
}

.news-archive-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-color);
    margin-top: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-archive-back-button {
    text-align: center;
    margin-top: 60px;
}

.news-pagination {
    margin-top: 40px;
    text-align: center;
}

/* ===================================
   サービスエリア
=================================== */
.service-area-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.service-area-grid-vertical {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.service-area-item {
    display: flex;
    flex-direction: column;
    background: white;
    border: var(--comic-border);
    box-shadow: var(--comic-shadow);
    transition: var(--transition);
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-area-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

.service-area-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--comic-shadow-hover);
}

.service-area-main {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
}

.service-area-image {
    flex-shrink: 0;
    width: 770px;
    max-width: 65%;
    height: 250px;
    overflow: visible;
    background: #ffffff;
    margin-left: 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.service-area-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    border: var(--comic-border);
    box-shadow: var(--comic-shadow);
    background: white;
}

.service-area-content {
    flex: 1;
    min-width: 0;
    width: 35%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-area-content h4 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-area-content p {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
    color: var(--text-color);
}

.service-area-content .comic-button {
    align-self: flex-start;
    margin-top: auto;
}

.service-accordion-toggle {
    align-self: flex-start;
    margin-top: auto;
}

.accordion-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    margin-left: 5px;
}

.service-accordion-toggle.active .accordion-arrow {
    transform: rotate(180deg);
}

.service-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), padding 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    border-top: var(--comic-border);
    background: #ffffff;
    opacity: 0;
    padding: 0 40px;
}

.service-accordion-content.active {
    max-height: 3000px;
    padding: 30px 40px;
    opacity: 1;
}

.achievements-grid,
.achievement-items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

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

.achievement-item a,
.achievement-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.achievement-image,
.achievement-item-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border: var(--comic-border);
    box-shadow: var(--comic-shadow);
    background: white;
    margin-bottom: 10px;
    transition: var(--transition);
    max-width: 180px;
    margin-left: auto;
    margin-right: auto;
}

.achievement-image:hover,
.achievement-item-image:hover {
    transform: translateY(-5px);
    box-shadow: var(--comic-shadow-hover);
}

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

.achievement-name,
.achievement-item-name {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--primary-color);
}

.achievement-post {
    margin-bottom: 30px;
}

.achievement-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.achievement-description {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 20px;
}

/* ===================================
   統一アニメーション
=================================== */
.news-archive-item,
.news-item,
.service-area-item,
.mission-section,
.company-info,
.privacy-content {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-archive-item.revealed,
.news-item.revealed,
.service-area-item.revealed,
.mission-section.revealed,
.company-info.revealed,
.privacy-content.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ミッションと会社概要のスタイル */
.mission-section,
.company-info {
    margin-bottom: 80px;
}

.mission-section:last-child,
.company-info:last-child {
    margin-bottom: 0;
}

.mission-content p {
    margin-bottom: 20px;
}
.mission-content p:last-child {
    margin-bottom: 0;
}

/* ===================================
   プライバシーポリシーページ
=================================== */
.privacy-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
}

/* プライバシーポリシーページのcomic-cardのホバー効果を無効化 */
.privacy-content.comic-card:hover {
    transform: translateY(0);
    box-shadow: var(--comic-shadow);
}

.privacy-content.comic-card:hover::before {
    border-color: var(--primary-color);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.privacy-toc {
    margin-bottom: 60px;
}

.privacy-toc h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

.privacy-toc ul {
    list-style: none;
    padding-left: 0;
}

.privacy-toc li {
    margin-bottom: 12px;
}

.privacy-toc a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.privacy-toc a:hover {
    text-decoration: underline;
}

.privacy-body {
    padding: 0;
}

.privacy-body h2 {
    font-size: 28px;
    font-weight: 700;
    margin-top: 60px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
}

.privacy-body h2:first-child {
    margin-top: 0;
}

.privacy-body h3 {
    font-size: 22px;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 20px;
}

.privacy-body h4 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
}

.privacy-body p {
    font-size: 16px;
    line-height: 1.9;
    margin-bottom: 20px;
}

/* ===================================
   ニュースシングルページ
=================================== */
.news-single-header {
    padding: 40px;
    margin-bottom: 40px;
}

.news-single-meta {
    text-align: center;
}

.news-single-date {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.news-single-title {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    line-height: 1.4;
    color: var(--primary-color);
    margin: 0;
}

.news-single-content {
    padding: 40px;
    margin-bottom: 40px;
}

.news-single-content .entry-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-color);
}

.news-single-content .entry-content h2,
.news-single-content .entry-content h3,
.news-single-content .entry-content h4 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.news-single-content .entry-content p {
    margin-bottom: 20px;
}

.news-single-content .entry-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

.news-single-footer {
    text-align: center;
}

/* ===================================
   一般ページ
=================================== */
.page-content {
    padding: 0;
}

.page-container {
    max-width: 1000px;
    margin: 100px auto 0;
    padding: 60px 40px;
}

.entry-header {
    text-align: center;
    margin-bottom: 60px;
}

.entry-title {
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 900;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.entry-featured-image {
    margin-bottom: 50px;
    border-radius: 12px;
    overflow: hidden;
}

.entry-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.entry-content {
    font-size: 18px;
    line-height: 1.9;
    color: #333;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.entry-content li {
    margin-bottom: 10px;
}

/* ニュースアーカイブ・シングル SP対応（480px以下・SERVICE同様） */
@media (max-width: 480px) {
    /* Pro Max等で画面上部見切れ防止（SERVICE・TOP同様） */
    .news-archive-section.section,
    .news-single-section.section {
        padding-top: calc(88px + var(--sat)) !important;
    }
    
    /* NEWS一覧：SERVICE同様にSPで常表示・PCの縮小レイアウト */
    .news-archive-item {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .news-archive-card {
        flex-direction: column;
        min-height: auto;
    }
    
    /* 画像の下にテキストを表示（横並びのままだとテキストが0幅で見えなくなる） */
    .news-archive-content {
        flex-direction: column !important;
        display: flex !important;
    }
    
    .news-archive-image {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: var(--comic-border);
        flex-shrink: 0;
    }
    
    .news-archive-text {
        padding: 18px 15px;
        flex: none !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
    }
    
    .news-archive-title {
        font-size: clamp(16px, 4vw, 18px);
    }
    
    .news-archive-excerpt {
        font-size: 12px;
        line-height: 1.55;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .news-year-tabs {
        gap: 10px;
        margin-bottom: 24px;
    }
    
    .news-year-tab {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .news-archive-back-button {
        margin-top: 32px;
        text-align: center;
    }
    
    .news-archive-back-button .comic-button {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    /* NEWS詳細：PCと同様に枠とコンテンツの余白を確保（.comic-cardのpadding:0を上書き） */
    .news-single-header.comic-card,
    .news-single-content.comic-card {
        padding: 28px 20px !important;
    }
    
    .news-single-header {
        padding: 28px 20px !important;
        margin-bottom: 24px;
    }
    
    .news-single-date {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    .news-single-title {
        font-size: clamp(20px, 5vw, 28px);
    }
    
    .news-single-content {
        padding: 28px 20px !important;
        margin-bottom: 32px;
    }
    
    .news-single-content .entry-content {
        font-size: 14px;
        line-height: 1.8;
    }
    
    .news-single-content .entry-content h2,
    .news-single-content .entry-content h3,
    .news-single-content .entry-content h4 {
        margin-top: 28px;
        margin-bottom: 14px;
        font-size: clamp(16px, 4vw, 20px);
    }
    
    .news-single-content .entry-content p {
        margin-bottom: 16px;
    }
    
    .news-single-footer {
        margin-top: 24px;
    }
    
    .news-single-footer .comic-button {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* ===================================
   レスポンシブ（小さいスマートフォン: iPhone SE以下）
=================================== */
@media (max-width: 375px) {
    .header-container {
        padding: max(12px, var(--sat)) max(12px, var(--sar)) 12px max(12px, var(--sal));
    }
    
    .site-logo {
        font-size: 18px;
    }
    
    /* メニュー内「CYBER STAR inc.」をヘッダーと同じ18pxに（SE用） */
    .main-navigation::before {
        font-size: 18px !important;
    }
    
    /* ×ボタン：SEも見切れないようセーフエリア＋余白を多めに */
    .menu-toggle span {
        width: 22px;
    }
    
    .section {
        padding: 60px 15px;
    }
    
    /* NEWS一覧・詳細も画面上部見切れ防止を維持 */
    .news-archive-section.section,
    .news-single-section.section {
        padding-top: calc(88px + var(--sat)) !important;
    }
    
    /* ヒーロー直後のABOUTとの間隔を480pxと同一に */
    .hero-section + .section {
        padding-top: 20px !important;
    }
    
    .section-title {
        font-size: clamp(24px, 6vw, 32px);
        margin-bottom: 40px;
    }
    
    .hero-section {
        padding: calc(88px + var(--sat)) 15px 20px;
    }
    
    .hero-content {
        padding: 0 5px;
    }
    
    .hero-text-wrapper {
        padding: 30px 20px;
    }
    
    .hero-title {
        font-size: clamp(24px, 7vw, 40px);
    }
    
    .hero-subtitle {
        font-size: clamp(12px, 3.5vw, 16px);
    }
    
    .hero-slide {
        padding: 15px;
        max-width: 98%;
    }
    
    .service-area-content {
        padding: 18px 15px !important;
    }
    
    .service-area-content h4 {
        font-size: clamp(16px, 3.8vw, 20px) !important;
    }
    
    .service-area-content p {
        font-size: 12px !important;
    }
    
    .comic-button {
        padding: 12px 30px;
        font-size: 13px;
    }
    
    .news-item {
        margin-bottom: 30px;
    }
    
    .news-content {
        padding: 20px;
    }
    
    .news-title {
        font-size: 18px;
    }
    
    /* 実績エリア：Pro Max/PCと同じ多列レイアウト（SEは2列で収める） */
    .achievements-grid,
    .achievement-items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .achievement-item-image {
        max-width: none;
    }
    
    .achievement-item-name {
        font-size: 11px;
    }
    
    .footer-content {
        gap: 14px;
        margin-bottom: 18px;
    }
    
    .site-footer {
        padding: 22px 18px max(18px, var(--sab));
    }
    
    .footer-section h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .footer-section ul {
        gap: 12px;
    }
    
    .footer-section a {
        font-size: 12px;
    }
    
    .footer-bottom {
        padding: 14px 18px max(14px, var(--sab));
    }
    
    .footer-bottom p {
        font-size: 10px;
    }
    
    /* プライバシーポリシー：画面上部見切れ防止・枠内余白を維持 */
    .privacy-policy-section.section {
        padding-top: calc(88px + var(--sat)) !important;
    }
    
    .privacy-content.comic-card {
        padding: 24px 18px !important;
    }
    
    .privacy-content {
        padding: 24px 18px !important;
    }
    
    .privacy-toc h2 {
        font-size: 18px;
    }
    
    .privacy-body h2 {
        font-size: clamp(18px, 4.5vw, 20px);
    }
    
    .privacy-body h3 {
        font-size: 16px;
    }
    
    .privacy-body p {
        font-size: 13px;
    }
}



