.tag-pill {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    margin: 0 4px 0 0;
}

.lab-page {
    width: min(100%, 960px);
    margin: 0 auto;
}

.lab-page__header h1 {
    margin: 8px 0;
    font-size: 1.5rem;
}

.lab-page__meta {
    color: #9ca3af;
    margin: 0 0 16px;
    line-height: 1.5;
}

.lab-page__breadcrumb {
    margin: 0 0 8px;
}

.lab-page__breadcrumb a {
    color: #60a5fa;
    text-decoration: none;
}

.lab-content-card {
    background: #111827;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.lab-empty {
    background: #111827;
    border: 1px dashed #374151;
    border-radius: 12px;
    color: #9ca3af;
    padding: 16px;
}

.lab-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lab-year-group {
    border: 1px solid #374151;
    border-radius: 12px;
    overflow: hidden;
    background: #111827;
}

.lab-year-title {
    cursor: pointer;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    font-weight: 700;
    list-style: none;
    gap: 8px;
}

.lab-year-title::-webkit-details-marker {
    display: none;
}

.lab-year-title::after {
    content: "▸";
    color: #9ca3af;
    transition: transform 0.2s ease;
}

details[open] .lab-year-title::after {
    transform: rotate(90deg);
}

.lab-year-title .lab-year-count {
    color: #93c5fd;
    font-size: 0.9rem;
}

.lab-list {
    padding: 0 10px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lab-list-item {
    border: 1px solid #374151;
    border-radius: 10px;
    background: #1f2937;
    padding: 10px;
    color: #e5e7eb;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 10px;
}

.lab-list-item:active {
    background: #232f43;
}

.lab-list-title {
    font-weight: 700;
    margin-bottom: 4px;
    word-break: break-word;
}

.lab-list-meta {
    color: #9ca3af;
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.lab-list-tags {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lab-list-tag {
    color: #34d399;
    font-size: 11px;
    border: 1px solid #065f46;
    border-radius: 999px;
    padding: 1px 6px;
}

.lab-action {
    white-space: nowrap;
    color: #60a5fa;
    align-self: center;
    min-width: 45px;
    text-align: right;
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.lab-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #374151;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    min-height: 38px;
    padding: 8px 12px;
    margin-top: 8px;
}

.lab-app-meta {
    color: #9ca3af;
    margin: 6px 0;
}

.lab-search-form {
    margin-bottom: 14px;
}

.lab-search-form .lab-search-input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #374151;
    border-radius: 10px;
    padding: 0 12px;
    background: #111827;
    color: #e5e7eb;
    margin-bottom: 8px;
    box-sizing: border-box;
    font: inherit;
}

.lab-search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.lab-search-select,
.lab-search-form button {
    min-height: 44px;
    border: 1px solid #374151;
    border-radius: 10px;
    background: #111827;
    color: #e5e7eb;
    padding: 0 10px;
    font: inherit;
    box-sizing: border-box;
}

.lab-search-form button {
    background: #2563eb;
    border-color: #2563eb;
}

.lab-result-section {
    margin-bottom: 18px;
}

mark {
    background: #fde68a;
    color: #111827;
    font-weight: 700;
}

@media (max-width: 768px) {
    .lab-page__header h1 {
        font-size: 1.3rem;
    }
    .lab-list-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .lab-action {
        align-self: flex-end;
    }
}
