/* Optional mobile article layout; enqueued only on supported article indexes. */
.mobileMeta { display: none; }

@media (max-width: 640px) {
  .mobilePostList .postStream.blogP {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    --mobileThumb: clamp(96px, 29vw, 120px);
  }

  .mobilePostList .postStream > article.p.articleCard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--mobileThumb);
    align-items: center;
    gap: 15px;
    width: 100%;
    min-width: 0;
    min-height: 112px;
    margin: 0;
    padding: 15px 0;
    border: 0;
    border-bottom: var(--contentBd-line) solid var(--themeBd-color);
    border-radius: 0;
    background: var(--contentBg);
    color: var(--contentC);
    box-shadow: none;
    transform: none;
    overflow: visible;
  }

  .mobilePostList .postStream > article.p.articleCard:last-child {
    border-bottom: 0;
  }

  .mobilePostList .postStream > article.p.articleCard > .pI {
    grid-column: 2;
    grid-row: 1;
    width: var(--mobileThumb);
    min-width: 0;
    max-width: none;
    height: 82px;
    margin: 0;
    aspect-ratio: auto;
    border-radius: var(--contentBd-radius);
    background: var(--contentBg-alt);
    overflow: hidden;
  }

  .mobilePostList .postStream > article.p.articleCard .pI a.thumbnail {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
  }

  .mobilePostList .postStream > article.p.articleCard .pI img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none;
  }


  /* Horizontal desktop cards use centered image transforms. Explicit hover
     overrides prevent those transforms and elevation leaking into this row. */
  .mobilePostList .postStream.blogP > article.p.articleCard:hover {
    box-shadow: none;
    transform: none;
  }
  .mobilePostList .postStream.blogP > article.p.articleCard:hover .pI img,
  .mobilePostList .postStream.blogP > article.p.articleCard .pI a.thumbnail:hover img {
    transform: none;
  }

  /* Touch browsers may retain :hover after a tap. Keep that state neutral,
     and enable the theme's link hover feedback only for mouse pointers. */
  .mobilePostList .postStream.blogP > article.p.articleCard .pT .name a,
  .mobilePostList .postStream.blogP > article.p.articleCard .pT .name a:hover {
    color: inherit;
    text-decoration: none;
    filter: none;
  }
  .mobilePostList .postStream.blogP > article.p.articleCard .pI a.thumbnail:hover {
    filter: none;
  }
  @media (hover: hover) and (pointer: fine) {
    .mobilePostList .postStream.blogP > article.p.articleCard .pT .name a:hover {
      color: var(--themeLink);
      text-decoration: underline;
    }
  }
  .mobilePostList .postStream.blogP > article.p.articleCard .pT .name a:active {
    color: var(--themeLink);
    text-decoration: none;
  }

  .mobilePostList .postStream > article.p.articleCard > .pC {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    min-height: 82px;
    padding: 0;
  }

  .mobilePostList .postStream > article.p.articleCard .pT .name {
    margin: 0;
    font-family: var(--fontBody-alt);
    font-size: var(--postTitle-fontItemsPhone);
    font-weight: var(--postTitle-fontWg);
    line-height: 1.4;
  }

  .mobilePostList .postStream > article.p.articleCard .pT a.clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    overflow-wrap: anywhere;
  }

  .mobilePostList .postStream > article.p.articleCard .pH.info,
  .mobilePostList .postStream > article.p.articleCard .pS,
  .mobilePostList .postStream > article.p.articleCard .pF.items {
    display: none !important;
  }

  .mobilePostList .postStream > article.p.articleCard .mobileMeta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: .8rem;
    line-height: 1.5;
    color: var(--themeC-alt);
  }

  .mobilePostList .postStream > article.p.articleCard .mobileMeta time { flex-shrink: 0; }
  .mobilePostList .postStream > article.p.articleCard .mobileMeta .metaDot { opacity: .4; }
  .mobilePostList .postStream > article.p.articleCard .mobileMeta .mobileCategory {
    display: block;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: inherit;
  }

  /* Keep the original bookmark input and its storage handler. */
  .mobilePostList .postStream > article.p.articleCard .pI .bar {
    inset: 0 0 auto auto;
    padding: 0;
    justify-content: flex-end;
  }
  .mobilePostList .postStream > article.p.articleCard .pI .tag.addl {
    margin: 0;
    padding: 0;
    background: transparent;
    color: var(--themeC);
    border-radius: 0;
    box-shadow: none;
  }
  .mobilePostList .postStream > article.p.articleCard .pI .tag.addl { position: relative; }
  /* Native checkbox remains focusable and uses the existing change handler. */
  .mobilePostList .postStream > article.p.articleCard .pI .addb {
    display: block;
    position: absolute;
    inset: 0;
    width: 40px;
    height: 40px;
    margin: 0;
    opacity: 0;
    z-index: 3;
    cursor: pointer;
  }
  .mobilePostList .postStream > article.p.articleCard .pI .addb:focus-visible ~ label {
    outline: 2px solid var(--themeLink);
    outline-offset: -2px;
  }
  .mobilePostList .postStream > article.p.articleCard .pI .addl label {
    position: relative;
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    cursor: pointer;
  }
  /* A small round surface inside the full touch target, without the legacy
     tag padding or hover text widening the thumbnail overlay. */
  .mobilePostList .postStream > article.p.articleCard .pI .addl label::before {
    content: none;
    display: none;
  }
  .mobilePostList .postStream > article.p.articleCard .pI .addl label::after {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid var(--themeBd-color);
    border-radius: 50%;
    background: var(--contentBg);
  }
  .mobilePostList .postStream > article.p.articleCard .pI .addl label svg {
    position: relative;
    z-index: 1;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }
  .mobilePostList .postStream > article.p.articleCard .pI .addb:checked ~ label {
    color: var(--themeLink);
  }
  .mobilePostList .postStream > article.p.articleCard a:focus-visible,
  .mobilePostList .postStream > article.p.articleCard .addl label:focus-visible {
    outline: 2px solid var(--themeLink);
    outline-offset: 2px;
  }

  .mobilePostList .postStream > article.p.articleCard.noThumb {
    grid-template-columns: minmax(0, 1fr);
  }
  .mobilePostList .postStream > article.p.articleCard.noThumb > .pI { display: none; }
  .mobilePostList .postStream > article.p.articleCard.noThumb > .pC { min-height: 64px; }

  /* Desktop grid/list controls have no effect on the mobile override. */
  .mobilePostList #main-widget > .Blog > .blogT .view-switcher { display: none; }
}
