.cards-grid.lists-mode {
    display: block;
    padding: 1.5rem;
    background: var(--bg-dark);
}

.lists-main {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding-bottom: 3rem;
}

.lists-loading,
.lists-empty {
    border: 1px solid #2d3a4a;
    border-radius: 10px;
    background: #192433;
    color: #a8bdd2;
    padding: 1.2rem;
}

.lists-empty {
    min-height: 260px;
    display: grid;
    place-items: center;
    gap: 0.8rem;
    text-align: center;
}

.lists-empty strong {
    color: #f0f8ff;
    font-size: 1.65rem;
}

.lists-header,
.lists-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.35rem;
}

.lists-title-block {
    display: grid;
    gap: 0.85rem;
}

.lists-header h1,
.lists-detail-header h1 {
    margin: 0;
    color: #f0f8ff;
    font-size: clamp(2rem, 5vw, 3.7rem);
    line-height: 1;
}

.lists-header p,
.lists-detail-header p,
.lists-detail-description {
    margin: 0;
    color: #a8bdd2;
    font-weight: 700;
}

.lists-header-actions,
.lists-detail-actions,
.lists-card-actions,
.lists-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.lists-primary-btn,
.lists-small-btn,
.lists-back-btn {
    min-height: 40px;
    border: 1px solid #4a607a;
    border-radius: 8px;
    background: #2b8ab3;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: 0 1rem;
}

.lists-primary-btn {
    background: #ffd447;
    border-color: #ffd447;
    color: #101720;
}

.lists-small-btn.danger {
    background: #5c1f2b;
    border-color: #a94452;
    color: #ffd6df;
}

.lists-small-btn.primary {
    background: #ffd447;
    border-color: #ffd447;
    color: #101720;
}

.lists-back-btn {
    margin-bottom: 0.7rem;
    background: #1e2a3a;
}

.lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1rem;
}

.lists-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    border: 1px solid #2d3a4a;
    border-radius: 10px;
    background: #192433;
    overflow: hidden;
}

.lists-card-cover {
    min-height: 210px;
    display: grid;
    place-items: center;
    border: 0;
    background: #24344a;
    color: #fff;
    cursor: pointer;
    font-size: 2rem;
    font-weight: 900;
}

.lists-card-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.lists-card-body {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 0.65rem;
    padding: 1rem;
}

.lists-card-body h2 {
    margin: 0;
    color: #f0f8ff;
}

.lists-card-body p {
    margin: 0;
    color: #a8bdd2;
}

.lists-card-description {
    min-height: 2.6rem;
}

.lists-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
}

.lists-item-card {
    display: grid;
    gap: 0.5rem;
    border: 1px solid #2d3a4a;
    border-radius: 10px;
    background: #192433;
    padding: 0.75rem;
}

.lists-item-card img {
    width: 100%;
    aspect-ratio: 63 / 88;
    display: block;
    border-radius: 7px;
    background: #101720;
    cursor: pointer;
    object-fit: contain;
}

.lists-item-card strong {
    color: #f0f8ff;
}

.lists-item-card span,
.lists-muted {
    color: #a8bdd2;
    font-weight: 700;
}

.lists-binder-preview {
    border: 1px solid #3b1022;
    border-radius: 12px;
    background:
        radial-gradient(circle at 8% 50%, rgba(255,255,255,0.08), transparent 8%),
        linear-gradient(135deg, #3b0f20, #5b1a2f 45%, #2a0a17);
    padding: 1rem;
}

.lists-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.64);
    padding: 1rem;
}

.lists-modal-card {
    position: relative;
    width: min(860px, 100%);
    max-height: min(840px, calc(100vh - 2rem));
    overflow: auto;
    border: 1px solid #2d3a4a;
    border-radius: 12px;
    background: #1b2433;
    color: #f0f8ff;
    padding: 1.25rem;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.lists-modal-card h2 {
    margin: 0 3rem 1rem 0;
}

.lists-type-modal {
    display: grid;
    gap: 0.85rem;
}

.lists-type-choice {
    width: 100%;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    border: 1px solid #2d3a4a;
    border-radius: 10px;
    background: #111827;
    color: #dbe8f5;
    padding: 0.85rem;
    text-align: left;
    cursor: pointer;
}

.lists-type-choice:hover,
.lists-type-choice:focus-visible {
    border-color: #67c5f5;
    background: #192433;
    outline: none;
}

.lists-type-icon {
    width: 76px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #24344a;
    color: #ffd447;
    font-size: 2rem;
    font-weight: 900;
}

.lists-type-copy {
    min-width: 0;
    display: grid;
    gap: 0.25rem;
}

.lists-type-copy strong {
    color: #f0f8ff;
    font-size: 1.2rem;
}

.lists-type-copy em {
    color: #ffd447;
    font-style: normal;
    font-weight: 900;
}

.lists-type-copy small,
.lists-type-copy b {
    color: #a8bdd2;
    font-size: 0.9rem;
    line-height: 1.35;
}

.lists-modal-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: #24344a;
    color: #fff;
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 900;
}

.lists-modal-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.lists-modal-form label {
    display: grid;
    gap: 0.45rem;
    color: #dbe8f5;
    font-weight: 900;
}

.lists-modal-form input,
.lists-modal-form select,
.lists-modal-form textarea,
.lists-add-card-modal input {
    width: 100%;
    border: 1px solid #405166;
    border-radius: 8px;
    background: #101720;
    color: #fff;
    font: inherit;
    padding: 0.85rem;
    outline: none;
}

.lists-modal-form textarea {
    min-height: 150px;
    resize: vertical;
}

.lists-wide,
.lists-modal-actions,
.lists-modal-status {
    grid-column: 1 / -1;
}

.lists-modal-actions {
    justify-content: flex-end;
}

.lists-modal-actions button {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: #2b8ab3;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: 0 1rem;
}

.lists-modal-actions button.secondary {
    background: #33465c;
}

.lists-add-card-modal {
    display: grid;
    gap: 1rem;
}

.lists-card-search-results {
    display: grid;
    gap: 0.6rem;
}

.lists-card-search-result {
    width: 100%;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid #2d3a4a;
    border-radius: 8px;
    background: #111827;
    color: #dbe8f5;
    cursor: pointer;
    font: inherit;
    padding: 0.65rem;
    text-align: left;
}

.lists-card-search-result img {
    width: 56px;
    aspect-ratio: 63 / 88;
    object-fit: contain;
}

.lists-card-search-result span {
    min-width: 0;
    display: grid;
    gap: 0.25rem;
}

.lists-card-search-result strong,
.lists-card-search-result small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lists-card-search-result b {
    color: #67c5f5;
}

.hidden {
    display: none !important;
}

@media (max-width: 700px) {
    .cards-grid.lists-mode {
        padding: 0.7rem;
    }

    .lists-main {
        width: 100%;
    }

    .lists-header,
    .lists-detail-header {
        display: grid;
    }

    .lists-grid,
    .lists-modal-form {
        grid-template-columns: 1fr;
    }

    .lists-type-choice {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .lists-type-icon {
        width: 56px;
        font-size: 1.4rem;
    }

    .lists-card {
        grid-template-columns: 118px minmax(0, 1fr);
    }

    .lists-card-cover {
        min-height: 170px;
    }
}
