/* 艾宾浩斯词表 · 手机端全宽 + 紧凑字号（≤720px；平板走 ebbinghaus-tablet.css） */
@media (max-width: 720px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* 右侧默认只露出「第一遍 + 1h」，其余日期列横滑查看 */
  .eh-scroll {
    --eh-view-w: 100vw;
  }

  .eh-paper-body .eh-table {
    --eh-col-idx-w: 1.5rem;
    --eh-col-word-w: 5.2rem;
    --eh-col-ipa-w: 5.4rem;
    --eh-gap: 0.22rem;
    --eh-date-col: 2.75rem;
    --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: 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-wrap {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .course-brand--compact {
    margin: 0 !important;
    padding: 0.45rem 0.5rem 0.35rem !important;
    font-size: clamp(1.05rem, 4.8vw, 1.35rem) !important;
  }

  .eh-site-head {
    margin: 0 !important;
    padding: 0.35rem 0.5rem !important;
  }

  .eh-page-head {
    margin: 0 0 0.45rem !important;
    padding: 0 0.5rem !important;
  }

  .eh-page-head h1 {
    font-size: 1.12rem;
    letter-spacing: 0.03em;
  }

  .eh-tabs-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0 0 0.45rem !important;
    padding: 0 0.35rem !important;
    gap: 0.28rem !important;
  }

  .eh-tabs {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(3.1rem, 1fr));
    gap: 0.24rem !important;
    width: 100%;
  }

  .eh-tab {
    font-size: 0.62rem;
    padding: 0.28rem 0.18rem;
    border-radius: 6px;
    line-height: 1.2;
    min-height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .eh-tab--print {
    width: 100%;
    font-size: 0.62rem;
    padding: 0.28rem 0.5rem;
  }

  .eh-notebook {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .eh-notebook-hdr {
    margin: 0 !important;
    padding: 0.45rem 0.5rem 0.55rem !important;
    font-size: 0.72rem;
  }

  .eh-panel,
  .eh-panel.is-active,
  .eh-word-panel,
  .eh-table-card,
  .eh-table-card.eh-paper-sheet,
  .eh-paper-layout,
  .eh-paper-main {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .eh-table-card.eh-paper-sheet {
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .eh-paper-toolbar-strip {
    display: none;
  }

  .eh-toolbar.eh-paper-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100% !important;
    margin: 0 !important;
    padding: 0.32rem 0.38rem 0.36rem !important;
    border-radius: 0 !important;
    gap: 0.28rem !important;
  }

  .eh-toolbar.eh-paper-toolbar .eh-toolbar-title {
    margin: 0;
    align-self: flex-start;
  }

  .eh-toolbar.eh-paper-toolbar .eh-toolbar-title__text {
    font-size: 0.68rem !important;
    padding: 0.14rem 0.42rem !important;
    transform: none;
    letter-spacing: 0.04em;
  }

  .eh-toolbar.eh-paper-toolbar .eh-toolbar-pills {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.22rem;
    width: 100%;
    flex: none;
    justify-content: stretch;
    align-items: stretch;
  }

  .eh-toolbar.eh-paper-toolbar .eh-accent-wrap {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    align-items: center;
    gap: 0.2rem;
    margin: 0;
    padding: 0.12rem 0.24rem;
  }

  .eh-toolbar.eh-paper-toolbar .eh-accent-label {
    font-size: 0.54rem;
    white-space: nowrap;
  }

  .eh-toolbar.eh-paper-toolbar .eh-pill-wrap {
    display: contents;
  }

  .eh-toolbar.eh-paper-toolbar .eh-pill {
    font-size: 0.54rem !important;
    padding: 0.16rem 0.22rem !important;
    border-radius: 6px !important;
    line-height: 1.15;
    min-height: 1.55rem;
    width: 100%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }

  .eh-toolbar.eh-paper-toolbar .eh-accent-btn {
    min-width: 0 !important;
    padding: 0.16rem 0.2rem !important;
    font-size: 0.54rem !important;
    transform: none !important;
  }

  .eh-toolbar.eh-paper-toolbar .eh-accent-btn.is-on {
    transform: none !important;
  }

  .eh-toolbar.eh-paper-toolbar .eh-batch-trigger-label {
    font-size: inherit;
  }

  .eh-table-card__body.eh-paper-body {
    width: 100% !important;
    padding: 0.32rem 0 0.45rem 0 !important;
  }

  .eh-paper-body::after {
    left: 1.15rem;
  }

  .eh-scroll {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-padding-left: 0;
  }

  .eh-scroll::after {
    content: "← 滑动查看更多复习日期 →";
    display: block;
    padding: 0.28rem 0.5rem 0.12rem;
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: center;
    color: rgba(92, 107, 61, 0.72);
  }

  .eh-table,
  .eh-paper-body .eh-table {
    width: var(--eh-table-w) !important;
    min-width: var(--eh-table-w) !important;
    max-width: none !important;
    table-layout: fixed !important;
    font-size: 0.74rem;
  }

  /* 左侧序/单词/音标/词义固定，复习日期列横滑 */
  .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;
  }

  .eh-paper-body .eh-table th.eh-col-mean,
  .eh-paper-body .eh-table td.eh-col-mean {
    position: sticky;
    z-index: 4;
    box-shadow: 4px 0 10px -4px rgba(44, 36, 32, 0.14);
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.42;
    vertical-align: top !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);
  }

  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: 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.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;
  }

  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 {
    left: var(--eh-sticky-left);
    width: var(--eh-mean-w) !important;
    min-width: var(--eh-mean-w) !important;
    max-width: var(--eh-mean-w) !important;
  }

  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: 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 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 tbody tr:nth-child(odd) td.eh-col-ipa {
    background: #fff;
  }

  body:not(.eh-hide-ipa) .eh-paper-body .eh-table tbody tr:nth-child(even) td.eh-col-ipa {
    background: var(--eh-row-alt, #e8f0e7);
  }

  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 {
    left: var(--eh-sticky-left);
    width: var(--eh-mean-w) !important;
    min-width: var(--eh-mean-w) !important;
    max-width: var(--eh-mean-w) !important;
  }

  .eh-paper-body .eh-table th,
  .eh-paper-body .eh-table td {
    padding: 0.32rem 0.2rem;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word;
    vertical-align: middle;
  }

  .eh-paper-body .eh-table thead th {
    white-space: nowrap !important;
    font-size: 0.66rem;
  }

  .eh-paper-body .eh-table thead .eh-thead-banner {
    padding: 0.32rem 0.28rem;
    font-size: 0.64rem;
    white-space: nowrap !important;
  }

  .eh-paper-body .eh-table thead .eh-subhead-row th {
    font-size: 0.56rem;
    padding: 0.2rem 0.06rem;
    white-space: nowrap !important;
  }

  .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 {
    width: var(--eh-date-col) !important;
    min-width: var(--eh-date-col) !important;
    max-width: var(--eh-date-col) !important;
    padding: 0.2rem 0.06rem !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);
  }

  .eh-paper-body .eh-table tbody td.eh-col-rev {
    padding: 0.24rem 0.06rem !important;
  }

  .eh-paper-body .eh-rev-date-field {
    max-width: 100%;
  }

  .eh-paper-body .eh-rev-date-display {
    font-size: 0.52rem !important;
    min-height: 1.2rem !important;
    padding: 0.08rem 0.06rem !important;
    white-space: nowrap !important;
  }

  .eh-col-idx {
    font-size: 0.64rem;
  }

  .eh-col-ipa {
    font-size: 0.6rem !important;
    line-height: 1.32 !important;
  }

  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;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    line-height: 1.32;
  }

  .eh-col-ipa .eh-pron-btns {
    display: none !important;
  }

  .eh-col-word {
    font-size: 0.72rem;
    min-width: 0 !important;
    vertical-align: top !important;
  }

  .eh-col-mean {
    font-size: 0.68rem;
    line-height: 1.42;
    white-space: normal !important;
    min-width: 0 !important;
  }

  .eh-paper-body .eh-table .eh-check {
    width: 1.2rem !important;
    height: 1.2rem !important;
    font-size: 0.72rem !important;
    margin-inline: auto;
    border-color: rgba(90, 110, 88, 0.42) !important;
    background: rgba(255, 255, 255, 0.72) !important;
  }

  .eh-table .eh-w-speak,
  .eh-w-speak {
    font-size: 0.68rem;
  }

  .eh-word-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.1rem 0.18rem;
    white-space: normal;
  }

  .eh-word-head .eh-w-speak {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }

  .eh-mastery-wrap {
    flex: 0 0 auto;
  }

  /* 与电脑端同款实色胶囊，仅略缩小字号 */
  .eh-mastery-status {
    font-size: 0.62rem !important;
    max-width: 4.8rem !important;
    padding: 0.12rem 0.42rem !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;
  }

  .eh-mx-input {
    font-size: 0.66rem;
    min-width: 3.75rem;
    padding: 0.16rem 0.28rem;
  }

  .eh-mx-badge {
    font-size: 0.56rem;
    padding: 0.12rem 0.36rem;
  }

  .eh-sheet-foot {
    padding: 0.45rem 0.5rem 0.55rem !important;
    font-size: 0.64rem;
  }

  .eh-notebook-ft {
    padding: 0.65rem 0.5rem 0.85rem !important;
    margin: 0 !important;
  }

  body.eh-hide-ipa .eh-col-ipa {
    display: none !important;
  }
}
