.tv-mode .layout-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
}

/* Cancel the global grow-on-focus effect: in a grid it shifts the neighbouring cards, which makes
   the spatial navigation targets move under the user. Same treatment as Library - see the longer
   explanation there for why the width is restated rather than set to `initial`.
   Two widths are needed here: the season grid uses portrait cards, the episode views landscape ones.

   :focus and :focus-visible are kept in separate rules throughout: an unsupported pseudo-class in a
   comma-separated list invalidates the whole list, so mixing them would drop the :focus styling on
   Chromium 53 - which is the only one that matters on the TV. */
.poster-grid .poster-card:focus {
    outline: 0px none var(--brand-color);
    outline-offset: -3px;
    transform: none;
    width: 180px;
}

.poster-grid .poster-card:focus-visible {
    outline: 0px none var(--brand-color);
    outline-offset: -3px;
    transform: none;
    width: 180px;
}

.thumb-grid .poster-card:focus,
.poster-row.thumb-row .poster-card:focus {
    outline: 0px none var(--brand-color);
    outline-offset: -3px;
    transform: none;
    width: 320px;
}

.thumb-grid .poster-card:focus-visible,
.poster-row.thumb-row .poster-card:focus-visible {
    outline: 0px none var(--brand-color);
    outline-offset: -3px;
    transform: none;
    width: 320px;
}

/* As in Library: the global focus border would change the wrapper's content width, and with it the
   padding-derived height, shifting neighbours. */
.poster-grid .poster-card:focus .poster-card-image-wrapper,
.thumb-grid .poster-card:focus .poster-card-image-wrapper,
.poster-row.thumb-row .poster-card:focus .poster-card-image-wrapper {
    border: 0;
    width: auto;
}

.poster-grid .poster-card:focus-visible .poster-card-image-wrapper,
.thumb-grid .poster-card:focus-visible .poster-card-image-wrapper,
.poster-row.thumb-row .poster-card:focus-visible .poster-card-image-wrapper {
    border: 0;
    width: auto;
}
