/* Ekklevia Alpha51 — genuine narrow-screen dashboard layout.
   The portal homepage is usually / with NO ?view=dashboard parameter.
   CSS is scoped to the dashboard and the cultes list; none of the editors,
   concert/chord layouts, calendar or administrative screens are affected. */
@media screen and (max-width: 900px) {
  .fcp-portal:is([data-fcp-view="dashboard"],[data-fcp-view="services"]) .fcp-shell {
    width: calc(100% - 24px);
    max-width: 100%;
    min-width: 0;
    margin-inline: auto;
  }
  .fcp-portal[data-fcp-view="dashboard"] :is(.fcp-front-hero,.fcp-panel-front,.fcp-stat-grid,.fcp-stat-grid article),
  .fcp-portal:is([data-fcp-view="dashboard"],[data-fcp-view="services"]) :is(.fcp-service-list,.fcp-service-card,.fcp-service-main,.fcp-service-actions) {
    min-width: 0;
    max-width: 100%;
  }
  .fcp-portal[data-fcp-view="dashboard"] .fcp-front-hero {
    gap: 16px;
  }
  .fcp-portal[data-fcp-view="dashboard"] .fcp-front-hero > div:first-child {
    min-width: 0;
  }
  .fcp-portal[data-fcp-view="dashboard"] .fcp-stat-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
  }
  .fcp-portal[data-fcp-view="dashboard"] .fcp-stat-grid article {
    padding: 16px;
  }
  .fcp-portal[data-fcp-view="dashboard"] .fcp-stat-grid article:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .fcp-portal:is([data-fcp-view="dashboard"],[data-fcp-view="services"]) .fcp-service-card {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 13px;
  }
  .fcp-portal:is([data-fcp-view="dashboard"],[data-fcp-view="services"]) .fcp-date-tile {
    width: 56px;
    height: 56px;
  }
  .fcp-portal:is([data-fcp-view="dashboard"],[data-fcp-view="services"]) .fcp-service-main :is(h3,p) {
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .fcp-portal:is([data-fcp-view="dashboard"],[data-fcp-view="services"]) .fcp-service-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
    padding: 0 !important;
    gap: 8px;
  }
  .fcp-portal:is([data-fcp-view="dashboard"],[data-fcp-view="services"]) .fcp-service-actions > :is(.fcp-button,.fcp-inline-form) {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
  }
  .fcp-portal:is([data-fcp-view="dashboard"],[data-fcp-view="services"]) .fcp-service-actions .fcp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    padding: 10px 6px;
    margin: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    line-height: 1.3;
    font-size: 12px;
  }
  .fcp-portal[data-fcp-view="dashboard"] .fcp-actions-row > .fcp-button {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }
}
@media screen and (max-width: 600px) {
  .fcp-portal[data-fcp-view="dashboard"] .fcp-front-hero {
    padding: 22px 18px;
  }
  .fcp-portal[data-fcp-view="dashboard"] .fcp-front-hero h1 {
    font-size: clamp(25px, 7vw, 33px);
    line-height: 1.13;
  }
  .fcp-portal[data-fcp-view="dashboard"] .fcp-actions-row {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 8px;
  }
  .fcp-portal[data-fcp-view="dashboard"] .fcp-actions-row .fcp-button {
    width: 100%;
  }
  .fcp-portal[data-fcp-view="dashboard"] .fcp-stat-grid article strong {
    font-size: 25px;
  }
  .fcp-portal:is([data-fcp-view="dashboard"],[data-fcp-view="services"]) .fcp-service-actions {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
  .fcp-portal:is([data-fcp-view="dashboard"],[data-fcp-view="services"]) .fcp-service-actions .fcp-button {
    min-height: 42px;
  }
  .fcp-portal[data-fcp-view="dashboard"] .fcp-panel-head-front {
    flex-wrap: wrap;
    gap: 8px;
  }
}
@media screen and (max-width: 349px) {
  .fcp-portal[data-fcp-view="dashboard"] .fcp-stat-grid {
    grid-template-columns: minmax(0,1fr);
  }
  .fcp-portal[data-fcp-view="dashboard"] .fcp-stat-grid article:last-child:nth-child(odd) {
    grid-column: auto;
  }
  .fcp-portal:is([data-fcp-view="dashboard"],[data-fcp-view="services"]) .fcp-service-card {
    grid-template-columns: 48px minmax(0,1fr);
    gap: 9px;
    padding: 10px;
  }
  .fcp-portal:is([data-fcp-view="dashboard"],[data-fcp-view="services"]) .fcp-date-tile {
    width: 48px;
    height: 48px;
  }
}
