/* FTMU v188 — Community feed + interactions + softened vertical card patterns. */
[data-route="community"] { padding-bottom: 34px; }
[data-route="community"] .community-head {
  margin: 8px 0 16px;
  padding: 18px 18px 17px;
  border: 1px solid rgba(174, 76, 111, .18);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--bf-surface-elevated), var(--bf-surface-2));
  box-shadow: 0 8px 24px rgba(92,63,72,.06);
}
[data-route="community"] .community-kicker {
  display: block;
  margin-bottom: 2px;
  color: #9d365c;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
[data-route="community"] .community-head h1 { margin: 0; color: var(--ink); font-size: 1.45rem; }
[data-route="community"] .community-head p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
[data-route="community"] .community-feed-tabs,
[data-route="community"] .community-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
[data-route="community"] .community-feed-tabs::-webkit-scrollbar,
[data-route="community"] .community-filters::-webkit-scrollbar { display: none; }
[data-route="community"] .community-feed-tabs { margin-bottom: 10px; }
[data-route="community"] .community-filters { margin-bottom: 16px; }
[data-route="community"] .community-feed-tabs button,
[data-route="community"] .community-filters button {
  flex: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:var(--bf-surface);
  color: var(--muted);
  padding: 8px 12px;
  font: inherit;
  font-size: .74rem;
  cursor: pointer;
}
[data-route="community"] .community-feed-tabs button.on,
[data-route="community"] .community-filters button.on {
  border-color: rgba(157,54,92,.30);
  background: rgba(179,61,104,.08);
  color: #913451;
  font-weight: 700;
}
[data-route="community"] .community-state {
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 28px 24px;
  text-align: center;
  border: 1px dashed rgba(174,76,111,.25);
  border-radius: 20px;
  background:var(--bf-surface-translucent);
}
[data-route="community"] .community-state[hidden] { display: none; }
[data-route="community"] .community-state-heart { color: #b33d68; font-size: 1.25rem; }
[data-route="community"] .community-state h2 { margin: 0; color: var(--ink); font-size: 1rem; }
[data-route="community"] .community-state p { max-width: 460px; margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
[data-route="community"] .community-retry {
  margin-top: 7px;
  border: 1px solid rgba(157,54,92,.28);
  border-radius: 999px;
  background: rgba(179,61,104,.08);
  color: #913451;
  padding: 8px 14px;
  font: inherit;
  font-size: .74rem;
  font-weight: 700;
  cursor: pointer;
}
[data-route="community"] .community-feed { display: grid; gap: 12px; }
[data-route="community"] .community-card {
  position: relative;
  overflow: hidden;
  padding: 15px;
  border: 1px solid rgba(79, 146, 84, .28);
  border-radius: 20px;
  background:var(--bf-surface-translucent);
  box-shadow: 0 10px 28px rgba(54, 78, 54, .12);
}
[data-route="community"] .community-card--food {
  background-image: url("img/webp/sfondo-cibo.webp");
  background-size: 520px;
  background-position: center;
}
[data-route="community"] .community-card--music {
  background-image: url("img/webp/sfondo-music.webp");
  background-size: 520px;
  background-position: center;
}
[data-route="community"] .community-card--training {
  background-image: url("img/webp/sfondo-training.webp");
  background-size: 520px;
  background-position: center;
}
[data-route="community"] .community-card--food::before,
[data-route="community"] .community-card--music::before,
[data-route="community"] .community-card--training::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--bf-pattern-overlay);
  pointer-events: none;
}
[data-route="community"] .community-card > * { position: relative; z-index: 1; }
[data-route="community"] .community-author { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
[data-route="community"] .community-author-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  object-fit: cover;
  background:var(--bf-surface-2);
  color: #aa3d65;
  font-size: .82rem;
}
[data-route="community"] .community-author-avatar--fallback { border: 1px solid rgba(174,76,111,.15); }
[data-route="community"] .community-author-copy { min-width: 0; display: grid; gap: 1px; }
[data-route="community"] .community-author-copy strong { overflow: hidden; color: var(--ink); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
[data-route="community"] .community-author-copy span { color: var(--muted); font-size: .66rem; }
[data-route="community"] .community-card-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 12px;
  border-radius: 15px;
  object-fit: cover;
  background:var(--bf-surface-2);
}

[data-route="community"] .community-music-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 12px;
  overflow: hidden;
  border-radius: 15px;
  background: #111;
}
[data-route="community"] .community-music-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
[data-route="community"] .community-music-player--missing {
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.78);
  font-size: .72rem;
}
[data-route="community"] .community-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
[data-route="community"] .community-actions--music {
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid rgba(107,92,98,.10);
}
[data-route="community"] .community-action {
  min-width: 48px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid rgba(107,92,98,.16);
  border-radius: 999px;
  background:var(--bf-surface-translucent);
  color: var(--muted);
  font: inherit;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}
