/* Extra information is mobile-only; the theme's original desktop cards remain intact. */
.ct-related-posts-items .urc-meta,
.ct-related-posts-items .urc-excerpt,
.ct-related-posts-items .urc-bottom { display: none; }

@media (max-width: 700px) {
  .single-post .ct-related-posts-items {
    --urc-surface: #fff;
    --urc-text: #22242b;
    --urc-muted: #656c79;
    --urc-line: #e5e6eb;
    --urc-accent: #5147ea;
    gap: 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }
  html[data-u-theme="dark"] .single-post .ct-related-posts-items {
    --urc-surface: #1c1e23; --urc-text: #eff0f4; --urc-muted: #9299a8; --urc-line: #303239; --urc-accent: #8b82ff;
  }
  .single-post .ct-related-posts-items > article {
    display: flex !important;
    flex-direction: column;
    min-width: 0;
    padding: 12px !important;
    border: 1px solid var(--urc-line) !important;
    border-radius: 17px !important;
    background: var(--urc-surface) !important;
    box-shadow: 0 1px 3px rgba(22, 24, 42, .025);
    color: var(--urc-text);
  }
  .single-post .ct-related-posts-items > article > a.ct-image-container,
  .single-post .ct-related-posts-items > article > a.urp-cover {
    order: 0;
    aspect-ratio: 1.8 !important;
    margin: 0 !important;
    border-radius: 13px;
  }
  .single-post .ct-related-posts-items > article > .urc-meta {
    order: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    margin: 15px 3px 0;
    color: var(--urc-muted);
    font-size: 12px;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
  }
  .single-post .ct-related-posts-items .urc-avatar {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    flex: 0 0 29px;
    width: 29px;
    height: 29px;
    padding-bottom: 3px;
    border-radius: 9px;
    background: #eeeafb;
    color: #6d52de;
    font-size: 20px;
    line-height: 1;
    font-weight: 850;
  }
  .single-post .ct-related-posts-items .urc-category { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--urc-text); font-weight: 650; }
  .single-post .ct-related-posts-items > article > .related-entry-title {
    order: 2;
    display: block !important;
    overflow: visible;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    margin: 15px 3px 8px !important;
    padding: 0 !important;
    color: var(--urc-text);
    font-size: 18px !important;
    line-height: 1.25 !important;
    font-weight: 720 !important;
    letter-spacing: -.025em;
  }
  .single-post .ct-related-posts-items .related-entry-title a { color: var(--urc-text) !important; text-decoration: none; border: 0; }
  .single-post .ct-related-posts-items > article > ul.entry-meta { display: none !important; }
  .single-post .ct-related-posts-items > article > .urc-excerpt {
    order: 3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 3px 20px;
    color: var(--urc-muted);
    font-size: 14px;
    line-height: 1.5;
  }
  .single-post .ct-related-posts-items > article > .urc-bottom {
    order: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: auto 3px 1px;
    padding-top: 13px;
    border-top: 1px solid var(--urc-line);
    color: var(--urc-muted);
    font-size: 12px;
    line-height: 1.45;
  }
  .single-post .ct-related-posts-items .urc-read,
  .single-post .ct-related-posts-items .urc-views { display: inline-flex; align-items: center; gap: 5px; }
  .single-post .ct-related-posts-items .urc-read { color: inherit; text-decoration: none; border: 0; }
  .single-post .ct-related-posts-items .urc-read:hover { color: var(--urc-accent); }
  .single-post .ct-related-posts-items .urc-views { font-variant-numeric: tabular-nums; }
  .single-post .ct-related-posts-items .urc-read svg,
  .single-post .ct-related-posts-items .urc-views svg { display: block; width: 16px; height: 16px; flex: none; }
}
@media (max-width: 700px) and (prefers-color-scheme: dark) {
  html:not([data-u-theme="light"]) .single-post .ct-related-posts-items {
    --urc-surface: #1c1e23; --urc-text: #eff0f4; --urc-muted: #9299a8; --urc-line: #303239; --urc-accent: #8b82ff;
  }
}

/* Match the homepage's mobile background and horizontal gutter. */
@media (max-width: 700px) {
  body.single-post { --urc-page-bg: #f1f2f6; --urc-widget-bg: #fff; --urc-pill-bg: #f1f2f6; }
  html[data-u-theme="dark"] body.single-post { --urc-page-bg: #101114; --urc-widget-bg: #1c1e23; --urc-pill-bg: #292b31; }
  html[data-u-theme] body.single-post,
  html:not([data-u-theme]) body.single-post,
  html body.single-post #main-container,
  html body.single-post #main,
  html body.single-post .ct-related-posts-container { background: var(--urc-page-bg) !important; }
  html body.single-post #main > .ct-container,
  html body.single-post .ct-related-posts-container > .ct-container {
    width: calc(100% - 28px) !important;
    max-width: none !important;
  }
  html body.single-post .ct-sidebar .widget_categories { background: var(--urc-widget-bg) !important; }
  html body.single-post .ct-sidebar .widget_categories li:not(:hover):not(:focus-within) { background: var(--urc-pill-bg); }
}
@media (max-width: 700px) and (prefers-color-scheme: dark) {
  html:not([data-u-theme="light"]) body.single-post { --urc-page-bg: #101114; --urc-widget-bg: #1c1e23; --urc-pill-bg: #292b31; }
}


/* UPROGER mobile related count 2026-11-11 */
@media (max-width: 700px) {
  .single-post .ct-related-posts-items > article:nth-of-type(n + 6) {
    display: none !important;
  }
}
/* END UPROGER mobile related count */


/* UPROGER mobile related top padding 2026-11-11 */
@media (max-width: 700px) {
  .single-post .ct-related-posts-container .ct-related-posts .ct-related-posts-items > article {
    padding-top: 12px !important;
  }
}
/* END UPROGER mobile related top padding */
