/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基本設定 */
:root {
    --primary-color: #4A90E2;
    --secondary-color: #7ED321;
    --accent-color: #F5A623;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --background-light: #F8F9FA;
    --background-white: #FFFFFF;
    --border-light: #E9ECEF;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
    --gradient-primary: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    --gradient-secondary: linear-gradient(135deg, #7ED321 0%, #6BB91A 100%);
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-white);
}

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

/* ヘッダー */
.header {
    background: var(--background-white);
    box-shadow: var(--shadow-light);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* fallback */
    padding-left: 20px; /* fallback */
    padding-right: 20px; /* fallback */
    /* iOS安全領域に配慮して右上の×が欠けないようにする */
    padding-left: calc(20px + env(safe-area-inset-left));
    padding-right: calc(20px + env(safe-area-inset-right));
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 56px;              /* さらに大きく */
    height: 56px;             /* さらに大きく */
    justify-content: center;
    align-items: center;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.nav-toggle span {
    width: 30px;
    height: 3px;
    background: var(--text-dark);
    margin: 0;
    transition: 0.3s;
}

/* メインビジュアル */
.hero {
    background: var(--gradient-primary);
    color: white;
    padding: 120px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

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

.hero-subtitle {
    display: block;
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-main-title {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-description {
    display: block;
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 3rem;
    line-height: 1.8;
    opacity: 0.95;
}

.hero-features {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.hero-feature-icon {
    font-size: 1.5rem;
}

.hero-feature-text {
    font-weight: 500;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

/* ボタンスタイル */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.btn-primary {
    background: var(--gradient-secondary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* スマホモックアップ */
.hero-image {
    display: flex;
    justify-content: center;
    animation: fadeInRight 1s ease-out 0.3s both;
}

.phone-mockup {
    width: 300px;
    height: 600px;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    position: relative;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

.app-preview {
    padding: 30px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.app-header {
    margin-bottom: 40px;
}

.app-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-align: center;
    margin-bottom: 20px;
}

.volume-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.2);
    padding: 10px 15px;
    border-radius: 20px;
}

.volume-bar {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    overflow: hidden;
}

.volume-fill {
    height: 100%;
    background: var(--secondary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.volume-text {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.app-player {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
}

.song-info {
    text-align: center;
    color: white;
}

.song-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.song-artist {
    font-size: 1rem;
    opacity: 0.8;
}

.player-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

.control-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-btn {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    background: rgba(255,255,255,0.3);
}

.control-btn:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
}

.audio-presets {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.preset-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* セクション共通 */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* 機能セクション */
.features {
    padding: 100px 0;
    background: var(--background-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--background-white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 700;
}

/* メリットセクション */
.benefits {
    padding: 100px 0;
    background: var(--background-white);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.benefit-card {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.benefit-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.benefit-description {
    color: var(--text-light);
    line-height: 1.8;
}

/* 技術仕様セクション */
.tech-specs {
    padding: 100px 0;
    background: var(--background-light);
}

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

.tech-card {
    background: var(--background-white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
}

.tech-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.tech-list {
    list-style: none;
}

.tech-list li {
    color: var(--text-light);
    margin-bottom: 0.8rem;
    padding-left: 1rem;
    border-left: 3px solid var(--primary-color);
}



/* スクリーンショットセクション */
.screenshots {
    padding: 100px 0;
    background: var(--background-white);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.screenshot-card {
    background: var(--background-white);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

.screenshot-card img {
    display: block;
    width: 100%;
    height: auto;
}

.screenshot-caption {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--text-light);
    background: #fff;
}

/* ダウンロードセクション */
.download {
    padding: 100px 0;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.download .section-title {
    color: white;
}

.download .section-title::after {
    background: white;
}

.download-content {
    max-width: 600px;
    margin: 0 auto;
}

.download-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.download-description {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    line-height: 1.8;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.download-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

.download-btn-icon {
    font-size: 2rem;
}

.download-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.download-btn-small {
    font-size: 0.8rem;
    opacity: 0.8;
}

.download-btn-large {
    font-size: 1.1rem;
    font-weight: 600;
}

.download-note {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* お問い合わせセクション */
.contact {
    padding: 100px 0;
    background: var(--background-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-subtitle {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.contact-developer {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.contact-description {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.contact-links {
    margin-bottom: 2rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--text-dark);
}

.contact-link-icon {
    font-size: 1.2rem;
}

.notification-form {
    background: var(--background-white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-note {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.tally-form-container {
    margin-top: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.tally-form-container iframe {
    border-radius: 10px;
}

/* フッター */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    opacity: 0.8;
    font-style: italic;
}

.footer-links {
    display: flex;
    gap: 3rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    opacity: 0.7;
}

/* 同意バナー */
.consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 14px 0;
    backdrop-filter: blur(6px);
}
.consent-banner__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 16px;
    align-items: center;
}
.consent-banner__text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}
.consent-banner__actions {
    display: flex;
    gap: 8px;
}
.consent-btn {
    appearance: none;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
}
.consent-accept { background: var(--secondary-color); color: #000; }
.consent-reject { background: #444; color: #fff; }

@media (max-width: 640px) {
    .consent-banner__inner { flex-direction: column; align-items: stretch; }
    .consent-banner__actions { justify-content: flex-end; }
}

/* アニメーション */
@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);
    }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
        margin-right: calc(16px + env(safe-area-inset-right)); /* 端の欠け対策をさらに強化 */
    }

    /* モバイル: ハンバーガーメニュー展開 */
    .nav-container {
        position: relative;
        padding-right: calc(20px + env(safe-area-inset-right)); /* 右上×の欠け防止 */
    }
    .nav-menu.active {
        display: flex;
        position: absolute;
        top: 70px;
        right: 0;
        left: 0;
        flex-direction: column;
        gap: 0;
        background: var(--background-white);
        border-bottom: 1px solid var(--border-light);
        box-shadow: var(--shadow-light);
        z-index: 1001;
    }
    .nav-menu.active li { border-top: 1px solid var(--border-light); }
    .nav-menu.active a {
        display: block;
        padding: 16px 24px; /* タップ領域拡大 */
        font-size: 1.1rem;
    }
    .nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    /* スマホSafariでのセーフエリア余白を強化 */
    .header { padding-right: env(safe-area-inset-right); }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-main-title {
        font-size: 2.5rem;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .phone-mockup {
        width: 250px;
        height: 500px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .hero-main-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .phone-mockup {
        width: 200px;
        height: 400px;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .status-item {
        flex-direction: column;
        gap: 1rem;
    }
}