/* 观看历史 H5：对齐 Figma 375px 画板。 */
@media (max-width: 768px) {
  .history-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px 16px 20px;
  }

  .history-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    min-height: 30px;
  }

  .history-filters {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .history-filters::-webkit-scrollbar { display: none; }

  .history-filter {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: transparent;
    color: #a1a1aa;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    white-space: nowrap;
    cursor: pointer;
  }

  .history-filter.is-active {
    border-color: rgba(236, 35, 127, .3);
    background: rgba(236, 35, 127, .1);
    color: #ff4a7b;
  }

  .history-clear {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #a1a1aa;
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
    white-space: nowrap;
    cursor: pointer;
  }

  .history-clear img,
  .history-clear__desktop { display: none; }
  .history-clear__mobile { display: inline; }

  .history-group,
  .history-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
  }

  .history-group__title {
    margin: 0;
    color: #7c7c86;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
  }

  .history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
  }

  .history-item__cover {
    display: block;
    flex: 0 0 48px;
    width: 48px;
    height: 64px;
    overflow: hidden;
    border-radius: 6px;
    background: #141417;
  }

  .history-item__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .history-item__body {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    min-width: 0;
  }

  .history-item__title {
    display: block;
    align-self: stretch;
    overflow: hidden;
    margin: 0;
    color: #f2f2f4;
    font-size: 15px;
    font-weight: 600;
    line-height: 21px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .history-item__title a {
    color: inherit;
    text-decoration: none;
  }

  .history-item__details {
    display: block;
    align-self: stretch;
    overflow: hidden;
    color: #7c7c86;
    font-size: 11px;
    font-weight: 400;
    line-height: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .history-item__episodes,
  .history-item__mobile-time {
    display: inline;
  }

  .history-item__mobile-time::before {
    content: "  ";
    white-space: pre;
  }

  .history-item__genre,
  .history-item__time,
  .history-item__resume-desktop {
    display: none;
  }

  .history-item__progress {
    display: block;
    width: 140px;
    max-width: 100%;
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
  }

  .history-item__progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff4a7b 0%, #ec237f 52%, #93226f 100%);
  }

  .history-item__resume {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 0;
    height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    background: transparent;
    color: #f2f2f4;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-decoration: none;
    white-space: nowrap;
  }

  .history-item__resume svg,
  .history-item__resume img {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
  }

  .history-item__resume-mobile {
    display: inline;
  }

  .history-item__remove {
    display: inline-flex;
    flex: 0 0 14px;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #7c7c86;
    cursor: pointer;
  }

  .history-item__remove svg,
  .history-item__remove img {
    display: block;
    width: 14px;
    height: 14px;
  }

  .history-main .account-pagination {
    margin-top: 4px;
  }

  .history-empty,
  .history-main .account-empty {
    padding: 48px 0;
  }
}
