/* LifeStory Timeline */

.lifestory-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

.lifestory-toolbar { user-select: none; }

/* Category filter chips */
.lifestory-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    font-size: 0.83rem;
    transition: all .15s;
    position: relative;
    padding-left: 22px;
    margin: 0;
}
.lifestory-cat-chip::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--c, #6c757d);
}
.lifestory-cat-chip input { display: none; }
.lifestory-cat-chip:has(input:not(:checked)) {
    opacity: 0.4;
    text-decoration: line-through;
}

/* Stage */
.lifestory-stage {
    background: linear-gradient(to bottom, #fafbfc, #f3f4f6);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: auto;
    position: relative;
}

.lifestory-axis {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
    border-bottom: 1px solid #e5e7eb;
    height: 36px;
    min-width: 100%;
}
.lifestory-axis-tick {
    position: absolute;
    top: 0;
    bottom: 0;
    border-left: 1px dashed #e5e7eb;
    padding-left: 6px;
    font-size: 0.72rem;
    color: #6b7280;
    line-height: 36px;
    white-space: nowrap;
}
.lifestory-axis-tick.major {
    border-left: 1px solid #d1d5db;
    color: #374151;
    font-weight: 600;
}

.lifestory-lanes {
    position: relative;
    min-width: 100%;
}

.lifestory-lane {
    position: relative;
    border-bottom: 1px solid #e5e7eb;
    background: repeating-linear-gradient(
        to right,
        transparent 0,
        transparent 99px,
        rgba(0,0,0,.025) 100px
    );
}

.lifestory-lane-label {
    position: sticky;
    left: 0;
    z-index: 5;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(6px);
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #1f2937;
    border-right: 1px solid #e5e7eb;
    width: 160px;
    display: inline-block;
    border-bottom: 1px solid #e5e7eb;
}

.lifestory-lane-content {
    position: relative;
    min-height: 80px;
    padding: 10px 0;
}

.lifestory-event {
    position: absolute;
    background: var(--c, #6c757d);
    color: #fff;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.75rem;
    line-height: 1.25;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
    transition: transform .12s, box-shadow .12s;
    border: 1px solid rgba(0,0,0,.1);
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 12px;
}
.lifestory-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
    z-index: 4;
}
.lifestory-event.point {
    width: 14px !important;
    height: 14px;
    border-radius: 50%;
    padding: 0;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,.15), 0 2px 4px rgba(0,0,0,.15);
}
.lifestory-event.point:hover { transform: translateY(-1px) scale(1.2); }
.lifestory-event .lifestory-event-title {
    text-shadow: 0 1px 2px rgba(0,0,0,.2);
    pointer-events: none;
}
.lifestory-event-thumb {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 1px 2px rgba(0,0,0,.3);
    border: 1px solid rgba(255,255,255,.4);
}

/* Modal content */
.lifestory-modal-meta {
    color: #6b7280;
    font-size: 0.88rem;
    margin-bottom: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.lifestory-modal-meta span { display: inline-flex; align-items: center; gap: 4px; }
.lifestory-modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 1rem;
}
.lifestory-modal-thumb {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    background: #f3f4f6;
    cursor: zoom-in;
}
.lifestory-modal-thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}

.lifestory-public-body {
    background: #f5f6fa;
    margin: 0;
    min-height: 100vh;
}

/* Empty state */
.lifestory-stage-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    flex-direction: column;
    gap: 0.5rem;
}
