/* Genesis Zero — Constitutional Habitat Styles */
:root {
    --bg-void: #050510;
    --bg-dark: #0a0a1a;
    --bg-card: #12122a;
    --bg-panel: #1a1a3a;
    --text-primary: #f0f0ff;
    --text-secondary: #8888aa;
    --text-muted: #555577;
    --accent-genesis: #8b5cf6;
    --accent-life: #22c55e;
    --accent-memory: #3b82f6;
    --accent-community: #f59e0b;
    --accent-capability: #ec4899;
    --accent-corpus: #06b6d4;
    --glow-genesis: rgba(139, 92, 246, 0.4);
    --glow-life: rgba(34, 197, 94, 0.4);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-void);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

/* Screens */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.screen.active {
    display: flex;
    opacity: 1;
}

/* Welcome Screen */
#welcome-screen {
    background: radial-gradient(ellipse at center, var(--bg-dark) 0%, var(--bg-void) 70%);
    justify-content: center;
    align-items: center;
}

.welcome-content {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
}

.genesis-seed {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-genesis) 0%, transparent 70%);
    box-shadow: 0 0 60px var(--glow-genesis), 0 0 120px var(--glow-genesis);
    animation: pulse-seed 3s ease-in-out infinite;
}

@keyframes pulse-seed {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.welcome-content h1 {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-genesis), var(--accent-life));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
}

.philosophy {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 3rem;
    font-style: italic;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-genesis), #6d28d9);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--glow-genesis);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--glow-genesis);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--accent-genesis);
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

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

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Main Experience Layout */
#main-experience {
    display: grid;
    grid-template-columns: 1fr 400px;
    grid-template-rows: 1fr;
    background: var(--bg-void);
}

/* Habitat Canvas */
#habitat-canvas {
    position: relative;
    overflow: hidden;
}

#habitat-viz {
    width: 100%;
    height: 100%;
}

#habitat-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Conversation Panel */
#conversation-panel {
    background: var(--bg-dark);
    border-left: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#conversation-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.habitat-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-life);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#habitat-stage {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

#conversation-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 90%;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    line-height: 1.6;
    animation: message-appear 0.3s ease;
}

@keyframes message-appear {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.genesis {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.3);
    align-self: flex-start;
}

.message.user {
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-self: flex-end;
}

.message.system {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    align-self: center;
    text-align: center;
    font-size: 0.9rem;
    color: var(--accent-life);
}

.message .emergence-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-genesis);
}

#conversation-input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

#user-input {
    flex: 1;
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    resize: none;
    max-height: 120px;
    transition: border-color 0.2s;
}

#user-input:focus {
    outline: none;
    border-color: var(--accent-genesis);
}

#user-input::placeholder {
    color: var(--text-muted);
}

.btn-send {
    background: var(--accent-genesis);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-send:hover {
    background: #7c3aed;
    transform: scale(1.05);
}

.btn-send svg {
    color: white;
}

/* Timeline Panel */
#timeline-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 400px;
    background: var(--bg-dark);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    transition: transform 0.3s ease;
}

#timeline-panel.collapsed {
    transform: translateY(calc(100% - 50px));
}

#timeline-header {
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

#timeline-header h3 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

#timeline-content {
    padding: 1rem 1.5rem 1.5rem;
}

.timeline-track {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.timeline-track::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-event {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    opacity: 0.4;
    transition: all 0.3s;
}

.timeline-event.active,
.timeline-event.completed {
    opacity: 1;
}

.event-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-panel);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.timeline-event.active .event-dot {
    background: var(--accent-genesis);
    border-color: var(--accent-genesis);
    box-shadow: 0 0 10px var(--glow-genesis);
}

.timeline-event.completed .event-dot {
    background: var(--accent-life);
    border-color: var(--accent-life);
}

.timeline-event span {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.timeline-event.active span,
.timeline-event.completed span {
    color: var(--text-primary);
}

/* Flourishing Panel */
#flourishing-panel {
    position: fixed;
    top: 60px;
    right: 420px;
    width: 200px;
    background: var(--bg-dark);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

#flourishing-panel.collapsed #flourishing-content {
    display: none;
}

#flourishing-header {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

#flourishing-header h3 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-life);
}

#flourishing-content {
    padding: 0 1rem 1rem;
}

.flourishing-metric {
    margin-bottom: 0.75rem;
}

.metric-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.25rem;
}

.metric-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-genesis), var(--accent-life));
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Explorer Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 500;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.btn-close:hover {
    color: var(--text-primary);
}

.explorer-tabs {
    display: flex;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn.active {
    color: var(--accent-genesis);
    border-bottom-color: var(--accent-genesis);
}

#explorer-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.explorer-item {
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.explorer-item:hover {
    border-color: var(--accent-genesis);
}

.explorer-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.explorer-item p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.explorer-item .emergence-info {
    font-size: 0.75rem;
    color: var(--accent-genesis);
    margin-top: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 0.9rem;
}

/* Scenarios Panel */
#scenarios-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.btn-scenarios {
    background: var(--bg-panel);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-scenarios:hover {
    background: rgba(139, 92, 246, 0.2);
}

#scenarios-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: var(--bg-dark);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 220px;
}

#scenarios-menu.hidden {
    display: none;
}

