/* ===================================
   AIキャリアアドバイザー - スタイル
   =================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #e0e7ff;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-sub: #64748b;
    --border: #e2e8f0;
    --success: #22c55e;
    --radius: 16px;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(99,102,241,0.15);
    --max-w: 480px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* レイアウト */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ヘッダー */
.app-header {
    text-align: center;
    padding: 24px 0 16px;
}
.app-header h1 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}
.app-header p {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-top: 4px;
}

/* プログレスバー */
.progress-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}
.progress-step-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}
.progress-track {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* カード（質問） */
.question-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.question-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* 選択肢 */
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.option-btn {
    display: block;
    width: 100%;
    padding: 14px 18px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}
.option-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.option-btn:active {
    transform: scale(0.98);
}

/* 戻るボタン */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-sub);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 8px 0;
    margin-top: 16px;
}
.back-btn:hover {
    color: var(--text);
}

/* ローディング */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 20px;
    animation: fadeIn 0.3s ease;
}
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.loading-screen p {
    color: var(--text-sub);
    font-size: 0.95rem;
}

/* 結果画面 */
.result-screen {
    animation: fadeIn 0.4s ease;
}
.type-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    padding: 12px 24px;
    border-radius: 12px;
    margin-bottom: 12px;
}
.type-description {
    color: var(--text-sub);
    font-size: 0.9rem;
    margin-bottom: 24px;
    line-height: 1.8;
}

/* 統計データセクション */
.stat-section {
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}
.stat-section h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
}
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.stat-item {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}
.stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}
.stat-label {
    font-size: 0.75rem;
    color: var(--text-sub);
    margin-top: 4px;
}
.stat-note {
    font-size: 0.7rem;
    color: var(--text-sub);
    margin-top: 8px;
    text-align: right;
}

/* おすすめカード */
.recommendation-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 12px;
}
.recommendation-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}
.recommendation-card p {
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.7;
}

/* 最初の一歩 */
.first-step {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius);
    padding: 20px;
    margin: 24px 0;
}
.first-step h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 8px;
}
.first-step p {
    font-size: 0.9rem;
    color: #78350f;
    line-height: 1.7;
}

/* 市場分析 */
.market-insight {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}
.market-insight h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.market-insight p {
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.8;
}

/* シェアボタン */
.share-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #bae6fd;
    border-radius: var(--radius);
    padding: 24px;
    margin: 24px 0;
    text-align: center;
}
.share-section p {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 12px;
}
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
}
.share-btn.native { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }
.share-btn.x { background: #0f1419; }
.share-btn.line { background: #06c755; }
.share-btn.copy { background: #6b7280; }
.share-btn.copy.copied { background: var(--success); }
.share-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* やり直しボタン */
.retry-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-sub);
    cursor: pointer;
    text-align: center;
    margin-bottom: 24px;
    transition: all 0.2s;
}
.retry-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* エラー */
.error-message {
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    color: #dc2626;
    margin: 20px 0;
}

/* ========================================
   ランディング画面
   ======================================== */
.landing-screen {
    text-align: center;
    padding: 16px 0 24px;
    animation: fadeIn 0.3s ease;
}
.landing-hero {
    margin-bottom: 32px;
}
.landing-hero .landing-cta {
    margin-top: 20px;
}
.landing-hero .landing-note {
    margin-top: 8px;
}
.landing-hero h2 {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 12px;
}
.landing-hero p {
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.7;
}
.landing-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
    text-align: left;
}
.landing-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow);
}
.landing-step-num {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    flex-shrink: 0;
}
.landing-step strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.landing-step p {
    font-size: 0.8rem;
    color: var(--text-sub);
    line-height: 1.5;
    margin: 0;
}
.landing-types {
    margin-bottom: 28px;
}
.landing-types h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-sub);
    margin-bottom: 12px;
}
.landing-type-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.landing-type-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.landing-cta {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    margin-bottom: 12px;
}
.landing-cta:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}
.landing-note {
    font-size: 0.75rem;
    color: var(--text-sub);
}

/* ========================================
   サイトヘッダー
   ======================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}
.header-logo:hover { text-decoration: none; }
.header-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}
.menu-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}
.menu-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.menu-toggle.active .menu-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active .menu-bar:nth-child(2) { opacity: 0; }
.menu-toggle.active .menu-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.header-nav {
    display: none;
    padding: 8px 16px 16px;
    max-width: var(--max-w);
    margin: 0 auto;
}
.header-nav.open { display: block; }
.nav-section {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.nav-section:last-child { border-bottom: none; }
.nav-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.nav-section a {
    display: block;
    padding: 8px 12px;
    color: var(--text);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: background 0.2s;
}
.nav-section a:hover {
    background: var(--primary-light);
    text-decoration: none;
}
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, 0.3);
}
.nav-overlay.active { display: block; }

/* ========================================
   サイトフッター
   ======================================== */
.site-footer {
    margin-top: 60px;
    padding: 32px 16px;
    background: var(--primary-light);
    text-align: center;
}
.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-bottom: 16px;
}
.footer-links a {
    font-size: 0.85rem;
    color: var(--text-sub);
}
.footer-apps {
    margin-bottom: 16px;
}
.footer-apps a {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}
.footer-copy {
    font-size: 0.75rem;
    color: var(--text-sub);
}

/* ========================================
   静的ページ（about, privacy, disclaimer, 記事）
   ======================================== */
.static-page {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 32px 16px 40px;
}
.static-page h1 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 24px;
    text-align: center;
    color: var(--text);
}
.static-page h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
    color: var(--text);
}
.static-page > p {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.8;
}
.static-page ul {
    padding-left: 20px;
    margin-bottom: 12px;
    list-style: disc;
}
.static-page ul li {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.7;
}

/* パンくずリスト */
.breadcrumb {
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-bottom: 20px;
}
.breadcrumb a {
    color: var(--primary);
}

/* CTAボタン */
.btn-cta {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}
.btn-cta:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    text-decoration: none;
}

/* ========================================
   読み物一覧ページ
   ======================================== */
.column-page {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 16px 40px;
}
.column-hero {
    text-align: center;
    padding: 36px 0 28px;
}
.column-hero h1 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text);
}
.column-hero p {
    font-size: 0.9rem;
    color: var(--text-sub);
}
.column-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.column-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
}
.column-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
    border-color: var(--primary);
}
.column-card-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 12px;
}
.column-card-body {
    flex: 1;
    min-width: 0;
}
.column-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
    line-height: 1.4;
}
.column-card-desc {
    font-size: 0.78rem;
    color: var(--text-sub);
    line-height: 1.5;
}
.column-card-arrow {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--primary);
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
}
.column-card:hover .column-card-arrow {
    opacity: 1;
    transform: translateX(3px);
}
.column-about-card {
    margin-top: 8px;
}
.column-about-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-light), #fef3c7);
    border-radius: var(--radius);
    border: 2px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s;
}
.column-about-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
}
.column-about-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
}
.column-about-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.column-about-desc {
    font-size: 0.78rem;
    color: var(--text-sub);
}
