#cjm-wrapper {
    font-family: 'Noto Sans JP', system-ui, sans-serif;
    max-width: 1100px;
    margin: 0 auto;
}

#cjm-header {
    background: #1e1b4b;
    color: #fff;
    padding: 48px 24px 40px;
    text-align: center;
    border-radius: 12px 12px 0 0;
}

.cjm-badge {
    display: inline-block;
    background: #6366f1;
    color: #e0e7ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
}

#cjm-header h2 {
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 800;
    color: #fff !important;
    margin: 12px 0;
    line-height: 1.4;
}

#cjm-header p {
    color: #a5b4fc;
    font-size: 15px;
    margin: 0;
}

#cjm-form-area {
    background: #1e1b4b;
    padding: 0 24px 40px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

#cjm-url-input {
    flex: 1;
    min-width: 200px;
    max-width: 480px;
    padding: 14px 18px;
    border-radius: 8px;
    border: 2px solid #4f46e5;
    font-size: 15px;
    outline: none;
}

#cjm-submit {
    padding: 14px 28px;
    border-radius: 8px;
    border: none;
    background: #6366f1;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

#cjm-submit:hover { background: #4f46e5; }
#cjm-submit:disabled { background: #818cf8; cursor: not-allowed; }

#cjm-loading {
    text-align: center;
    padding: 40px;
    color: #6366f1;
    font-weight: 600;
    font-size: 16px;
}

.cjm-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #c7d2fe;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: cjm-spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes cjm-spin { to { transform: rotate(360deg); } }

#cjm-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0;
}

.cjm-summary {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 24px 0 12px;
}

.cjm-summary > div { flex: 1; min-width: 200px; }

.cjm-label {
    font-size: 11px;
    font-weight: 700;
    color: #6366f1;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.cjm-dl-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.cjm-excel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #16a34a;
    background: #f0fdf4;
    color: #15803d;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.cjm-excel-btn:hover { background: #dcfce7; }

.cjm-table-wrap { overflow-x: auto; }

.cjm-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    font-size: 13px;
}

.cjm-table th,
.cjm-table td {
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    vertical-align: top;
    line-height: 1.6;
}

.cjm-table thead th { text-align: center; }

