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

body.ccm-tool-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ccm-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

.ccm-question-section {
    background: #f7fafc;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.ccm-question-group {
    margin-bottom: 25px;
}

.ccm-question-group:last-child {
    margin-bottom: 0;
}

@media (min-width: 769px) {
    .ccm-question-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
    }
}

.ccm-question {
    font-size: 1em;
    color: #2d3748;
    margin-bottom: 12px;
    font-weight: 600;
}

.ccm-container select,
.ccm-container input[type="text"],
.ccm-container input[type="month"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    color: #2d3748;
    font-family: inherit;
}

.ccm-container select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
}

.ccm-container input[type="text"],
.ccm-container input[type="month"] {
    cursor: text;
}

.ccm-container select:hover,
.ccm-container input:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ccm-container select:focus,
.ccm-container input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ccm-container select:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 #2d3748;
}

.ccm-timeline-description {
    margin-bottom: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    color: #4a5568;
    font-style: italic;
    display: none;
}

.ccm-timeline-description.show {
    display: block;
}

.ccm-path-container {
    display: none;
    margin-top: 40px;
}

.ccm-path-container.show {
    display: block;
}

.ccm-paths-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    width: 100%;
}

.ccm-icon-legend {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.ccm-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.95em;
    color: #4a5568;
}

.ccm-legend-item:last-child {
    margin-bottom: 0;
}

.ccm-legend-icon {
    font-size: 1.5em;
    min-width: 30px;
    text-align: center;
}

.ccm-path-card {
    background: #f7fafc;
    border-radius: 15px;
    padding: 30px;
    border: 3px solid #e2e8f0;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.ccm-path-title {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2d3748;
    text-align: center;
}

.ccm-grid-3x3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 25px auto;
    max-width: 420px;
}

.ccm-grid-cell {
    aspect-ratio: 1;
    border: 2px solid #cbd5e0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    position: relative;
    font-size: 0.9em;
    padding: 10px;
    text-align: center;
    overflow: hidden;
}

.ccm-grid-cell.active {
    background: #667eea;
    color: white;
    border-color: #5568d3;
    font-weight: 700;
}

.ccm-cell-number {
    font-size: 1.5em;
    opacity: 0.7;
    margin-bottom: 4px;
}

.ccm-cell-archetype {
    font-weight: 700;
    font-size: 1.4em;
}

.ccm-footstep {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ccm-footstep svg {
    width: 28px;
    height: 28px;
}

.ccm-journey-text {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    line-height: 1.9;
    color: #4a5568;
    text-align: center;
    font-size: 1.05em;
}

.ccm-column-labels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 420px;
    margin: 0 auto 10px;
    text-align: center;
    font-size: 0.9em;
    font-weight: 600;
    color: #4a5568;
}

.ccm-footstep svg path,
.ccm-footstep svg rect,
.ccm-footstep svg circle {
    fill: black !important;
    stroke: black !important;
}

.ccm-prompt-generator {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.ccm-prompt-generator h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.ccm-form-group {
    margin-bottom: 20px;
}

.ccm-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.95em;
}

.ccm-generate-btn {
    width: 100%;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ccm-generate-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ccm-prompts-output {
    margin-top: 25px;
    display: none;
}

.ccm-prompts-output.show {
    display: block;
}

.ccm-prompts-container {
    background: white;
    border-radius: 12px;
    padding: 35px;
    border: 2px solid #e2e8f0;
    line-height: 1.8;
}

.ccm-prompt-main {
    font-size: 1.4em;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 25px;
    line-height: 1.2em;
}

.ccm-prompt-context {
    font-size: 1em;
    color: #4a5568;
    margin-bottom: 20px;
}

.ccm-prompt-guidance {
    font-size: 1.1em;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
}

.ccm-pathway-narrative {
    background: #f0f4ff;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 25px 30px;
    margin-bottom: 30px;
    line-height: 1.8;
}

.ccm-pathway-narrative-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
}

