.aly-card {
  --aly-orange: #c44f26;
  --aly-orange-soft: rgba(196, 79, 38, 0.08);
  --aly-text: #1a1a1a;
  --aly-muted: #595959;
  --aly-chip-border: #e8e8e8;
  --aly-chip-bg: #fafafa;
  --aly-shadow:
    rgba(0, 0, 0, 0.2) 0px 3px 3px -2px,
    rgba(0, 0, 0, 0.14) 0px 3px 4px 0px,
    rgba(0, 0, 0, 0.12) 0px 1px 8px 0px;
  --aly-shadow-hover:
    rgba(0, 0, 0, 0.22) 0px 6px 10px -2px,
    rgba(0, 0, 0, 0.16) 0px 4px 8px 0px,
    rgba(0, 0, 0, 0.14) 0px 2px 12px 0px;

  box-sizing: border-box;
  width: 100%;
  min-height: 280px;
  margin: 0;
  padding: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--aly-shadow);
  overflow: hidden;
  font-family: "DM Sans", Helvetica, Arial, sans-serif;
  transition:
    box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.aly-card *,
.aly-card *::before,
.aly-card *::after {
  box-sizing: border-box;
}

.aly-card:hover {
  box-shadow: var(--aly-shadow-hover);
  transform: translateY(-2px);
}

.aly-card__layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: inherit;
}

.aly-card__left {
  --aly-left-gap: 1.25rem;
  --aly-copy-gap: 0.75rem;

  flex: 3 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--aly-left-gap);
  padding: 1.75rem 1.5rem 1.5rem;
}

.aly-card__section {
  display: flex;
  flex-direction: column;
  flex: none;
  min-height: auto;
}

.aly-card__section--middle {
  gap: var(--aly-copy-gap);
}

.aly-card__right {
  position: relative;
  flex: 2 1 0;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.aly-card__right--widget {
  align-items: stretch;
  justify-content: flex-start;
  overflow: visible;
  background:
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("/public/background.jpg") center center / cover no-repeat;
}

.aly-card__right--portrait {
  overflow: hidden;
}

.aly-card__right-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    #faf7f2 0%,
    #f5ebe3 50%,
    rgba(232, 149, 109, 0.25) 100%
  );
  pointer-events: none;
}

.aly-card__portrait {
  position: relative;
  z-index: 1;
  max-width: 85%;
  max-height: 240px;
  width: auto;
  height: auto;
  margin: 0 1rem 0 0;
  object-fit: contain;
  object-position: bottom right;
  border-radius: 16px;
  display: block;
}

.aly-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.aly-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(196, 79, 38, 0.25);
  background: var(--aly-orange-soft);
  color: var(--aly-orange);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.aly-card__status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #2e7d32;
}

.aly-card__status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.aly-card__status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #22c55e;
  animation: aly-pulse 1.8s ease-out infinite;
  opacity: 0.55;
}

@keyframes aly-pulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  70% {
    transform: scale(2.2);
    opacity: 0;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.aly-card__title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  line-height: 1.25;
  color: var(--aly-text);
}

.aly-card__desc {
  margin: 0;
  max-width: 36rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--aly-muted);
}

.aly-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aly-card__chip {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--aly-chip-border);
  background: var(--aly-chip-bg);
  font-size: 0.75rem;
  font-weight: 500;
  color: #333;
  transition:
    background 200ms ease,
    border-color 200ms ease;
}

.aly-card__chip:hover {
  border-color: rgba(196, 79, 38, 0.35);
  background: var(--aly-orange-soft);
}

@media (min-width: 768px) {
  .aly-card {
    min-height: 300px;
  }

  .aly-card__layout {
    flex-direction: row;
  }

  .aly-card__left {
    --aly-left-gap: 1.5rem;
    --aly-copy-gap: 0.875rem;

    min-height: inherit;
    gap: var(--aly-left-gap);
    padding: 2.25rem 1.5rem 2rem 2.5rem;
  }

  .aly-card__section {
    flex: 1 1 0;
    min-height: 0;
  }

  .aly-card__section--top {
    justify-content: flex-start;
  }

  .aly-card__section--middle {
    justify-content: center;
  }

  .aly-card__section--bottom {
    justify-content: flex-end;
  }

  .aly-card__right--widget {
    min-height: 0;
    align-self: stretch;
    overflow: hidden;
  }

  .aly-widget {
    --aly-avatar-min-height: 240px;
    --aly-actions-height: 200px;

    height: 100%;
    min-height: 100%;
    justify-content: flex-end;
  }

  .aly-widget__avatar {
    flex: 1 1 0;
    width: 100%;
    height: auto;
    min-height: var(--aly-avatar-min-height);
    max-height: none;
    object-fit: contain;
    object-position: center bottom;
  }

  .aly-widget__frame {
    flex: 0 0 var(--aly-actions-height);
    height: var(--aly-actions-height);
    min-height: var(--aly-actions-height);
  }

  .aly-card__right--portrait {
    min-height: 220px;
    align-self: stretch;
  }

  .aly-card__portrait {
    max-height: 100%;
    margin-right: 1.5rem;
  }
}