.cjm-col-tofu { background: #eef2ff; }
.cjm-col-mofu { background: #ecfeff; }
.cjm-col-bofu { background: #ecfdf5; }

.cjm-stage-badge {
    display: inline-block;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.cjm-tofu-badge { background: #6366f1; }
.cjm-mofu-badge { background: #0891b2; }
.cjm-bofu-badge { background: #059669; }

.cjm-stage-sub { font-size: 12px; font-weight: 600; }
.cjm-tofu-sub  { color: #6366f1; }
.cjm-mofu-sub  { color: #0891b2; }
.cjm-bofu-sub  { color: #059669; }

.cjm-row-label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
    background: #f8fafc;
    width: 130px;
}

.cjm-table tbody tr:nth-child(even) .cjm-col-tofu { background: #e8edff; }
.cjm-table tbody tr:nth-child(even) .cjm-col-mofu { background: #e4f8fc; }
.cjm-table tbody tr:nth-child(even) .cjm-col-bofu { background: #e4f9f0; }
.cjm-table tbody tr:nth-child(even) .cjm-row-label { background: #f1f5f9; }

.cjm-table ul { margin: 0; padding-left: 16px; }
.cjm-table ul li { margin-bottom: 4px; }

.cjm-reset-bar { text-align: center; margin-top: 20px; }

.cjm-reset-btn {
    padding: 10px 24px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.cjm-reset-btn:hover { background: #f8fafc; }

.cjm-privacy-note {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 12px;
}

.cjm-privacy-note a {
    color: #94a3b8;
    text-decoration: underline;
}

.cjm-privacy-note a:hover {
    color: #6366f1;
}

/* サイドバー非表示・1カラム化（カスタマージャーニーページのみ） */
#cjm-wrapper {
    width: 100%;
}

body:has(#cjm-wrapper) #sidebar,
body:has(#cjm-wrapper) .sidebar,
body:has(#cjm-wrapper) #aside,
body:has(#cjm-wrapper) .aside,
body:has(#cjm-wrapper) .widget-area,
body:has(#cjm-wrapper) #secondary {
    display: none !important;
}

body:has(#cjm-wrapper) #main,
body:has(#cjm-wrapper) .main,
body:has(#cjm-wrapper) #content,
body:has(#cjm-wrapper) .content,
body:has(#cjm-wrapper) #primary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

/* ツールページ専用：タイトル・SNS・日付・パンくず・著者を非表示 */
body:has(#cjm-wrapper) .entry-title,
body:has(#cjm-wrapper) .article-title,
body:has(#cjm-wrapper) h1.title,
body:has(#cjm-wrapper) .sns-share,
body:has(#cjm-wrapper) .sns-follow,
body:has(#cjm-wrapper) .share-buttons,
body:has(#cjm-wrapper) .post-date,
body:has(#cjm-wrapper) .entry-date,
body:has(#cjm-wrapper) .date,
body:has(#cjm-wrapper) .byline,
body:has(#cjm-wrapper) .author,
body:has(#cjm-wrapper) .breadcrumb,
body:has(#cjm-wrapper) .tagcloud,
body:has(#cjm-wrapper) .post-tags,
body:has(#cjm-wrapper) .related-posts,
body:has(#cjm-wrapper) .comment-area,
body:has(#cjm-wrapper) #comments,
body:has(#cjm-wrapper) .pager,
body:has(#cjm-wrapper) .pagination,
body:has(#cjm-wrapper) .post-navi,
body:has(#cjm-wrapper) .footer-widget {
    display: none !important;
}

/* コンテンツエリアの余白をリセット */
body:has(#cjm-wrapper) .entry-content,
body:has(#cjm-wrapper) .article-body {
    padding: 0 !important;
    margin: 0 !important;
}

body:has(#cjm-wrapper) #main article,
body:has(#cjm-wrapper) .main article {
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* ツールページ：記事メタ情報・タイトル・著者・パンくず・プロフィール非表示 */
body:has(#cjm-wrapper) .entry-title,
body:has(#cjm-wrapper) .article-title,
body:has(#cjm-wrapper) .page-title,
body:has(#cjm-wrapper) h1.title,
body:has(#cjm-wrapper) .entry-date,
body:has(#cjm-wrapper) .post-date,
body:has(#cjm-wrapper) .date,
body:has(#cjm-wrapper) time,
body:has(#cjm-wrapper) .author-info,
body:has(#cjm-wrapper) .author-box,
body:has(#cjm-wrapper) .author-widget,
body:has(#cjm-wrapper) .prof-card,
body:has(#cjm-wrapper) .author-area,
body:has(#cjm-wrapper) .byline,
body:has(#cjm-wrapper) .by-author,
body:has(#cjm-wrapper) .breadcrumb,
body:has(#cjm-wrapper) .breadcrumbs,
body:has(#cjm-wrapper) #breadcrumb,
body:has(#cjm-wrapper) .sns-share,
body:has(#cjm-wrapper) .sns-follow,
body:has(#cjm-wrapper) .share-buttons,
body:has(#cjm-wrapper) .post-navi,
body:has(#cjm-wrapper) .pager,
body:has(#cjm-wrapper) .related-posts,
body:has(#cjm-wrapper) #comments,
body:has(#cjm-wrapper) .comment-area {
    display: none !important;
}

/* コンテンツ余白リセット */
body:has(#cjm-wrapper) .entry-content,
body:has(#cjm-wrapper) .article-body {
    padding: 0 !important;
    margin: 0 !important;
}

body:has(#cjm-wrapper) #main article,
body:has(#cjm-wrapper) .main article {
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border: none !important;
}

/* テーマスタイルのリセット・見出し修正 */
body:has(#cjm-wrapper) .entry-title,
body:has(#cjm-wrapper) .article-title {
    display: none !important;
}

#cjm-header h2 {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-left: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 0 12px !important;
    color: #fff !important;
    font-size: clamp(20px, 4vw, 32px) !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    text-align: center !important;
}

#cjm-header h2::before,
#cjm-header h2::after {
    display: none !important;
}

/* ページ全体の背景をツールに合わせる */
body:has(#cjm-wrapper) {
    background: #f8fafc !important;
}

body:has(#cjm-wrapper) #main,
body:has(#cjm-wrapper) .main,
body:has(#cjm-wrapper) #content,
body:has(#cjm-wrapper) .content {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 auto !important;
    max-width: 100% !important;
}

body:has(#cjm-wrapper) #wrap,
body:has(#cjm-wrapper) #wrapper {
    background: #f8fafc !important;
}

body:has(#cjm-wrapper) article {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body:has(#cjm-wrapper) .entry-content {
    padding: 0 !important;
    margin: 0 !important;
}
