/*
Theme Name: SSTOApp Theme
Theme URI: https://sstoapp.com
Author: SSTOApp Team
Description: Custom theme for SSTOApp Portfolio
Version: 1.0
*/

/* ===========================
   デザインシステム - CSS Variables
   =========================== */
:root {
    /* カラーパレット */
    --color-bg-primary: #0a1929;
    --color-bg-secondary: #0f2137;
    --color-bg-card: #132f4c;
    --color-bg-hover: #173a52;

    --color-text-primary: #ffffff;
    --color-text-secondary: #b2bac2;
    --color-text-muted: #8895a7;

    --color-accent-blue: #3b82f6;
    --color-accent-purple: #8b5cf6;
    --color-accent-pink: #ec4899;
    --color-accent-cyan: #06b6d4;

    /* グラデーション */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-hero: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);

    /* スペーシング */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* タイポグラフィ */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3rem;

    /* ボーダー・シャドウ */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);

    /* トランジション */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===========================
   リセット & ベーススタイル
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===========================
   共通コンポーネント
   =========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===========================
   ヘッダー
   =========================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 25, 41, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-sm) 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-weight: 700;
    font-size: var(--font-size-xl);
}

.logo-icon {
    font-size: var(--font-size-2xl);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: var(--spacing-xs);
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    transition: var(--transition-base);
}

/* ===========================
   ヒーローセクション
   =========================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    opacity: 0.5;
    z-index: 0;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.hero-description {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    gap: var(--spacing-xl);
}

.stat-item {
    text-align: left;
}

.stat-number {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--spacing-xs);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease-out 0.3s both;
}

.phone-mockup {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
    animation: floatPhone 6s ease-in-out infinite;
}

@keyframes floatPhone {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

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

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

/* ===========================
   NEWSセクション
   =========================== */
.news-section {
    padding: var(--spacing-2xl) 0;
    background: var(--color-bg-primary);
}

.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    gap: var(--spacing-lg);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color var(--transition-fast);
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

