#sidebar-ch-list .sch-thumb {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

#sidebar-ch-list .sch-meta-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

#sidebar-ch-list.is-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    /* Size each row to its content. Without this the implicit
       rows default to `auto`, and WebKit/Chromium's auto
       row-sizing ignores the aspect-ratio thumbnail's height
       and collapses the cell to a thin strip. */
    grid-auto-rows: max-content;
    gap: 8px;
    padding: 10px;
    align-content: start;
}

#sidebar-ch-list.is-grid .sidebar-ch-row {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    overflow: hidden;
}

#sidebar-ch-list.is-grid .sidebar-ch-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

#sidebar-ch-list.is-grid .sch-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    border-radius: 0;
}

#sidebar-ch-list.is-grid .sch-info {
    padding: 8px 9px 9px;
}

#sidebar-ch-list.is-grid .sch-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Grid: badges float as a pill centred on the cover */
#sidebar-ch-list.is-grid .sch-meta {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    aspect-ratio: 3 / 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#sidebar-ch-list.is-grid .sch-meta-inner {
    gap: 6px;
    padding: 5px 5px;
    border-radius: 999px;
    background: rgb(17 17 19);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* Grid: the download button becomes a full-width card footer instead of
   the default small square — same treatment as #chapters-list.is-grid
   .mo-row-btn on the series page (see series-page.css). The card's own
   overflow:hidden + border-radius clips it into the bottom corners for
   free, so no border-radius is needed on the button itself. */
#sidebar-ch-list.is-grid .mo-row-btn {
    width: 100%;
    height: 34px;
    padding: 8px 0;
    border-radius: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

#sidebar-ch-list.is-grid .mo-row-btn:hover {
    background: rgba(255, 255, 255, 0.07);
}

/* Grid cards are too narrow for "20h ago · Sep 20, 2026" on one line —
   drop the absolute date and keep the row from wrapping/overflowing. */
#sidebar-ch-list.is-grid .sch-date-row {
    flex-wrap: nowrap;
    overflow: hidden;
}

#sidebar-ch-list.is-grid .sch-date-extra {
    display: none;
}
