#activity_feed {
  box-sizing: border-box;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 28px 40px;
  color: var(--ui-text);

  .activity_header {
    margin-bottom: 22px;

    h2 { margin: 0; font: 30px/1.2 'Acme'; }
    p { margin: 6px 0 0; color: var(--ui-muted); font: 15px/1.5 system-ui, sans-serif; }
  }

  > .empty_state { margin-inline: 0; }
}

.activities {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;

  .activity {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: var(--list-avatar-size) minmax(0, 1fr);
    height: var(--list-row-height);
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow);
  }

  .activity_visual {
    position: relative;
    width: var(--list-avatar-size);
    height: var(--list-avatar-size);

    .avatar {
      border-radius: 10px;
    }

  }

  .activity_icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: var(--list-avatar-size);
    height: var(--list-avatar-size);
    border: 1px solid #e8ce87;
    border-radius: 10px;
    background: #fff5d5;
    color: #94600d;
    font-size: 22px;

    &.activity_bingo { border-color: #efb6a8; background: #fff1e9; color: #b64d2a; }
    &.activity_board { border-color: #a6d9ed; background: #ecfaff; color: #1674a1; }
    &.activity_mode { border-color: #cbb8eb; background: #f6f0ff; color: #7950ac; }
    &.activity_invitation { border-color: #a9d8be; background: #effcf4; color: #287949; }
  }

  .activity_body { min-width: 0; }

  .activity_meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 6px 10px;
  }

  .username {
    min-width: 0;
    margin: 0;
    font: 16px/1.3 'Acme';
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .created_at {
    flex: none;
    margin-left: auto;
    color: var(--ui-muted);
    font: 12px/1.4 system-ui, sans-serif;
  }

  .content {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: 4px;
    color: #526171;
    font: 13px/18px system-ui, sans-serif;
    overflow-wrap: anywhere;
  }

  a {
    color: var(--ui-focus);
    text-decoration: underline;
    text-underline-offset: 3px;

    &:hover { color: #104d6d; }
    &:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 3px; border-radius: 2px; }
  }

  .activity_unread {
    border-color: #9fcce2;
    background: #f2f9fd;
    box-shadow: inset 3px 0 0 #238cb9;
  }

  .activity_unread_badge {
    padding: 3px 7px;
    border-radius: 999px;
    background: #dceff9;
    color: #176b96;
    font: 12px/1.2 system-ui, sans-serif;
    font-weight: 600;
  }
}

@media (max-width: 600px) {
  #activity_feed { padding: 22px 14px 32px; }
  .activities {
    .activity { padding: 8px; gap: 8px; }
  }
}
