.lab-page {
    min-height: 100vh;
    background: #fdf6f8;
}

.lab-container {
    max-width: 450px;
    padding-top: 18px;
    padding-bottom: 44px;
}

.lab-heading-section {
    display: grid;
    gap: 4px;
    margin-bottom: 16px;
}

.lab-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
}

.lab-list-section {
    scroll-margin-top: 76px;
}

.lab-list-section[hidden] {
    display: none;
}

.lab-list-section .category-title {
    margin-top: 0;
}

.lab-list-section .category-title a {
    color: inherit;
    text-decoration: none;
}

.lab-list-section .top-chevron {
    color: var(--text-secondary);
    font-size: 1.4em;
    line-height: 1;
}

.lab-list-section .character-slider-container {
    margin-right: -20px;
    margin-left: -20px;
    padding-left: 20px;
}

.top-timeline-preview-title-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.top-timeline-preview-slider {
    gap: 12px;
}

.top-timeline-preview-card {
    display: flex;
    flex: 0 0 210px;
    width: 210px;
    min-width: 210px;
    max-width: 210px;
    min-height: 136px;
    flex-direction: column;
    gap: 9px;
    padding: 12px;
    border: 1px solid #edf0f2;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2328;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.top-timeline-preview-card:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.top-timeline-preview-card:focus-visible {
    outline: 2px solid #1d9bf0;
    outline-offset: 2px;
}

.top-timeline-preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.top-timeline-preview-avatar {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 1px solid #edf0f2;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    background: #f6f7f8;
}

.top-timeline-preview-avatar-fallback {
    display: inline-grid;
    place-items: center;
    color: #6b7280;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.top-timeline-preview-author {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.top-timeline-preview-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.top-timeline-preview-name {
    min-width: 0;
    overflow: hidden;
    color: #1f2328;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-timeline-preview-date {
    color: rgba(83, 100, 113, 0.62);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
}

.top-timeline-preview-text {
    display: block;
    margin: 0;
    overflow: visible;
    color: #24252a;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.55;
}

.top-timeline-preview-actions {
    display: flex;
    align-items: center;
    margin-top: auto;
    color: #707782;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.top-timeline-preview-reply-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    font-variant-numeric: tabular-nums;
}

.top-timeline-preview-reply-icon {
    flex: 0 0 auto;
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.top-plot-section .category-title > a {
    display: flex;
    align-items: center;
}

.top-plot-section .plot-card.has-image,
.top-plot-section .plot-card.no-image-fallback {
    width: 107px;
    height: 142px;
    min-height: 142px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(42, 35, 40, 0.22);
}

.top-plot-section .plot-card.has-image {
    background: #2A2328;
}

.top-plot-section .plot-card.has-image::before {
    display: block;
    background:
        linear-gradient(to top, rgba(20, 13, 18, 0.9) 14%, rgba(20, 13, 18, 0.42) 48%, rgba(20, 13, 18, 0.08) 72%, rgba(20, 13, 18, 0.04) 100%),
        linear-gradient(to right, rgba(20, 13, 18, 0.12), rgba(20, 13, 18, 0.12));
    z-index: 0;
}

.top-plot-section .plot-card.has-image h4,
.top-plot-section .plot-card.no-image-fallback h4 {
    font-size: 0.7em;
    line-height: 1.18;
    -webkit-line-clamp: 3;
}

.top-plot-section .plot-card.has-image .hobby-tags,
.top-plot-section .plot-card.no-image-fallback .hobby-tags {
    margin-top: 4px;
    gap: 3px;
}

.top-plot-section .plot-card.has-image .hobby-tags span,
.top-plot-section .plot-card.no-image-fallback .hobby-tags span {
    padding: 1px 4px;
    font-size: 0.54em;
}

.top-plot-section .plot-card.has-image .plot-card-photo {
    border-radius: 8px;
}

.top-plot-section .plot-card.has-image .card-content,
.top-plot-section .plot-card.no-image-fallback .card-content {
    padding: 30px 7px 7px;
}

.top-plot-section .plot-card.has-image .plot-card-cast-row,
.top-plot-section .plot-card.no-image-fallback .plot-card-cast-row {
    margin-top: 5px;
}

.top-plot-section .plot-card.has-image .plot-card-cast-avatar,
.top-plot-section .plot-card.no-image-fallback .plot-card-cast-avatar {
    width: 18px;
    height: 18px;
}

.top-plot-section .plot-card.has-image .card-top-right-badges,
.top-plot-section .plot-card.no-image-fallback .card-top-right-badges {
    top: 6px;
    right: 6px;
}

.top-plot-section .plot-card.has-image .card-chat-count-badge,
.top-plot-section .plot-card.has-image .plot-card-new-badge,
.top-plot-section .plot-card.no-image-fallback .card-chat-count-badge,
.top-plot-section .plot-card.no-image-fallback .plot-card-new-badge {
    padding: 2px 5px;
    font-size: 0.58em;
}

.top-timeline-preview-slider .top-section-more-card,
.featured-plot-slider .top-section-more-card {
    flex: 0 0 107px;
    width: 107px;
    min-width: 107px;
    max-width: 107px;
    height: 142px;
    min-height: 142px;
    border-color: #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #6b7280;
    font-size: 12px;
    box-shadow: 0 3px 10px rgba(42, 35, 40, 0.06);
}

.hangout-groups-section {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.hangout-groups-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.hangout-groups-grid {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(42, 35, 40, 0.05);
}

.hangout-group-card {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-bottom: 1px solid #eeeeef;
    border-radius: 0;
    padding: 6px 10px;
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: background-color 0.18s ease;
}

.hangout-group-card:last-child {
    border-bottom: 0;
}

.hangout-group-card:hover {
    background: #fafafa;
}

.hangout-group-card--recommendation {
    background: #fbfffb;
}

.hangout-group-avatar-row {
    display: flex;
    align-items: center;
    flex: 0 0 52px;
    min-height: 30px;
    padding-left: 10px;
}

.hangout-group-avatar {
    width: 28px;
    height: 28px;
    margin-left: -10px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: #f4f4f5;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(42, 35, 40, 0.14);
}

.hangout-group-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hangout-group-card-body {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hangout-group-card-title {
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.32;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hangout-group-card-topic {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lab-page .welcome-description {
    margin-top: 34px;
    padding: 18px 0 0;
}

.lab-page .welcome-description h2 {
    margin: 0 0 10px;
    padding: 0;
}

.lab-page .welcome-description p {
    margin: 0;
}

.lab-page .h1-logo-img {
    display: block;
    width: auto;
    height: 42px;
    max-width: 80%;
    margin: 0 auto;
}

@media (max-width: 520px) {
    .lab-container {
        padding-top: 14px;
    }

    .lab-list-section .character-slider-container {
        margin-right: -20px;
        margin-left: -20px;
        padding-left: 20px;
    }

    .hangout-groups-grid {
        margin-right: -4px;
        margin-left: -4px;
        border-radius: 0;
    }

    .hangout-group-card {
        min-height: 52px;
        padding: 6px 8px;
    }

    .hangout-group-avatar-row {
        flex-basis: 48px;
        min-height: 30px;
        padding-left: 10px;
    }

    .hangout-group-avatar {
        width: 28px;
        height: 28px;
        margin-left: -10px;
    }
}