.news-date {
    flex-shrink: 0;
    width: 100px;
    color: var(--color-accent-blue);
    font-size: var(--font-size-sm);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.news-title {
    flex: 1;
    font-size: var(--font-size-lg);
    font-weight: 600;
    line-height: 1.5;
}

.news-title a {
    color: var(--color-text-primary);
    transition: color var(--transition-fast);
}

.news-title a:hover {
    color: var(--color-accent-blue);
}

.news-empty {
    text-align: center;
    color: var(--color-text-muted);
    padding: var(--spacing-xl) 0;
    font-size: var(--font-size-base);
}

/* ===========================
   アプリセクション
   =========================== */
.apps-section {
    padding: var(--spacing-2xl) 0;
    background: var(--color-bg-secondary);
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    max-width: 1200px;
    /* バランスよく広げる */
    margin: 0 auto;
}

.app-card {
    display: flex;
    flex-direction: column;
    background: var(--color-bg-card);
    /* より明るい紺色に変更 */
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* ボーダーも少し明るく */
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    position: relative;
    height: 100%;
    /* グリッド内で高さを揃える */
}

.app-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

.card-image {
    width: 100%;
    aspect-ratio: 16/9;
    /* 横長比率 */
    position: relative;
    overflow: hidden;
    background: var(--color-bg-tertiary);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.app-card:hover .card-image img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    /* 右上に戻す */
    left: auto;
    background: var(--color-accent-blue);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: var(--font-size-xs);
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.badge-soon {
    background: var(--color-text-secondary);
}

.card-content {
    flex: 1;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.tag {
    font-size: var(--font-size-xs);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-secondary);
}

.tag-personality {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.tag-productivity {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.tag-entertainment {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.tag-ios {
    background: rgba(255, 255, 255, 0.1);
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.card-description {
    color: var(--color-text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    flex-grow: 1;
    /* コンテンツ下部を揃えるために伸ばす */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-accent-blue);
    font-weight: 600;
    text-decoration: none;
    transition: gap var(--transition-fast);
    margin-top: auto;
    /* 下寄せ */
}

.card-link:hover {
    gap: var(--spacing-md);
    color: #818cf8;
}

.arrow-icon {
    transition: transform var(--transition-fast);
}

.card-link:hover .arrow-icon {
    transform: translateX(4px);
}

/* プレースホルダー（近日公開）スタイル */
.app-card-placeholder {
    opacity: 0.8;
}

.app-card-placeholder .card-image {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.1) 0%, rgba(71, 85, 105, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    animation: pulse 2s ease-in-out infinite;
}

.placeholder-icon {
    font-size: 4rem;
    opacity: 0.5;
}

.card-link-disabled {
    color: var(--color-text-muted);
    cursor: not-allowed;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

/* ===========================
   フッター
   =========================== */
.footer {
    background: var(--color-bg-primary);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-lg);
}

.footer-brand {
    max-width: 400px;
}

.footer-tagline {
    color: var(--color-text-secondary);
    margin-top: var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-links a {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent-blue);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

/* ===========================
   レスポンシブデザイン
   =========================== */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }

    .hero-visual {
        order: -1;
    }

    .phone-mockup {
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-description {
        font-size: var(--font-size-base);
    }

    .app-card {
        flex-direction: column;
        height: auto;
    }

    .card-image {
        width: 100%;
        height: 200px;
    }

    .card-badge {
        top: 10px;
        left: 10px;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .footer-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-2xl: 2.5rem;
    }

    .hero-title {
        font-size: var(--font-size-2xl);
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }
}/* =========================================
   下層ページスタイル (NEWS, Single) - シンプル版
   ========================================= */

.main-content {
    padding-top: 120px;
    padding-bottom: 100px;
    background: var(--color-bg-primary);
    /* 背景色は維持 */
    min-height: 80vh;
}

.container-narrow {
    max-width: 840px;
    /* 横幅調整 */
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* 記事ラッパー（枠線なし） */
.single-post-simple {
    position: relative;
    color: var(--color-text-primary);
}

/* ヘッダーエリア */
.single-header-simple {
    margin-bottom: 60px;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    /* 控えめなライン */
    padding-bottom: 20px;
}

/* 日付デザイン: 縦並び */
.date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-family: var(--font-english);
    color: var(--color-accent-blue);
    padding-right: 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    /* 右側に区切り線 */
}

.date-month {
    font-size: 1.4rem;
    font-weight: 700;
}

.date-day {
    font-size: 1.0rem;
    color: var(--color-text-secondary);
    margin-top: 4px;
}

.meta-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 12px;
}

.category-label a {
    color: var(--color-text-secondary);
    text-decoration: none;
}

/* タイトル */
.single-title-simple {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 40px;
    text-align: left;
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    .single-title-simple {
        font-size: 1.8rem;
    }
}

/* アイキャッチ */
.single-thumbnail-simple {
    margin-bottom: 60px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.single-thumbnail-simple img {
    width: 100%;
    height: auto;
    display: block;
}

/* 本文 */
.single-body-simple {
    font-size: 1.05rem;
    line-height: 2;
    color: #cbd5e1;
    /* 明るめのグレー */
}

.single-body-simple h2 {
    font-size: 1.8rem;
    margin: 60px 0 30px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

.single-body-simple h3 {
    font-size: 1.5rem;
    margin: 40px 0 20px;
    font-weight: 700;
    border-left: 4px solid var(--color-accent-blue);
    padding-left: 16px;
}

.single-body-simple p {
    margin-bottom: 2em;
}

.single-body-simple img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 30px 0;
}

.single-body-simple ul,
.single-body-simple ol {
    background: rgba(255, 255, 255, 0.03);
    padding: 30px 30px 30px 50px;
    border-radius: var(--radius-lg);
    margin-bottom: 2em;
}

.single-body-simple li {
    margin-bottom: 0.5em;
}

/* フッター（戻るボタンなど） */
.single-footer-simple {
    margin-top: 100px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 60px;
}

.back-link-simple {
    display: inline-block;
    padding: 14px 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: 4px;
    /* 少し角丸に */
    transition: all var(--transition-normal);
}

.back-link-simple:hover {
    background: white;
    color: var(--color-bg-primary);
    border-color: white;
}

/* ニュース一覧 (Archive) - シンプルリスト */
.news-archive-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    /* 隙間なし（ボーダーで区切るため） */
}

.news-archive-list .news-item {
    background: transparent;
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* 下線のみ */
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: opacity var(--transition-fast);
}

.news-archive-list .news-item:hover {
    opacity: 0.8;
}

.news-archive-list .news-date {
    font-size: 0.9rem;
    color: var(--color-accent-blue);
    font-family: var(--font-english);
    font-weight: 600;
}

.news-archive-list .news-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

.news-archive-list .news-title a {
    color: var(--color-text-primary);
    text-decoration: none;
}/* Archive List Refinements */
.news-archive-list .news-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    transition: background-color var(--transition-fast);
}

.news-item-link {
    display: flex;
    align-items: center;
    padding: 30px 20px;
    /* クリック領域を広く */
    text-decoration: none;
    color: inherit;
    gap: 30px;
}

.news-archive-list .news-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.news-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-family: 'Inter', sans-serif;
    /* 英語フォント */
    color: var(--color-accent-blue);
    min-width: 50px;
}

.news-date-month {
    font-size: 1.2rem;
    font-weight: 700;
}

.news-date-day {
    font-size: 1.0rem;
    color: var(--color-text-secondary);
    margin-top: 4px;
}

.news-content {
    flex: 1;
}

.news-archive-list .news-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.5;
    color: var(--color-text-primary);
    transition: color 0.2s;
}

.news-item-link:hover .news-title {
    color: var(--color-accent-blue);
}

@media (max-width: 600px) {
    .news-item-link {
        padding: 20px 10px;
        gap: 20px;
    }

    .news-date-box {
        min-width: 40px;
    }

    .news-date-month {
        font-size: 1rem;
    }

    .news-archive-list .news-title {
        font-size: 1.1rem;
    }
}/* App Card Reordering & Badge Fix */
.app-card {
    display: flex;
    flex-direction: column;
    padding-bottom: 20px;
    height: auto;
    /* 高さはコンテンツなりに */
}

/* バッジスタイル修正 */
.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    left: auto;
    /* 左指定を解除 */
    width: auto;
    /* 幅を自動に */
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 4px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
}

/* コンテンツエリア */
.card-content {
    padding: 25px 25px 10px 25px;
    /* 下のパディングを減らす */
    order: 1;
    /* 明示的に順序指定（念のため） */
    flex: 0 0 auto;
}

.card-title {
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.card-description {
    margin-bottom: 15px;
    -webkit-line-clamp: 4;
    /* 行数制限を少し増やす */
}

/* 画像エリア */
.card-image {
    order: 2;
    margin: 0 25px 15px 25px;
    /* 左右に余白を入れて枠のようにするか、あるいは全幅にするか。要望は画像を下に。 */
    /* 全幅にするなら margin: 0; だが、カードデザイン的には少し内側にあるとおしゃれかも。今回は全幅でなく内側に配置してみる */
    border-radius: var(--radius-lg);
    overflow: hidden;
    width: auto;
    /* マージンを効かせる */
    aspect-ratio: 16/9;
}

/* アクション（リンク）エリア */
.card-action {
    order: 3;
    padding: 0 25px;
    margin-top: auto;
    /* 下に寄せる */
}

/* モバイル調整 */
@media (max-width: 768px) {
    .card-badge {
        top: 10px;
        right: 10px;
    }

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

    .card-image {
        margin: 0 20px 15px 20px;
    }

    .card-action {
        padding: 0 20px;
    }
}/* Hero Order Fix for Mobile */
@media (max-width: 968px) {
    .hero-visual {
        order: 1 !important;
        /* コンテンツの下に表示 */
        margin-top: 30px;
    }
}

/* App Card Layout Restoration & Badge Fix */
.app-card {
    display: flex;
    flex-direction: column;
}

.card-image {
    order: 0;
    /* 画像を先頭に */
    margin: 0;
    width: 100%;
    border-radius: 0;
    /* カード上部は角丸なし（親のoverflowで切る） */
}

/* バッジを右上に固定（横伸び防止） */
.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    left: auto;
    /* 左側の指定を解除 */
    width: auto;
    /* 幅を自動に */
    min-width: auto;
    z-index: 20;
    padding: 6px 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.card-content {
    order: 1;
    /* コンテンツはその後 */
    padding: var(--spacing-lg);
}

/* 不要になったアクションエリアのスタイルリセット */
.card-action {
    display: none;
}/* Hero Layout Refactor (Grid Areas) */
.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0 var(--spacing-2xl);
    /* 横のギャップのみ、縦はコンテンツ依存 */
    align-items: center;
    grid-template-areas:
        "text visual"
        "stats visual";
}

.hero-content {
    grid-area: text;
    margin-bottom: var(--spacing-xl);
}

.hero-stats {
    grid-area: stats;
    display: flex;
    gap: var(--spacing-xl);
    align-items: center;
    /* ユーザー数などを垂直中央揃え */
    justify-content: flex-start;
}

.hero-visual {
    grid-area: visual;
    animation: fadeInRight 1s ease-out 0.3s both;
    margin-top: 0 !important;
    /* 前回のmargin指定をリセット */
    order: 0 !important;
    /* order指定をリセット */
}

/* Mobile Layout (Text -> Visual -> Stats) */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: var(--spacing-lg) 0;
        grid-template-areas:
            "text"
            "visual"
            "stats";
        justify-items: center;
        /* 中央揃え */
        text-align: center;
    }

    .hero-content {
        margin-bottom: var(--spacing-md);
    }

    .hero-description {
        margin-bottom: 0;
    }

    .hero-stats {
        width: 100%;
        justify-content: center;
        /* 中央寄せ */
        gap: var(--spacing-xl);
        margin-top: var(--spacing-md);
    }

    .stat-item {
        text-align: center;
        /* スマホでは中央揃え */
    }

    .hero-visual {
        margin: var(--spacing-md) 0;
    }
}/* ヒーロータイトルのスマホ表示拡大 & スタッツ横並び調整 */
@media (max-width: 968px) {
    .hero-title {
        font-size: 3rem !important;
        /* スマホでも大きく */
        margin-bottom: 20px;
    }

    /* スタッツを強制的に横並びにする */
    .hero-stats {
        flex-direction: row !important;
        /* 行方向に */
        flex-wrap: nowrap !important;
        /* 折り返さない */
        gap: 1.5rem !important;
        /* 間隔を少し詰める */
        align-items: flex-start !important;
        width: auto !important;
        /* コンテンツ幅に合わせる */
        display: inline-flex !important;
        /* 中央寄せしやすく */
    }

    .stat-item {
        min-width: auto !important;
        /* 幅を制限しない */
        flex: 0 0 auto !important;
    }

    .stat-number {
        font-size: 2rem !important;
        /* 数字を少し小さくして収める */
    }

    .stat-label {
        font-size: 0.8rem !important;
        white-space: nowrap;
        /* ラベルの折り返しを防ぐ */
    }
}/* Mobile Spacing Adjustment */
@media (max-width: 768px) {
    .container {
        padding-left: 24px !important;
        /* 1.5rem相当 */
        padding-right: 24px !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 20px !important;
        /* 小さい画面でも最低20pxは確保 */
        padding-right: 20px !important;
    }

    /* 変数の上書きをキャンセルして少し広めに保つ */
    :root {
        --spacing-md: 1.25rem !important;
        /* 1rem(16px) -> 20pxへ変更 */
    }
}/* Global Spacing Increase (More Padding) */
.container {
    padding-left: 5% !important;
    /* 固定pxではなく％で指定して画面幅に応じたゆとりを持たせる */
    padding-right: 5% !important;
    max-width: 1280px;
    /* 余白が増えた分、最大幅も少し広げてバランスを取る */
}

