.community-program-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 26px);
  margin-top: clamp(28px, 4vw, 48px);
}

.community-program-panels > .tr-program-guidance,
.community-gear-panel {
  max-width: none;
  margin: 0;
  padding: clamp(18px, 2.15vw, 32px);
  background: var(--theme-panel, #eef1f5);
  border-radius: 12px;
}

.community-gear-panel p,
.community-card-body p,
.community-notice,
.community-review p,
.community-records p,
.community-dialog p {
  color: var(--theme-muted, #586a75);
  line-height: 1.65;
}

.community-gear-panel h3,
.community-heading h2 { margin: 0; }
.community-gear-panel p { margin: 4px 0 14px; }
.community-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.community-heading .tr-text-link { white-space: nowrap; }
.community-gear-teasers { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.community-gear-teasers a { display: grid; align-content: start; gap: 8px; font-size: clamp(11px, 1.2vw, 14px); font-weight: 650; }
.community-gear-teasers img { aspect-ratio: 3 / 2; border-radius: 6px; object-position: center; }
.community-gear-panel .community-byline { margin: 18px 0 0; }

.community-page .page-head { margin-bottom: 4px; }
.community-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.community-card {
  overflow: hidden;
  min-width: 0;
  background: var(--theme-panel, #eef1f5);
  border: 1px solid var(--theme-border, #ccd3d6);
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.community-card > a { display: block; height: 100%; }
.community-card > a:focus-visible { outline-offset: -3px; }
.community-card img { aspect-ratio: 4 / 3; object-position: center 42%; }
.community-card-body { padding: clamp(15px, 2vw, 22px); }
.community-card-body h3 { margin: 5px 0; }
.community-card-body small { color: var(--theme-link, #244dd7); font-size: 12px; font-weight: 650; }
.community-card-body p { margin: 8px 0 0; font-size: 14px; }
.community-card-body h3 span { color: var(--theme-link, #244dd7); }
.community-card .community-byline,.community-gear-panel .community-byline { font-size: 13px; }
.community-notice { font-size: 13px; margin: 10px 0 18px; }
.community-showcase-bar,.community-post-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.community-post-actions { margin-top: 16px; }
.community-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.community-filters a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 10px; font-size: 14px; color: var(--theme-muted, #586a75); }
.community-filters [aria-current],.community-like[aria-pressed="true"] { color: var(--theme-link, #244dd7); font-weight: 700; }
.community-filters [aria-current] { border-bottom: 2px solid currentColor; }
.community-post-actions .btn { min-height: 44px; }
.community-post { display: flex; flex-direction: column; }
.community-post .community-card-body { flex: 1; display: flex; flex-direction: column; }
.community-post .community-post-actions { margin-top: auto; padding-top: 14px; }
.community-like {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--theme-text, #17354b);
  font-size: 14px;
  font-weight: 650;
}
.community-like-icon,.community-like-glyph { display: inline-block; line-height: 1; }
.community-like-icon { transition: transform 150ms ease-out; }
.community-like-count { min-inline-size: 2ch; text-align: end; font-variant-numeric: tabular-nums; }
@media (any-hover: hover) {
  .community-like:hover .community-like-icon { transform: scale(1.30); }
}
.community-author {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding-top: 10px;
  margin-top: 14px;
  border-top: 1px solid var(--theme-border, #ccd3d6);
  font-size: 13px;
  line-height: 1.35;
}
.community-author small { display: block; font-weight: 550; }
.community-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  height: 34px;
  border: 1px solid var(--theme-border, #ccd3d6);
  border-radius: 50%;
  color: var(--theme-link, #244dd7);
  font-weight: 750;
}
.community-author:hover strong { color: var(--theme-link, #244dd7); }
.community-delete summary { cursor: pointer; padding: 10px 6px; min-height: 44px; }

.community-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 4vw, 52px); align-items: start; }
.community-detail figure { margin: 0; }
.community-detail img { aspect-ratio: 5 / 4; border-radius: 12px; object-position: center; }
.community-review { background: var(--theme-panel, #eef1f5); border-radius: 12px; padding: clamp(18px, 2.6vw, 32px); }
.community-review h2 { margin: 8px 0; }
.community-review p { margin: 8px 0 18px; }
.community-review h2:not(:first-child) { margin-top: 22px; }
.community-review dl { margin-bottom: 0; }
.community-review dl div { border-top: 1px solid var(--theme-border, #ccd3d6); padding: 13px 0; }
.community-review dt { font-weight: 700; }
.community-review dd { margin: 5px 0 0; color: var(--theme-muted, #586a75); line-height: 1.65; }
.community-recommendations { margin-top: 18px; border-top: 1px solid var(--theme-border, #ccd3d6); }
.community-recommendations > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 46px;
  margin-top: 14px;
  padding: 8px 12px;
  color: var(--theme-link, #244dd7);
  border: 1px solid var(--theme-border, #ccd3d6);
  border-radius: 8px;
  font-weight: 750;
  cursor: pointer;
}
.community-recommendations > summary::-webkit-details-marker { display: none; }
.community-recommendations[open] > summary span { transform: rotate(180deg); }
.community-product-card {
  display: grid;
  grid-template-columns: minmax(72px, 2fr) minmax(0, 3fr);
  align-items: start;
  gap: clamp(10px, 1.6vw, 18px);
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--theme-border, #ccd3d6);
  border-radius: 10px;
  scroll-margin-block: 18px;
}
.community-product-card img { aspect-ratio: 1; border-radius: 7px; }
.community-product-card h3 { margin: 0; }
.community-product-card p { margin: 5px 0 8px; font-size: 14px; }
.community-product-card .btn { display: flex; width: fit-content; margin-top: 8px; min-height: 44px; }
.community-product-focus { border-color: var(--theme-link, #244dd7); }
.community-product-page .community-product-price { margin-top: 0; }
.community-product-price span { display: block; font-size: 13px; }
.community-product-price strong { color: var(--theme-text, #17354b); font-size: clamp(25px, 3vw, 34px); }
.community-record-heading { margin-top: 35px; }
.community-record-heading span { color: var(--theme-muted, #586a75); font-size: 13px; }
.community-records { padding: 0; margin: 0; list-style: none; }
.community-records li { display: grid; grid-template-columns: clamp(64px, 9vw, 108px) minmax(0, 1fr) auto; align-items: center; gap: clamp(10px, 2vw, 24px); border-top: 1px solid var(--theme-border, #ccd3d6); padding: 16px 0; }
.community-records p { margin: 4px 0 0; }
.community-records img { aspect-ratio: 1; border-radius: 8px; }
.community-records .community-author { width: fit-content; margin: 0; padding: 0; border: 0; }
.community-record-result { display: flex; align-items: center; gap: clamp(8px, 1.5vw, 20px); white-space: nowrap; }
.community-score { font-weight: 750; }

.community-dialog {
  max-width: min(510px, calc(100% - 28px));
  max-height: calc(100% - 32px);
  width: 100%;
  border: 1px solid var(--theme-border, #ccd3d6);
  border-radius: 12px;
  padding: clamp(18px, 4vw, 28px);
  background: var(--theme-panel, #eef1f5);
  color: var(--theme-text, #17354b);
}
.community-dialog::backdrop { background: rgb(0 0 0 / 60%); }
.community-editor { max-width: 570px; padding: clamp(18px, 3vw, 28px); border-radius: 12px; background: var(--theme-panel, #eef1f5); }
:is(.community-dialog,.community-editor) h2 { margin: 0; }
:is(.community-dialog,.community-editor) label { display: grid; gap: 6px; margin: 12px 0; font-weight: 650; }
[data-community-form] label[hidden] { display: none; }
:is(.community-dialog,.community-editor) :is(input:not([type="checkbox"]),select,textarea) { width: 100%; padding: 8px; border: 1px solid var(--theme-border, #ccd3d6); border-radius: 5px; color: inherit; background: var(--theme-page, #fff); font-size: 16px; }
.community-editor .community-checkbox { display: flex; align-items: center; }
.community-page [role="status"]:empty { display: none; }

@media (max-width: 800px) {
  .community-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 660px) {
  .community-program-panels,.community-detail { grid-template-columns: minmax(0, 1fr); }
  .tr-workout-nav > .tr-workout-tabs { gap: clamp(8px, 3vw, 18px); }
  .tr-workout-nav > .tr-workout-tabs a { font-size: clamp(11px, 3.4vw, 14px); }
}
@media (max-width: 580px) {
  .community-records li { grid-template-columns: 58px minmax(0, 1fr); column-gap: 12px; row-gap: 4px; align-items: start; }
  .community-record-result { grid-column: 2; }
  .community-records p { font-size: 13px; }
}
@media (max-width: 420px) {
  .community-grid { grid-template-columns: minmax(0, 1fr); }
}