[data-route="community"] .community-action:hover { background: rgba(179,61,104,.055); }
[data-route="community"] .community-action:disabled { cursor: default; opacity: .78; }
[data-route="community"] .community-action.on {
  border-color: rgba(179,61,104,.24);
  background: rgba(179,61,104,.08);
  color: #9d365c;
}
[data-route="community"] .community-action-icon { font-size: 1rem; line-height: 1; }
[data-route="community"] .community-action-icon--share { font-size: .95rem; }

[data-route="community"] .community-card-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-bottom: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(179,61,104,.08);
  color: #913451;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
[data-route="community"] .community-card--food .community-card-badge { background: rgba(112,145,79,.10); color: #557237; }
[data-route="community"] .community-card--music .community-card-badge { background: rgba(95,88,150,.10); color: #5d568d; }
[data-route="community"] .community-card h2 { margin: 0; color: var(--ink); font-size: 1.02rem; line-height: 1.32; }
[data-route="community"] .community-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
[data-route="community"] .community-meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(73,64,68,.055);
  color: var(--muted);
  font-size: .66rem;
}
[data-route="community"] .community-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; }
[data-route="community"] .community-engagement { color: var(--muted); font-size: .68rem; }
[data-route="community"] .community-card-foot a {
  margin-left: auto;
  color: #923650;
  font-size: .7rem;
  font-weight: 700;
  text-decoration: none;
}
@media (min-width: 720px) {
  [data-route="community"] .community-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-route="community"] .community-state { min-height: 220px; }
}

[data-route="community"] .community-food-recipe {
  margin-top: 12px;
  border-top: 1px solid rgba(107,92,98,.10);
  padding-top: 10px;
}
[data-route="community"] .community-food-recipe > summary {
  cursor: pointer;
  color: #557237;
  font-size: .72rem;
  font-weight: 700;
}
[data-route="community"] .community-food-recipe ul {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
[data-route="community"] .community-food-recipe li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: .7rem;
}
[data-route="community"] .community-food-recipe li strong {
  flex: none;
  color: var(--muted);
  font-weight: 600;
}
[data-route="community"] .community-food-recipe-text {
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(112,145,79,.07);
}
[data-route="community"] .community-food-recipe-text strong { color: #557237; font-size: .68rem; }
[data-route="community"] .community-food-recipe-text p { margin: 4px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.5; white-space: pre-line; }

/* v185 — azioni di utilizzo del feed pubblico */
[data-route="community"] .community-action--save-music {
  min-width: 132px;
  justify-content: flex-start;
}
[data-route="community"] .community-action-count {
  margin-left: 1px;
  opacity: .72;
  font-weight: 600;
}
[data-route="community"] .community-plan-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(107,92,98,.10);
}
[data-route="community"] .community-plan-add select,
[data-route="community"] .community-plan-button {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(107,92,98,.16);
  border-radius: 11px;
  background:var(--bf-surface-translucent);
  color: var(--ink);
  font: inherit;
  font-size: .68rem;
}
[data-route="community"] .community-plan-add select { padding: 0 9px; }
[data-route="community"] .community-plan-button {
  grid-column: 1 / -1;
  border-color: rgba(77,135,73,.26);
  background: #4f9254;
  color:var(--bf-on-accent);
  font-weight: 700;
  cursor: pointer;
}
[data-route="community"] .community-plan-button:disabled {
  cursor: wait;
  opacity: .72;
}
[data-route="community"] .community-plan-status {
  grid-column: 1 / -1;
  min-height: 1em;
  color: var(--muted);
  font-size: .62rem;
  line-height: 1.3;
}

/* v190 — Training Community: acquisizione nella libreria personale */
[data-route="community"] .community-card--training .community-card-badge {
  background: rgba(79,146,84,.10);
  color: #4f7d52;
}
[data-route="community"] .community-training-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.5;
  white-space: pre-line;
}

/* v197 — Training versionato e genealogia Community. */
[data-route="community"] .community-training-publisher,
[data-route="community"] .community-training-provenance,
[data-route="community"] .community-training-update {
  margin: 7px 0 0; padding: 7px 9px; border-radius: 9px; font-size: .7rem; line-height: 1.4;
}
[data-route="community"] .community-training-publisher { display: flex; gap: 7px; align-items: baseline; background: rgba(79,146,84,.06); }
[data-route="community"] .community-training-publisher span { color: var(--muted); }
[data-route="community"] .community-training-provenance { color: var(--muted); border: 1px solid rgba(79,146,84,.16); }
[data-route="community"] .community-training-update { background:var(--bf-warn-soft); color: #765d16; border: 1px solid rgba(154,119,22,.18); font-weight: 600; }
[data-route="community"] .community-action--duplicate-training { padding-inline: 10px; }
