/* 艾宾浩斯词表 · 平板端（721–1180px）：单词/音标/词义固定，日期列横滑（默认见第一遍+1h） */
@media (min-width: 721px) and (max-width: 1180px) {
  .eh-scroll {
    --eh-view-w: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    padding-right: 0 !important;
  }

  .eh-scroll::after {
    content: "← 滑动查看更多复习日期 →";
    display: block;
    padding: 0.32rem 0.65rem 0.18rem;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: center;
    color: rgba(92, 107, 61, 0.72);
  }

  .eh-paper-body .eh-table {
    --eh-col-idx-w: 2.1rem;
    --eh-col-word-w: 8.5rem;
    --eh-col-ipa-w: 6.25rem;
    --eh-gap: 0.28rem;
    --eh-date-col: 3.15rem;
    --eh-date-peek: calc(2 * var(--eh-date-col));
    --eh-sticky-left: calc(var(--eh-col-idx-w) + var(--eh-col-word-w));
    --eh-mean-w: max(7.5rem, calc(var(--eh-view-w) - var(--eh-sticky-left) - var(--eh-date-peek) - var(--eh-gap)));
    --eh-table-w: calc(var(--eh-sticky-left) + var(--eh-mean-w) + 6 * var(--eh-date-col));
    width: var(--eh-table-w) !important;
    min-width: var(--eh-table-w) !important;
    max-width: none !important;
    table-layout: fixed !important;
  }

  body.eh-hide-ipa .eh-paper-body .eh-table {
    --eh-sticky-left: calc(var(--eh-col-idx-w) + var(--eh-col-word-w));
    --eh-mean-w: max(8rem, calc(var(--eh-view-w) - var(--eh-sticky-left) - var(--eh-date-peek) - var(--eh-gap)));
    --eh-table-w: calc(var(--eh-sticky-left) + var(--eh-mean-w) + 6 * var(--eh-date-col));
  }

  body:not(.eh-hide-ipa) .eh-paper-body .eh-table {
    --eh-sticky-left: calc(var(--eh-col-idx-w) + var(--eh-col-word-w) + var(--eh-col-ipa-w));
    --eh-mean-w: max(7rem, calc(var(--eh-view-w) - var(--eh-sticky-left) - var(--eh-date-peek) - var(--eh-gap)));
    --eh-table-w: calc(var(--eh-sticky-left) + var(--eh-mean-w) + 6 * var(--eh-date-col));
  }

  .eh-paper-body .eh-table th.eh-col-idx,
  .eh-paper-body .eh-table td.eh-col-idx {
    position: sticky;
    left: 0;
    z-index: 4;
    width: var(--eh-col-idx-w) !important;
    min-width: var(--eh-col-idx-w) !important;
    max-width: var(--eh-col-idx-w) !important;
  }

  .eh-paper-body .eh-table th.eh-col-word,
  .eh-paper-body .eh-table td.eh-col-word {
    position: sticky;
    left: var(--eh-col-idx-w);
    z-index: 4;
    width: var(--eh-col-word-w) !important;
    min-width: var(--eh-col-word-w) !important;
    max-width: var(--eh-col-word-w) !important;
    vertical-align: top !important;
    overflow: visible !important;
    padding-right: 0.45rem !important;
  }

  body.eh-hide-ipa .eh-paper-body .eh-table th.eh-col-mean,
  body.eh-hide-ipa .eh-paper-body .eh-table td.eh-col-mean {
    position: sticky;
    left: var(--eh-sticky-left);
    z-index: 4;
    width: var(--eh-mean-w) !important;
    min-width: var(--eh-mean-w) !important;
    max-width: var(--eh-mean-w) !important;
    box-shadow: 4px 0 10px -4px rgba(44, 36, 32, 0.12);
    vertical-align: top !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  body:not(.eh-hide-ipa) .eh-paper-body .eh-table th.eh-col-ipa,
  body:not(.eh-hide-ipa) .eh-paper-body .eh-table td.eh-col-ipa {
    position: sticky;
    left: calc(var(--eh-col-idx-w) + var(--eh-col-word-w));
    z-index: 4;
    width: var(--eh-col-ipa-w) !important;
    min-width: var(--eh-col-ipa-w) !important;
    max-width: var(--eh-col-ipa-w) !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    vertical-align: top !important;
  }

  body:not(.eh-hide-ipa) .eh-paper-body .eh-table th.eh-col-mean,
  body:not(.eh-hide-ipa) .eh-paper-body .eh-table td.eh-col-mean {
    position: sticky;
    left: var(--eh-sticky-left);
    z-index: 4;
    width: var(--eh-mean-w) !important;
    min-width: var(--eh-mean-w) !important;
    max-width: var(--eh-mean-w) !important;
    box-shadow: 4px 0 10px -4px rgba(44, 36, 32, 0.12);
    vertical-align: top !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  body.eh-hide-ipa .eh-paper-body .eh-table th.eh-col-ipa,
  body.eh-hide-ipa .eh-paper-body .eh-table td.eh-col-ipa {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
  }

  .eh-paper-body .eh-table thead th.eh-col-idx,
  .eh-paper-body .eh-table thead th.eh-col-word,
  .eh-paper-body .eh-table thead th.eh-col-mean,
  .eh-paper-body .eh-table thead th.eh-col-ipa {
    z-index: 6;
    background: var(--eh-table-head, #5c6b3d);
    color: #f5f3ea;
  }

  .eh-paper-body .eh-table tbody tr:nth-child(odd) td.eh-col-idx,
  .eh-paper-body .eh-table tbody tr:nth-child(odd) td.eh-col-word,
  .eh-paper-body .eh-table tbody tr:nth-child(odd) td.eh-col-mean,
  .eh-paper-body .eh-table tbody tr:nth-child(odd) td.eh-col-ipa {
    background: #fff;
  }

  .eh-paper-body .eh-table tbody tr:nth-child(even) td.eh-col-idx,
  .eh-paper-body .eh-table tbody tr:nth-child(even) td.eh-col-word,
  .eh-paper-body .eh-table tbody tr:nth-child(even) td.eh-col-mean,
  .eh-paper-body .eh-table tbody tr:nth-child(even) td.eh-col-ipa {
    background: var(--eh-row-alt, #e8f0e7);
  }

  .eh-paper-body .eh-table thead .eh-rev-date-row td,
  .eh-paper-body .eh-table thead .eh-subhead-row th,
  .eh-paper-body .eh-table .eh-col-rev,
  .eh-paper-body .eh-table tbody td:nth-child(n + 5):nth-child(-n + 10) {
    width: var(--eh-date-col) !important;
    min-width: var(--eh-date-col) !important;
    max-width: var(--eh-date-col) !important;
    padding: 0.24rem 0.1rem !important;
    box-sizing: border-box;
    text-align: center;
  }

  .eh-paper-body .eh-table .eh-col-rev:first-child,
  .eh-paper-body .eh-table thead .eh-rev-date-row td:first-child,
  .eh-paper-body .eh-table thead .eh-subhead-row th:first-child {
    border-left: 1px solid rgba(90, 110, 88, 0.14);
    box-shadow: -3px 0 8px -4px rgba(44, 36, 32, 0.1);
  }

  body:not(.eh-hide-ipa) .eh-col-ipa .eh-ipa-row,
  body:not(.eh-hide-ipa) .eh-col-ipa .eh-i-text {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    line-height: 1.35 !important;
  }

  body.eh-mode-mx .eh-col-word {
    width: var(--eh-col-word-w) !important;
    min-width: var(--eh-col-word-w) !important;
    max-width: var(--eh-col-word-w) !important;
  }

  /* 单词独占一行，标记/默写在下一行，避免遮挡 */
  .eh-word-head {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 0.22rem !important;
    white-space: normal !important;
    max-width: 100% !important;
  }

  .eh-word-head .eh-w-speak,
  .eh-word-head .eh-w-text {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    position: relative !important;
    z-index: 1 !important;
  }

  .eh-word-head .eh-mx-write {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .eh-mastery-wrap {
    flex: 0 0 auto !important;
    position: relative !important;
    z-index: 2 !important;
    max-width: 100% !important;
    margin-top: 0.04rem;
  }

  /* 与电脑端同款实色胶囊 */
  .eh-mastery-status {
    max-width: 5.4rem !important;
    font-size: 0.68rem !important;
    padding: 0.14rem 0.48rem !important;
    line-height: 1.35 !important;
    opacity: 1 !important;
  }

  .eh-mastery-status--unmarked {
    background: #e8ebe4 !important;
    color: #5f675c !important;
    border-color: #c5cbbf !important;
  }

  .eh-mastery-status--known {
    background: #f2e8d0 !important;
    color: #6b5834 !important;
    border-color: #d4c08a !important;
  }

  .eh-mastery-status--fuzzy {
    background: #dfe6ee !important;
    color: #4a5a68 !important;
    border-color: #b4c0cc !important;
  }

  .eh-mastery-status--forgot {
    background: #f0dede !important;
    color: #7a454a !important;
    border-color: #d4a8ac !important;
  }

  body.eh-mode-mx .eh-mx-input {
    min-width: 8rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}
