body[data-page="shortmax-browse"] {
  background: #141516;
  color: #fff;
  font: 400 16px/1.4 Montserrat, "PingFang SC", "Noto Sans SC", sans-serif;
}
.sm-browse {
  width: min(100%, 1920px);
  margin: 70px auto 0;
  padding: 20px 4vw 50px;
  background: #111218;
}
.sm-browse a { text-decoration: none; }
.sm-crumb { margin: 0 0 20px; color: rgba(255, 255, 255, .6); font-size: 14px; line-height: 18px; }
.sm-crumb a { color: rgba(255, 255, 255, .75); }
.sm-crumb [aria-current] { color: #fff; }
.sm-genres, .sm-pills { display: flex; flex-wrap: wrap; }
.sm-genres { gap: 12px 40px; margin: 0 0 20px; }
.sm-genres a {
  position: relative;
  flex: none;
  height: 24px;
  padding: 0 0 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  text-align: center;
}
.sm-genres a[aria-current] { color: #f6610f; font-size: 16px; font-weight: 600; }
.sm-genres a[aria-current]::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 16px;
  height: 4px;
  border-radius: 100px;
  background: #f6610f;
  transform: translateX(-50%);
}
.sm-tag-block { margin: 0; }
.sm-pills { gap: 12px; overflow: hidden; }
.sm-pills.is-open { max-height: none !important; }
.sm-pills a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 5px 16px;
  border: 0;
  border-radius: 100px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .6);
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
}
.sm-pills a[aria-current] {
  border: 1px solid rgba(246, 97, 15, .4);
  border-radius: 24px;
  background: rgba(246, 97, 15, .1);
  color: #f6610f;
  font-weight: 600;
}
.sm-tag-more {
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 12px auto 0;
  padding: 3px 16px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 100px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font: 400 16px/normal "PingFang SC", "Noto Sans SC", sans-serif;
  cursor: pointer;
}
.sm-tag-more:not([hidden]) { display: flex; }
.sm-tag-more::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(45deg) translateY(-2px);
}
.sm-tag-more.is-open::after { transform: rotate(225deg) translateY(-1px); }
.sm-browse h1 { margin: 20px 0; color: #fff; font-size: 20px; font-weight: 600; line-height: 26px; }
.sm-browse-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 20px;
}
.sm-browse-grid .sm-card { width: auto; min-width: 0; height: 340px; }
.sm-empty { margin: 24px 0 40px; color: #cccdd4; text-align: center; }
.sm-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 50px 0 20px;
}
.sm-pages > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .88);
  font-size: 14px;
  font-weight: 500;
  line-height: 32px;
}
.sm-pages [aria-current] { background: #f6610f; color: #fff; font-weight: 700; }
.sm-pages .disabled { background: rgba(255, 255, 255, .05); opacity: .4; }
.sm-pages .gap { min-width: 32px; background: transparent; color: rgba(255, 255, 255, .6); }
@media (max-width: 1590px) {
  .sm-browse-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 1380px) {
  .sm-browse-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .sm-browse-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .sm-browse-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1781px) {
  .sm-browse { padding-inline: 110px; }
}

/* H5 inner only. Narrow desktop stays on the rules above; parent sets data-sm-device. */
body[data-sm-device="mobile"] .sm-browse {
  margin-top: 0;
  padding: 20px 16px 60px;
}
body[data-sm-device="mobile"] .sm-genres {
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
  min-height: 36px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
body[data-sm-device="mobile"] .sm-genres::-webkit-scrollbar { display: none; }
body[data-sm-device="mobile"] .sm-genres a,
body[data-sm-device="mobile"] .sm-genres a[aria-current] {
  height: 23px;
  font-size: 12px;
  white-space: nowrap;
}
body[data-sm-device="mobile"] .sm-genres a[aria-current]::after { bottom: 0; width: 10px; }
body[data-sm-device="mobile"] .sm-pills { min-height: 0; }
body[data-sm-device="mobile"] .sm-pills a,
body[data-sm-device="mobile"] .sm-pills a[aria-current] {
  height: 28px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}
body[data-sm-device="mobile"] .sm-pills a { color: #fff; opacity: .8; }
body[data-sm-device="mobile"] .sm-pills a[aria-current] { color: #f6610f; opacity: 1; }
body[data-sm-device="mobile"] .sm-tag-more { min-height: 28px; padding: 4px 12px; font-size: 12px; }
body[data-sm-device="mobile"] .sm-browse h1 { margin: 0; font-size: 14px; font-weight: 600; line-height: 18px; }
body[data-sm-device="mobile"] .sm-browse-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
body[data-sm-device="mobile"] .sm-browse-grid .sm-card { height: 211px; }
body[data-sm-device="mobile"] .sm-browse-grid .sm-card-face {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 211px;
  padding-bottom: 16px;
  overflow: hidden;
  border-radius: 12px;
  background: transparent;
}
body[data-sm-device="mobile"] .sm-browse-grid .sm-poster { flex: none; height: 168px; }
body[data-sm-device="mobile"] .sm-browse-grid .sm-card-title {
  flex: none;
  align-self: stretch;
  height: 36px;
  margin-top: 0;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}
body[data-sm-device="mobile"] .sm-browse-grid .sm-hover { display: none; }
body[data-sm-device="mobile"] .sm-pages { margin: 20px 0; }
