:root {
    --bg-dark: #faf7f2;
    --bg-panel: #ffffff;
    --bg-hover: #f6f1e9;
    --border-color: rgba(139, 92, 26, 0.1);
    --border-glow: rgba(217, 119, 6, 0.25);
    --text-primary: #292524;
    --text-secondary: #57534e;
    --text-muted: #878378;
    --primary-color: #d97706;
    --primary-hover: #b45309;
    --accent-color: #0d9488;
    --success-color: #166534;
    --info-color: #0369a1;
    --radius-xl: 20px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --font-sans: 'Inter', sans-serif;
    --font-logo: 'Outfit', sans-serif;
    --shadow-premium: 0 20px 40px -15px rgba(67, 43, 15, 0.06);
    --shadow-glow: 0 0 30px rgba(217, 119, 6, 0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

html, body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 背景グロー装飾 */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.08;
}

.bg-glow-1 {
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation: float-glow 12s ease-in-out infinite;
}

.bg-glow-2 {
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    bottom: -200px;
    left: -200px;
    animation: float-glow-reverse 15s ease-in-out infinite;
}

@keyframes float-glow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, 40px) scale(1.1); }
}

@keyframes float-glow-reverse {
    0%, 100% { transform: translate(0, 0) scale(1.1); }
    50% { transform: translate(40px, -30px) scale(0.9); }
}

/* ポータルコンテナ */
.portal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* ヘッダー */
.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 60px;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portal-logo-icon {
    font-size: 28px;
    animation: bounce-small 3s ease-in-out infinite;
}

.portal-logo-text h1 {
    font-family: var(--font-logo);
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #78350f 0%, #b45309 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.portal-logo-text p {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
}

/* 言語スイッチャー */
.lang-switcher {
    display: flex;
    gap: 2px;
    background: rgba(139, 92, 26, 0.05);
    border: 1px solid rgba(139, 92, 26, 0.1);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.btn-lang {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-lang.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.15);
}

.btn-lang:hover:not(.active) {
    color: var(--text-primary);
}

/* ヒーローセクション */
.hero-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.hero-title {
    font-family: var(--font-logo);
    font-size: 44px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, #b45309 0%, #d97706 60%, #0d9488 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 寄付カード */
.fund-section {
    margin-bottom: 80px;
}

.fund-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    display: flex;
    gap: 40px;
    align-items: center;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

.fund-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
}

.fund-info {
    flex: 1.3;
}

.fund-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-color);
    background: rgba(236, 72, 153, 0.1);
    padding: 4px 8px;
    border-radius: 20px;
    margin-bottom: 16px;
    letter-spacing: 0.05em;
}

.fund-info h3 {
    font-family: var(--font-logo);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.fund-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.fund-progress-container {
    background: rgba(139, 92, 26, 0.03);
    border: 1px solid rgba(139, 92, 26, 0.06);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
}

.fund-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.fund-progress-header strong {
    color: var(--text-primary);
}

.progress-bar-bg {
    width: 100%;
    height: 20px;
    background: rgba(139, 92, 26, 0.08);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.2);
    transition: width 1s ease-out;
}

.progress-percent {
    font-size: 11px;
    font-weight: 700;
    color: white;
}

.fund-actions {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.unlock-note {
    font-size: 11px;
    color: var(--text-muted);
}

/* セクション設定 */
.section-container {
    margin-bottom: 80px;
}

.section-title {
    font-family: var(--font-logo);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 32px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.section-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}

/* アプリ・ツールカード */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
    gap: 30px;
}

.app-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.app-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-premium), var(--shadow-glow);
}

.card-icon-wrapper {
    padding: 30px 30px 10px;
}

.card-icon {
    font-size: 40px;
    display: inline-block;
    transition: transform 0.3s;
}

.app-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-image-header {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.app-logo-large {
    font-size: 48px;
    transition: transform 0.3s;
}

.app-card:hover .app-logo-large {
    transform: scale(1.1) rotate(-5deg);
}

.card-content {
    padding: 24px 30px 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-header-row h4 {
    font-family: var(--font-logo);
    font-size: 20px;
    font-weight: 700;
}

.badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-accent { background: rgba(236, 72, 153, 0.1); color: var(--accent-color); }
.badge-primary { background: rgba(99, 102, 241, 0.1); color: var(--primary-color); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success-color); }
.badge-info { background: rgba(14, 165, 233, 0.1); color: var(--info-color); }

.card-desc {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    flex: 1;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}

.tag {
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(139, 92, 26, 0.05);
    border: 1px solid rgba(139, 92, 26, 0.08);
    padding: 3px 8px;
    border-radius: 4px;
}

/* ボタン */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}

.btn-block {
    display: flex;
    width: 100%;
    padding: 12px 0;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(139, 92, 26, 0.06);
    border: 1px solid rgba(139, 92, 26, 0.12);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(139, 92, 26, 0.12);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(139, 92, 26, 0.2);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(139, 92, 26, 0.05);
    border-color: rgba(139, 92, 26, 0.3);
}

.btn.disabled {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.btn.disabled:hover {
    transform: none;
}

/* フッター */
.portal-footer {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
}

.portal-footer p {
    margin-bottom: 8px;
}

.footer-privacy {
    opacity: 0.6;
}

/* アニメーション */
@keyframes bounce-small {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* レスポンシブ */
@media (max-width: 900px) {
    .fund-card {
        flex-direction: column;
        padding: 30px;
    }
    .fund-info, .fund-actions {
        width: 100%;
    }
    .hero-title {
        font-size: 34px;
    }
}

@media (max-width: 600px) {
    .portal-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
        margin-bottom: 40px;
    }
    .header-nav {
        width: 100%;
        justify-content: space-between;
    }
    .hero-title {
        font-size: 28px;
    }
    .hero-subtitle {
        font-size: 14px;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* 使い方アコーディオン (Usage Details) */
.usage-details {
    background: rgba(139, 92, 26, 0.03);
    border: 1px solid rgba(139, 92, 26, 0.06);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    overflow: hidden;
    transition: background 0.3s;
}

.usage-details[open] {
    background: rgba(139, 92, 26, 0.06);
    border-color: rgba(217, 119, 6, 0.25);
}

.usage-summary {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    list-style: none; /* デフォルトの三角マーカーを非表示 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.usage-summary::-webkit-details-marker {
    display: none; /* Safariでの三角マーク非表示 */
}

.usage-summary::after {
    content: '▼';
    font-size: 9px;
    transition: transform 0.2s;
    color: var(--text-muted);
}

.usage-details[open] .usage-summary::after {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.usage-summary:hover {
    color: var(--text-primary);
}

.usage-steps {
    padding: 0 16px 16px 30px;
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.usage-steps li {
    margin-bottom: 8px;
}

.usage-steps li:last-child {
    margin-bottom: 0;
}