.scenario-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.scenario-item:hover {
    background: rgba(139, 92, 246, 0.2);
}

.scenario-icon {
    font-size: 1.25rem;
}

/* Time Scale Panel */
#timescale-panel {
    position: fixed;
    bottom: 70px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

.timescale-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.timescale-buttons {
    display: flex;
    gap: 0.25rem;
}

.timescale-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.timescale-btn:hover {
    color: var(--text-secondary);
}

.timescale-btn.active {
    background: var(--accent-genesis);
    color: white;
}

/* View Toggle */
#view-toggle {
    position: fixed;
    top: 20px;
    right: 420px;
    display: flex;
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    color: var(--text-secondary);
}

.view-btn.active {
    background: var(--accent-genesis);
    color: white;
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 100px;
    right: 420px;
    background: var(--bg-dark);
    border: 1px solid rgba(245, 158, 11, 0.5);
    border-radius: 12px;
    padding: 1rem;
    max-width: 320px;
    animation: slide-in 0.3s ease;
    z-index: 500;
}

.notification.hidden {
    display: none;
}

@keyframes slide-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.notification-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.notification-icon {
    font-size: 1.5rem;
}

.notification-text strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--accent-community);
}

.notification-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btn-approve {
    background: var(--accent-life);
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
}

.btn-dismiss {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
}

/* Morphogenesis Event Overlay */
.event-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fade-in 0.5s ease;
}

.event-overlay.hidden {
    display: none;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.event-content {
    text-align: center;
    max-width: 500px;
    padding: 3rem;
}

.event-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-genesis), var(--accent-life));
    animation: pulse-event 1.5s ease-in-out infinite;
}

@keyframes pulse-event {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px var(--glow-genesis); }
    50% { transform: scale(1.1); box-shadow: 0 0 60px var(--glow-life); }
}

.event-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-genesis);
}

.event-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Closing Screen */
#closing-screen {
    background: radial-gradient(ellipse at center, var(--bg-dark) 0%, var(--bg-void) 70%);
    justify-content: center;
    align-items: center;
}

.closing-content {
    text-align: center;
    max-width: 700px;
    padding: 2rem;
}

.habitat-complete {
    width: 150px;
    height: 150px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-life) 0%, var(--accent-genesis) 50%, transparent 70%);
    box-shadow: 0 0 80px var(--glow-life), 0 0 160px var(--glow-genesis);
    animation: habitat-glow 4s ease-in-out infinite;
}

@keyframes habitat-glow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.closing-content h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.closing-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 2;
    margin-bottom: 2rem;
}

.closing-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-genesis);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.closing-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Provenance Tab Styles */
#provenance-content {
    padding: 0.5rem;
}

.provenance-section {
    margin-bottom: 1.5rem;
}

.provenance-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-genesis);
    margin-bottom: 0.5rem;
}

.provenance-section h5 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.provenance-intro {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--accent-genesis);
}

.provenance-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.provenance-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.provenance-item:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.2);
}

.provenance-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.provenance-item-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.provenance-item-type {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-genesis);
    border-radius: 4px;
}

.provenance-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.provenance-item-hash {
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--accent-life);
    opacity: 0.7;
}

.provenance-graph {
    height: 200px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.provenance-empty {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
}

/* Composition Tab Styles (CCE) */
#composition-content {
    padding: 0.5rem;
}

.composition-section {
    margin-bottom: 1.5rem;
}

.composition-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-life);
    margin-bottom: 0.5rem;
}

.composition-section h5 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.composition-intro {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--accent-life);
}

.composition-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.composition-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.composition-item:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
}

.composition-item.active {
    border-color: var(--accent-life);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}

.composition-item.emerging {
    animation: pulse-emerge 2s ease-in-out infinite;
}

@keyframes pulse-emerge {
    0%, 100% { box-shadow: 0 0 5px rgba(236, 72, 153, 0.2); }
    50% { box-shadow: 0 0 15px rgba(236, 72, 153, 0.4); }
}

.composition-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.composition-item-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.composition-item-state {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    background: rgba(34, 197, 94, 0.2);
    color: var(--accent-life);
    border-radius: 4px;
}

.composition-item-state.emerging {
    background: rgba(236, 72, 153, 0.2);
    color: #ec4899;
}

.composition-item-state.transforming {
    background: rgba(6, 182, 212, 0.2);
    color: #06b6d4;
}

.composition-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.composition-item-progress {
    margin-top: 0.5rem;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.composition-item-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-genesis), var(--accent-life));
    border-radius: 2px;
    transition: width 0.3s ease;
}

.composition-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.composition-metric {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    text-align: center;
}

.composition-metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-life);
}

.composition-metric-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.composition-empty {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* Responsive */
@media (max-width: 1024px) {
    #main-experience {
        grid-template-columns: 1fr;
    }
    
    #conversation-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 50vh;
        border-left: none;
        border-top: 1px solid rgba(139, 92, 246, 0.2);
    }
    
    #habitat-canvas {
        height: 50vh;
    }
    
    #timeline-panel {
        right: 0;
    }
    
    #flourishing-panel {
        right: 20px;
        top: auto;
        bottom: 55vh;
    }
    
    #view-toggle {
        right: 20px;
    }
    
    .notification {
        right: 20px;
        bottom: 55vh;
    }
}
