.library-browse {
  margin: 20px 0 0;
  padding: 0;
}
.browse-primary, .browse-secondary, .browse-location {
  display: flex;
  align-items: center;
  min-width: 0;
}
.browse-primary { justify-content: space-between; margin-bottom: 6px; }
.browse-secondary { justify-content: space-between; min-height: 44px; }
.browse-location { flex-wrap: wrap; }
.library-browse .section-tabs, .library-browse .tv-tabs {
  display: flex;
  flex: 0 0 auto;
  margin: 0 20px 0 0;
  padding: 0;
  gap: 0;
}
.library-browse .section-tabs button, .library-browse .tv-tabs button {
  min-width: 0;
  min-height: 46px;
  margin: 0 22px 0 0;
  padding: 6px 0;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #aaa;
  font-size: 24px;
  font-weight: 700;
  line-height: 30px;
  box-shadow: none;
}
.library-browse .section-tabs button:last-child, .library-browse .tv-tabs button:last-child { margin-right: 0; }
.library-browse .section-tabs button.is-active, .library-browse .tv-tabs button.is-active {
  color: #fff;
  border-bottom-color: #ec0014;
}
.library-browse .section-tabs button:hover, .library-browse .tv-tabs button:hover { color: #fff; }
.library-browse .section-tabs button:focus-visible {
  outline: 2px solid #ec0014;
  outline-offset: 3px;
  background: #291416;
}
.library-browse-tv .tv-tabs button:focus {
  outline: 0;
  box-shadow: none;
  background: transparent;
}
.browse-search {
  display: flex;
  align-items: center;
  flex: 0 1 340px;
  min-width: 0;
  height: 42px;
  border: 1px solid #434343;
  border-radius: 6px;
  background: #111;
}
.browse-search > svg { margin-left: 12px; flex: 0 0 19px; }
.browse-search svg { width: 19px; height: 19px; fill: none; stroke: #bbb; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.browse-search input {
  width: 100%; min-width: 0; height: 100%; padding: 8px 10px;
  border: 0; border-radius: 6px; outline: 0; background: transparent; color: #fff; font: inherit; font-size: 15px;
  -webkit-appearance: none; appearance: none;
}
.browse-search input:focus { box-shadow: inset 0 -2px #ec0014; }
.browse-search input::-webkit-search-cancel-button { display: none; }
.browse-search button {
  display: flex; align-items: center; justify-content: center; flex: 0 0 40px;
  width: 40px; height: 40px; padding: 8px; border: 0; border-radius: 5px; background: transparent; color: #fff;
}
.browse-search button:hover, .browse-search button:focus { outline: 0; background: #301416; box-shadow: inset 0 0 0 1px #ec0014; }
.library-browse .movie-views {
  display: flex; flex-wrap: nowrap; margin: 0 12px 0 0; padding: 3px;
  border: 1px solid #3d3d3d; border-radius: 999px; background: #111;
}
.library-browse .movie-views button {
  flex: 1 1 auto; min-height: 36px; margin: 0; padding: 5px 12px;
  border: 1px solid transparent; border-radius: 999px; background: transparent; color: #aaa; font-size: 15px;
  white-space: nowrap;
}
.library-browse .movie-views button[aria-pressed="true"] { background: #363636; border-color: #555; color: #fff; }
.library-browse .movie-views button:hover, .library-browse .movie-views button:focus { border-color: #ec0014; color: #fff; outline: 0; }
.library-browse [data-browse-title] { margin: 0 12px 0 0; color: #f2f2f2; font-size: 17px; line-height: 24px; }
.browse-count { color: #aaa; font-size: 14px; white-space: nowrap; }
.movie-views .browse-count { margin-left: 6px; font-weight: 400; }
.library-browse .library-tools, .tv-library .library-browse .library-tools { margin: 0 0 0 16px; flex: 0 0 auto; }
.library-browse .library-tool-buttons { flex-wrap: nowrap; }
.library-browse .library-tool-buttons > button { margin: 0 0 0 8px; }
.library-browse .library-tool-button { min-height: 40px; padding: 8px 11px; background: transparent; border-color: transparent; }
.library-browse .library-tool-button:hover, .library-browse .library-tool-button:focus { background: #252525; border-color: #ec0014; }
.library-browse .library-tool-button[data-active="true"] { background: #211416; }
.library-sort-value { margin-left: 7px; color: #aaa; font-size: 13px; font-weight: 400; }
.library-applied { display: flex; align-items: center; flex-wrap: wrap; margin: 6px 0 0; }
.library-applied-list { display: contents; }
.library-applied .library-filter-chip { display: inline-flex; max-width: 100%; min-height: 34px; margin: 0 8px 6px 0; padding: 5px 9px; border: 1px solid #454545; background: #1b1b1b; font-size: 13px; }
.library-filter-chip svg { order: 1; width: 14px; height: 14px; flex-basis: 14px; margin-left: 8px; }
.library-filter-chip svg + span { margin-left: 0; overflow-wrap: break-word; }
.library-applied .library-clear { font-size: 13px; color: #aaa; }
.library-browse .breadcrumb { padding: 0; margin: 0 12px 0 0; font-size: 18px; }
.library-browse .folder-heading, .library-browse .folder-heading p { margin: 0; padding: 0; font-size: 14px; }
.library-browse .tv-library-meta { min-height: 0; margin: 0; }
.library-browse .tv-library-meta > div { display: flex; align-items: center; flex-wrap: wrap; }
.library-browse .tv-library-meta h1 { font-size: 21px; margin: 0 14px 0 0; }
.library-browse .tv-library-meta p { margin: 0; font-size: 16px; }
.library-browse ~ .library-grid { padding-top: 14px; }
.library-browse ~ .library-rows { padding-top: 14px; }
.library-browse ~ .tv-grid { margin-top: 0; padding-top: 14px; }
.library-browse ~ .tv-status:empty { display: none; }
.library-browse [hidden] { display: none !important; }
.search-kind {
  position: absolute; top: 8px; left: 8px; z-index: 2; max-width: calc(100% - 58px);
  padding: 4px 7px; border-radius: 4px; background: rgba(0,0,0,.85); color: #fff;
  font: 600 12px/18px Arial, sans-serif; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
}
.library-browse-tv .browse-primary { margin-bottom: 8px; }
.library-browse-tv .tv-tabs button { min-height: 52px; font-size: 28px; margin-right: 28px; }
.library-browse-tv .browse-search { height: 48px; flex-basis: 420px; }
.library-browse-tv .browse-search input { font-size: 19px; }
.library-browse-tv .browse-search button { height: 46px; flex-basis: 46px; }
.library-browse-tv .movie-views button { min-height: 44px; font-size: 19px; padding: 7px 14px; }
.library-browse-tv .browse-count, .library-browse-tv .library-sort-value { font-size: 17px; }
.library-browse-tv [data-browse-title] { font-size: 23px; }
.library-browse-tv .library-tool-button { min-height: 48px; font-size: 19px; }
.library-browse-tv .library-applied-list { display: flex; flex-wrap: wrap; }
.library-browse-tv .library-filter-chip { min-height: 44px; font-size: 17px; }
.library-browse-tv .library-clear { font-size: 17px; }
.tv-card .search-kind { font-size: 16px; line-height: 22px; }
@media (max-width: 720px) {
  .library-browse { padding-top: 10px; margin-top: 14px; }
  .library-browse .section-tabs { margin-right: 14px; }
  .library-browse .section-tabs button { font-size: 20px; margin-right: 16px; min-height: 44px; }
  .browse-search { flex-basis: 240px; height: 44px; }
  .browse-search input { font-size: 16px; padding-left: 7px; }
  .browse-search > svg { margin-left: 8px; flex-basis: 16px; width: 16px; }
  .browse-search button { flex-basis: 32px; width: 32px; }
  .library-browse .library-tools { margin-left: 4px; }
  .library-browse .library-tool-buttons > button { width: 44px; min-height: 44px; padding: 10px; margin-left: 2px; position: relative; }
  .library-tool-buttons .library-tool-label, .library-tool-buttons .library-sort-value { display: none; }
  .library-tool-buttons .library-filter-count { position: absolute; top: 0; right: 0; margin: 0; min-width: 16px; padding: 0 3px; border-radius: 8px; background: #e60012; font-size: 11px; line-height: 16px; }
  .library-browse .movie-views { margin-right: 6px; }
  .library-browse .movie-views button { min-height: 36px; padding: 5px 7px; font-size: 14px; margin-right: 0; }
  .browse-count { font-size: 12px; }
  .library-browse ~ .library-grid { padding-top: 12px; }
  .library-applied { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
  .library-applied-list { display: flex; flex: 0 0 auto; }
  .library-applied .library-filter-chip { flex: 0 0 auto; min-height: 40px; }
  .library-applied .library-clear { flex: 0 0 auto; white-space: nowrap; }
}
@media (max-width: 360px) {
  .library-browse .movie-views { margin-right: 0; }
  .library-browse .movie-views button { padding-left: 5px; padding-right: 5px; }
  .movie-views .browse-count { margin-left: 4px; }
  .library-browse .library-tool-buttons > button { width: 40px; margin-left: 0; padding: 8px; }
}

.library-browse .browse-primary { margin-bottom: 8px; }
.library-browse .section-tabs, .library-browse .tv-tabs { flex: 1 1 0%; min-width: 0; margin-right: 24px; }
.library-browse .section-tabs button, .library-browse .tv-tabs button {
  position: relative; flex: 1 1 0%; min-width: 0; height: 54px; min-height: 54px;
  margin: 0 14px 0 0; padding: 7px 12px 7px 28px;
  border-bottom: 2px solid transparent; color: #999; text-align: left;
  font-size: 24px; line-height: 28px; white-space: normal;
}
.library-browse .section-tabs button::before, .library-browse .tv-tabs button::before {
  content: ""; position: absolute; left: 24px; bottom: -2px; height: 42px;
  border-left: 2px solid #414141; transform: skewX(30deg); transform-origin: bottom left;
  pointer-events: none;
}
.library-browse .section-tabs button::after, .library-browse .tv-tabs button::after {
  content: ""; position: absolute; left: 24px; right: 0; bottom: -2px; height: 2px;
  background: #414141; pointer-events: none;
}
.library-browse .section-tabs button.is-active, .library-browse .tv-tabs button.is-active,
.library-browse .section-tabs button:hover, .library-browse .tv-tabs button:hover,
.library-browse-tv .tv-tabs button:focus { color: #fff; border-bottom-color: transparent; }
.library-browse .section-tabs button.is-active::before, .library-browse .tv-tabs button.is-active::before,
.library-browse .section-tabs button:hover::before, .library-browse .tv-tabs button:hover::before,
.library-browse-tv .tv-tabs button:focus::before { border-left-color: #ec0014; }
.library-browse .section-tabs button.is-active::after, .library-browse .tv-tabs button.is-active::after,
.library-browse .section-tabs button:hover::after, .library-browse .tv-tabs button:hover::after,
.library-browse-tv .tv-tabs button:focus::after { background: #ec0014; }
.library-browse .browse-secondary { min-height: 48px; }
.library-browse .browse-location { flex: 1 1 0%; }
.library-browse-tv .browse-secondary { min-height: 56px; }
.library-browse-tv .tv-tabs button { height: 60px; min-height: 60px; font-size: 28px; }
.library-browse-tv .tv-tabs button::before { height: 48px; left: 28px; }
.library-browse-tv .tv-tabs button::after { left: 28px; }
.browse-search-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: 0 0 44px; margin: 0; padding: 10px;
  border: 1px solid transparent; border-radius: 4px; background: transparent; color: #b7b7b7;
}
.browse-search-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.browse-search-toggle:hover, .browse-search-toggle:focus, .browse-search-toggle.is-active { border-color: #ec0014; outline: 0; color: #fff; background: #201315; }
.library-browse-tv .browse-search-toggle { width: 52px; height: 52px; flex-basis: 52px; }
.library-search-dialog { width: 560px; max-width: calc(100% - 32px); padding: 20px; border-radius: 8px; }
.library-search-dialog header { padding: 0 0 14px; margin-bottom: 18px; }
.library-search-dialog .browse-search { width: 100%; height: 52px; flex: 0 0 52px; }
.library-search-dialog .browse-search input { font-size: 18px; }
.library-search-dialog .browse-search button { height: 48px; width: 48px; flex-basis: 48px; }
.library-search-tv .library-search-dialog { width: 740px; padding: 28px; }
.library-search-tv .browse-search { height: 64px; flex-basis: 64px; }
.library-search-tv .browse-search input { font-size: 24px; }
.library-search-tv .browse-search button { height: 60px; flex-basis: 60px; }
.library-search-overlay [hidden] { display: none !important; }
.library-browse.is-searching .browse-location { flex-wrap: nowrap; }
.library-browse.is-searching [data-browse-title] { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.library-browse.is-searching .browse-count { flex: 0 0 auto; }
.continue-rows { position: relative; }
.continue-rows .shelf-header { position: absolute; right: 0; top: -42px; margin: 0; }
.tv-library .continue-rows .shelf-header { top: -49px; }
/* Reserve space for hover lift and shadow without moving the tile row. */
.continue-rows .shelf-track { padding-top: 4px; margin-top: -4px; }
.continue-rows .shelf-header h2 { display: none; }
.continue-rows .library-shelf { margin-top: 0; }
.library-browse ~ .continue-rows { padding-top: 14px; }
.library-grid.search-results { display: block; }
.search-group { margin: 0 0 28px; }
.search-group > h2 { margin: 0 0 14px; font-size: 22px; line-height: 28px; color: #f2f2f2; }
.search-group > h2 > span { margin-left: 10px; font: 400 14px/24px Arial, sans-serif; color: #aaa; }
.search-group-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0; }
.tv-grid.search-results .search-group-grid { display: block; font-size: 0; }
.tv-grid.search-results .search-group > h2 { font-size: 28px; line-height: 36px; }
.tv-grid.search-results .search-group > h2 > span { font-size: 18px; }
@media (max-width: 720px) {
  .library-browse { margin-top: 14px; padding-top: 0; }
  .library-browse .section-tabs { margin-right: 8px; }
  .library-browse .section-tabs button { height: 52px; min-height: 52px; margin-right: 6px; padding: 4px 4px 4px 16px; font-size: 17px; line-height: 20px; }
  .library-browse .section-tabs button:first-child { flex-grow: 1.55; }
  .library-browse .section-tabs button::before { left: 20px; height: 34px; }
  .library-browse .section-tabs button::after { left: 20px; }
  .library-browse .browse-secondary { min-height: 48px; }
  .browse-primary > .browse-search-toggle { width: 40px; flex-basis: 40px; padding: 8px; }
  .library-search-dialog { padding: 16px; }
  .library-search-overlay { align-items: flex-start; padding-top: 64px; }
  .library-search-dialog .browse-search input { font-size: 16px; }
  .library-browse.is-searching .browse-location { flex-wrap: wrap; }
  .library-browse.is-searching [data-browse-title] { max-width: 100%; font-size: 15px; line-height: 22px; }
  .search-group > h2 { font-size: 19px; margin-bottom: 12px; }
  .library-browse ~ .continue-rows { padding-top: 12px; }
}
@media (max-height: 500px) {
  .library-search-overlay { align-items: flex-start; padding-top: 12px; }
}