@media (min-width: 1200px) {
    .container {
        padding-left: 60px !important;
        /* 大画面では固定値でしっかり余白 */
        padding-right: 60px !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 30px !important;
        /* スマホでも30px確保 */
        padding-right: 30px !important;
    }
}/* Fix for Narrow Container Override */
.container.container-narrow {
    max-width: 840px !important;
    /* 全体のmax-width設定に負けないように強制 */
    padding-left: 24px !important;
    /* 詳細ページは余白を含めて読みやすく */
    padding-right: 24px !important;
}

/* スマホでも詳細ページは狭すぎないように */
@media (max-width: 768px) {
    .container.container-narrow {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}/* Footer Layout Refinement (Centered) */
.footer-content {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: var(--spacing-md) !important;
}

.footer-brand {
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-links {
    flex-direction: row !important;
    justify-content: center !important;
    gap: var(--spacing-lg) !important;
    width: 100%;
}

.logo {
    justify-content: center;
    /* ロゴ内のアイコンとテキストも中央に */
}

/* スマホでのリンクの並びを微調整 */
@media (max-width: 480px) {
    .footer-links {
        flex-direction: column !important;
        /* スマホでは縦並びの方が押しやすい場合も */
        gap: var(--spacing-sm) !important;
    }
}/* Update: More Padding for Mobile Single/Page */
@media (max-width: 768px) {
    .container.container-narrow {
        padding-left: 32px !important;
        /* 20px -> 32px に増量 */
        padding-right: 32px !important;
    }
}/* Footer Visual Refinement */
.footer {
    padding: 80px 0 40px !important;
    /* 上下の余白をたっぷり取る */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* コンテンツとの境界線を引く */
    margin-top: 80px;
    /* 記事本文との距離も離す */
}

/* ブランドエリアとリンクエリアの距離を離す */
.footer-brand {
    margin-bottom: 20px !important;
}

.footer-tagline {
    color: var(--color-text-secondary) !important;
    /* 少し暗くして階層を下げる */
    font-size: 0.85rem !important;
    margin-top: 12px !important;
}

/* リンクメニューのデザイン */
.footer-links {
    gap: 40px !important;
    /* PCではリンク間隔を広めに */
    margin-bottom: 20px !important;
}

.footer-links a {
    color: var(--color-text-primary) !important;
    font-size: 0.95rem !important;
    font-weight: 500;
    opacity: 0.8;
    transition: all 0.3s ease;
    padding: 5px 0;
    /* クリック領域微増 */
}

.footer-links a:hover {
    opacity: 1;
    color: var(--color-accent-blue) !important;
}

/* コピーライト */
.footer-bottom {
    margin-top: 40px !important;
    padding-top: 20px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    /* さらに薄い線で区切る */
    width: 100%;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.75rem !important;
    color: var(--color-text-muted) !important;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .footer {
        padding: 60px 0 30px !important;
    }

    .footer-links {
        flex-direction: column !important;
        /* 完全な縦並び */
        gap: 24px !important;
        /* 指で押しやすい間隔 */
        margin: 30px 0 !important;
    }

    .footer-links a {
        display: block;
        padding: 8px 0;
        /* タップ領域確保 */
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        /* うっすら区切り線 */
        width: 100%;
        max-width: 200px;
        /* 横幅を制限 */
    }
}/* Mobile Footer Fix (Cleaner Look) */
@media (max-width: 480px) {
    .footer-links {
        margin: 20px 0 30px !important;
        gap: 16px !important;
        /* 間隔を少し詰める */
    }

    .footer-links a {
        border-bottom: none !important;
        /* 線を消す */
        width: auto !important;
        /* 幅制限を解除 */
        max-width: none !important;
        padding: 5px 0 !important;
        font-size: 0.9rem !important;
        color: rgba(255, 255, 255, 0.7) !important;
        /* 少し色を抑えて上品に */
    }

    .footer-links a:hover,
    .footer-links a:active {
        color: white !important;
    }

    /* ブランド周りの余白も少し詰める */
    .footer {
        padding-top: 50px !important;
        /* 上部余白を少し減らす */
        margin-top: 50px !important;
    }

    .footer-brand {
        margin-bottom: 10px !important;
    }
}/* PC版ヒーローセクションの余白調整 */
@media (min-width: 969px) {
    .hero {
        min-height: 80vh !important;
        /* 100vhだと広すぎるため少し縮める */
        padding-top: 100px !important;
        /* ヘッダー直下の余白を調整 */
    }

    .hero-content {
        margin-bottom: 20px !important;
        /* テキストとスタッツの間（下の余白）を詰める */
    }

    .hero .container {
        align-content: center;
        /* コンテンツ全体を中央寄りに */
    }
}/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    /* 紫色〜ピンクのグラデーション */
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(20px);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.6);
}

/* モバイル調整 */
@media (max-width: 768px) {
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}
/* Header Navigation */
.header-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--color-accent-cyan); /* アクセントカラー(水色) */
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: white;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Header Nav */
@media (max-width: 768px) {
    .header-nav {
        gap: 15px;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }
}