.ccm-pathway-narrative p {
    font-size: 1em;
    color: #2d3748;
    margin-bottom: 12px;
    line-height: 1.7;
}

.ccm-pathway-narrative p:last-child {
    margin-bottom: 0;
}

.ccm-archetype-section {
    margin-bottom: 35px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
}

.ccm-archetype-section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ccm-archetype-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.ccm-archetype-question {
    font-size: 1em;
    color: #2d3748;
    margin-bottom: 8px;
}

.ccm-archetype-reminder {
    font-size: 0.95em;
    color: #718096;
    font-style: italic;
}

.ccm-brief-subsection {
    font-size: 1em;
    color: #2d3748;
    margin-bottom: 6px;
    line-height: 1.5;
}

.ccm-brief-subsection strong {
    color: #4a5568;
    font-weight: 600;
}

.ccm-brief-description {
    font-size: 1em;
    color: #2d3748;
    margin-top: 12px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.ccm-brief-approach {
    font-size: 1em;
    color: #2d3748;
    margin-top: 12px;
}

.ccm-brief-approach ul {
    margin-top: 8px;
    margin-left: 20px;
}

.ccm-brief-approach li {
    margin-bottom: 6px;
    line-height: 1.5;
}

.ccm-divider {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 25px 0;
}

.ccm-section-label {
    text-align: center;
    font-size: 0.95em;
    font-weight: 600;
    color: #718096;
    letter-spacing: 0.05em;
    margin-bottom: 25px;
}

.ccm-prompts-actions {
    margin-top: 30px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ccm-prompts-actions .ccm-copy-btn,
.ccm-prompts-actions .ccm-plan-btn,
.ccm-prompts-actions .ccm-dashboard-btn {
    flex: 1;
    min-width: 140px;
}

.ccm-copy-btn {
    width: 100%;
    padding: 12px 24px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ccm-copy-btn:hover {
    background: #38a169;
    transform: translateY(-1px);
}

.ccm-copy-btn.copied {
    background: #2d3748;
}

.ccm-dashboard-btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ccm-dashboard-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ── Shared button styles ──────────────────────────────────────────────────── */

.ccm-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.ccm-btn-primary {
    background: #667eea;
    color: white;
}

.ccm-btn-primary:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ccm-btn-secondary {
    background: #ffffff;
    color: #667eea;
    border: 2px solid #667eea;
}

.ccm-btn-secondary:hover {
    background: #667eea;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ccm-btn-danger {
    background: #fff5f5;
    color: #e53e3e;
    border: 1px solid #fed7d7;
}

.ccm-btn-danger:hover {
    background: #fed7d7;
    transform: translateY(-1px);
}

/* ── Save controls ─────────────────────────────────────────────────────────── */

.ccm-save-controls {
    margin-top: 25px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.ccm-save-notice {
    font-size: 0.95em;
    color: #48bb78;
    margin-bottom: 12px;
    font-weight: 600;
}

.ccm-save-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ccm-save-actions .ccm-brief-name-input {
    flex: 1;
    min-width: 180px;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    background: white;
    color: #2d3748;
    transition: all 0.3s ease;
}

.ccm-save-actions .ccm-brief-name-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ccm-save-feedback {
    margin-top: 10px;
    font-size: 0.9em;
    min-height: 20px;
}

.ccm-feedback-success {
    color: #38a169;
    font-weight: 600;
}

.ccm-feedback-error {
    color: #e53e3e;
    font-weight: 600;
}

/* ── Guest save notice ─────────────────────────────────────────────────────── */

.ccm-guest-save-notice {
    padding: 16px 20px;
    background: #f0f4ff;
    border: 2px solid #c3d0f7;
    border-radius: 10px;
    color: #2d3748;
    line-height: 1.7;
}

.ccm-guest-save-notice p {
    margin-bottom: 10px;
    font-size: 0.95em;
}

.ccm-guest-save-notice p:last-of-type {
    margin-bottom: 14px;
}

.ccm-guest-save-notice a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.ccm-guest-save-notice a:hover {
    text-decoration: underline;
}

/* ── Shared states ─────────────────────────────────────────────────────────── */

.ccm-loading {
    text-align: center;
    padding: 30px;
    color: #718096;
    font-style: italic;
}

.ccm-error {
    color: #e53e3e;
    padding: 12px;
    background: #fff5f5;
    border-radius: 8px;
    border: 1px solid #fed7d7;
}

.ccm-notice {
    padding: 12px;
    background: #ebf8ff;
    border-radius: 8px;
    border: 1px solid #bee3f8;
    color: #2b6cb0;
}

.ccm-login-notice {
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    color: #4a5568;
    text-align: center;
}

.ccm-login-notice a {
    color: #667eea;
    font-weight: 600;
}

/* ── Select pathway button ─────────────────────────────────────────────────── */

.ccm-select-pathway-btn {
    padding: 12px 24px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ccm-select-pathway-btn:hover {
    background-color: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ccm-show-all-btn {
    padding: 12px 24px;
    background-color: #000000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ccm-show-all-btn:hover {
    background-color: #4a5568;
    transform: translateY(-2px);
}

/* ── Dashboard ─────────────────────────────────────────────────────────────── */

.ccm-dashboard {
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ccm-dashboard-header {
    margin-bottom: 30px;
}

.ccm-dashboard-header h2 {
    font-size: 1.6em;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 16px;
}

.ccm-dashboard-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.ccm-dashboard-controls input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    background: white;
    color: #2d3748;
    transition: all 0.3s ease;
}

.ccm-dashboard-controls input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ccm-dashboard-controls select {
    padding: 10px 36px 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    background: white;
    color: #2d3748;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    transition: all 0.3s ease;
}

.ccm-dashboard-controls select:focus {
    outline: none;
    border-color: #667eea;
}

.ccm-briefs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.ccm-brief-card {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ccm-brief-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.ccm-brief-card-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.3;
}

.ccm-brief-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ccm-brief-card-meta span {
    background: #edf2f7;
    color: #4a5568;
    font-size: 0.8em;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
}

.ccm-brief-card-journey {
    font-size: 0.85em;
    color: #718096;
    line-height: 1.5;
}

.ccm-brief-card-date {
    font-size: 0.8em;
    color: #a0aec0;
}

.ccm-brief-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.ccm-brief-card-actions .ccm-btn {
    flex: 1;
    text-align: center;
    font-size: 0.875em;
    padding: 8px 12px;
}

.ccm-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #718096;
    font-style: italic;
}

/* ── Dashboard detail view ─────────────────────────────────────────────────── */

.ccm-back-btn {
    margin-bottom: 24px;
}

.ccm-brief-detail-header {
    margin-bottom: 24px;
}

.ccm-brief-detail-header h2 {
    font-size: 1.6em;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.ccm-brief-detail-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.ccm-brief-detail-title {
    font-size: 1.6em;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.ccm-rename-panel {
    margin-bottom: 12px;
}

.ccm-rename-feedback {
    margin-top: 8px;
    font-size: 0.875em;
    min-height: 18px;
}

.ccm-brief-detail-meta {
    font-size: 0.95em;
    color: #718096;
}

/* ── Planning notes ────────────────────────────────────────────────────────── */

.ccm-planning-notes {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
}

.ccm-planning-questions-heading {
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #718096;
    margin-bottom: 10px;
}

.ccm-planning-questions-list {
    margin: 0 0 12px 18px;
    padding: 0;
}

.ccm-planning-question,
.ccm-planning-question-label {
    font-size: 0.95em;
    color: #4a5568;
    margin-bottom: 6px;
    line-height: 1.5;
}

.ccm-series-planning-questions {
    background: #f0f4ff;
    border: 2px solid #c3d0f7;
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.ccm-series-planning {
    margin-top: 20px;
    margin-bottom: 10px;
    padding: 20px;
    background: #f0f4ff;
    border: 2px solid #c3d0f7;
    border-radius: 10px;
}

.ccm-planning-notes-readonly {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #e2e8f0;
}

.ccm-planning-question {
    font-size: 0.95em;
    color: #4a5568;
    margin-bottom: 8px;
    line-height: 1.5;
}

.ccm-notes-label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-size: 0.95em;
}

.ccm-notes-label-secondary {
    margin-top: 16px;
}

.ccm-notes-hint {
    font-weight: 400;
    color: #718096;
    font-size: 0.9em;
}

.ccm-notes-textarea {
    width: 100%;
    min-height: 160px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    color: #2d3748;
    background: white;
    resize: vertical;
    transition: all 0.3s ease;
    line-height: 1.6;
}

.ccm-series-notes-textarea,
.ccm-archetype-link-textarea {
    min-height: 200px;
}

.ccm-service-notes-textarea {
    min-height: 160px;
}

.ccm-notes-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ccm-notes-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.ccm-notes-feedback {
    font-size: 0.875em;
    min-height: 18px;
}

/* ── Planning Modal ────────────────────────────────────────────────────────── */

.ccm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ccm-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 620px;
    height: 90vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.ccm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 20px;
    border-bottom: 2px solid #e2e8f0;
    flex-shrink: 0;
}

.ccm-modal-title {
    font-size: 1.2em;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.ccm-modal-close {
    background: none;
    border: none;
    font-size: 1.6em;
    color: #718096;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}

.ccm-modal-close:hover {
    color: #2d3748;
}

.ccm-modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.ccm-modal-section {
    margin-bottom: 20px;
}

.ccm-modal-step {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.ccm-modal-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ccm-modal-footer {
    padding: 20px 28px;
    border-top: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.ccm-modal-name-input {
    flex: 1;
    min-width: 160px;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    color: #2d3748;
    transition: all 0.3s ease;
}

.ccm-modal-name-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ccm-modal-save-feedback {
    font-size: 0.875em;
    min-height: 18px;
}

.ccm-modal-body textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    color: #2d3748;
    background: white;
    resize: vertical;
    transition: all 0.3s ease;
    line-height: 1.6;
    margin-top: 6px;
}

.ccm-modal-body textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ccm-plan-btn {
    padding: 12px 24px;
    background: #2d3748;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ccm-plan-btn:hover {
    background: #4a5568;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .ccm-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .ccm-modal {
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
    }

    .ccm-modal-header,
    .ccm-modal-body,
    .ccm-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .ccm-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .ccm-modal-name-input {
        min-width: 0;
    }
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .ccm-container {
        padding: 0;
    }

    .ccm-question-section {
        padding: 20px;
    }

    .ccm-path-card {
        padding: 20px;
        width: 100%;
        max-width: 100%;
    }

    .ccm-grid-3x3 {
        max-width: 100%;
        width: 100%;
    }

    .ccm-grid-cell {
        padding: 10px;
        font-size: 0.85em;
    }

    .ccm-column-labels {
        max-width: 100%;
        font-size: 0.8em;
        gap: 8px;
    }

    .ccm-cell-number {
        font-size: 1em;
        margin-bottom: 2px;
    }

    .ccm-cell-archetype {
        font-size: 1.1em;
    }

    .ccm-footstep {
        margin-bottom: 2px;
    }

    .ccm-footstep svg {
        width: 24px !important;
        height: 24px !important;
        display: block;
        margin: 0 auto;
    }

    .ccm-journey-text {
        font-size: 0.9em;
        padding: 15px;
    }

    .ccm-path-title {
        font-size: 1.2em;
    }

    .ccm-question-group > div {
        margin-bottom: 20px;
    }

    .ccm-question-group > div:last-child {
        margin-bottom: 0;
    }

    .ccm-prompt-generator {
        padding: 20px 0 0 0;
        background: transparent;
        border: none;
        border-radius: 0;
    }

    .ccm-prompt-generator h3 {
        font-size: 1.1em;
    }

    .ccm-prompts-container {
        padding: 15px 0;
        border: none;
        border-radius: 0;
        background: transparent;
    }

    .ccm-prompts-actions {
        margin-top: 30px;
        flex-direction: column;
    }

    .ccm-prompts-actions .ccm-copy-btn,
    .ccm-prompts-actions .ccm-plan-btn,
    .ccm-prompts-actions .ccm-dashboard-btn {
        width: 100%;
    }

    .ccm-copy-btn {
        font-size: 0.95em;
        padding: 10px 20px;
    }

    .ccm-icon-legend {
        padding: 12px;
        font-size: 0.9em;
    }

    .ccm-save-controls {
        padding: 15px 0;
        background: transparent;
        border: none;
        border-radius: 0;
    }

    .ccm-save-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ccm-save-actions .ccm-brief-name-input {
        min-width: 0;
    }

    .ccm-series-planning {
        padding: 15px;
    }

    .ccm-dashboard-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .ccm-dashboard-controls select {
        width: 100%;
    }

    .ccm-briefs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .ccm-cell-archetype {
        display: none !important;
    }
}

/* ── Modal read-only prompts ───────────────────────────────────────────────── */

.ccm-modal-prompt-text {
    font-size: 0.95em;
    color: #718096;
    font-style: italic;
    line-height: 1.6;
    margin-top: 6px;
}

.ccm-modal-planning {
    border-top: 1px dashed #e2e8f0;
    margin-top: 16px;
    padding-top: 16px;
}

.ccm-modal-question {
    font-size: 0.95em;
    color: #4a5568;
    margin-bottom: 10px;
    line-height: 1.5;
    padding: 10px 14px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

/* ── Y27 Archetype Selection ───────────────────────────────────────────────── */

.ccm-y27-selection {
    margin: 20px 0;
    padding: 18px 20px;
    background: #f3eeff;
    border: 2px solid #c4aee8;
    border-radius: 8px;
}

.ccm-y27-selection-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ccm-y27-label {
    font-size: .95em;
    color: #2d3748;
    line-height: 1.5;
}

.ccm-y27-select-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ccm-y27-select {
    flex: 1;
    min-width: 220px;
    padding: 9px 12px;
    border: 2px solid #c4aee8;
    border-radius: 8px;
    font-size: .95em;
    font-family: inherit;
    color: #2d3748;
    background: #ffffff;
    cursor: pointer;
}

.ccm-y27-select:focus {
    outline: none;
    border-color: #7D5BA6;
    box-shadow: 0 0 0 3px rgba(125,91,166,.12);
}

.ccm-y27-feedback {
    font-size: .88em;
    min-width: 60px;
}

.ccm-y27-loading {
    font-size: .9em;
    color: #718096;
    font-style: italic;
}

.ccm-y27-content {
    margin-top: 16px;
    padding: 16px 18px;
    background: #ffffff;
    border: 2px solid #c4aee8;
    border-radius: 8px;
}

.ccm-y27-content-heading {
    font-size: .9em;
    font-weight: 700;
    color: #7D5BA6;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 10px;
}

.ccm-y27-content-body {
    font-size: .92em;
    color: #4a5568;
    line-height: 1.7;
    pointer-events: none;
    user-select: text;
}

.ccm-y27-content-body p { margin-bottom: .8em; }
.ccm-y27-content-body h2,
.ccm-y27-content-body h3 { color: #2d3748; margin-bottom: .4em; }

.ccm-y27-note {
    font-size: .82em;
    color: #7D5BA6;
    font-style: italic;
    align-self: center;
}

.ccm-y27-guest {
    font-size: .9em;
    color: #718096;
    margin: 4px 0 0;
}

.ccm-y27-guest a {
    color: #7D5BA6;
    text-decoration: underline;
}

/* ── Writing Pad ─────────────────────────────────────────────────────────── */

#ccmWritingPad .ccm-planning-notes {
    border-top: none;
    padding-top: 0;
    margin-top: 16px;
}

#ccmWritingPad .ccm-planning-questions-heading {
    margin-bottom: 6px;
}

#ccmWritingPad #ccmWpNotes {
    margin-top: 24px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

#ccmWritingPad #ccmWpSampleSection {
    margin-top: 24px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    border-top: none;
    padding-top: 20px;
}

.ccm-wp-note-text {
    font-size: 14px;
    line-height: 1.65;
    color: #4a5568;
    white-space: pre-wrap;
    margin-top: 8px;
}

.ccm-wp-write-area {
    margin-top: 32px;
}

.ccm-wp-textarea {
    width: 100%;
    min-height: 400px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    font-size: 15px;
    font-family: inherit;
    line-height: 1.7;
    color: #2d3748;
    resize: vertical;
    transition: border-color 0.2s;
    margin-top: 12px;
}

.ccm-wp-textarea:focus {
    outline: none;
    border-color: #7D5BA6;
}

.ccm-wp-textarea::placeholder {
    color: #a0aec0;
    font-style: italic;
}

.ccm-empty-notice {
    color: #a0aec0;
    font-style: italic;
    font-size: 14px;
    padding: 16px 0;
}

/* ── Writing Pad step fields ─────────────────────────────────────────────── */

.ccm-wp-step-fields {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.ccm-wp-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 160px;
}

.ccm-wp-field-group select,
.ccm-wp-field-group input[type="number"] {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    color: #2d3748;
    transition: border-color 0.2s;
}

.ccm-wp-field-group select:focus,
.ccm-wp-field-group input[type="number"]:focus {
    outline: none;
    border-color: #7D5BA6;
}

.ccm-wp-report-instruction {
    font-size: 0.95em;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 12px;
    padding: 12px 16px;
    background: #f0f4ff;
    border: 1px solid #c3d0f7;
    border-radius: 8px;
    width: 100%;
}
    font-size: 0.9em;
    color: #718096;
    align-self: center;
}

.ccm-wp-step-progress.ccm-feedback-success {
    color: #38a169;
    font-weight: 600;
}

.ccm-wp-step-row {
    padding: 20px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 16px;
}

.ccm-wp-post-textarea {
    width: 100%;
    min-height: 400px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    line-height: 1.7;
    color: #2d3748;
    resize: vertical;
    transition: border-color 0.2s;
    margin-top: 12px;
    box-sizing: border-box;
}

.ccm-wp-post-textarea:focus {
    outline: none;
    border-color: #7D5BA6;
}

.ccm-wp-editor-section {
    padding: 24px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.ccm-wp-step-notes {
    margin-top: 8px;
}

/* ── Writing Pad steps grid ──────────────────────────────────────────────── */

.ccm-wp-steps-grid {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.ccm-wp-steps-grid-header {
    display: grid;
    grid-template-columns: 1fr 180px 140px;
    gap: 12px;
    padding: 10px 16px;
    background: #edf2f7;
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #718096;
}

.ccm-wp-steps-grid-row {
    display: grid;
    grid-template-columns: 1fr 180px 140px;
    gap: 12px;
    padding: 12px 16px;
    align-items: center;
    border-top: 1px solid #e2e8f0;
}

.ccm-wp-steps-grid-row:hover {
    background: #f7fafc;
}

.ccm-wp-step-label {
    font-size: 0.95em;
    color: #2d3748;
    font-weight: 500;
}

.ccm-wp-steps-grid-row select,
.ccm-wp-steps-grid-row input[type="number"] {
    padding: 8px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9em;
    font-family: inherit;
    background: white;
    color: #2d3748;
    width: 100%;
    transition: border-color 0.2s;
}

.ccm-wp-steps-grid-row select:focus,
.ccm-wp-steps-grid-row input[type="number"]:focus {
    outline: none;
    border-color: #7D5BA6;
}

@media (max-width: 600px) {
    .ccm-wp-steps-grid-header {
        display: none;
    }

    .ccm-wp-steps-grid-row {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 8px;
        padding: 12px;
    }

    .ccm-wp-step-label {
        grid-column: 1 / -1;
        font-weight: 600;
    }
}

.ccm-wp-report-incomplete {
    background: #fff5f5;
    border-color: #fed7d7;
    color: #c53030;
}

.ccm-wp-report-incomplete ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.ccm-wp-report-incomplete li {
    margin-bottom: 4px;
    font-size: 0.9em;
}

/* ── Preview Notes Modal ─────────────────────────────────────────────────── */

.ccm-preview-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ccm-preview-modal-inner {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 720px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.ccm-preview-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.ccm-preview-modal-title {
    font-size: 1.2em;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

.ccm-preview-modal-close {
    background: none;
    border: none;
    font-size: 1.6em;
    line-height: 1;
    color: #718096;
    cursor: pointer;
    padding: 0 4px;
}

.ccm-preview-modal-close:hover {
    color: #1a202c;
}

.ccm-preview-modal-body {
    overflow-y: auto;
    padding: 24px;
    flex: 1;
}

.ccm-preview-block {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 3px solid #7D5BA6;
}

.ccm-preview-block-empty {
    border-left-color: #e2e8f0;
    opacity: 0.7;
}

.ccm-preview-question {
    font-size: 0.82em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7D5BA6;
    margin-bottom: 8px;
}

.ccm-preview-block-empty .ccm-preview-question {
    color: #a0aec0;
}

.ccm-preview-answer {
    font-size: 0.95em;
    color: #2d3748;
    line-height: 1.7;
    white-space: pre-wrap;
}

.ccm-preview-step {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.ccm-preview-step-title {
    font-size: 1em;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 14px;
}

/* ── Member Guide ────────────────────────────────────────────────────────── */

.ccm-guide {
    max-width: 780px;
    font-size: 1em;
    line-height: 1.8;
    color: #2d3748;
}

.ccm-guide-h1 {
    font-size: 1.8em;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px 0;
}

.ccm-guide-h2 {
    font-size: 1.3em;
    font-weight: 700;
    color: #1a202c;
    margin: 40px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.ccm-guide-h3 {
    font-size: 1.1em;
    font-weight: 700;
    color: #2d3748;
    margin: 28px 0 10px 0;
}

.ccm-guide-h4 {
    font-size: 1em;
    font-weight: 700;
    color: #4a5568;
    margin: 20px 0 8px 0;
}

.ccm-guide p {
    margin: 0 0 16px 0;
}

.ccm-guide-list {
    margin: 0 0 16px 24px;
    padding: 0;
}

.ccm-guide-list li {
    margin-bottom: 6px;
}

.ccm-guide-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 32px 0;
}

.ccm-guide code {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.88em;
    font-family: monospace;
    color: #7D5BA6;
}

.ccm-guide-modal-inner {
    max-width: 860px;
}

/* ── Step version tabs ─────────────────────────────────────────────────────── */

.ccm-version-tab {
    font-size: 0.875em;
    padding: 6px 14px;
}

.ccm-version-tab-active {
    background: #667eea;
    color: #ffffff;
    border-color: #667eea;
}

.ccm-version-tab-active:hover {
    background: #5568d3;
    border-color: #5568d3;
    color: #ffffff;
}

#ccmWpVersionBar {
    min-height: 24px;
}

#ccmWpNamePrompt {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 0 4px;
}

#ccmWpVersionNameInput {
    flex: 1;
    min-width: 200px;
    max-width: 320px;
    padding: 9px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    color: #2d3748;
    background: white;
    transition: border-color 0.2s;
}

#ccmWpVersionNameInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
